[PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend
Jagadeesh Kona
jagadeesh.kona at oss.qualcomm.com
Thu Nov 26 10:57:13 PST 2026
From: Krishna Kurapati <krishna.kurapati at oss.qualcomm.com>
When we perform suspend in host mode, there is a xHCI crash seen on
resume. During bus suspend use case if the device is wakeup capable,
the GDSC needs to be kept ON to retain memory and avoid SMMU faults.
Set GDSCs hwmode to true to keep the GDSC ON during suspend. And set
it to false to ensure GDSC is turned OFF during cable disconnect or
non-wakeup scenarios.
Co-developed-by: Prashanth K <prashanth.k at oss.qualcomm.com>
Signed-off-by: Prashanth K <prashanth.k at oss.qualcomm.com>
Signed-off-by: Krishna Kurapati <krishna.kurapati at oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <jagadeesh.kona at oss.qualcomm.com>
---
drivers/usb/dwc3/dwc3-qcom.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 5a68025ccea5e5df8860f540f718262b7d8acf8c..99dce28dda065583b91ed965d917e977519cfe58 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/interconnect.h>
#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
#include <linux/phy/phy.h>
#include <linux/usb/of.h>
#include <linux/reset.h>
@@ -391,6 +392,9 @@ static int dwc3_qcom_suspend(struct dwc3_qcom *qcom, bool wakeup)
for (i = 0; i < qcom->num_ports; i++)
qcom->ports[i].usb2_speed = dwc3_qcom_read_usb2_speed(qcom, i);
dwc3_qcom_enable_interrupts(qcom);
+ dev_pm_genpd_set_hwmode(qcom->dev, true);
+ } else {
+ dev_pm_genpd_set_hwmode(qcom->dev, false);
}
qcom->is_suspended = true;
--
2.56.0
More information about the linux-phy
mailing list