[PATCH v2 4/7] usb: host: xhci-plat: Support XHCI_RESET_ON_RESUME via device property

From: Faisal Hassan

Date: Thu Sep 03 2026 - 12:10:20 EST


When the USB controller loses power during PM suspend (as occurs
on targets like SA8255P that fully power off the controller),
it generates a Host Controller Error (HCE) on resume requiring
full reinitialization. This is handled by the XHCI_RESET_ON_RESUME
quirk (introduced upstream in 8b328f8002bc).

Read the "xhci-reset-on-resume-quirk" device property to set
XHCI_RESET_ON_RESUME. This allows parent drivers (e.g., dwc3)
to enable the quirk via software nodes.

Co-developed-by: Sriram Dash <sriram.dash@xxxxxxxxxxxxxxxx>
Signed-off-by: Sriram Dash <sriram.dash@xxxxxxxxxxxxxxxx>
Signed-off-by: Faisal Hassan <faisal.hassan@xxxxxxxxxxxxxxxx>
---
drivers/usb/host/xhci-plat.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 074d9c731639..7df2947d13dc 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -277,6 +277,9 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
if (device_property_read_bool(tmpdev, "xhci-skip-phy-init-quirk"))
xhci->quirks |= XHCI_SKIP_PHY_INIT;

+ if (device_property_read_bool(tmpdev, "xhci-reset-on-resume-quirk"))
+ xhci->quirks |= XHCI_RESET_ON_RESUME;
+
device_property_read_u32(tmpdev, "imod-interval-ns",
&xhci->imod_interval);
device_property_read_u16(tmpdev, "num-hc-interrupters",
--
2.34.1