Skip to content

RFC DWC2 fixes and hacks to make things work on HiKey

John Stultz lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3usb: dwc2: Force port resume on switching to device modedrivers/usb/dwc2/hcd.c+8 -00 replies
2/3usb: dwc2: Avoid suspending if we're in gadget modedrivers/usb/dwc2/hcd.c+3 -00 replies
3/3usb: dwc2: Make sure we disconnect the gadget statedrivers/usb/dwc2/hcd.c+1 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/3] DWC2 fixes and hacks to make things work on HiKey

Hey folks,
I wanted to send out these patches again for comment.
These three patches are basically required to get otg/gadget mode working reliably on HiKey.

I admit they do feel a bit hackish, but without them we run into a number of problems related to autosuspend and incorrect connection state handling.

So I wanted to resend these for feedback and guidance.

I suspect that some of these issues may be due to the phy driver on hikey being somewhat minimal:
https://git.linaro.org/people/john.stultz/android-dev.git/plain/drivers/phy/phy-hi6220-usb.c?h=dev/hikey-mainline-WIP

So I've tried to hacked together extconn support into the phy driver, and I'm getting phy notifications, but I've not yet sorted out how to get the phy->gadget signaling to work properly (or if my appraoch is even correct).

See:
https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey-mainline-WIP&id=c608f263240f7c54dbf5439f2210cba1ab8e0136

I've had a difficult time trying to understand how the usb contoller driver, phy driver and extcon shoudl properly fit together, and I'm not sure what would be a good reference driver to follow.

So suggestions or pointers here would be greatly appreciated.

Cc Wei Xu <[email protected]>
Cc Guodong Xu <[email protected]>
Cc Amit Pundir <[email protected]>
Cc Rob Herring <[email protected]>
Cc John Youn <[email protected]>
Cc Douglas Anderson <[email protected]>
Cc Chen Yu <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

Chen Yu (1):
usb: dwc2: Force port resume on switching to device mode

John Stultz (2):
usb: dwc2: Avoid suspending if we're in gadget mode
usb: dwc2: Make sure we disconnect the gadget state

 drivers/usb/dwc2/hcd.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Signature · 1 line
2.7.4