Commit graph

21355 commits

Author SHA1 Message Date
Minda Chen
75814d6d44 dts: Add amp dts node.
Add different domain in dts node for sbi boot and disable
gmac1 node.
make DEVICE_TREE=starfive_jh7110-amp to build
uboot amp image.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2024-04-29 14:06:22 +08:00
Minda Chen
1444304dac spl: amp: Enable UART2 and move rtos image to memory
Enable UART2 for rtos and move rtos image to running memory.
The image size is 832KB.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2024-04-26 17:18:29 +08:00
andy.hu
f1b1c9ad3e Merge branch 'CR_9208_DEVKITS_EEPROM_ziv.xu' into 'jh7110-master'
CR_9208_DEVKITS_EEPROM_ziv.xu

See merge request sdk/u-boot!79
2024-02-23 07:15:21 +00:00
Ziv Xu
03ae7601a0 riscv: dts: change eeprom model for devkits
change eeprom model for devkits

Signed-off-by: Ziv Xu <ziv.xu@starfivetech.com>
2024-02-18 17:26:24 +08:00
Ziv Xu
e91aaecb55 riscv: dts: change eeprom model for visionfive
change eeprom model for visionfive

Signed-off-by: Ziv Xu <ziv.xu@starfivetech.com>
2024-02-06 17:10:20 +08:00
Hal Feng
f9d4424a16 riscv: dts: jh7110: Change the node name "i2c@12050000" to "i2c5@12050000"
So the I2C adapter can be recognized in OpenSBI.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-12-05 11:47:55 +08:00
Hal Feng
b5cb74c260 riscv: dts: Change compatible "raydium,rm68200" to "starfive,seeed"
As drivers/video/raydium-rm68200-starfive.c is renamed to
drivers/video/starfive_seeed_panel.c, change the dts accordingly.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:55:10 +08:00
Hal Feng
8d2695797e riscv: dts: Add StarFive JH7110 Devkits board device tree
Add device tree for StarFive JH7110 Devkits board.
The code is ported from tag JH7110_DVK_515_v3.9.3 of Devkits repo.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:53:23 +08:00
Hal Feng
55255733cf riscv: dts: jh7110: Sync with Devkits repo
To be compatible with the Devkits board.
The code is ported from tag JH7110_DVK_515_v3.9.3 of Devkits repo.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:53:10 +08:00
Hal Feng
e4f8517ebf board: starfive: Add TARGET_STARFIVE_DEVKITS to Kconfig
Add board support for StarFive Devkits.
The code is ported from tag JH7110_DVK_515_v3.9.3 of Devkits repo.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:52:55 +08:00
Hal Feng
580270489b riscv: dts: Add StarFive VisionFive 2 board device tree
Add device tree for StarFive VisionFive 2 board.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:47:10 +08:00
Hal Feng
4b07186e8e riscv: dts: jh7110: Add a new clock input to gmac
To be compatible with the VisionFive 2 board.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:46:57 +08:00
Hal Feng
4f914dd6f7 board: starfive: Add TARGET_STARFIVE_VISIONFIVE2 to Kconfig
Add board support for StarFive VisionFive 2.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:46:47 +08:00
Hal Feng
d5c8e632a1 riscv: cpu: jh7110: Add EEPROM support
Add a header to easily use the EEPROM interface.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:46:35 +08:00
Kevin.xie
5a0cf0dd73 riscv: dts: Add link state register to PCIe syscon nodes.
Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
2023-09-11 18:07:36 +08:00
Minda Chen
24be5cb7ec dts: usb: Add starfive,usb2-only to zero
Add starfive,usb2-only to zero in evb board.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-09-05 10:58:53 +08:00
Minda Chen
37cf2331ab dts: usb: Add USB 3.0 clock dts.
Add evb USB 3.0 clock dts.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-08-25 16:18:51 +08:00
Yanhong Wang
f64678cdc6 dts: starfive: devkits: Update usb device tree node
Updated USB Device Tree Node to support USB Device functionality and is
consistent with Kernel.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-08-25 16:13:01 +08:00
William Qiu
7818499b71 riscv: dts: starfive: limit cclk_in frequency
The frequency of cclk_in is limited to 50M, so that it does not do internal
part frequency and goes by-pass mode. And delete syscon node.

