geerlingguy / raspberry-pi-pcie-devices

Raspberry Pi PCI Express device compatibility database
http://pipci.jeffgeerling.com
GNU General Public License v3.0
1.61k stars 145 forks source link

VL805 and µPD720201 not working on Pi 5 #576

Open tltangliang opened 10 months ago

tltangliang commented 10 months ago

I'm testing vl805 and µPD720201 on pi5 and the usb adapter card doesn't work.

VL805

The pci card can be enumerated, but the usb device cannot be found and takes a very long time to boot up. b30b0a9141c21a1a2ffe5cb49461872

3a5c6bc93937d7d4ad16802762cc089

µPD720201

µPD720201 directly fails to boot the system, causing kernel errors

image

`RPi: BOOTSYS release VERSION:0f881224 DATE: 2023/12/14 TIME: 16:43:25 BOOTMODE: 0x06 partition 0 build-ts BUILD_TIMESTAMP=1702572205 serial 9931f32c boardrev d04170 stc 1361829 AON_RESET: 00000003 PM_RSTS 00001000 RP1_BOOT chip ID: 0x20001927 PM_RSTS: 0x00001000 part 00000000 reset_info 00000000 PMIC reset-event 00000000 rtc 00000001 alarm 00000000 enabled 0 uSD voltage 3.3V Initialising SDRAM 'Micron' 32Gb x2 total-size: 64 Gbit 4267 DDR 4267 1 0 64 152 RP1_BOOT chip ID: 0x20001927

RP1_BOOT chip ID: 0x20001927 RP1_BOOT: fw size 25968 PCI2 init PCI2 reset PCIe scan 00001de4:00000001 RP1_CHIP_INFO 20001927

RPi: BOOTLOADER release VERSION:0f881224 DATE: 2023/12/14 TIME: 16:43:25 BOOTMODE: 0x06 partition 0 build-ts BUILD_TIMESTAMP=1702572205 serial 9931f32c boardrev d04170 stc 4325528 AON_RESET: 00000003 PM_RSTS 00001000 Unsupported boot order 6 usb_pd_init status 3 USB_PD CONFIG 0 41 Boot mode: SD (01) order f4 SD HOST: 200000000 CTL0: 0x00800000 BUS: 400000 Hz actual: 390625 HZ div: 512 (256) status: 0x1fff0000 delay: 276 SD HOST: 200000000 CTL0: 0x00800f00 BUS: 400000 Hz actual: 390625 HZ div: 512 (256) status: 0x1fff0000 delay: 276 SD retry 1 oc 501 SD HOST: 200000000 CTL0: 0x00800000 BUS: 400000 Hz actual: 390625 HZ div: 512 (256) status: 0x1fff0000 delay: 276 OCR c0ff8000 [430] CID: 00ff000053445531201014a0148b014c CSD: 400e0032db790003ae077f800a400000 SD: bus-width: 4 spec: 2 SCR: 0x02058487 0x00000000 SD HOST: 200000000 CTL0: 0x00800f04 BUS: 50000000 Hz actual: 50000000 HZ div: 4 (2) status: 0x1fff0000 delay: 2 MBR: 0x00002000, 1048576 type: 0x0c MBR: 0x00102000,245891072 type: 0x83 MBR: 0x00000000, 0 type: 0x00 MBR: 0x00000000, 0 type: 0x00 USB-PD: src-cap PDO object1 0x080191f4 Current 5000 mA Voltage 5000 mV USB-PD: src-cap PDO object2 0x0002d12c Current 3000 mA Voltage 9000 mV USB-PD: src-cap PDO object3 0x0003c0e1 Current 2250 mA Voltage 12000 mV USB-PD: src-cap PDO object4 0x0004b0b4 Current 1800 mA Voltage 15000 mV Trying partition: 0 type: 32 lba: 8192 'mkfs.fat' ' bootfs ' clusters 261116 (4) rsc 32 fat-sectors 2040 root dir cluster 2 sectors 0 entries 0 FAT32 clusters 261116 [sdcard] autoboot.txt not found Select partition rsts 0 C(boot_partition) 0 EEPROM config 0 result 0 Trying partition: 0 type: 32 lba: 8192 'mkfs.fat' ' bootfs ' clusters 261116 (4) rsc 32 fat-sectors 2040 root dir cluster 2 sectors 0 entries 0 FAT32 clusters 261116 Read config.txt bytes 1408 hnd 0x2a3cf [sdcard] pieeprom.upd not found usb_max_current_enable default 0 max-current 5000 Read bcm2712-rpi-5-b.dtb bytes 76676 hnd 0x2a4b1 dt-match: compatible: raspberrypi,5-model-b match: brcm,bcm2712 dt-match: compatible: brcm,bcm2712 match: brcm,bcm2712

NOTICE: BL31: v2.6(release):v2.6-239-g2a9ede0bd NOTICE: BL31: Built : 14:26:57, Jun 22 2023 [ 0.508206] Unable to handle kernel paging request at virtual address ffffc00008e18103 [ 0.516179] Mem abort info: [ 0.518985] ESR = 0x0000000096000021 [ 0.522750] EC = 0x25: DABT (current EL), IL = 32 bits [ 0.528087] SET = 0, FnV = 0 [ 0.531150] EA = 0, S1PTW = 0 [ 0.534302] FSC = 0x21: alignment fault [ 0.538327] Data abort info: [ 0.541218] ISV = 0, ISS = 0x00000021 [ 0.545069] CM = 0, WnR = 0 [ 0.548045] swapper pgtable: 16k pages, 47-bit VAs, pgdp=0000000001238000 [ 0.554869] [ffffc00008e18103] pgd=100000010018c003, p4d=100000010018c003, pud=100000010018c003, pmd=1000000100190003, pte=0068001b00000f13 [ 0.567465] Internal error: Oops: 0000000096000021 [#1] PREEMPT SMP [ 0.573762] Modules linked in: [ 0.576827] CPU: 0 PID: 9 Comm: kworker/u8:0 Not tainted 6.1.70-v8-16k+ #1 [ 0.583737] Hardware name: Raspberry Pi 5 Model B Rev 1.0 (DT) [ 0.589596] Workqueue: events_unbound deferred_probe_work_func [ 0.595461] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 0.602457] pc : handshake+0x50/0xc0 [ 0.606050] lr : handshake+0x38/0xc0 [ 0.609639] sp : ffffc00008083930 [ 0.612964] x29: ffffc00008083930 x28: 0000000000000000 x27: 0000000000000000 [ 0.620136] x26: 000000001e0e2f26 x25: ffffd0000c88d220 x24: ffffd0000d6d4030 [ 0.627309] x23: 00000001481488bd x22: 000000000000000a x21: 0000000000000000 [ 0.634481] x20: 0000000000000800 x19: ffffc00008e18103 x18: 0000000000000004 [ 0.641653] x17: 202c293832312020 x16: 7361772820383231 x15: 0140000000000000 [ 0.648825] x14: 0040000000000001 x13: 0000401af71e8000 x12: 2030303030282065 [ 0.655996] x11: 636976656420676e x10: 0000000000004000 x9 : ffffd0000c13c1b8 [ 0.663168] x8 : ffffc00008e18000 x7 : 0000000000000004 x6 : 000000000213a6a2 [ 0.670340] x5 : 00ffffffffffffff x4 : 0025317bffed1440 x3 : 0000000000000018 [ 0.677512] x2 : 00000000000000e2 x1 : 00000000000003e8 x0 : 000000001e0e96bd [ 0.684684] Call trace: [ 0.687136] handshake+0x50/0xc0 [ 0.690376] quirk_usb_early_handoff+0x334/0x990 [ 0.695015] pci_fixup_device+0x104/0x210 [ 0.699042] pci_bus_add_device+0x2c/0xd0 [ 0.703070] pci_bus_add_devices+0x40/0x90 [ 0.707184] pci_bus_add_devices+0x6c/0x90 [ 0.711297] pci_host_probe+0x48/0xd0 [ 0.714975] brcm_pcie_probe+0x384/0x83c [ 0.718914] platform_probe+0x70/0xcc [ 0.722591] really_probe+0xc4/0x2e0 [ 0.726179] driver_probe_device+0x80/0x120 [ 0.730553] driver_probe_device+0x44/0x164 [ 0.734753] device_attach_driver+0xc0/0x13c [ 0.739215] bus_for_each_drv+0x84/0xe0 [ 0.743067] __device_attach+0xa4/0x1a0 [ 0.746917] device_initial_probe+0x1c/0x2c [ 0.751116] bus_probe_device+0xa4/0xb0 [ 0.754966] deferred_probe_work_func+0x90/0xd0 [ 0.759515] process_one_work+0x200/0x474 [ 0.763542] worker_thread+0x22c/0x43c [ 0.767306] kthread+0x110/0x114 [ 0.770546] ret_from_fork+0x10/0x20 [ 0.774137] Code: 14000004 aa1603e0 940cbf8e d503203f (b9400263) [ 0.780259] ---[ end trace 0000000000000000 ]--- `

julienrobin28 commented 5 months ago

Hi @tltangliang

Had the exact same issue on the exact same hardware (I believe, PCIe x1 Slot for RPI 5 from 52PI, but the PCB is black, and exact same looking USB3 card with VL805 on it).

I ended up with the VL805 card working, by adding this line into /boot/firmware/config.txt:

    dtoverlay=pcie-32bit-dma-pi5

I tried a lot of different PCIe options (both by dtoverlay, dtparam, and cmdline.txt) but this one is the only / single one that made it work (others options aren't needed). Works fine, around 400 MiB/s without warnings from dmesg.

From /boot/firmware/overlays/README the only options I didn't try is pciex1-compat-pi5, on which l1ss, no-l0s and no-mip sub-parameters are available (but I still don't know what they do). I also have to get information about CLKREQ# things.

It looks like having PCIe devices working with the Pi 5 isn't as plug and play as expected (at least as I expected...), but everything seems to turn around these options.

Hope this may help!

tltangliang commented 5 months ago

That's awesome! Upon seeing your message, I immediately tested it, and adding this configuration made it work. But the system cannot boot from USB through VL805. However, the µPD720201 still cannot be used.

Thank you very much!!!