diff --git a/README.md b/README.md index b854830f..9372af03 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ environment in case of a forced and buggy bootloader. - ZEROFLTE - DREAMLTE - STARLTE +- STAR2LTE - X1S - J5LTE - J4LTE diff --git a/board/Kconfig b/board/Kconfig index 18eb66dc..5079bc8f 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -136,6 +136,13 @@ menu "Device Support" depends on EXYNOS_9810 help Say Y if you want to include support for Samsung Galaxy S9 + + config SAMSUNG_STAR2LTE + bool "Support for Samsung Galaxy S9+" + default n + 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" diff --git a/board/Makefile b/board/Makefile index ff4def54..de1ad01b 100644 --- a/board/Makefile +++ b/board/Makefile @@ -15,6 +15,7 @@ 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_STAR2LTE) += samsung/board-star2lte.o lib-$(CONFIG_SAMSUNG_X1S) += samsung/board-x1s.o lib-$(CONFIG_SAMSUNG_J5LTE) += samsung/board-j5lte.o lib-$(CONFIG_SAMSUNG_J4LTE) += samsung/board-j4lte.o diff --git a/board/samsung/board-star2lte.c b/board/samsung/board-star2lte.c new file mode 100644 index 00000000..e55bb098 --- /dev/null +++ b/board/samsung/board-star2lte.c @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, Markuss Broks + * Copyright (c) 2024, Ivaylo Ivanov + * Copyright (c) 2025, Leah + */ +#include +#include +#include + +#define DECON_F_BASE 0x16030000 +#define HW_SW_TRIG_CONTROL 0x70 + +// Early initialization +int star2lte_init(void) +{ + /* Allow framebuffer to be written to */ + *(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281; + return 0; +} + +#ifdef CONFIG_SIMPLE_FB +static struct video_info star2lte_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1440, + .height = 2960, + .stride = 4, + .address = (void *)0xcc000000 +}; +#endif + +int star2lte_drv(void) +{ +#ifdef CONFIG_SIMPLE_FB + REGISTER_DRIVER("simplefb", simplefb_probe, &star2lte_fb); +#endif + return 0; +} + +struct board_data board_ops = { + .name = "samsung-star2lte", + .ops = { + .early_init = star2lte_init, + .drivers_init = star2lte_drv, + }, + .quirks = 0 +}; diff --git a/configs/star2lte_defconfig b/configs/star2lte_defconfig new file mode 100644 index 00000000..a64ba13d --- /dev/null +++ b/configs/star2lte_defconfig @@ -0,0 +1,6 @@ +CONFIG_POSITION_INDEPENDENT=y +CONFIG_EXYNOS_9810=y +CONFIG_SAMSUNG_STAR2LTE=y +CONFIG_TEXT_BASE=0x87000000 +CONFIG_PAYLOAD_ENTRY=0x90000000 +CONFIG_RAMDISK_ENTRY=0x84000000