diff --git a/board/Kconfig b/board/Kconfig index 8b05639..fbe6fcd 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -6,6 +6,13 @@ menu "Device Support" help Say Y if you want to include support for iPhone 6 + config SAMSUNG_A105F + bool "Support for Samsung Galaxy A10" + default n + depends on EXYNOS_7885 + help + Say Y if you want to include support for Samsung Galaxy A10 + config SAMSUNG_A127F bool "Support for Samsung Galaxy A12 Nacho" default n @@ -114,6 +121,7 @@ menu "Device Specific Addresses" config PAYLOAD_ENTRY hex "Payload Entry Address" default 0x830000000 if APPLE_N61AP + default 0x090000000 if SAMSUNG_A105F default 0x090008000 if SAMSUNG_A127F default 0x090000000 if SAMSUNG_C1S default 0x090000000 if SAMSUNG_G0S @@ -131,6 +139,7 @@ menu "Device Specific Addresses" config RAMDISK_ENTRY hex "Ramdisk Entry Address" + default 0x084000000 if SAMSUNG_A105F default 0x082000000 if SAMSUNG_A127F default 0x082000000 if SAMSUNG_DREAMLTE default 0x084000000 if SAMSUNG_C1S @@ -144,6 +153,7 @@ menu "Device Specific Addresses" hex "Framebuffer Base Address (for SimpleFB)" depends on SIMPLE_FB default 0x83e900000 if APPLE_N61AP + default 0x0ec000000 if SAMSUNG_A105F default 0x0fa000000 if SAMSUNG_A127F default 0x0f1000000 if SAMSUNG_C1S default 0x0f6200000 if SAMSUNG_G0S @@ -163,6 +173,7 @@ menu "Device Specific Addresses" int "Framebuffer Width (for SimpleFB)" depends on SIMPLE_FB default 752 if APPLE_N61AP + default 720 if SAMSUNG_A105F default 720 if SAMSUNG_A127F default 1080 if SAMSUNG_C1S default 1080 if SAMSUNG_G0S @@ -182,6 +193,7 @@ menu "Device Specific Addresses" int "Framebuffer Height (for SimpleFB)" depends on SIMPLE_FB default 1334 if APPLE_N61AP + default 1520 if SAMSUNG_A105F default 1600 if SAMSUNG_A127F default 2400 if SAMSUNG_C1S default 2340 if SAMSUNG_G0S @@ -201,6 +213,7 @@ menu "Device Specific Addresses" int "Framebuffer Stride (for SimpleFB)" depends on SIMPLE_FB default 4 if APPLE_N61AP + default 4 if SAMSUNG_A105F default 4 if SAMSUNG_A127F default 4 if SAMSUNG_C1S default 4 if SAMSUNG_G0S diff --git a/board/Makefile b/board/Makefile index 2be0273..a04f504 100644 --- a/board/Makefile +++ b/board/Makefile @@ -1,4 +1,5 @@ lib-$(CONFIG_APPLE_N61AP) += apple/board-n61ap.o +lib-$(CONFIG_SAMSUNG_A105F) += samsung/board-a105f.o lib-$(CONFIG_SAMSUNG_A127F) += samsung/board-a127f.o lib-$(CONFIG_SAMSUNG_C1S) += samsung/board-c1s.o lib-$(CONFIG_SAMSUNG_G0S) += samsung/board-g0s.o diff --git a/board/samsung/board-a105f.c b/board/samsung/board-a105f.c new file mode 100644 index 0000000..76f8998 --- /dev/null +++ b/board/samsung/board-a105f.c @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, David Wronek + * Copyright (c) 2024, Ivaylo Ivanov + */ +#include +#include +#include +#include + +void init_board_funcs(void *board) +{ + /* + * Parsing the struct directly without restructing is + * broken as of Sep 29 2024 + */ + struct { + const char *name; + int ops[BOARD_OP_EXIT]; + } *board_restruct = board; + + board_restruct->name = "A105F"; +} + +// Early initialization +int board_init(void) +{ + /* Allow framebuffer to be written to */ + *(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281; + return 0; +} + +// Late initialization +int board_late_init(void) +{ + return 0; +} + +int board_driver_setup(void) +{ + struct { + int width; + int height; + int stride; + void *address; + } simplefb_data = { + .width = 720, + .height = 1520, + .stride = 4, + .address = (void *)0xec000000 + }; + + REGISTER_DRIVER("simplefb", simplefb_probe, &simplefb_data); + return 0; +} diff --git a/configs/a105f_defconfig b/configs/a105f_defconfig new file mode 100644 index 0000000..b475bf8 --- /dev/null +++ b/configs/a105f_defconfig @@ -0,0 +1,3 @@ +CONFIG_CROSS_COMPILE="aarch64-linux-gnu-" +CONFIG_EXYNOS_7885=y +CONFIG_SAMSUNG_A105F=y