It works for the 1.2a version, too.

To create the .dtb file from upstream I used the attached script (don't know how you do it, but maybe it's helpful for someone else, too).

There are some warnings which were addressed here: https://github.com/starfive-tech/linux/issues/118

Thank you.

Quoting Kevin Lo <ke...@kevlo.org>:

On Tue, Aug 29, 2023 at 09:15:41PM +0200, Mark Kettenis wrote:

> Date: Tue, 29 Aug 2023 11:58:23 +0200
> From: Mark Kettenis <mark.kette...@xs4all.nl>
>
> Upstreaming of the JH7110 PCIe device tree bindings isn't finished
> yet, but it seems some progress has been made and things have been
> reviewed by some of the key people involved:
>
>   https://patchwork.kernel.org/project/linux-pci/list/?series=779297
>
> Here is a diff that adjusts the driver to the current state of things
> such that we can use the latest device tree from:
>
>   https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream
>
> to continue development.  The idea is to support the preliminary
> bindings a little bit longer such that folks can update their device
> trees.  Will probably drop support for the preliminary bindings in a
> few weeks.
>
> ok?

patrick@ pointed out that the dv_unit check won't work properly if the
first PCIe controller is disabled.  So here is a diff that checks the
device address instead like we do for dwqe(4).

ok?

ok kevlo@

Tested on my VisionFive 2 v1.3b with the device tree from:

https://raw.githubusercontent.com/starfive-tech/linux/JH7110_VisionFive2_upstream/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dts

It works fine, the NVMe is detected.

BTW, I noticed that the memory statistics seem to be incorrect.
The VisionFive 2 is equipped with 8GB RAM.

OpenBSD 7.3-current (GENERIC.MP) #0: Wed Aug 30 11:52:03 CST 2023
    kevlo@vf2:/usr/src/sys/arch/riscv64/compile/GENERIC.MP
real mem  = 4294967296 (4096MB)
            ^^^^^^^^^^^^^^^^^^^
avail mem = 8110370816 (7734MB)
            ^^^^^^^^^^^^^^^^^^^
SBI: OpenSBI v1.2, SBI Specification Version 1.0
random: good seed from bootblocks
mainbus0 at root: StarFive VisionFive 2 v1.3B
cpu0 at mainbus0: SiFive U7 imp 4210427 rv64imafdc_zba_zbb
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 rv64imafdc_zba_zbb
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 rv64imafdc_zba_zbb
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 rv64imafdc_zba_zbb
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
"display-subsystem" at mainbus0 not configured
"stmmac-axi-config" 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
"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
dwiic0 at simplebus0
iic0 at dwiic0
dwiic1 at simplebus0
iic1 at dwiic1
"spi" at simplebus0 not configured
"tdm" at simplebus0 not configured
"pwmdac" at simplebus0 not configured
"i2s" 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
dwiic3 at simplebus0
iic3 at dwiic3
"sony,imx219" at iic3 addr 0x10 not configured
"i2s" at simplebus0 not configured
"i2s" at simplebus0 not configured
"pwm" at simplebus0 not configured
stftemp0 at simplebus0
"spi" at simplebus0 not configured
"timer" at simplebus0 not configured
"watchdog" at simplebus0 not configured
"crypto" at simplebus0 not configured
"dma-controller" at simplebus0 not configured
"rng" at simplebus0 not configured
dwmmc0 at simplebus0: 49 MHz base clock
sdmmc0 at dwmmc0: 8-bit, mmc 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 0x00, address 6c:cf:39:00:31:1d
ytphy0 at dwqe0 phy 0: YT8531 10/100/1000 PHY, rev. 11
dwqe1 at simplebus0 gmac 1: rev 0x00, address 6c:cf:39:00:31:1e
dwqe1: reset timeout
ytphy1 at dwqe1 phy 0: YT8531 10/100/1000 PHY, rev. 11
"dma-controller" at simplebus0 not configured
"pinctrl" at simplebus0 not configured
"power-controller" at simplebus0 not configured
"csi-bridge" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
"phy" at simplebus0 not configured
"camss" at simplebus0 not configured
"lcd-controller" at simplebus0 not configured
"hdmi" 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
xhci0 at pci1 dev 0 function 0 "VIA VL805 xHCI" rev 0x01: intx, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "VIA xHCI root hub" rev 3.00/1.00 addr 1
stfpcie1 at simplebus0
pci2 at stfpcie1
0:0:0: bridge mem address conflict 0x900000000/0x100000
ppb1 at pci2 dev 0 function 0 "PLDA XpressRICH-AXI" rev 0x00
pci3 at ppb1 bus 1
nvme0 at pci3 dev 0 function 0 vendor "Phison", unknown product 0x5021 rev 0x01: intx, NVMe 1.4
nvme0: TEAM TM8FPK500G, firmware ELFMB0.6, serial TPBF2210110040500017
scsibus0 at nvme0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <NVMe, TEAM TM8FPK500G, ELFM>
sd0: 476940MB, 512 bytes/sector, 976773168 sectors
gpiorestart0 at mainbus0
"pwmdac-codec" at mainbus0 not configured
"sound-pwmdac" at mainbus0 not configured
"clk_ext_camera" at mainbus0 not configured
"framebuffer" at mainbus0 not configured
scsibus1 at sdmmc0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Samsung, CJTD4R, 0000> removable
sd1: 59640MB, 512 bytes/sector, 122142720 sectors
scsibus2 at sdmmc1: 2 targets, initiator 0
sd2 at scsibus2 targ 1 lun 0: <Sandisk, SR64G, 0086> removable
sd2: 60906MB, 512 bytes/sector, 124735488 sectors
uhub1 at uhub0 port 1 configuration 1 interface 0 "vendor 0x2109 USB2.0 Hub" rev 2.10/4.20 addr 2
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd2a (6b2230b449d63529.a) swap on sd2b dump on sd2b
WARNING: CHECK AND RESET THE DATE!


Attachment: dtb_obsd.sh
Description: Bourne shell script

Reply via email to