XHCI bringup on the Raspberry Pi 4

Nicolas Saenz Julienne nsaenzjulienne at suse.de
Wed Apr 1 19:30:27 CEST 2020


Hi All,
I'm working on enabling the VIA805 XCHI controller found on the new Raspberry
Pi 4. The controller sits behind a PCIe bus, which I've already implemented[1]
and will submit once the XCHI issues are resolved, as it's worthless otherwise.

The XHCI initialization gets stuck after issuing the fist 'enable slot'
command. I've been reviewing the whole init process and comparing it to Linux's
for days without finding anything fishy. DMA constraints, which are important
on the RPi are mantained, and on top of that, I can confirm DMA trough PCIe
works fine as I see two 'port status change' events available in the ring
before completly stalling. Also note that, unsurprisingly, the CRR bit in the
CRCR register (which marks the running state of the Command Ring state machine)
is never set after ringing the relevant doorbell.

I'm clueless at this point, I figure the VIA805 is sensitive to the ordering of
some of the operations we perform in u-boot, or worse, the timing. For example,
I tried replicanting Linux's behaviour with regard to 'port status change'
events, processing them before calling the 'enable slot' command. I also tried
to mimic Linux by enabling port-0's power (the USB3 port) before starting the
HC. Again, no luck.

I attached the usb/xhci debug output, any ideas on where to look will be
apreciated.

Regards,
Nicolas

[1] https://github.com/vianpl/u-boot/commits/brcm-pcie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot.log
Type: text/x-log
Size: 8114 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200401/deecda40/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200401/deecda40/attachment.sig>


More information about the U-Boot mailing list