Skip to contentSkip to conversation

configs: starfive: Enable PCIE auto enum and NVME/USB stuff for Starfive Visionfive 2

PATCH In review Shengyu Qu 4 participants 7 messages Aug 22, 2023 – Sep 5, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Shengyu Qu

author
#1 lore raw

PATCH 1/2 configs: starfive: Enable PCIE auto enum and NVME/USB stuff for Starfive Visionfive 2

Although PCIE driver already exists, board defconfig isn't configured to enable PCIE enum on boot, thus USB storage device and NVME drive are not supported by default. So modify defconfig to enable PCIE auto enum, then start USB subsystem and scan nvme drive on boot.

---
 configs/starfive_visionfive2_defconfig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
configs/starfive_visionfive2_defconfig +7 -1
index e9b63e5b84..3002c96f0e 100644
@@ -30,6 +30,7 @@ CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x82000000
 CONFIG_SYS_PCI_64BIT=y
 CONFIG_PCI=y
+CONFIG_PCI_INIT_R=y
 CONFIG_TARGET_STARFIVE_VISIONFIVE2=y
 CONFIG_SPL_OPENSBI_LOAD_ADDR=0x40000000
 CONFIG_ARCH_RV64I=y
@@ -43,7 +44,7 @@ CONFIG_SD_BOOT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 debug rootwait earlycon=sbi"
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};"
+CONFIG_PREBOOT="nvme scan; usb start; setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
 CONFIG_DEFAULT_FDT_FILE="starfive/jh7110-starfive-visionfive-2.dtb"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
@@ -124,4 +125,9 @@ CONFIG_TIMER_EARLY=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PCI=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_PCI=y
+CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
Signature · 1 line
2.42.0
Tested-by on v1 1/2
#2 lore raw
Quoted 6 lines · Shengyu Qu

Although PCIE driver already exists, board defconfig isn't configured to enable PCIE enum on boot, thus USB storage device and NVME drive are not supported by default. So modify defconfig to enable PCIE auto enum, then start USB subsystem and scan nvme drive on boot.

Quoted 38 lines
---
 configs/starfive_visionfive2_defconfig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
configs/starfive_visionfive2_defconfig +7 -1
index e9b63e5b84..3002c96f0e 100644
@@ -30,6 +30,7 @@ CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x82000000
 CONFIG_SYS_PCI_64BIT=y
 CONFIG_PCI=y
+CONFIG_PCI_INIT_R=y
 CONFIG_TARGET_STARFIVE_VISIONFIVE2=y
 CONFIG_SPL_OPENSBI_LOAD_ADDR=0x40000000
 CONFIG_ARCH_RV64I=y
@@ -43,7 +44,7 @@ CONFIG_SD_BOOT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 debug rootwait earlycon=sbi"
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr ${fdtcontroladdr};"
+CONFIG_PREBOOT="nvme scan; usb start; setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
 CONFIG_DEFAULT_FDT_FILE="starfive/jh7110-starfive-visionfive-2.dtb"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
@@ -124,4 +125,9 @@ CONFIG_TIMER_EARLY=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PCI=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_PCI=y
+CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
Signature · 1 line
2.42.0
Tested-by on v1 1/2
#3 lore raw
In reply to Shengyu Qu
Quoted 7 lines · Shengyu Qu

Although PCIE driver already exists, board defconfig isn't configured to enable PCIE enum on boot, thus USB storage device and NVME drive are not supported by default. So modify defconfig to enable PCIE auto enum, then start USB subsystem and scan nvme drive on boot.

Quoted 42 lines
---
 configs/starfive_visionfive2_defconfig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
configs/starfive_visionfive2_defconfig +1 -1
index e9b63e5b84..3002c96f0e 100644
@@ -30,6 +30,7 @@ CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x82000000
 CONFIG_SYS_PCI_64BIT=y
 CONFIG_PCI=y
+CONFIG_PCI_INIT_R=y
 CONFIG_TARGET_STARFIVE_VISIONFIVE2=y
 CONFIG_SPL_OPENSBI_LOAD_ADDR=0x40000000
 CONFIG_ARCH_RV64I=y
@@ -43,7 +44,7 @@ CONFIG_SD_BOOT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 debug rootwait earlycon=sbi"
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr};fdt addr

${fdtcontroladdr};"
+CONFIG_PREBOOT="nvme scan; usb start; setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
CONFIG_DEFAULT_FDT_FILE="starfive/jh7110-starfive-visionfive-2.dtb" CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y

