-
Notifications
You must be signed in to change notification settings - Fork 5k
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
usb gadget on rpi A #1343
usb gadget on rpi A #1343
Conversation
The overlay commit looks good to me, although the commit message could mention the overlay by name. @P33M Do you approve of the OTG change? |
@prudy: Can you rebase the patch? The OTG change looks ok, but this is an upstream driver. Are we happy to accept this out-of-tree? |
We would prefer the dwc patch is submitted upstream and we can pick it once it is accepted. |
It makes sense, but don't you feedback changes to the upstream? |
let split dtb and dwc2 changes, so only dtb will apply locally as rpi specific. |
@prudy, is "dtoverlay=dwc2,dr_mode=peripheral" all I need to switch this on, or is something extra required? Haven't quite got this working on my A+ yet. |
Two ways:
In any case this dtb patch is needed but also kernel patch to gadget. The latter is on its way in upstream or you can take it from my branch. |
I had already recompiled the dwc2 driver in dual mode (with all the patches, obviously since I'm posting on this pr), and the overlay is already in the rpi tree, and it's behaving as expected when I configure some libcomposite devices, but nothing happens when I connect to the pi with an a-a cable. Both ends act as if I'd not connected the cable at all. |
If nothing happens it means the patches are not active. I'd check:
See this post with kernel configuration: In the startup log you should see this: and this: eventually this when plugging in the cable: |
As far as I can tell, everything is running as intended (no "mismatch" message because I have dr_mode set correctly in config.txt) and I've added debug messages to prove that the force dev bits are being preserved... but inserting the cable (I've tried both a home-soldered one and a purchased one) does nothing. At this point I think I'll probably wait until this makes it into the official Pi kernel before trying again. |
Linux 4.5 has an extra patch that will check the hardware capabilities of the model "A", and block otg mode: EDIT: Confirmed this patch is not a problem, and gadget mode is working on model A |
Any idea how to most effectively enable OTG mode on A+ with latest linux and work around the OTG mode block? |
As far as I know it should work with "dtoverlay=dwc2","dr_mode=peripheral" from linux 4.6 and above. The patch I mentioned above may only check what the chip can do, not which cable is connected but I broke the sdcard slot on my Model A, so I replaced that with a Zero and cannot actually test what might happen on an A+. |
It is direct fix for issue 'usb gadget on rpi A #324'.