Greetings,
 
I got OpenBSD booting from microSD on the VisionFive2 Lite but it took a bit of hacking, NVMe still not working sadly.
 
Let me know if there’s anything else I can do or try on my end and thanks! Here is bug report (see also attached dmesg)

Went back and forth with Claude for a bit. I hope it’s okay that I used AI to summarize the report:

>Synopsis: riscv64: StarFive VisionFive 2 Lite (JH7110S) - SD card, NVMe and USB not working
>Category: kernel
>Description:
Board: StarFive VisionFive 2 Lite, SD-card variant (JH7110S SoC).
Kernel: OpenBSD 8.0-beta (GENERIC.MP) #28: Fri Sep 25 19:20:57 MDT 2026
Firmware: StarFive vendor U-Boot as shipped in SPI flash:
         U-Boot 2021.10 (Sep 15 2025 - 16:03:04 +0800),
         Build: jenkins-VF2_6.12_Branch_SDK_Release-64
         (Buildroot JH7110_VF2_6.12_v5.14.10, gcc 12.2.0)
 
1. Booting install80.img with the device tree supplied by the
  vendor U-Boot (${fdtcontroladdr}), the SD controller fails
  to attach:
 
    dwmmc0 at simplebus0: no clock base
 
  hw.product reports "StarFive VisionFive V2 Lite", but
  hw.disknames lists only rd0, so the installer offers no
  disks.
 
2. Booting instead with the mainline device tree
  jh7110-starfive-visionfive-2-lite.dtb (from Debian's
  linux-base-7.2.8+deb14-riscv64 package), the SD controllers
  attach:
 
    dwmmc0 at simplebus0: 49 MHz base clock
    sdmmc0 at dwmmc0: 4-bit, sd high-speed, dma
    dwmmc1 at simplebus0: 49 MHz base clock
    sdmmc1 at dwmmc1: 4-bit, sd high-speed, dma
    sdmmc1: can't enable card
 
  (sdmmc1 is the eMMC controller; this board has no eMMC
  fitted.) No card is detected on sdmmc0 although one is
  inserted. The mainline dts uses cd-gpios for card detect on
  mmc@16010000. Adding "non-removable" to that node in U-Boot
  works around it and sd0 attaches normally; the system is now
  installed and running this way.
 
  With this device tree, dmesg also shows
  "stfclock_enable_jh7110_sys: unknown clock" and
“stfclock_get_frequency_jh7110_sys: unknown clock 0x00000094”
  (full lines in the attached dmesg).
 
3. An NVMe drive in the M.2 slot is never detected.
  With the U-Boot-supplied device tree, stfpcie0 attaches but
  no pci bus or nvme device follows it.
  With the mainline device tree, the root port and bridge
  attach but nothing is found behind the bridge:
 
    stfpcie0 at simplebus0
    pci0 at stfpcie0
    ppb0 at pci0 dev 0 function 0 "PLDA XpressRICH-AXI" rev 0x00
    pci1 at ppb0 bus 1
 
  and the slot's power regulator is not handled:
 
    "regulator-vcc-3v3-pcie" at mainbus0 not configured
 
  The drive itself works. U-Boot detects it:
 
    StarFive # pci enum
    starfive_pcie pcie@2C000000: Port link up.
    starfive_pcie pcie@2C000000: Starfive PCIe bus probed.
    PCI: Failed autoconfig bar 10
    StarFive # nvme info
    Device 0: Vendor: 0x2646 Rev: HPS1 Prod: 0026B7382D1E40
                Type: Hard Disk
                Capacity: 122104.3 MB = 119.2 GB
 
  Running "pci enum" in U-Boot before booting, so that U-Boot
  has powered the slot and brought the link up, does not help
  with either device tree: with the mainline tree, pci1 is
  still empty and no nvme device attaches.
 
4. USB is not supported: "usb" at simplebus0 not configured.
 
The attached dmesg is from the installed system, booted with the
mainline device tree plus the non-removable workaround.
>How-To-Repeat:
Boot install80.img from the SD card with the board's U-Boot:
   load mmc 0:1 ${kernel_addr_r} efi/boot/bootriscv64.efi
   bootefi ${kernel_addr_r} ${fdtcontroladdr}
The installer finds no disks.
 
Boot with the mainline Lite device tree instead of
${fdtcontroladdr}: the SD slot attaches but no card is found.
NVMe is not detected with either device tree.
>Fix:
Workaround for SD, used as the U-Boot bootcmd with the dtb
copied to the MSDOS boot partition:
   load mmc 0:1 ${fdt_addr_r} jh7110-starfive-visionfive-2-lite.dtb
   fdt addr ${fdt_addr_r}
   fdt resize
   fdt set /soc/mmc@16010000 non-removable
   load mmc 0:1 ${kernel_addr_r} efi/boot/bootriscv64.efi
   bootefi ${kernel_addr_r} ${fdt_addr_r}
No workaround known for NVMe.

Happy Hacking,
Jordan Hardee
 
OpenBSD 8.0-beta (GENERIC.MP) #28: Fri Sep 25 19:20:57 MDT 2026
    [email protected]:/usr/src/sys/arch/riscv64/compile/GENERIC.MP
real mem  = 4294967296 (4096MB)
avail mem = 3930402816 (3748MB)
SBI: OpenSBI v1.2, SBI Specification Version 1.0
random: good seed from bootblocks
mainbus0 at root: StarFive VisionFive 2 Lite
cpu0 at mainbus0: SiFive U7 imp 4210427
intc0 at cpu0
cpu0: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu0: 2048KB 64b/line 2048-way L2 cache
cpu1 at mainbus0: SiFive U7 imp 4210427
cpu1: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu1: 2048KB 64b/line 2048-way L2 cache
cpu2 at mainbus0: SiFive U7 imp 4210427
cpu2: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu2: 2048KB 64b/line 2048-way L2 cache
cpu3 at mainbus0: SiFive U7 imp 4210427
cpu3: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu3: 2048KB 64b/line 2048-way L2 cache
"opp-table-0" at mainbus0 not configured
"dvp-clock" at mainbus0 not configured
"gmac0-rgmii-rxin-clock" at mainbus0 not configured
"gmac0-rmii-refin-clock" at mainbus0 not configured
"gmac1-rgmii-rxin-clock" at mainbus0 not configured
"gmac1-rmii-refin-clock" at mainbus0 not configured
"hdmitx0-pixel-clock" at mainbus0 not configured
"i2srx-bclk-ext-clock" at mainbus0 not configured
"i2srx-lrck-ext-clock" at mainbus0 not configured
"i2stx-bclk-ext-clock" at mainbus0 not configured
"i2stx-lrck-ext-clock" at mainbus0 not configured
"mclk-ext-clock" at mainbus0 not configured
"oscillator" at mainbus0 not configured
"rtc-oscillator" at mainbus0 not configured
"stmmac-axi-config" at mainbus0 not configured
"tdm-ext-clock" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
plic0 at simplebus0
stfpciephy0 at simplebus0
stfpciephy1 at simplebus0
stfclock0 at simplebus0: stgcrg
syscon0 at simplebus0: "syscon"
stfclock1 at simplebus0: syscrg
syscon1 at simplebus0: "syscon"
stfclock2 at syscon1: pll
stfpinctrl0 at simplebus0
stfclock3 at simplebus0: aoncrg
syscon2 at simplebus0: "syscon"
"timer" at simplebus0 not configured
"cache-controller" at simplebus0 not configured
com0 at simplebus0: dw16550
com0: console
com1 at simplebus0stfclock_enable_jh7110_sys: unknown clock 0x00000094
stfclock_get_frequency_jh7110_sys: unknown clock 0x00000094
: dw16550
com1: probed fifo depth: 0 bytes
dwiic0 at simplebus0
iic0 at dwiic0
dwiic1 at simplebus0
iic1 at dwiic1
"spi" at simplebus0 not configured
"usb" at simplebus0 not configured
"phy" at simplebus0 not configured
dwiic2 at simplebus0
iic2 at dwiic2
axppmic0 at iic2 addr 0x36: AXP15060
"atmel,24c04" at iic2 addr 0x50 not configured
dwiic3 at simplebus0
iic3 at dwiic3
"pwm" at simplebus0 not configured
stftemp0 at simplebus0
"spi" at simplebus0 not configured
"watchdog" at simplebus0 not configured
"memory-controller" at simplebus0 not configured
"crypto" at simplebus0 not configured
"dma-controller" at simplebus0 not configured
stfrng0 at simplebus0
dwmmc0 at simplebus0: 49 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, dma
dwmmc1 at simplebus0: 49 MHz base clock
sdmmc1 at dwmmc1: 4-bit, sd high-speed, dma
dwqe0 at simplebus0 gmac 0: rev 0x52, address 6c:cf:39:00:88:c0
ytphy0 at dwqe0 phy 0: YT8531, rev. 11
"dma-controller" at simplebus0 not configured
"pinctrl" at simplebus0 not configured
"power-controller" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
"phy" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
stfpcie0 at simplebus0
pci0 at stfpcie0
ppb0 at pci0 dev 0 function 0 "PLDA XpressRICH-AXI" rev 0x00
pci1 at ppb0 bus 1
gpiorestart0 at mainbus0
gpioleds0 at mainbus0: no LEDs
"audio-codec" at mainbus0 not configured
"sound" at mainbus0 not configured
"regulator-vcc-3v3-pcie" at mainbus0 not configured
"framebuffer" at mainbus0 not configured
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Sandisk, SH32G, 0080> removable
sd0: 30436MB, 512 bytes/sector, 62333952 sectors
sdmmc1: can't enable card
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (5dee51c2d34fa53b.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!

Reply via email to