Add support for Samsung Galaxy S20 5G, based on exynos990, to the current samsung board support. This platform, just like exynos8895, needs a bit to be set in order to allow the framebuffer to refresh.
Barebox has to be packaged as an android boot image: mkbootimg --kernel images/barebox-exynos.img \ --ramdisk ramdisk.bin \ --dt stock.dtb --cmdline "buildvariant=eng" \ --base 0x10000000 \ --kernel_offset 0x00008000 \ --ramdisk_offset 0x01000000 \ --second_offset 0x00f00000 \ --tags_offset 0x00000100 \ --os_version 9.0.0 \ --os_patch_level 2019-10 \ --pagesize 2048 \ --hash sha1 \ --output boot.img And then flashed to the boot partition: heimdall flash --BOOT boot.img Currently, only a minimal set of features work. An image can be booted by barebox by configuring barebox to jump to the address where ramdisk gets loaded by s-boot, and packaging that payload as a ramdisk with mkbootimg. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivan...@gmail.com> Tested-by: Umer Uddin <umer.ud...@mentallysanemainliners.org> --- The tester is also the one who upstreamed support for x1s in mainline linux. He volunteered for me to upstream barebox support for it alongside dreamlte, hence why I have my copyright in the x1s overlay device tree. --- arch/arm/boards/samsung-exynos/board.c | 3 +++ arch/arm/boards/samsung-exynos/lowlevel.c | 3 +++ arch/arm/dts/Makefile | 3 ++- arch/arm/dts/exynos990-x1s.dts | 13 +++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos990-x1s.dts diff --git a/arch/arm/boards/samsung-exynos/board.c b/arch/arm/boards/samsung-exynos/board.c index 25e4add6..249b1b07 100644 --- a/arch/arm/boards/samsung-exynos/board.c +++ b/arch/arm/boards/samsung-exynos/board.c @@ -29,6 +29,8 @@ static int exynos_postcore_init(void) */ if (of_machine_is_compatible("samsung,exynos8895")) decon0_base = IOMEM(0x12860000); + else if (of_machine_is_compatible("samsung,exynos990")) + decon0_base = IOMEM(0x19050000); else return 0; @@ -49,6 +51,7 @@ static inline int exynos_init(struct device *dev) static const struct of_device_id exynos_of_match[] = { { .compatible = "samsung,dreamlte" }, + { .compatible = "samsung,x1s" }, { /* Sentinel */}, }; diff --git a/arch/arm/boards/samsung-exynos/lowlevel.c b/arch/arm/boards/samsung-exynos/lowlevel.c index 9c4a0297..c574535f 100644 --- a/arch/arm/boards/samsung-exynos/lowlevel.c +++ b/arch/arm/boards/samsung-exynos/lowlevel.c @@ -12,6 +12,7 @@ #include <asm/mmu.h> extern char __dtb_exynos8895_dreamlte_start[]; +extern char __dtb_exynos990_x1s_start[]; static bool is_compat(const void *fdt, const char *prefix) { @@ -42,6 +43,8 @@ static noinline void exynos_continue(void *downstream_fdt) /* select device tree dynamically */ if (is_compat(downstream_fdt, "Samsung DREAMLTE")) { __dtb_start = __dtb_exynos8895_dreamlte_start; + } else if (is_compat(downstream_fdt, "Samsung X1S")) { + __dtb_start = __dtb_exynos990_x1s_start; } else { /* we didn't match any device */ return; diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index a53834f7..58f05871 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -13,7 +13,8 @@ lwl-$(CONFIG_MACH_BEAGLEPLAY) += k3-am625-beagleplay.dtb.o k3-am625-r5-beaglepla lwl-$(CONFIG_MACH_CLEP7212) += ep7212-clep7212.dtb.o lwl-$(CONFIG_MACH_CM_FX6) += imx6dl-cm-fx6.dtb.o imx6q-cm-fx6.dtb.o imx6q-utilite.dtb.o lwl-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o -lwl-$(CONFIG_MACH_EXYNOS) += exynos8895-dreamlte.dtb.o +lwl-$(CONFIG_MACH_EXYNOS) += exynos8895-dreamlte.dtb.o \ + exynos990-x1s.dtb.o lwl-$(CONFIG_MACH_DUCKBILL) += imx28-duckbill.dtb.o lwl-$(CONFIG_MACH_KINDLE_MX50) += imx50-kindle-d01100.dtb.o imx50-kindle-d01200.dtb.o imx50-kindle-ey21.dtb.o lwl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o diff --git a/arch/arm/dts/exynos990-x1s.dts b/arch/arm/dts/exynos990-x1s.dts new file mode 100644 index 00000000..19d59eaa --- /dev/null +++ b/arch/arm/dts/exynos990-x1s.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * Samsung Galaxy S20 5G (x1s/SM-G981B) barebox device tree source + * + * Copyright (c) 2025, Ivaylo Ivanov <ivo.ivanov.ivan...@gmail.com> + */ + +/dts-v1/; +#include <arm64/exynos/exynos990-x1s.dts> + +/ { + barebox,disable-deep-probe; +}; -- 2.43.0