Closed WeeJeWel closed 1 year ago
There is a USB soft-disconnect when switching between the ROM file-loader and the file-server. I't possible that that host doesn't like that but you'd need a USB analyzer to debug further e.g. to see if the Pi is doing something that's not compliant with the USB spec. Unfortunately, I don't think anyone here is going to be able to spend time investigating non-Linux OS ports / different cables etc
Thanks for the reply! I didn't know a soft-disconnect was a thing, so that's already helpful. To be continued...
IIRC it puts the PHY into a mode where it ignores all packets so it should look like a physical disconnect to the host.
Update: sometimes it does work as expected.
It will be due to the quality of the cable, we've seen before USB cables with an impedance double (or half) of the 90ohm specification. This then causes problems with the USB signals which sometimes work and sometimes don't (it really depends on the quality of the USB cable). Good quality cables tend to work fine, others may or may not work. The fact it works when you add another thing may just again be a bit more randomness added to the signal integrity...
Hm... but when using the same USB-C cable, but with a small USB-C → USB-A adapter at the end, the problem never occurs.
You're just adding more impedance, exactly what the effect will be can only really be determined by some very expensive test equipment and a bunch of smith charts. I can't be sure that is the problem in this case, but it has been seen in the past (with cheap cables) which produced a similar failure.
@timg236 I've thought about this, and because it sometimes works, I think it's a timing issue. Can we add some delay in the bootcode between the usb device disconnect and reconnect? As if the 'cable' was plugged out longer.
Please can you check the latest version. It does a soft disconnect when the second stage is initialised so you should see a delay whilst SDRAM is initialised.
omg it works! Thank you so much!! <3
This is a quite interesting but weird problem, which I'm frankly unsure of whether it's fixable by usbboot at all.
A CM4 on a carrier board with an USB-C connector, regardless using USB-C PD or not, always shows up as
BCM2711 Boot
when connected andnRPIBOOT
is enabled. So far, so good.Then
usbboot
runs and uploads the fileserver bootcode. TheBCM2711 Boot
disconnects. So far, so good.On some devices,
BCM2711 Boot
comes back with a fileserver. All is good! On other devices, e.g. all MacBooks that I've tested, the CM4 doesn't come back again.Now here's where the fun starts. When using an USB-C (CM4) → USB-A (MacBook) cable on the same MacBook, everything works fine!
I think this has to to with the USB-C PD (CC) protocol, but honestly, I don't even know where to start looking.
Any clue?