diff --git a/board/Kconfig b/board/Kconfig index ae8756d..3a93867 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -55,6 +55,13 @@ menu "Device Support" depends on QC32_8916 help Say Y if you want to include arm32 support for Samsung Galaxy J5 2015 + + config SAMSUNG_J4LTE + bool "Support for Samsung Galaxy J4 2018" + default n + depends on EXYNOS_7570 + help + Say Y if you want to include arm64 support for Samsung Galaxy J4 2018 endmenu menu "Device Specific Addresses" @@ -69,6 +76,7 @@ menu "Device Specific Addresses" default 0x090000000 if SAMSUNG_STARLTE default 0x090000000 if SAMSUNG_X1S default 0x090000000 if SAMSUNG_J5LTE + default 0x040000000 if SAMSUNG_J4LTE config FRAMEBUFFER_BASE @@ -82,6 +90,7 @@ menu "Device Specific Addresses" default 0x0cc000000 if SAMSUNG_STARLTE default 0x0F1000000 if SAMSUNG_X1S default 0x08e000000 if SAMSUNG_J5LTE + default 0x067000000 if SAMSUNG_J4LTE config FRAMEBUFFER_WIDTH int "Framebuffer Width (for SimpleFB)" @@ -94,6 +103,7 @@ menu "Device Specific Addresses" default 1440 if SAMSUNG_STARLTE default 1440 if SAMSUNG_X1S default 720 if SAMSUNG_J5LTE + default 720 if SAMSUNG_J4LTE config FRAMEBUFFER_HEIGHT int "Framebuffer Height (for SimpleFB)" @@ -106,6 +116,7 @@ menu "Device Specific Addresses" default 2960 if SAMSUNG_STARLTE default 3200 if SAMSUNG_X1S default 1280 if SAMSUNG_J5LTE + default 1280 if SAMSUNG_J4LTE config FRAMEBUFFER_STRIDE int "Framebuffer Stride (for SimpleFB)" @@ -118,5 +129,6 @@ menu "Device Specific Addresses" default 4 if SAMSUNG_STARLTE default 4 if SAMSUNG_X1S default 3 if SAMSUNG_J5LTE + default 4 if SAMSUNG_J4LTE endmenu diff --git a/board/Makefile b/board/Makefile index 811c091..9764107 100644 --- a/board/Makefile +++ b/board/Makefile @@ -5,4 +5,5 @@ 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_X1S) += samsung/board-x1s.o -lib-$(CONFIG_SAMSUNG_J5LTE) += samsung/board-j5lte.o \ No newline at end of file +lib-$(CONFIG_SAMSUNG_J5LTE) += samsung/board-j5lte.o +lib-$(CONFIG_SAMSUNG_J4LTE) += samsung/board-j4lte.o \ No newline at end of file diff --git a/board/samsung/board-j4lte.c b/board/samsung/board-j4lte.c new file mode 100644 index 0000000..771ee5f --- /dev/null +++ b/board/samsung/board-j4lte.c @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2023, predefine + */ + +void board_init(void) { + +} diff --git a/configs/j4lte_defconfig b/configs/j4lte_defconfig new file mode 100644 index 0000000..33375d1 --- /dev/null +++ b/configs/j4lte_defconfig @@ -0,0 +1,3 @@ +CONFIG_CROSS_COMPILE="aarch64-linux-gnu-" +CONFIG_EXYNOS_7570=y +CONFIG_SAMSUNG_J4LTE=y diff --git a/include/soc/exynos7570.h b/include/soc/exynos7570.h new file mode 100644 index 0000000..2f6e4cf --- /dev/null +++ b/include/soc/exynos7570.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2023, predefine + */ + +#ifndef EXYNOS7570_H_ /* Include guard */ +#define EXYNOS7570_H_ + +#define DECON_F_BASE 0x14830000 +#define HW_SW_TRIG_CONTROL 0x70 + +#endif // EXYNOS7570_H_ diff --git a/soc/Kconfig b/soc/Kconfig index db57524..24ddf63 100644 --- a/soc/Kconfig +++ b/soc/Kconfig @@ -27,6 +27,13 @@ config QUALCOMM help Say Y if your device uses Samsung Exynos7420 SoC + config EXYNOS_7570 + bool "Support for Exynos 7570" + default n + select EXYNOS + help + Say Y if your device uses Samsung Exynos7570 SoC + config EXYNOS_7885 bool "Support for Exynos 7885" default n diff --git a/soc/Makefile b/soc/Makefile index cc1dc84..2adfe82 100644 --- a/soc/Makefile +++ b/soc/Makefile @@ -1,5 +1,6 @@ lib-$(CONFIG_APPLE_T7000) += apple/t7000.o lib-$(CONFIG_EXYNOS_7420) += exynos/exynos7420.o +lib-$(CONFIG_EXYNOS_7570) += exynos/exynos7570.o lib-$(CONFIG_EXYNOS_7885) += exynos/exynos7885.o lib-$(CONFIG_EXYNOS_8895) += exynos/exynos8895.o lib-$(CONFIG_EXYNOS_9810) += exynos/exynos9810.o diff --git a/soc/exynos/exynos7570.c b/soc/exynos/exynos7570.c new file mode 100644 index 0000000..cf10dbf --- /dev/null +++ b/soc/exynos/exynos7570.c @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2023, predefine + */ + +#include + +void soc_init(void) { + /* Allow framebuffer to be written to */ + *(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281; +}