-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
platform(d1): Support USB OTG Device Mode #88
Comments
https://www.kernel.org/doc/html/v4.14/driver-api/usb/writing_musb_glue_layer.html is actually very good and relevant too. |
VERY relevant (the exact PDF we need, I think): https://linux-sunxi.org/images/7/73/Musbmhdrc.pdf |
More relevant docs: https://linux-sunxi.org/USB_OTG_Controller_Register_Guide |
When we want to support host mode, here's a host driver for the atsamd: https:/nviennot/turbo-resin/tree/main/src/drivers/usb (note: the rest of the project is GPL, but the usb host stack is MIT+Apache2 |
It would be very nice to support the OTG port (the one we use for xfel) in device mode, so we can remove the need for UART in most cases, and in the future support higher bandwidth comms, including potentially bridged networking.
Unfortunately, the user manual and PAC have no information for usb0/usb-otg. But it is supported in Linux.
https:/torvalds/linux/tree/8a28a0b6f1a1dcbf5a834600a9acfbe2ba51e5eb/drivers/usb/musb
Apparently they use Mentor IP for dual role ports, and allwinner (sunxi in linux terms) has used this IP for a number of devices.
If nothing else, we can likely reverse engineer the registers from these definitions, and figure out how to get something like embassy-usb supported, at least enough to get an ACM serial port up and going.
The text was updated successfully, but these errors were encountered: