All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dwc3: Fix fastboot re-run failure with flat DTS
@ 2026-05-29 12:22 Balaji Selvanathan
  2026-05-30 10:02 ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Balaji Selvanathan @ 2026-05-29 12:22 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Tom Rini, Mattijs Korpershoek, Jonas Karlman,
	Kever Yang, Casey Connolly, Kaustabh Chakraborty, Sam Protsenko,
	Balaji Selvanathan

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@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@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-08  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29 12:22 [PATCH] dwc3: Fix fastboot re-run failure with flat DTS Balaji Selvanathan
2026-05-30 10:02 ` Marek Vasut
2026-06-08  7:15   ` Mattijs Korpershoek
2026-06-08  9:07     ` Balaji Selvanathan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.