Merge pull request #8 from predefine/master

add Samsung Galaxy J4lte & Exynos 7570 support
This commit is contained in:
Ivaylo Ivanov 2023-08-15 14:02:31 +03:00 committed by GitHub
commit f7906fff57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 55 additions and 0 deletions

View File

@ -62,6 +62,13 @@ menu "Device Support"
depends on QC32_8916 depends on QC32_8916
help help
Say Y if you want to include arm32 support for Samsung Galaxy J5 2015 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 endmenu
menu "Device Specific Addresses" menu "Device Specific Addresses"
@ -77,6 +84,7 @@ menu "Device Specific Addresses"
default 0x090000000 if SAMSUNG_STARLTE default 0x090000000 if SAMSUNG_STARLTE
default 0x090000000 if SAMSUNG_X1S default 0x090000000 if SAMSUNG_X1S
default 0x090000000 if SAMSUNG_J5LTE default 0x090000000 if SAMSUNG_J5LTE
default 0x040000000 if SAMSUNG_J4LTE
config FRAMEBUFFER_BASE config FRAMEBUFFER_BASE
@ -91,6 +99,7 @@ menu "Device Specific Addresses"
default 0x0cc000000 if SAMSUNG_STARLTE default 0x0cc000000 if SAMSUNG_STARLTE
default 0x0F1000000 if SAMSUNG_X1S default 0x0F1000000 if SAMSUNG_X1S
default 0x08e000000 if SAMSUNG_J5LTE default 0x08e000000 if SAMSUNG_J5LTE
default 0x067000000 if SAMSUNG_J4LTE
config FRAMEBUFFER_WIDTH config FRAMEBUFFER_WIDTH
int "Framebuffer Width (for SimpleFB)" int "Framebuffer Width (for SimpleFB)"
@ -104,6 +113,7 @@ menu "Device Specific Addresses"
default 1440 if SAMSUNG_STARLTE default 1440 if SAMSUNG_STARLTE
default 1440 if SAMSUNG_X1S default 1440 if SAMSUNG_X1S
default 720 if SAMSUNG_J5LTE default 720 if SAMSUNG_J5LTE
default 720 if SAMSUNG_J4LTE
config FRAMEBUFFER_HEIGHT config FRAMEBUFFER_HEIGHT
int "Framebuffer Height (for SimpleFB)" int "Framebuffer Height (for SimpleFB)"
@ -117,6 +127,7 @@ menu "Device Specific Addresses"
default 2960 if SAMSUNG_STARLTE default 2960 if SAMSUNG_STARLTE
default 3200 if SAMSUNG_X1S default 3200 if SAMSUNG_X1S
default 1280 if SAMSUNG_J5LTE default 1280 if SAMSUNG_J5LTE
default 1280 if SAMSUNG_J4LTE
config FRAMEBUFFER_STRIDE config FRAMEBUFFER_STRIDE
int "Framebuffer Stride (for SimpleFB)" int "Framebuffer Stride (for SimpleFB)"
@ -130,5 +141,6 @@ menu "Device Specific Addresses"
default 4 if SAMSUNG_STARLTE default 4 if SAMSUNG_STARLTE
default 4 if SAMSUNG_X1S default 4 if SAMSUNG_X1S
default 3 if SAMSUNG_J5LTE default 3 if SAMSUNG_J5LTE
default 4 if SAMSUNG_J4LTE
endmenu endmenu

View File

@ -7,3 +7,4 @@ lib-$(CONFIG_SAMSUNG_DREAMLTE) += samsung/board-dreamlte.o
lib-$(CONFIG_SAMSUNG_STARLTE) += samsung/board-starlte.o lib-$(CONFIG_SAMSUNG_STARLTE) += samsung/board-starlte.o
lib-$(CONFIG_SAMSUNG_X1S) += samsung/board-x1s.o lib-$(CONFIG_SAMSUNG_X1S) += samsung/board-x1s.o
lib-$(CONFIG_SAMSUNG_J5LTE) += samsung/board-j5lte.o lib-$(CONFIG_SAMSUNG_J5LTE) += samsung/board-j5lte.o
lib-$(CONFIG_SAMSUNG_J4LTE) += samsung/board-j4lte.o

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2023, predefine <predefine@yandex.ru>
*/
void board_init(void) {
}

3
configs/j4lte_defconfig Normal file
View File

@ -0,0 +1,3 @@
CONFIG_CROSS_COMPILE="aarch64-linux-gnu-"
CONFIG_EXYNOS_7570=y
CONFIG_SAMSUNG_J4LTE=y

12
include/soc/exynos7570.h Normal file
View File

@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2023, predefine <predefine@yandex.ru>
*/
#ifndef EXYNOS7570_H_ /* Include guard */
#define EXYNOS7570_H_
#define DECON_F_BASE 0x14830000
#define HW_SW_TRIG_CONTROL 0x70
#endif // EXYNOS7570_H_

View File

@ -27,6 +27,13 @@ config QUALCOMM
help help
Say Y if your device uses Samsung Exynos7420 SoC 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 config EXYNOS_7885
bool "Support for Exynos 7885" bool "Support for Exynos 7885"
default n default n

View File

@ -1,5 +1,6 @@
lib-$(CONFIG_APPLE_T7000) += apple/t7000.o lib-$(CONFIG_APPLE_T7000) += apple/t7000.o
lib-$(CONFIG_EXYNOS_7420) += exynos/exynos7420.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_7885) += exynos/exynos7885.o
lib-$(CONFIG_EXYNOS_8895) += exynos/exynos8895.o lib-$(CONFIG_EXYNOS_8895) += exynos/exynos8895.o
lib-$(CONFIG_EXYNOS_9810) += exynos/exynos9810.o lib-$(CONFIG_EXYNOS_9810) += exynos/exynos9810.o

11
soc/exynos/exynos7570.c Normal file
View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2023, predefine <predefine@yandex.ru>
*/
#include <soc/exynos7570.h>
void soc_init(void) {
/* Allow framebuffer to be written to */
*(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281;
}