uspi
uspi copied to clipboard
RPi 4 support ?
How tricky will this be ?
This requires a complete rewrite of the USB host controller driver. It is not likely, that there will be a version of this project, which can be used with the RPi 4, in foreseeable time.
Now that circle has support for Pi4 is uspi support more probable ?
Thanks !
The effort to port this from C++ to C remains huge, I'm sorry. It's not only the xHCI driver. USB on the RPi 4 needs MMU LPAE support (for AArch32) and a driver for the PCIe host bridge too. And if one wants Ethernet access, this would be another separate driver. With the increasing variety of RPi hardware, I decided to focus on Circle and related projects.
the pi4 still has the old dwc2 controller as well, but its now wired to the usb-c port
the USB_OTG pin isnt connected properly, and the fancy usb-c direction detection logic is missing, so you have to force host or device mode like with the pi A's
Why not consider converting your project to Circle so you have all the features of it ? I converted a huge Linux C 32 bit program to run on Circle 64 bit in only a few weeks with excellent results. You don't have to use all the features of Circle and indeed I used my own audio drivers, but it's still an excellent base for bare metal work. There isn't much it can't do.
"Circle"?? Are you referring to this? https://github.com/circleci
No this https://github.com/rsta2/circle
uspi was derived from a much earlier version of it several years ago. Since then Circle has been updated with lots of good stuff including PnP USB.
@MikeDB1 : Thanks! The search I did (github circle
) didn't reveal that. So glad to know of this!
Maybe you can answer another question for me: I'm interested in a reliable method for turning USB power ON and OFF. This item from the Linux kernel docs indicates it's supported in the kernel, but indicates it must also be supported by the driver. I can't find this "USB power" feature described in the RPi documentation, and so assume it's just not supported in the "native" driver. The uhubctl
project indicates it's possible to do this on the RPi, but I guess it must be using sysfs
? At any rate - integration with the driver would seem to be a "cleaner" way to do this. Is anybody here in circle doing something like this?
I seem to recall a comment on the forum that the only way to do this was to use a special cable, for example to connect a Pi4 to a PC, with the power lines disconnected. That would appear to suggest that the Pi driver has no method to turn power off.
Perhaps... but I wonder how uhubctl
manages to do it?
Seems there was a firmware update from VLI superceding the comment I'd seen.
https://www.raspberrypi.org/forums/viewtopic.php?t=258489
I'll have a play with it.