From 5901622aaac4a02714f169549544cd3d1e7f2576 Mon Sep 17 00:00:00 2001 From: halal-beef <78730004+halal-beef@users.noreply.github.com> Date: Sun, 16 Jul 2023 10:20:06 +0100 Subject: [PATCH] Support for the exynos990 and the Samsung S20 --- board/Kconfig | 14 +++++++++++++- board/Makefile | 1 + board/samsung/board-x1s.c | 8 ++++++++ configs/x1s_defconfig | 3 +++ include/soc/exynos990.h | 12 ++++++++++++ soc/Kconfig | 7 +++++++ soc/Makefile | 1 + soc/exynos/exynos990.c | 10 ++++++++++ 8 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 board/samsung/board-x1s.c create mode 100644 configs/x1s_defconfig create mode 100644 include/soc/exynos990.h create mode 100644 soc/exynos/exynos990.c diff --git a/board/Kconfig b/board/Kconfig index 12d526c..62b398a 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -41,6 +41,13 @@ menu "Device Support" depends on EXYNOS_9810 help Say Y if you want to include support for Samsung Galaxy S9 + + config SAMSUNG_X1S + bool "Support for Samsung Galaxy S20" + default n + depends on EXYNOS_990 + help + Say Y if you want to include support for Samsung Galaxy S20 endmenu @@ -54,6 +61,7 @@ menu "Device Specific Addresses" default 0x090000000 if SAMSUNG_ZEROFLTE default 0x090000000 if SAMSUNG_DREAMLTE default 0x090000000 if SAMSUNG_STARLTE + default 0x090000000 if SAMSUNG_X1S config FRAMEBUFFER_BASE hex "Framebuffer Base Address (for SimpleFB)" @@ -64,6 +72,7 @@ menu "Device Specific Addresses" default 0x0e2a00000 if SAMSUNG_ZEROFLTE default 0x0cc000000 if SAMSUNG_DREAMLTE default 0x0cc000000 if SAMSUNG_STARLTE + default 0x0F1000000 if SAMSUNG_X1S config FRAMEBUFFER_WIDTH int "Framebuffer Width (for SimpleFB)" @@ -74,6 +83,7 @@ menu "Device Specific Addresses" default 1440 if SAMSUNG_ZEROFLTE default 1440 if SAMSUNG_DREAMLTE default 1440 if SAMSUNG_STARLTE + default 1440 if SAMSUNG_X1S config FRAMEBUFFER_HEIGHT int "Framebuffer Height (for SimpleFB)" @@ -84,7 +94,8 @@ menu "Device Specific Addresses" default 2560 if SAMSUNG_ZEROFLTE default 2960 if SAMSUNG_DREAMLTE default 2960 if SAMSUNG_STARLTE - + default 3200 if SAMSUNG_X1S + config FRAMEBUFFER_STRIDE int "Framebuffer Stride (for SimpleFB)" depends on SIMPLE_FB @@ -94,5 +105,6 @@ menu "Device Specific Addresses" default 4 if SAMSUNG_ZEROFLTE default 4 if SAMSUNG_DREAMLTE default 4 if SAMSUNG_STARLTE + default 4 if SAMSUNG_X1S endmenu diff --git a/board/Makefile b/board/Makefile index 2657f3a..ef1d637 100644 --- a/board/Makefile +++ b/board/Makefile @@ -4,3 +4,4 @@ lib-$(CONFIG_SAMSUNG_JACKPOTLTE) += samsung/board-jackpotlte.o lib-$(CONFIG_SAMSUNG_ZEROFLTE) += samsung/board-zeroflte.o lib-$(CONFIG_SAMSUNG_DREAMLTE) += samsung/board-dreamlte.o lib-$(CONFIG_SAMSUNG_STARLTE) += samsung/board-starlte.o +lib-$(CONFIG_SAMSUNG_X1S) += samsung/board-x1s.o diff --git a/board/samsung/board-x1s.c b/board/samsung/board-x1s.c new file mode 100644 index 0000000..ba73f17 --- /dev/null +++ b/board/samsung/board-x1s.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, halal-beef <78730004+halal-beef@users.noreply.github.com> + */ + +void board_init(void) { + +} diff --git a/configs/x1s_defconfig b/configs/x1s_defconfig new file mode 100644 index 0000000..2d46fb1 --- /dev/null +++ b/configs/x1s_defconfig @@ -0,0 +1,3 @@ +CONFIG_CROSS_COMPILE="aarch64-linux-gnu-" +CONFIG_EXYNOS_990=y +CONFIG_SAMSUNG_X1S=y diff --git a/include/soc/exynos990.h b/include/soc/exynos990.h new file mode 100644 index 0000000..a91ea55 --- /dev/null +++ b/include/soc/exynos990.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, halal-beef <78730004+halal-beef@users.noreply.github.com> + */ + +#ifndef EXYNOS990_H_ /* Include guard */ +#define EXYNOS990_H_ + +#define DECON_F_BASE 0x19050000 +#define HW_SW_TRIG_CONTROL 0x70 + +#endif // EXYNOS990_H_ diff --git a/soc/Kconfig b/soc/Kconfig index 8daf36d..5578978 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -43,5 +43,12 @@ choice select EXYNOS help Say Y if your device uses Samsung Exynos9810 SoC + + config EXYNOS_990 + bool "Support for Exynos 990" + default n + select EXYNOS + help + Say Y if your device uses Samsung Exynos990 SoC endchoice diff --git a/soc/Makefile b/soc/Makefile index 5cee501..fe04c57 100644 --- a/soc/Makefile +++ b/soc/Makefile @@ -3,3 +3,4 @@ lib-$(CONFIG_EXYNOS_7420) += exynos/exynos7420.o lib-$(CONFIG_EXYNOS_7885) += exynos/exynos7885.o lib-$(CONFIG_EXYNOS_8895) += exynos/exynos8895.o lib-$(CONFIG_EXYNOS_9810) += exynos/exynos9810.o +lib-$(CONFIG_EXYNOS_990) += exynos/exynos990.o diff --git a/soc/exynos/exynos990.c b/soc/exynos/exynos990.c new file mode 100644 index 0000000..1b44486 --- /dev/null +++ b/soc/exynos/exynos990.c @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, halal-beef <78730004+halal-beef@users.noreply.github.com> + */ + +#include + +void soc_init(void) { + *(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281; +}