Linux next/fotg210 driver refresh #14
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch upgrades the fotg210 usb drivers from the mainline ones, dated 2013, to ones from https://github.com/FaradayA380Platform/Linux, dated 2019. Most notably this allows us to run peripheral mode on BL808 successfully which could not be accomplished with the mainline drivers.
The bulk of this patch is just the code from faraday, I've tried to keep a clean set of patches.
The faraday code also has OTG drivers, but smaeul has pointed out that both the Pine64 and Sipeed boards have wiring problems which make it unlikely to run reliably. I may or may not try later.
Issue 1
There are issues in host mode where we can't mount devices that transmit in bulk mode. This seems to be the same issue listed in bouffalolab/bouffalo_sdk#65 . I don't think this is a regression, and may be a hardware issue. The original mainline integration also suffered the same issue.
Issue 2
This PR does not address powering up the USB subsystem on the BL808. This requires powering up via a separate PDS subsystem.
I have a patched version of OBLFR that allows you to power up the PDS and will be working to get that integrated. The U-Boot fork also has code which can properly power up the device.
I have also provided both binaries and code on a fork of buildroot_bouffalo to easily bring up the code for testing. It is available at https://github.com/grant-olson/buildroot_bouffalo/releases/tag/usb_gadget-alpha1