Skip to content

Conversation

@grant-olson
Copy link

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.

  1. Original code.
  2. Fixes to compile.
  3. Fix for runtime error.
  4. Device tree updates to allow users to enable either host or peripheral mode.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant