Since upstream has introduced dwc2_core_reset(), commit c5d685b8993c
("usb: dwc2: Unify flush and reset logic with v4.20a support"), upon
init, the debounce timers used in hw to filter signals (Vbus, ID pins)
race with the driver init. This result in the wrong mode (host) being
sampled in dwc2_core_reset(). Then it polls waiting for host mode,
that is never reached, because the IP turns into device mode, during
gadget driver init. When it happens, below log is seen:dwc2_core_reset: Waiting for GINTSTS_CURMODE_HOST timeout - First change disables debounce filter when it isn't needed e.g. when forcing the session (override Vbus/ID pins HW sampling). - Second change adds some check to wait for the correct mode to establish during init, when the digital filters are used. Signed-off-by: Fabrice Gasnier <[email protected]> --- Fabrice Gasnier (2): usb: gadget: dwc2_udc_otg: bypass debounce filter usb: gadget: dwc2_udc_otg: wait for mode when digital filter is active drivers/usb/common/dwc2_core.c | 45 +++++++++++++++++++++++++++++++++++++++ drivers/usb/common/dwc2_core.h | 1 + drivers/usb/gadget/dwc2_udc_otg.c | 8 +++++-- 3 files changed, 52 insertions(+), 2 deletions(-) --- base-commit: 5508406582f6f7120dce0c4b3059819a41788db2 change-id: 20261008-dwc2-iddig-fixes-53179e377a1f Best regards, -- Fabrice Gasnier <[email protected]>
