From 9ae8d180283eb92cffad56b88c92198fc5d29945 Mon Sep 17 00:00:00 2001 From: Aiden Isik Date: Tue, 21 Apr 2026 00:45:05 +0100 Subject: [PATCH] board: Add support for Samsung Galaxy Watch FE Adds the initial support for Samsung Galaxy Watch FE (lucky7). --- README.md | 1 + board/Kconfig | 7 ++++++ board/Makefile | 1 + board/samsung/board-lucky7.c | 49 ++++++++++++++++++++++++++++++++++++ configs/lucky7_defconfig | 8 ++++++ soc/Kconfig | 6 +++++ 6 files changed, 72 insertions(+) create mode 100644 board/samsung/board-lucky7.c create mode 100644 configs/lucky7_defconfig diff --git a/README.md b/README.md index 59f6799..bf50347 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ environment in case of a forced and buggy bootloader. - C1S - HEROLTE - G0S +- LUCKY7 - NOBLELTE - JACKPOTLTE - ZEROFLTE diff --git a/board/Kconfig b/board/Kconfig index f15730f..d6047ba 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -172,6 +172,13 @@ menu "Device Support" help Say Y if you want to include support for Samsung Galaxy A8 (2018) + config SAMSUNG_LUCKY7 + bool "Support for Samsung Galaxy Watch FE" + default n + depends on EXYNOS_5515 + help + Say Y if you want to include support for Samsung Galaxy Watch FE + config SAMSUNG_NOBLELTE bool "Support for Samsung Galaxy Note5" default n diff --git a/board/Makefile b/board/Makefile index ac49bda..a85f668 100644 --- a/board/Makefile +++ b/board/Makefile @@ -21,6 +21,7 @@ lib-$(CONFIG_SAMSUNG_HEROLTE) += samsung/board-herolte.o lib-$(CONFIG_SAMSUNG_J4LTE) += samsung/board-j4lte.o lib-$(CONFIG_SAMSUNG_J5LTE) += samsung/board-j5lte.o lib-$(CONFIG_SAMSUNG_JACKPOTLTE) += samsung/board-jackpotlte.o +lib-$(CONFIG_SAMSUNG_LUCKY7) += samsung/board-lucky7.o lib-$(CONFIG_SAMSUNG_NOBLELTE) += samsung/board-noblelte.o lib-$(CONFIG_SAMSUNG_R0Q) += samsung/board-r0q.o lib-$(CONFIG_SAMSUNG_R8S) += samsung/board-r8s.o diff --git a/board/samsung/board-lucky7.c b/board/samsung/board-lucky7.c new file mode 100644 index 0000000..b0f9c00 --- /dev/null +++ b/board/samsung/board-lucky7.c @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2024, Ivaylo Ivanov + * Copyright (c) 2026, Aiden Isik + */ +#include +#include +#include +#include +#include +#include + +#define DECON_F_BASE 0x138C0000 +#define HW_SW_TRIG_CONTROL 0x70 +#define HW_TRIG_EN 0x1 + +int lucky7_init(void) +{ + /* Enable writing to the framebuffer */ + writel(HW_TRIG_EN, (void *)(DECON_F_BASE + HW_SW_TRIG_CONTROL)); + return 0; +} + +#ifdef CONFIG_SIMPLE_FB +static struct video_info lucky7_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 396, + .height = 396, + .stride = 4, + .address = (void *)0x9e0cf000 +}; +#endif + +int lucky7_drv(void) +{ +#ifdef CONFIG_SIMPLE_FB + REGISTER_DRIVER("simplefb", simplefb_probe, &lucky7_fb); +#endif + return 0; +} + +struct board_data board_ops = { + .name = "samsung-lucky7", + .ops = { + .early_init = lucky7_init, + .drivers_init = lucky7_drv, + }, + .quirks = 0 +}; diff --git a/configs/lucky7_defconfig b/configs/lucky7_defconfig new file mode 100644 index 0000000..a148eab --- /dev/null +++ b/configs/lucky7_defconfig @@ -0,0 +1,8 @@ +CONFIG_SIMPLE_FB=y +CONFIG_POSITION_INDEPENDENT=y +CONFIG_LINUX_KRNL_HEADER_IMG=y +CONFIG_EXYNOS_5515=y +CONFIG_SAMSUNG_LUCKY7=y +CONFIG_TEXT_BASE=0xc0000000 +CONFIG_RAMDISK_ENTRY=0x84000000 +CONFIG_PAYLOAD_ENTRY=0x80000000 \ No newline at end of file diff --git a/soc/Kconfig b/soc/Kconfig index 47ed8aa..abbcdc0 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -59,6 +59,12 @@ config QUALCOMM help Say Y if your device uses Samsung Exynos850 SoC + config EXYNOS_5515 + bool "Support for Exynos 5515" + select EXYNOS + help + Say Y if your device uses Samsung Exynos5515 SoC + config EXYNOS_7420 bool "Support for Exynos 7420" select EXYNOS