Commit graph

75285 commits

Author SHA1 Message Date
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
4d348e3fb4 board: starfive: Add StarFive Devkits board support
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:51:13 +08:00
Hal Feng
60884ca5ec video: starfive: Add StarFive VisionFive 2 board support
Make the code be compatible with the StarFive VisionFive 2 board.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:48:28 +08:00
Hal Feng
2f2f662785 pci: starfive: Add StarFive VisionFive 2 board support
Make the code be compatible with the StarFive VisionFive 2 board.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:48:17 +08:00
Hal Feng
3dec8563ac net: dwc_eth_qos: Add StarFive VisionFive 2 board support
Make the code be compatible with the StarFive VisionFive 2 board.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: Samin Guo <samin.guo@linux.starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:48:06 +08:00
Hal Feng
7a6dd69c9d mmc: dw_mmc: Add StarFive VisionFive 2 board support
Make the code be compatible with the StarFive VisionFive 2 board.
The code is ported from tag JH7110_VF2_515_v3.9.3 of VF2 repo.

Signed-off-by: William Qiu <william.qiu@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:47:53 +08:00
Jianlong Huang
77a08d507b cmd: eeprom: Add StarFive VisionFive 2 board support
Rename CONFIG_SYS_DEF_EEPROM_ADDR to CONFIG_SYS_I2C_EEPROM_ADDR
based on current usage.

Convert CONFIG_SYS_I2C_EEPROM_BUS, CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
CONFIG_SYS_EEPROM_SIZE, CONFIG_SYS_EEPROM_PAGE_WRITE_BITS and
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS to Kconfig.

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2023-11-29 10:47:49 +08:00
Jianlong.Huang
295685561e cmd/eeprom: fix data type issue for parse_numeric_param
This patch fixs parse_numeric_param issue on some platfrom which has
different sizes of int and long, like riscv64.

On riscv64, int is 4 bytes, but long is 8 bytes.

on this situation:
ulong addr = parse_numeric_param(argv[index]);

if argv[index] is "0x80000000", this "ulong addr" will be
0xffffffff80000000.

Signed-off-by: Jianlong.Huang <jianlong.huang@starfivetech.com>
Co-developed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Wei Fu <wefu@redhat.com>
2023-11-29 10:47:43 +08:00
Yanhong Wang
b2edbe9c9e i2c: designware: support SYS_I2C_DW in SPL
Add SYS_I2C_DW driver to support in SPL.

Signed-off-by: Yanhong Wang <yanhong.wang@linux.starfivetech.com>
2023-11-29 10:47:40 +08:00
Sunil V L
f142804408 efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support
This adds support for new RISCV_EFI_BOOT_PROTOCOL to
communicate the boot hart ID to bootloader/kernel on RISC-V
UEFI platforms.

The specification of the protocol is hosted at:
https://github.com/riscv-non-isa/riscv-uefi

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-11-29 10:47:33 +08:00
Hal Feng
3adcafc929 configs: starfive: Add starfive_visionfive2_defconfig
Add a defconfig file 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:22 +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
Hal Feng
93cc1e2b6d board: starfive: Add StarFive VisionFive 2 board support
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:45:35 +08:00
andy.hu
b9ea242a49 Merge branch 'CR_7842_fix_lenovo_udisk_crash_minda' into 'jh7110-master'
CR_7842 usb: fix TRB_TRANSFER return null pointer issue

See merge request sdk/u-boot!73
2023-10-18 10:53:54 +00:00
Minda Chen
de86bf5edc usb: fix TRB_TRANSFER return null pointer issue
xhci_wait_for_event() wait TRB_TRANSFER may return null
pointer, shoud checkit avoid crash.
Read usb device info maybe failed, should check it and
do not register usb device. uboot should rescan usb
device and register.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-10-18 18:53:00 +08:00
andy.hu
6f58ddddaf Merge branch 'usb_fix_duplicate_device_minda' into 'jh7110-master'
CR7345 usb: hub: Do NOT add device if portchanged over current bit is set

See merge request sdk/u-boot!72
2023-10-11 08:31:36 +00:00
Minda Chen
25ce4e7598 usb: hub: Do NOT add device if portchanged over current bit is set
USB hub should not add the usb devices if over current bit
is set in portchange. For later usb_scan_port will still return
with error and rescan and add device again.
it will generate dulplicated device and cause crash issue.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-10-10 17:23:31 +08:00
andy.hu
5a6195d028 Merge branch 'CR_7124_PCIe_Kevin.xie' into 'jh7110-master'
CR 7124 PCIe dts & driver: Modified reset & link wait timing for better compatbility.

See merge request sdk/u-boot!71
2023-09-13 09:56:05 +00:00
andy.hu
d5f1e2303a Merge branch 'CR_7420_vf2_fastboot_Xingyu.Wu' into 'jh7110-master'
CR_7420_vf2_fastboot_Xingyu.Wu

See merge request sdk/u-boot!70
2023-09-13 09:55:19 +00:00
andy.hu
9ac96f4316 Merge branch 'CR_5472_uboot_mmc0_log_keith.zhao' into 'jh7110-master'
CR 5472 vout: logo: emmc log show many times

See merge request sdk/u-boot!69
2023-09-13 09:54:35 +00:00
Kevin.xie
0c0a3017a2 drivers: pci: Update reset & link wait timing as spec required.
1. Modified reset assert duration to 100ms.
2. Wait 10-100 ms for link training.
3. If link is up, delay 100ms before doing any configuration space access.