configs/starfive_visionfive2_defconfig +5 -1
@@ -124,4 +125,9 @@ CONFIG_TIMER_EARLY=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PCI=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_PCI=y
+CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
--

2.42.0

author
#4 lore raw

PATCH 2/2 doc: board: starfive: Add more info about supported driver

In reply to a message not in the archive

Since PLDA PCIE driver is added and VL805 support is enabled in defconfig for Starfive Visionfive 2, modify the document to keep consistent.

---
 doc/board/starfive/visionfive2.rst | 2 ++
 1 file changed, 2 insertions(+)
doc/board/starfive/visionfive2.rst +2 -0
index 941899a0a4..460f23aec3 100644
@@ -20,6 +20,8 @@ The support for following drivers are already enabled:
 3. StarFive JH7110 reset Driver.
 4. Cadence QSPI controller Driver.
 5. MMC SPI Driver for MMC/SD support.
+6. PLDA PCIE controller driver.
+7. On-board VL805 PCIE-USB controller driver.
 
 Booting from MMC using U-Boot SPL
 ---------------------------------
Signature · 1 line
2.42.0
Tested-by on v1 2/2
#5 lore raw

Re: [PATCH v1 2/2] doc: board: starfive: Add more info about supported driver

Quoted 5 lines · Shengyu Qu

Since PLDA PCIE driver is added and VL805 support is enabled in defconfig for Starfive Visionfive 2, modify the document to keep consistent.

Quoted 20 lines
---
 doc/board/starfive/visionfive2.rst | 2 ++
 1 file changed, 2 insertions(+)
doc/board/starfive/visionfive2.rst +2 -0
index 941899a0a4..460f23aec3 100644
@@ -20,6 +20,8 @@ The support for following drivers are already enabled:
 3. StarFive JH7110 reset Driver.
 4. Cadence QSPI controller Driver.
 5. MMC SPI Driver for MMC/SD support.
+6. PLDA PCIE controller driver.
+7. On-board VL805 PCIE-USB controller driver.
 
 Booting from MMC using U-Boot SPL
 ---------------------------------
Signature · 1 line
2.42.0
Tested-by on v1 2/2
#6 lore raw

Re: [PATCH v1 2/2] doc: board: starfive: Add more info about supported driver

In reply to Shengyu Qu
Quoted 6 lines · Shengyu Qu

Since PLDA PCIE driver is added and VL805 support is enabled in defconfig for Starfive Visionfive 2, modify the document to keep consistent.

Quoted 22 lines
---
 doc/board/starfive/visionfive2.rst | 2 ++
 1 file changed, 2 insertions(+)
doc/board/starfive/visionfive2.rst +2 -1
index 941899a0a4..460f23aec3 100644
@@ -20,6 +20,8 @@ The support for following drivers are already enabled:
 3. StarFive JH7110 reset Driver.
 4. Cadence QSPI controller Driver.
 5. MMC SPI Driver for MMC/SD support.
+6. PLDA PCIE controller driver.
+7. On-board VL805 PCIE-USB controller driver.
 
 Booting from MMC using U-Boot SPL
 ---------------------------------
--

2.42.0

#7 lore raw

Re: [PATCH v1 2/2] doc: board: starfive: Add more info about supported driver

In reply to Shengyu Qu

doc/board/starfive/visionfive2.rst The support for following drivers are already enabled:

Quoted 14 lines · Shengyu Qu

Since PLDA PCIE driver is added and VL805 support is enabled in defconfig for Starfive Visionfive 2, modify the document to keep consistent.

---
  doc/board/starfive/visionfive2.rst | 2 ++
  1 file changed, 2 insertions(+)
doc/board/starfive/visionfive2.rst +0 -0
index 941899a0a4..460f23aec3 100644
@@ -20,6 +20,8 @@ The support for following drivers are already enabled:

Nits:

Support for the following drivers is already enabled:

Best regards

Heinrich

Quoted 8 lines
doc/board/starfive/visionfive2.rst +2 -0
  3. StarFive JH7110 reset Driver.
  4. Cadence QSPI controller Driver.
  5. MMC SPI Driver for MMC/SD support.
+6. PLDA PCIE controller driver.
+7. On-board VL805 PCIE-USB controller driver.
 
  Booting from MMC using U-Boot SPL
  ---------------------------------