From 347589d10d0435f3cc61d0456bc6f38ec0d54b9f Mon Sep 17 00:00:00 2001 From: Thomas Turner Date: Wed, 8 Jul 2026 16:41:49 +0100 Subject: [PATCH] board: Add support for Samsung Galaxy A21s Signed-off-by: Thomas Turner --- board/Kconfig | 7 +++++++ board/Makefile | 1 + board/samsung/board-a21s.c | 37 +++++++++++++++++++++++++++++++++++++ configs/a21s_defconfig | 5 +++++ 4 files changed, 50 insertions(+) create mode 100644 board/samsung/board-a21s.c create mode 100644 configs/a21s_defconfig diff --git a/board/Kconfig b/board/Kconfig index 8fac310..c510289 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -138,6 +138,13 @@ menu "Device Support" help Say Y if you want to include support for Samsung Galaxy A12 Nacho + config SAMSUNG_A21S + bool "Support for Samsung Galaxy A21S" + default n + depends on EXYNOS_3830 + help + Say Y if you want to include support for Samsung Galaxy A21S + config SAMSUNG_A30 bool "Support for Samsung Galaxy A30" default n diff --git a/board/Makefile b/board/Makefile index 75e2184..00768c2 100644 --- a/board/Makefile +++ b/board/Makefile @@ -17,6 +17,7 @@ lib-$(CONFIG_REALME_RMX3511) += realme/board-rmx3511.o lib-$(CONFIG_SAMSUNG_A3XELTE) += samsung/board-a3xelte.o lib-$(CONFIG_SAMSUNG_A10) += samsung/board-a10.o lib-$(CONFIG_SAMSUNG_A12S) += samsung/board-a12s.o +lib-$(CONFIG_SAMSUNG_A21S) += samsung/board-a21s.o lib-$(CONFIG_SAMSUNG_A30) += samsung/board-a30.o lib-$(CONFIG_SAMSUNG_A33X) += samsung/board-a33x.o lib-$(CONFIG_SAMSUNG_BEYOND1LTE) += samsung/board-beyond1lte.o diff --git a/board/samsung/board-a21s.c b/board/samsung/board-a21s.c new file mode 100644 index 0000000..3302c1e --- /dev/null +++ b/board/samsung/board-a21s.c @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2026, DaemonMCR + */ +#include +#include +#include +#include +#include + +int a21s_init(void) +{ + *(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281; + return 0; +} + +static struct video_info a21s_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 720, + .height = 1600, + .stride = 4, + .address = (void *)0xfa000000 +}; + +static const struct device a21s_devices[] = { + { "simplefb", &a21s_fb, "fb" }, +}; + +struct board_data board_ops = { + .name = "samsung-a21s", + .ops = { + .early_init = a21s_init, + }, + .devices = a21s_devices, + .num_devices = ARRAY_SIZE(a21s_devices), + .quirks = 0 +}; diff --git a/configs/a21s_defconfig b/configs/a21s_defconfig new file mode 100644 index 0000000..bee66cd --- /dev/null +++ b/configs/a21s_defconfig @@ -0,0 +1,5 @@ +CONFIG_EXYNOS_3830=y +CONFIG_SAMSUNG_A21S=y +CONFIG_TEXT_BASE=0x80080000 +CONFIG_PAYLOAD_ENTRY=0x90000000 +CONFIG_RAMDISK_ENTRY=0x84000000