[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v2 0/2] usb: dwc2: fix USB peripheral role in dual-role mode on PX30
On Theobroma Ringneck SoM, USB peripheral role when in dual-role mode does not
work and displays the following error message:
dwc2 ff300000.usb: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST

The USB sniffer shows nothing and dumping the host registers is stuck on
HCDMA(0) register.

Note that for some reason it works "fine" on PX30-EVB (there's another issue but
not related to/fixed in this patch series).

Since there's no documentation available for this IP, this patch series is
basically just slightly adapted downstream BSP vendor kernel patches and I
cannot unfortunately give more information than what I have.

This patch series was tested on Theobroma Ringneck SoM on Haikou devkit and PX30
EVB. It fixes Ringneck support and does not break PX30-EVB's.

For reference, the content of those commits can be found in tag
linux-5.10-gen-rkr1, and the following commits have been used:

Note that Rockchip kernel called a slightly different implementation of
__dwc2_lowlevel_hw_enable instead of dwc2_lowlevel_hw_enable but it seemed more
right to me to call dwc2_lowlevel_hw_enable as done for the forced peripheral

Note that it is still not flawlessly working but the support is improved
(somewhat working vs not working at all).

To: Minas Harutyunyan <>
To: Greg Kroah-Hartman <>
Cc: Bin Yang <>
Signed-off-by: Quentin Schulz <>
Changes in v2:
- add "shadow" variable for HCD skip_phy_initialization so that it can be
configured on a per-platform basis,
- Patch 1 and Patch 2 of the v1 are already in linux-next next-20221216, so removed from this series,
- Link to v1:

Quentin Schulz (2):
usb: dwc2: allow platforms to prevent core phy initialisation
usb: dwc2: prevent core PHY initialization on Rockchip

drivers/usb/dwc2/core.h | 6 ++++++
drivers/usb/dwc2/hcd.c | 2 ++
drivers/usb/dwc2/params.c | 1 +
3 files changed, 9 insertions(+)
base-commit: ca39c4daa6f7f770b1329ffb46f1e4a6bcc3f291
change-id: 20221206-dwc2-gadget-dual-role-aac67e6d42fd

Best regards,
Quentin Schulz <>

 \ /
  Last update: 2022-12-16 17:31    [W:0.219 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site