diff --git a/board/Kconfig b/board/Kconfig index 8c5a31c..d4ea60c 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -71,6 +71,13 @@ menu "Device Support" help Say Y if you want to include support for Samsung Galaxy S22+ + config SAMSUNG_HEROLTE + bool "Support for Samsung Galaxy S7" + default n + depends on EXYNOS_8890 + help + Say Y if you want to include support for Samsung Galaxy S7 + config SAMSUNG_NOBLELTE bool "Support for Samsung Galaxy Note5" default n diff --git a/board/Makefile b/board/Makefile index 403eed0..193a2d6 100644 --- a/board/Makefile +++ b/board/Makefile @@ -6,6 +6,7 @@ lib-$(CONFIG_SAMSUNG_A105F) += samsung/board-a105f.o lib-$(CONFIG_SAMSUNG_A127F) += samsung/board-a127f.o lib-$(CONFIG_SAMSUNG_A3XELTE) += samsung/board-a3xelte.o lib-$(CONFIG_SAMSUNG_C1S) += samsung/board-c1s.o +lib-$(CONFIG_SAMSUNG_HEROLTE) += samsung/board-herolte.o lib-$(CONFIG_SAMSUNG_G0S) += samsung/board-g0s.o lib-$(CONFIG_SAMSUNG_NOBLELTE) += samsung/board-noblelte.o lib-$(CONFIG_SAMSUNG_JACKPOTLTE) += samsung/board-jackpotlte.o diff --git a/board/samsung/board-herolte.c b/board/samsung/board-herolte.c new file mode 100644 index 0000000..006c71f --- /dev/null +++ b/board/samsung/board-herolte.c @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2025, Ivaylo Ivanov + */ +#include +#include +#include +#include +#include +#include + +#define DECON_F_BASE 0x13960000 +#define HW_SW_TRIG_CONTROL 0x70 +#define HW_SW_TRIG_CONTROL_TRIG_AUTO_MASK_TRIG (1 << 12) +#define HW_SW_TRIG_CONTROL_SW_TRIG (1 << 8) +#define HW_SW_TRIG_CONTROL_UNKN_BIT (1 << 7) +#define HW_SW_TRIG_CONTROL_HW_TRIG_MASK (1 << 5) +#define HW_SW_TRIG_CONTROL_HW_TRIG_EN (1 << 4) +#define HW_TRIG_EN (HW_SW_TRIG_CONTROL_TRIG_AUTO_MASK_TRIG | \ + HW_SW_TRIG_CONTROL_HW_TRIG_EN) + +int herolte_init(void) +{ + /* allow framebuffer to be written to */ + writel(HW_TRIG_EN, (void *)(DECON_F_BASE + HW_SW_TRIG_CONTROL)); + + return 0; +} + +#ifdef CONFIG_SIMPLE_FB +static struct video_info herolte_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1440, + .height = 2960, + .stride = 4, + .address = (void *)0xe2a00000 +}; +#endif + +int herolte_drv(void) +{ +#ifdef CONFIG_SIMPLE_FB + REGISTER_DRIVER("simplefb", simplefb_probe, &herolte_fb); +#endif + return 0; +} + +int herolte_late_init(void) +{ + return 0; +} + +struct board_data board_ops = { + .name = "samsung-herolte", + .ops = { + .early_init = herolte_init, + .drivers_init = herolte_drv, + .late_init = herolte_late_init, + }, + .quirks = 0 +}; diff --git a/configs/herolte_defconfig b/configs/herolte_defconfig new file mode 100644 index 0000000..b5d0790 --- /dev/null +++ b/configs/herolte_defconfig @@ -0,0 +1,6 @@ +CONFIG_POSITION_INDEPENDENT=y +CONFIG_EXYNOS_8890=y +CONFIG_SAMSUNG_HEROLTE=y +CONFIG_TEXT_BASE=0x87000000 +CONFIG_PAYLOAD_ENTRY=0x90000000 +CONFIG_RAMDISK_ENTRY=0x84000000 diff --git a/soc/Kconfig b/soc/Kconfig index 87d71a0..50e42df 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -88,6 +88,13 @@ config QUALCOMM help Say Y if your device uses Samsung Exynos7885 SoC + config EXYNOS_8890 + bool "Support for Exynos 8890" + default n + select EXYNOS + help + Say Y if your device uses Samsung Exynos8890 SoC + config EXYNOS_8895 bool "Support for Exynos 8895" default n