Reference spec: PCIe Base Spec r6.0 & CEM 2.0.

Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
2023-09-11 18:22:21 +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
Xingyu Wu
24a0c6a085 cmd: fastboot: Fix failure to enter fastboot
Only USB host and device are same IP and should be changed mode with initialization
before fastboot in Devkits. Add the target of Devkits to math the board.

Fixes: 67df54127e ("cmd: fastboot: Add presetting on StarFive SoC before fastboot")
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-09-11 14:13:55 +08:00
Keith Zhao
b3cee3bba9 vout: logo: emmc log show many times
the vout clocks on enable status, when no connecters (hdmi or mipi)
this will cause emmc init many times
need to closed the vout clocks

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
2023-09-08 15:03:41 +08:00
andy.hu
081aa0e676 Merge branch 'CR_4615_add_fastboot_Xingyu.Wu' into 'jh7110-master'
CR_4615_add_fastboot_Xingyu.Wu

See merge request sdk/u-boot!68
2023-09-07 02:53:09 +00:00
Xingyu Wu
fe15334eb1 common: autoboot: Add auto-fastboot on StarFive SoC
Add auto-fastboot function before autoboot on StarFive SoC
and add a config to enable or disable this.

In the auto-fastboot, it check a environment flag of 'fb_sf_completed'
first. The flag is NULL and then the fastboot will work.
The flag will be set from USB tool to indicate done after flashing the
image.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-09-07 09:34:13 +08:00
Xingyu Wu
67df54127e cmd: fastboot: Add presetting on StarFive SoC before fastboot
Add the presetting about usb as device in fastboot function.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-09-07 09:34:13 +08:00
Xingyu Wu
706fab8ccb drivers: fastboot: Fix the error of writing sparse file with fastboot
Add config for max block size to write in MMC with sparse file.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-09-07 09:34:13 +08:00
Xingyu Wu
92543ed1f3 drivers: fastboot: Add logical-block-size in getvar command
Add a new parameter to get "logical-block-size" in getvar command.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-09-07 09:34:13 +08:00
Xingyu Wu
0c23a7095f driver: fastboot: Add new flag to load image file without partition
Add new flag to load image file to preset address without partition.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
2023-09-07 09:34:13 +08:00
andy.hu
3e6f524ed4 Merge branch 'CR_7250_add_usb_device_in_u_boot_minda' into 'jh7110-master'
CR_7250 usb: cdns: Add USB device support

See merge request sdk/u-boot!67
2023-09-06 09:59:31 +00: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
2508827652 usb: cdns: Add USB device support
Add USB device support. Add dr_num_mode for
changing the dr mode number, For changing the strings cause issues.
For devkits, If using device,
need to changed starfive,usb2-only to 1 and dr_num_mode
to 2.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-08-31 16:02:51 +08:00
andy.hu
eec56304c3 Merge branch 'CR_7199_add_usb_host_minda' into 'jh7110-master'
CR_7199 usb: cdns3: starfive: Add usb driver to support for JH7110

See merge request sdk/u-boot!66
2023-08-30 10:16:40 +00:00
andy.hu
2a533dc920 Merge branch 'CR_7136_fix_usb_device_xfer_timeout_minda' into 'jh7110-master'
CR_7136 usb: cdns3: Set the SS EP config bit by usb SS speed

See merge request sdk/u-boot!65
2023-08-30 09:53:42 +00: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
Yanhong Wang
22d5e1fae2 usb: cdns3: starfive: Add usb driver to support for JH7110
Add usb driver to support for jh7110.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-08-25 16:12:34 +08:00
Minda Chen
0ff6454c13 usb: cdns3: Set the SS EP config bit by usb SS speed
Set SS EP config bit by USB SS speed. Avoid transfer
timeout.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
2023-08-23 09:01:28 +08:00
andy.hu
0b2f3140a5 Merge branch 'CR_6370_nvme_sd_boot_samin.guo' into 'jh7110-master'
CR6370: riscv: starfive: evb: Optimize boot logic(sd/nvme)

See merge request sdk/u-boot!64
2023-08-16 11:11:40 +00:00
Samin Guo
a5c8183f22 riscv: starfive: jh7110-evb: Optimize boot commands
- Optimize boot commands for jh7110-evb
- Add CONFIG_DEFAULT_FDT_FILE for debian boot

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-08-16 15:49:11 +08:00
Samin Guo
b46afd08fd riscv: starfive: evb: add get_boot_mode
add get_boot_mode function to support Multi-device boot

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-08-16 15:38:02 +08:00
Samin Guo
c814e8bc9d riscv: starfive: evb: Add EVB_SDK_BOOTENV
Add BOOTENV for jh7110 evb

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-08-16 15:37:03 +08:00
Samin Guo
f4ab04e7c0 riscv: starfive: jh7110: Add JH7110_XX_BOOTEN
Add JH7110_DISTRO_BOOTEN/JH7110_SDK_BOOTEN for debian/sdk boot
on JH7110 SOC.

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-08-16 15:28:58 +08:00
Samin Guo
0b1529615a riscv: starfive: evb: remove unused bootenv
will be replaced by the new bootenv

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2023-08-16 15:25:38 +08:00
andy.hu
39eb5e5464 Merge branch 'CR_6806_MMC_evb_william.qiu' into 'jh7110-master'
CR_6806: spl: starfive: modify driver strength and slew rate

See merge request sdk/u-boot!63
2023-07-28 10:56:18 +00: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