mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2024-11-21 11:30:06 +00:00
board: Add support for r8s (Samsung Galaxy S20 FE)
Signed-off-by: Sota4Ever <wachiturroxd150@gmail.com>
This commit is contained in:
parent
eba7aec49d
commit
cb87ef8644
@ -75,6 +75,13 @@ menu "Device Support"
|
||||
depends on EXYNOS_9610
|
||||
help
|
||||
Say Y if you want to include support for Samsung Galaxy Tab S6 Lite
|
||||
|
||||
config SAMSUNG_R8S
|
||||
bool "Support for Samsung Galaxy S20 FE"
|
||||
default n
|
||||
depends on EXYNOS_990
|
||||
help
|
||||
Say Y if you want to include support for Samsung Galaxy S20 FE
|
||||
endmenu
|
||||
|
||||
menu "Device Specific Addresses"
|
||||
@ -96,12 +103,14 @@ menu "Device Specific Addresses"
|
||||
default 0x050000000 if SAMSUNG_J4LTE
|
||||
default 0x090000000 if SAMSUNG_J5LTE
|
||||
default 0x090000000 if SAMSUNG_GTA4XL
|
||||
default 0x090000000 if SAMSUNG_R8S
|
||||
|
||||
config RAMDISK_ENTRY
|
||||
hex "Ramdisk Entry Address"
|
||||
default 0x082000000 if SAMSUNG_DREAMLTE
|
||||
default 0x084000000 if SAMSUNG_C1S
|
||||
default 0x084000000 if SAMSUNG_X1S
|
||||
default 0x084000000 if SAMSUNG_R8S
|
||||
|
||||
config FRAMEBUFFER_BASE
|
||||
hex "Framebuffer Base Address (for SimpleFB)"
|
||||
@ -117,6 +126,7 @@ menu "Device Specific Addresses"
|
||||
default 0x067000000 if SAMSUNG_J4LTE
|
||||
default 0x08e000000 if SAMSUNG_J5LTE
|
||||
default 0x0ca000000 if SAMSUNG_GTA4XL
|
||||
default 0x0f1000000 if SAMSUNG_R8S
|
||||
|
||||
config FRAMEBUFFER_WIDTH
|
||||
int "Framebuffer Width (for SimpleFB)"
|
||||
@ -132,6 +142,7 @@ menu "Device Specific Addresses"
|
||||
default 720 if SAMSUNG_J4LTE
|
||||
default 720 if SAMSUNG_J5LTE
|
||||
default 1200 if SAMSUNG_GTA4XL
|
||||
default 1080 if SAMSUNG_R8S
|
||||
|
||||
config FRAMEBUFFER_HEIGHT
|
||||
int "Framebuffer Height (for SimpleFB)"
|
||||
@ -147,6 +158,7 @@ menu "Device Specific Addresses"
|
||||
default 1280 if SAMSUNG_J4LTE
|
||||
default 1280 if SAMSUNG_J5LTE
|
||||
default 2000 if SAMSUNG_GTA4XL
|
||||
default 2400 if SAMSUNG_R8S
|
||||
|
||||
config FRAMEBUFFER_STRIDE
|
||||
int "Framebuffer Stride (for SimpleFB)"
|
||||
@ -162,6 +174,7 @@ menu "Device Specific Addresses"
|
||||
default 4 if SAMSUNG_J4LTE
|
||||
default 3 if SAMSUNG_J5LTE
|
||||
default 4 if SAMSUNG_GTA4XL
|
||||
default 4 if SAMSUNG_R8S
|
||||
|
||||
config FRAMEBUFFER_BGRA
|
||||
bool "Framebuffer BGRA (for SimpleFB)"
|
||||
|
@ -9,3 +9,4 @@ lib-$(CONFIG_SAMSUNG_X1S) += samsung/board-x1s.o
|
||||
lib-$(CONFIG_SAMSUNG_J5LTE) += samsung/board-j5lte.o
|
||||
lib-$(CONFIG_SAMSUNG_J4LTE) += samsung/board-j4lte.o
|
||||
lib-$(CONFIG_SAMSUNG_GTA4XL) += samsung/board-gta4xl.o
|
||||
lib-$(CONFIG_SAMSUNG_R8S) += samsung/board-r8s.o
|
||||
|
57
board/samsung/board-r8s.c
Normal file
57
board/samsung/board-r8s.c
Normal file
@ -0,0 +1,57 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) Sota4Ever <wachiturroxd150@gmail.com>
|
||||
* Copyright (c) 2024, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
|
||||
*/
|
||||
#include <board.h>
|
||||
#include <drivers/framework.h>
|
||||
#include <lib/simplefb.h>
|
||||
|
||||
#define DECON_F_BASE 0x19050000
|
||||
#define HW_SW_TRIG_CONTROL 0x70
|
||||
|
||||
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 = "R8S";
|
||||
}
|
||||
|
||||
// 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 = 1080,
|
||||
.height = 2400,
|
||||
.stride = 4,
|
||||
.address = (void *)0xf1000000
|
||||
};
|
||||
|
||||
REGISTER_DRIVER("simplefb", simplefb_probe, &simplefb_data);
|
||||
return 0;
|
||||
}
|
3
configs/r8s_defconfig
Normal file
3
configs/r8s_defconfig
Normal file
@ -0,0 +1,3 @@
|
||||
CONFIG_CROSS_COMPILE="aarch64-linux-gnu-"
|
||||
CONFIG_EXYNOS_990=y
|
||||
CONFIG_SAMSUNG_R8S=y
|
Loading…
Reference in New Issue
Block a user