Signed-off-by: William Qiu <william.qiu@starfivetech.com>
2023-07-28 18:25:21 +08:00
Samin Guo
3566baaf46 gpio: starfive: Add SET_DS/SET_PULL/SET_SLEW support
SET_DS/SET_PULL/SET_SLEW can configure the properties of the GPIO

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-07-26 18:35:38 +08:00
Samin Guo
7e61b32c84 board: starfive: evb: use dram_init in spl
dram_init call fdtdec_setup_mem_size_base, so starfive_ddr.c do not
need it.

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-07-20 16:10:01 +08:00
andy.hu
24704a41a8 Merge branch 'CR_6604_1G_DDR_SYNC_samin.guo' into 'jh7110-master'
CR6604:dram: jh7110:  sync from devkits/vf2

See merge request sdk/u-boot!59
2023-07-20 03:27:38 +00:00
Keith Zhao
93c7758092 riscv: dts: starfive: jh7110: replace mipi&hdmi node
replace mipi&hdmi node , hdmi logo will start begin mipi

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
2023-07-18 17:19:30 +08:00
Samin Guo
28908c780f dram: jh7110: remove resize-ddr function
The resize-ddr should be board-level code

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-07-18 16:23:25 +08:00
Samin Guo
a76fba9179 dram: starfive: jh7110: Add 1G support
add 1G DDR tuning cfg

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-07-10 11:38:08 +08:00
Samin Guo
7eb47f1ce4 dram: jh7110: Add CONFIG_ID_EEPROM to determine if EEPROM is available
When eeprom reads, you need to determine whether eeprom supports it.

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-07-10 11:38:05 +08:00
Samin Guo
b354251c68 dram: jh7110: Macro definitions STARFIVE_JH7110_EEPROM_DDRINFO_OFFSET
In order to read DDR info from eeprom.

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-07-10 11:36:17 +08:00
Samin Guo
496d25d55c dram: jh7110: Add resize DDR info from EEPROM.
sync from vf2 and add resize DDR info from EEPROM

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-06-25 09:33:32 +08:00
Andy Hu
fffd811e3d riscv: dts: starfive: add zicsr_zifencei to riscv,isa string
Starting from gcc 12.x, csr and fence instructions have been
separated from the base I instruction set. special the
zicsr_zifencei string to DT riscv,isa string

Signed-off-by: Andy Hu <andy.hu@starfivetech.com>
2023-05-18 21:08:24 +08:00
Yanhong Wang
fe8426ebb0 board: starfive: copyright: Standardize the copyright format
Unify the content format of the copyright section

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
2023-04-23 11:19:47 +08:00
Minda Chen
5fa2c5f3d6 dts: pmu: remove pmu dts stall cycles config.
class 8 and class9 cpu stall cycles hwcounter is
not supported in U74. delete the configuration.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-04-10 16:20:37 +08:00
Samin Guo
41cad11dbf riscv: dts: jh7110: Add L2 pretcher configuration
Add L2 pretcher configuration for starfive jh7110 SoC.

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-04-04 09:33:30 +08:00
Hal Feng
dc7742fa96 riscv: dts: starfive: Add gpio-controller for the gpio node
Add gpio-controller for node gpio and gpioa.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-03-28 17:45:15 +08:00
Heinrich Schuchardt
0908b45ec9 riscv: support building double-float modules
The riscv32 toolchain for GCC-12 provided by kernel.org contains libgcc.a
compiled for double-float. To link to it we have to adjust how we build
U-Boot.

As U-Boot actually does not use floating point at all this should not
make a significant difference for the produced binaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-03-17 14:13:29 +08:00
Alexandre Ghiti
7e35037d2b riscv: Fix build against binutils 2.38
The following description is copied from the equivalent patch for the
Linux Kernel proposed by Aurelien Jarno:

>From version 2.38, binutils default to ISA spec version 20191213. This
means that the csr read/write (csrr*/csrw*) instructions and fence.i
instruction has separated from the `I` extension, become two standalone
extensions: Zicsr and Zifencei. As the kernel uses those instruction,
this causes the following build failure:

arch/riscv/cpu/mtrap.S: Assembler messages:
arch/riscv/cpu/mtrap.S:65: Error: unrecognized opcode `csrr a0,scause'
arch/riscv/cpu/mtrap.S:66: Error: unrecognized opcode `csrr a1,sepc'
arch/riscv/cpu/mtrap.S:67: Error: unrecognized opcode `csrr a2,stval'
arch/riscv/cpu/mtrap.S:70: Error: unrecognized opcode `csrw sepc,a0'

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Christian Stewart <christian@paral.in>
Reviewed-by: Rick Chen <rick@andestech.com>
2023-03-17 14:13:29 +08:00
keith.zhao
e5cef96f23 riscv: dts: enable hdmi dts config in uboot
hdmi can show a bitmap logo while uboot start
and the default resolution is 1920x1080@60fps

Signed-off-by: keith.zhao<keith.zhao@statfivetech.com>
2023-03-07 18:31:58 -08:00
Mason Huo
e1c27bd246 riscv: dts: starfive: Enable PCIe host controller
Enable and add pinctrl configuration for PCIe host controller.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
2023-02-22 17:54:41 +08:00
keith.zhao
5ce454f6e0 riscv:uboot:cache driver
cache driver enabled by config STARFIVE_JH7110_L2CC_FLUSH
if not , there is a dump on vf2

Signed-off-by:keith.zhao<keith.zhao@statfivetech.com>
2023-02-20 22:08:39 -08:00
keith.zhao
cadceda9b6 dts:riscv:jh7110: add mipi driver node
update dts node to support vout mipi driver

Signed-off-by:keith.zhao<keith.zhao@statfivetech.com>
2023-02-16 22:14:52 -08:00
keith.zhao
a6d99b2bd0 riscv:cache:jh7110: add cache driver
support flush_dcache_range interface STARFIVE_JH7110_L2CC_FLUSH

Signed-off-by:keith.zhao<keith.zhao@statfivetech.com>
2023-02-16 19:56:31 -08:00
andy.hu
5d74715db8 Merge branch 'CR_3238_Reserved_memory_mason.huo' into 'jh7110-master'
CR_3238 exclude opensbi memory range in device tree

See merge request sdk/u-boot!27
2023-02-03 11:27:56 +00:00
Felix Moessbauer
a5b1810f12 exclude opensbi memory range in device tree
This patch explicitly excludes the memory range of the OpenSBI in the
built-in device tree. When booting EFI, the efi loader has to know
about that zone before loading the device tree for Linux, otherwise
it tries to access 0x40000000, leading to an access violation.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
2023-02-03 15:25:28 +08:00
Heinrich Schuchardt
b680cc70dc sysreset: provide SBI based sysreset driver
Provide sysreset driver using the SBI system reset extension.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Samuel Holland <samuel@sholland.org>
2023-02-02 19:11:45 +08:00
Heinrich Schuchardt
c9051a2bda riscv: add missing SBI extension definitions
Add the System Reset Extension and the Hart State Management Extension
definitions.

Add missing RFENCE Extension enum values.

The SBI 0.1 extension constants are needed for the sbi command. Remove
an #ifdef.

Cf. https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-02-02 19:11:40 +08:00
minda.chen
ac7891c717 dts: add boot-hart-id property in dts
boot-hart-id is used by opensbi.

Signed-off-by: minda.chen <minda.chen@starfivetech.com>
2023-01-09 15:19:09 +08:00
andy.hu
bfbdce9b86 Merge branch 'CR_3049_Hibernation_mason.huo' into 'jh7110-master'
CR_3049 dts: add i2c5 and attach pmic configuration

See merge request sdk/u-boot!22
2023-01-06 06:41:29 +00:00
andy.hu
84e25a12dc Merge branch 'CR_2708_VOUTCLK_yanhong.wang' into 'jh7110-master'
CR 2708 clk:starfive: Add vout clock driver for StarFive JH7110

See merge request sdk/u-boot!23
2023-01-06 06:24:28 +00:00
Yanhong Wang
1b96445bfc clk:starfive: Add vout clock driver for StarFive JH7110
Add vout clock driver for StarFive JH7110

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
2023-01-05 18:04:26 +08:00
minda.chen
946b2e1ad8 dts: add i2c5 and attach pmic configuration
i2c5 and pmic is used by opensbi power management
ops.

Signed-off-by: minda.chen <minda.chen@starfivetech.com>
2023-01-05 13:15:42 +08:00
minda.chen
097a45c6a9 dts: pmu : add riscv pmu dts config
add 7110 performance monitor for perf use

Signed-off-by: minda.chen <minda.chen@starfivetech.com>
2023-01-03 14:13:57 +08:00