Skip to content

usb: dwc2: Fix core reset and force mode delays

John Youn linux-arm-kernel linux-rockchip lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 11 repliesIn review
  2. v43 patches 2 repliesSuperseded
  3. v33 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches0 repliesSuperseded
v14 patches7 repliesSuperseded

Changes in v5 from the cover letter

* Added Stefan Wahren's tested-by
* Dropped RFT

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3usb: dwc2: gadget: Only initialize device if in device modedrivers/usb/dwc2/gadget.c+5 -20 replies
2/3usb: dwc2: Add delay to core soft resetdrivers/usb/dwc2/core.c drivers/usb/dwc2/core.h drivers/usb/dwc2/hw.h+97 -00 replies
3/3usb: dwc2: Properly account for the force mode delaysdrivers/usb/dwc2/core.c+14 -1711 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchHeiko StuebnerStefan Wahren
1/3T-b T-b
2/3T-b
3/3T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/3] usb: dwc2: Fix core reset and force mode delays

This series accounts for the delay from the IDDIG debounce filter when switching modes. This delay is a function of the PHY clock speed and can range from 5-50 ms. This delay must be taken into account on core reset and force modes. A full explanation is provided in the patch commit log and code comments.

This revision of the series increases the IDDIG delay to 100 ms. Some rockchip platforms seem to timeout even with 50 ms so I have doubled this.

Appreciate any testing on RK3188 platforms.

v5:
* Added Stefan Wahren's tested-by
* Dropped RFT

v4:
* Increased the IDDIG delay to 110ms.
* Removed tested-by for patch 2 since I have changed the delays.

v3:
* Added tested-bys for patch 1-2
* Fixed an issue where a function was not returning a value
* Dropped patch 4

v2:
* Broke up the last patch of the original series

Regards,
John

John Youn (3):
usb: dwc2: gadget: Only initialize device if in device mode
usb: dwc2: Add delay to core soft reset
usb: dwc2: Properly account for the force mode delays

 drivers/usb/dwc2/core.c   | 126 +++++++++++++++++++++++++++++++++++++++-------
 drivers/usb/dwc2/core.h   |   1 +
 drivers/usb/dwc2/gadget.c |   7 ++-
 drivers/usb/dwc2/hw.h     |   1 +
 4 files changed, 116 insertions(+), 19 deletions(-)
Signature · 1 line
2.9.0