The best source of info I know of is Atish Patra’s instructions, which can be found here:
Hello,
Has anyone made any progress with their expansion board?
I’ve been playing with the HiFive Unleashed board for a while and I’ve been trying to get the expansion board to work.
I have the drivers for the microsemi board enabled in the Linux Kernel
Here is a section of the boot messages:
[ 0.670000] microsemi_pcie_probe In
[ 0.670000] microsemi-pcie 2030000000.pci: interrupt disabled
[ 0.680000] microsemi-pcie 2030000000.pci: Intc node foundi interrupt-controller
[ 0.690000] microsemi-pcie 2030000000.pci: host bridge /soc/pci@2030000000 ranges:
[ 0.690000] microsemi-pcie 2030000000.pci: Parsing ranges property…
[ 0.700000] microsemi-pcie 2030000000.pci: MEM 0x40000000…0x5fffffff -> 0x40000000
[ 0.710000] microsemi-pcie 2030000000.pci: PCI host bridge to bus 0000:00
And here is what I get when listing PCI devices:
lspci -v
00:00.0 Class 1506: Device 2901:1506 (rev 01) (prog-if 29)
Flags: fast devsel
I/O ports at [disabled]
I/O ports at [disabled]
I/O ports at [disabled]
Expansion ROM at [disabled by cmd]
Does anyone know what I’m missing?
I am new to modifying Linux Kernels. Please forgive me if I am asking a super simple, newbie question.
You need the microsemi pci driver and you need a way to modify the in rom DTS to add the missing entry for the microsemi card.
The best reference is here
https://github.com/westerndigitalcorporation/RISC-V-Linux
This adds code to bbl to dynamically modify the DTS to add the missing entry for the microsemi card. Plus it has the microsemi driver, and a 4.19 kernel with patches. You might need to use the v1_0 branch of freedom-u-sdk to make this work though as it refers to freedom-u-sdk which was recently modified.
The SiFive freedom-u-sdk was recently modified to support the card. This is a little rough but can be found here
https://github.com/sifive/freedom-u-sdk
This adds u-boot support, and then u-boot provides the DTS instead of using the one from the ROM. it also includes the microsemi pcie driver.
Another option is to try this
https://github.com/tmagik/freedom-u-sdk/releases/tag/hifiveu-2.0-alpha.1
which is similar to the above, and is also a little rough but should work.
Thank you for responding,
I did pull the freedom-u-sdk on sifive’s github in order to get u-boot, and that’s how I got the above result.
If the card is in standalone mode, it doesn’t see any pci devices, which is why I assumed I already had the drivers.
If you are having trouble with freedom-u-sdk, then I would suggest filing a github issue. The forums have low participation, and aren’t the best place to get help.
I’m not a hardware guy or low level system programmer, so all I can do is point you at useful sources of info.
I would ask if you have any devices plugged into the board though. I don’t know if lspci will do anything useful if nothing is plugged in.
I do have devices connected; my gpu, and a hard drive.
Alrighty, thanks for the advice!
I guess one more thing I can ask is if you have programmed the FPGA. It must be programmed at least once, but once programmed should not need to be programmed a second time.
If ‘lspci’ shows nothing you need to program the FPGA. See https://github.com/sifive/freedom-u-sdk/releases/download/hifiveu-2.0-alpha-2/IOFPGAChip.job for most recent ‘known good’ fpga bitstream build.
root@hifiveu:~# lspci
00:00.0 PCI bridge: Actel Device 1556
01:00.0 PCI bridge: PMC-Sierra Inc. Device 8561
02:00.0 PCI bridge: PMC-Sierra Inc. Device 8561
02:01.0 PCI bridge: PMC-Sierra Inc. Device 8561
02:02.0 PCI bridge: PMC-Sierra Inc. Device 8561
02:03.0 PCI bridge: PMC-Sierra Inc. Device 8561
03:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD ]
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 64]
05:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM9611
06:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9125 PCIe SATA 6.0 Gb/s controlle)