[PATCH] dwc3: Fix fastboot re-run failure with flat DTS
Balaji Selvanathan
balaji.selvanathan at oss.qualcomm.com
Fri May 29 14:22:51 CEST 2026
Problem: The first "run fastboot" works and enumerates on the host.
Subsequent runs fail, with no USB enumeration observed.
With flat DTS configurations, the peripheral device inherits
power-domains from its parent (glue) node, as both reference the
same DT node. During teardown after "fastboot continue",
device_remove() of peripheral device invokes dev_power_domain_off(),
which powers off the shared USB GDSC.
As a result, the next "run fastboot" fails because the power
domain is left in an uninitialized state.
Add DM_FLAG_LEAVE_PD_ON to dwc3_generic_peripheral to prevent
power domain shutdown during peripheral removal.
This aligns with hierarchical DTS behavior, where the peripheral
child does not own power-domains. Power management remains with
the glue device, which persists across probe/remove cycles,
allowing repeated fastboot runs to succeed.
Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
---
drivers/usb/dwc3/dwc3-generic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 22b9ef0b24e..788fe6fc819 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -220,6 +220,7 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = {
.remove = dwc3_generic_peripheral_remove,
.priv_auto = sizeof(struct dwc3_generic_priv),
.plat_auto = sizeof(struct dwc3_generic_plat),
+ .flags = DM_FLAG_LEAVE_PD_ON,
};
#endif
---
base-commit: 987907ae4bcc5d6055bdf7d318a3edf53e14d5fa
change-id: 20260529-usb-3b6b44559cc5
Best regards,
--
Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
More information about the U-Boot
mailing list