diff --git a/README.md b/README.md index 2b0f338..23c4985 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ environment in case of a forced and buggy bootloader. ### Samsung - A105F - A127F +- A305F - A3XELTE - C1S - HEROLTE diff --git a/board/Kconfig b/board/Kconfig index 8d32808..ea5781a 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -67,6 +67,13 @@ menu "Device Support" help Say Y if you want to include support for Samsung Galaxy A12 Nacho + config SAMSUNG_A305F + bool "Support for Samsung Galaxy A30" + default n + depends on EXYNOS_7885 + help + Say Y if you want to include support for Samsung Galaxy A30 + config SAMSUNG_A3XELTE bool "Support for Samsung Galaxy A3 2016" default n diff --git a/board/Makefile b/board/Makefile index b947e9c..e79f6a6 100644 --- a/board/Makefile +++ b/board/Makefile @@ -6,6 +6,7 @@ lib-$(CONFIG_NOTHING_TETRIS) += nothing/board-tetris.o lib-$(CONFIG_QEMU_BOARD_VIRT) += qemu/board-virt.o lib-$(CONFIG_SAMSUNG_A105F) += samsung/board-a105f.o lib-$(CONFIG_SAMSUNG_A127F) += samsung/board-a127f.o +lib-$(CONFIG_SAMSUNG_A305F) += samsung/board-a305f.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 diff --git a/board/samsung/board-a305f.c b/board/samsung/board-a305f.c new file mode 100644 index 0000000..883231f --- /dev/null +++ b/board/samsung/board-a305f.c @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, David Wronek + * Copyright (c) 2024, Ivaylo Ivanov + * Copyright (c) 2026, faveoled + */ + +#include +#include +#include +#include + +// Early initialization +int a305f_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 a305f_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1080, + .height = 2340, + .stride = 4, + .address = (void *)0xec000000 +}; +#endif + +int a305f_drv(void) +{ +#ifdef CONFIG_SIMPLE_FB + REGISTER_DRIVER("simplefb", simplefb_probe, &a305f_fb); +#endif + return 0; +} + +struct board_data board_ops = { + .name = "samsung-a305f", + .ops = { + .early_init = a305f_init, + .drivers_init = a305f_drv, + }, + .quirks = 0 +}; diff --git a/configs/a305f_defconfig b/configs/a305f_defconfig new file mode 100644 index 0000000..7d2d3f7 --- /dev/null +++ b/configs/a305f_defconfig @@ -0,0 +1,11 @@ +CONFIG_POSITION_INDEPENDENT=y +CONFIG_SIMPLE_FB=y +CONFIG_EXYNOS_7885=y +CONFIG_SAMSUNG_A305F=y +CONFIG_TEXT_BASE=0x87000000 +CONFIG_PAYLOAD_ENTRY=0x90000000 +CONFIG_RAMDISK_ENTRY=0x89000000 +CONFIG_FRAMEBUFFER_BASE=0xec000000 +CONFIG_FRAMEBUFFER_WIDTH=1080 +CONFIG_FRAMEBUFFER_HEIGHT=2340 +CONFIG_FRAMEBUFFER_STRIDE=4 \ No newline at end of file