[PATCH v3 0/6] usb: dwc2: fix low power issues found on stm32mp1
From: Fabrice Gasnier
Date: Fri Nov 06 2026 - 12:38:46 EST
This series addresses several hang, bad_irq or re-initialisation issues
found on stm32mp1 when going to system low power (stop mode):
- First three fixes can be reproduced on stm32mp13 DK board, stm32mp15 DK
and EVAL boards.
- Subsequent fixes can be reproduced on stm32mp15 EVAL board that uses
an external Vbus regulator and stm32 dedicated detection logic.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>
---
Changes in v3:
- Update since Sashiko comments
- Add a paramter (need_restore) to gadget resume function based on
canary detection to avoir possible race on lx_state as raised by
Sashiko
- Add a dwc2_vbus_supply_restore() to check regulator enable state
during hcd resume, to enforce it gets restored along with PWR bit
if it has been turned off earlier.
- Introduced a new patch for a possible race in hcd resume, with
HCD_FLAG_HW_ACCESSIBLE not being set, but host interrupts are active.
- Refactor stm32 vb/id detection, to rool back in case of regulator
disable fails.
- Link to v2: https://patch.msgid.link/20261013-dwc2-low-power-fixes-stm32-v2-0-79865a4f1b63@xxxxxxxxxxx
Changes in v2:
- Several fixes or commit messages updates since Sashiko review (see
changelog in each patch).
- Add Thinh instead of Minas to the recipients
- Link to v1: https://patch.msgid.link/20261008-dwc2-low-power-fixes-stm32-v1-0-5b303df762e6@xxxxxxxxxxx
---
Fabrice Gasnier (6):
usb: dwc2: fix recovery after PM domain off
usb: dwc2: fix a possible interrupt storm in hcd resume
usb: dwc2: fix a possible interrupt storm on stm32mp1
usb: dwc2: hcd: fix possible successive vbus supply enables
usb: dwc2: hcd: don't disable/enable external vbus by system suspend/resume
usb: dwc2: platform: fix stm32mp15 detection logic power management
drivers/usb/dwc2/core.c | 1 -
drivers/usb/dwc2/core.h | 6 +-
drivers/usb/dwc2/core_intr.c | 9 +-
drivers/usb/dwc2/gadget.c | 4 +-
drivers/usb/dwc2/hcd.c | 36 +++++--
drivers/usb/dwc2/platform.c | 240 +++++++++++++++++++++++--------------------
6 files changed, 165 insertions(+), 131 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261007-dwc2-low-power-fixes-stm32-0c1e5e68b252
Best regards,
--
Fabrice Gasnier <fabrice.gasnier@xxxxxxxxxxx>