[PATCH] usb: dwc2: fix reset logic in dwc2_core_reset
Junhui Liu
junhui.liu at pigmoral.tech
Thu Jul 24 14:53:52 CEST 2025
On 23/07/2025 17:09, Patrick Delaunay wrote:
> Use GUSBCFG_FORCEHOSTMODE to detected the HOST forced mode as it is done
> in the Linux driver drivers/usb/dwc2/core.c:dwc2_core_reset().
>
> The host polling must be executed only if the current mode is host,
> either due to the force HOST mode (which persists after core reset)
> or the connector id pin.
>
> The GUSBCFG_FORCEDEVMODE bits is used to force the device mode (for
> example used on STM32MP1x platform) and when it is activated the DWC2 reset
> failed with the trace:
> "dwc2_core_reset: Waiting for GINTSTS_CURMODE_HOST timeout"
>
> Fixes: c5d685b8993c ("usb: dwc2: Unify flush and reset logic with v4.20a support")
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
Thanks for the fix.
Reviewed-by: Junhui Liu <junhui.liu at pigmoral.tech>
--
Best regards,
Junhui Liu
More information about the U-Boot
mailing list