riscv: t-head: licheepi4a: initial support added

Add support for Sipeed's Lichee Pi 4A board which based on T-HEAD's
TH1520 SoC, only minimal device tree and serial console are enabled,
so it's capable of chain booting from T-HEAD's vendor u-boot.

Reviewed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
Yixun Lan 2023-07-08 19:24:32 +08:00 committed by Leo Yu-Chi Liang
parent 9675d92027
commit 5f3a7fdb72
6 changed files with 96 additions and 0 deletions

View file

@ -27,6 +27,10 @@ config TARGET_SIFIVE_UNMATCHED
config TARGET_STARFIVE_VISIONFIVE2
bool "Support StarFive VisionFive2 Board"
config TARGET_TH1520_LPI4A
bool "Support Sipeed's TH1520 Lichee PI 4A Board"
select SYS_CACHE_SHIFT_6
config TARGET_SIPEED_MAIX
bool "Support Sipeed Maix Board"
select SYS_CACHE_SHIFT_6
@ -66,6 +70,7 @@ source "board/emulation/qemu-riscv/Kconfig"
source "board/microchip/mpfs_icicle/Kconfig"
source "board/sifive/unleashed/Kconfig"
source "board/sifive/unmatched/Kconfig"
source "board/thead/th1520_lpi4a/Kconfig"
source "board/openpiton/riscv64/Kconfig"
source "board/sipeed/maix/Kconfig"
source "board/starfive/visionfive2/Kconfig"

View file

@ -0,0 +1,42 @@
if TARGET_TH1520_LPI4A
config ARCH_THEAD
bool
default y
config SYS_BOARD
default "th1520_lpi4a"
config SYS_VENDOR
default "thead"
config SYS_CPU
default "generic"
config SYS_CONFIG_NAME
default "th1520_lpi4a"
config TEXT_BASE
default 0x01b00000 if SPL
default 0x01c00000 if !RISCV_SMODE
default 0x01c00000 if RISCV_SMODE
config SPL_TEXT_BASE
default 0x08000000
config SPL_OPENSBI_LOAD_ADDR
default 0x80000000
config BOARD_SPECIFIC_OPTIONS
def_bool y
select ARCH_EARLY_INIT_R
imply CPU
imply CPU_RISCV
imply RISCV_TIMER if RISCV_SMODE
imply CMD_CPU
imply SMP
imply SUPPORT_OF_CONTROL
imply OF_CONTROL
imply OF_REAL
endif

View file

@ -0,0 +1,7 @@
Lichee PI 4A
M: Wei Fu <wefu@redhat.com>
M: Yixun Lan <dlan@gentoo.org>
S: Maintained
F: board/thead/th1520_lpi4a/
F: configs/th1520_lpi4a_defconfig
F: doc/board/thead/lpi4a.rst

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (c) 2023, Yixun Lan <dlan@gentoo.org>
obj-y += board.o

View file

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2023, Yixun Lan <dlan@gentoo.org>
*
*/
#include <common.h>
#include <cpu_func.h>
int board_init(void)
{
enable_caches();
return 0;
}

View file

@ -0,0 +1,22 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c) 2023 Yixun Lan <dlan@gentoo.org>
*
*/
#ifndef __TH1520_LPI4A_H
#define __TH1520_LPI4A_H
#include <linux/sizes.h>
#define CFG_SYS_SDRAM_BASE 0x00000000
#define UART_BASE 0xffe7014000
#define UART_REG_WIDTH 32
/* Environment options */
#define CFG_EXTRA_ENV_SETTINGS \
"PS1=[LPi4A]# \0"
#endif /* __TH1520_LPI4A_H */