* [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend
@ 2026-11-26 18:57 Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 1/8] clk: qcom: gdsc: Use GenPD hwmode to keep GDSC " Jagadeesh Kona
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona, Krishna Kurapati,
Prashanth K, Krishna Chaitanya Chundru
USB and PCIe GDSCs on some Qualcomm platforms need to remain enabled
across system suspend for certain use cases, such as USB host mode and
PCIe non-D3cold. These GDSCs currently use PWRSTS_RET_ON, which keeps
them enabled after their first enable even when consumers no longer
require them.
These GDSCs have a HW mechanism to stay enabled during suspend while
allowing the parent voltage rails to turn off, with HW handling the
parent transition to active voltage rails. Use the existing GenPD
hwmode interface to let consumers request this behavior only when
required, and clear it once no longer needed, allowing the GDSC to be
powered off when unused.
This series adds the set_hwmode_dev callback for USB and PCIe GDSCs on
Qualcomm Glymur, QCS615 and Shikra platforms, and updates the corresponding
USB and PCIe consumer drivers to use dev_pm_genpd_set_hwmode() to control
the GDSC dynamically.
The clock and USB driver patches need to be picked together on Glymur
to avoid functional issues, since the existing RET_ON flag is removed
in this series. This approach can be extended to more targets in the
future.
This series is based on top of below qmp phy suspend/resume series and
depends on it:
https://lore.kernel.org/all/20261113103111.156476-1-prashanth.k@oss.qualcomm.com/
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
Jagadeesh Kona (4):
clk: qcom: gdsc: Use GenPD hwmode to keep GDSC enabled across suspend
clk: qcom: gcc-glymur: Register set_hwmode_dev callback for USB, PCIe GDSCs
clk: qcom: gcc-qcs615: Register set_hwmode_dev callback for USB, PCIe GDSCs
clk: qcom: gcc-shikra: Register set_hwmode_dev callback for USB, PCIe GDSCs
Krishna Chaitanya Chundru (1):
PCI: qcom: Keep GDSC enabled during non-D3cold suspend
Krishna Kurapati (1):
usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend
Prashanth K (2):
phy: qcom: combo: Keep the PHY GDSC ON during host bus suspend
phy: qcom: usb: Keep the PHY GDSC ON during host bus suspend
drivers/clk/qcom/gcc-glymur.c | 46 ++++++++++++++++++++++++-------
drivers/clk/qcom/gcc-qcs615.c | 3 ++
drivers/clk/qcom/gcc-shikra.c | 3 ++
drivers/clk/qcom/gdsc.c | 21 ++++++++++++++
drivers/clk/qcom/gdsc.h | 2 ++
drivers/pci/controller/dwc/pcie-qcom.c | 6 ++++
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 14 ++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 15 ++++++++++
drivers/usb/dwc3/dwc3-qcom.c | 4 +++
9 files changed, 104 insertions(+), 10 deletions(-)
---
base-commit: 47588e4c16d8876d3058bcec030ed8a016794b9e
change-id: 20261126-usb-pcie-gdsc-suspend-7a99c6b62406
prerequisite-message-id: 20261113103111.156476-1-prashanth.k@oss.qualcomm.com
prerequisite-patch-id: d39d8cf075595b668e85fbc6c3cf7234c318602e
prerequisite-patch-id: 5f7421fa9312a84661ff4a87e946f315e8dc27e8
Best regards,
--
Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/8] clk: qcom: gdsc: Use GenPD hwmode to keep GDSC enabled across suspend
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 2/8] clk: qcom: gcc-glymur: Register set_hwmode_dev callback for USB, PCIe GDSCs Jagadeesh Kona
` (7 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona
USB and PCIe GDSCs need to remain enabled across system suspend for
certain use cases, such as USB host mode and PCIe non-D3cold. These
GDSCs currently use PWRSTS_RET_ON, which keeps them enabled after
their first enable even when consumers no longer require them.
These GDSCs have a HW mechanism to stay enabled during suspend while
allowing the parent voltage rails to turn off, with HW handling the
parent transition to active voltage rails. Use the existing GenPD
hwmode interface to let consumers dynamically request this behavior
only when required, and clear it once no longer needed, allowing the
GDSC to be powered off when unused.
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
drivers/clk/qcom/gdsc.c | 21 +++++++++++++++++++++
drivers/clk/qcom/gdsc.h | 2 ++
2 files changed, 23 insertions(+)
diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
index be9c14eb7b064f988bb4b330c8784cab82e43b2d..7b2b9ad0485e6035af6c72d035ceb2bb8f4155e5 100644
--- a/drivers/clk/qcom/gdsc.c
+++ b/drivers/clk/qcom/gdsc.c
@@ -345,6 +345,13 @@ static int gdsc_disable(struct generic_pm_domain *domain)
struct gdsc *sc = domain_to_gdsc(domain);
int ret;
+ /*
+ * Skip GDSC disable if consumer drivers requested
+ * to keep the GDSC ON in HW even after suspend.
+ */
+ if (sc->hw_stay_on)
+ return 0;
+
if (sc->pwrsts == PWRSTS_ON)
return gdsc_assert_reset(sc);
@@ -746,3 +753,17 @@ int gdsc_gx_disable(struct generic_pm_domain *domain)
return 0;
}
EXPORT_SYMBOL_GPL(gdsc_gx_disable);
+
+/*
+ * set_hwmode_dev callback for GDSCs that let a consumer request that the
+ * GDSC stay powered in HW across suspend, instead of being torn down.
+ */
+int gdsc_set_hw_stay_on(struct generic_pm_domain *domain, struct device *dev, bool enable)
+{
+ struct gdsc *sc = domain_to_gdsc(domain);
+
+ sc->hw_stay_on = enable;
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(gdsc_set_hw_stay_on);
diff --git a/drivers/clk/qcom/gdsc.h b/drivers/clk/qcom/gdsc.h
index 2f9665b664e606234fcc632c3f6b302a448d06a7..12bf74a1b2a431cefdab955de15ae6b01db7a10a 100644
--- a/drivers/clk/qcom/gdsc.h
+++ b/drivers/clk/qcom/gdsc.h
@@ -79,6 +79,7 @@ struct gdsc {
bool needs_icc;
unsigned int icc_path_index;
struct icc_path *icc_path;
+ bool hw_stay_on;
};
struct gdsc_desc {
@@ -94,6 +95,7 @@ int gdsc_register(struct gdsc_desc *desc, struct reset_controller_dev *,
void gdsc_unregister(struct gdsc_desc *desc);
int gdsc_gx_do_nothing_enable(struct generic_pm_domain *domain);
int gdsc_gx_disable(struct generic_pm_domain *domain);
+int gdsc_set_hw_stay_on(struct generic_pm_domain *domain, struct device *dev, bool enable);
#else
static inline int gdsc_register(struct gdsc_desc *desc,
struct reset_controller_dev *rcdev,
--
2.56.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/8] clk: qcom: gcc-glymur: Register set_hwmode_dev callback for USB, PCIe GDSCs
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 1/8] clk: qcom: gdsc: Use GenPD hwmode to keep GDSC " Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 3/8] clk: qcom: gcc-qcs615: " Jagadeesh Kona
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona
Register gdsc_set_hw_stay_on as set_hwmode_dev callback for USB & PCIe
GDSCs to allow the USB & PCIe consumer drivers to keep the GDSC ON based on
the requirement in USB host mode and PCIe non-D3 cold usecases. Also drop
the PWRSTS_RET_ON flag for USB GDSC's.
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
drivers/clk/qcom/gcc-glymur.c | 46 +++++++++++++++++++++++++++++++++----------
1 file changed, 36 insertions(+), 10 deletions(-)
diff --git a/drivers/clk/qcom/gcc-glymur.c b/drivers/clk/qcom/gcc-glymur.c
index d8d33eff419eeb9885f8560c2c7c71d542371658..73013133fa27cf0b908a8e5552a6fe981ab197d4 100644
--- a/drivers/clk/qcom/gcc-glymur.c
+++ b/drivers/clk/qcom/gcc-glymur.c
@@ -7557,6 +7557,7 @@ static struct gdsc gcc_pcie_0_tunnel_gdsc = {
.collapse_mask = BIT(2),
.pd = {
.name = "gcc_pcie_0_tunnel_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7571,6 +7572,7 @@ static struct gdsc gcc_pcie_1_tunnel_gdsc = {
.collapse_mask = BIT(1),
.pd = {
.name = "gcc_pcie_1_tunnel_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7585,6 +7587,7 @@ static struct gdsc gcc_pcie_2_tunnel_gdsc = {
.collapse_mask = BIT(3),
.pd = {
.name = "gcc_pcie_2_tunnel_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7599,6 +7602,7 @@ static struct gdsc gcc_pcie_3a_gdsc = {
.collapse_mask = BIT(4),
.pd = {
.name = "gcc_pcie_3a_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7613,6 +7617,7 @@ static struct gdsc gcc_pcie_3a_phy_gdsc = {
.collapse_mask = BIT(5),
.pd = {
.name = "gcc_pcie_3a_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7627,6 +7632,7 @@ static struct gdsc gcc_pcie_3b_gdsc = {
.collapse_mask = BIT(6),
.pd = {
.name = "gcc_pcie_3b_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7641,6 +7647,7 @@ static struct gdsc gcc_pcie_3b_phy_gdsc = {
.collapse_mask = BIT(7),
.pd = {
.name = "gcc_pcie_3b_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7655,6 +7662,7 @@ static struct gdsc gcc_pcie_4_gdsc = {
.collapse_mask = BIT(10),
.pd = {
.name = "gcc_pcie_4_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7669,6 +7677,7 @@ static struct gdsc gcc_pcie_4_phy_gdsc = {
.collapse_mask = BIT(11),
.pd = {
.name = "gcc_pcie_4_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7683,6 +7692,7 @@ static struct gdsc gcc_pcie_5_gdsc = {
.collapse_mask = BIT(8),
.pd = {
.name = "gcc_pcie_5_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7697,6 +7707,7 @@ static struct gdsc gcc_pcie_5_phy_gdsc = {
.collapse_mask = BIT(9),
.pd = {
.name = "gcc_pcie_5_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7711,6 +7722,7 @@ static struct gdsc gcc_pcie_6_gdsc = {
.collapse_mask = BIT(12),
.pd = {
.name = "gcc_pcie_6_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7725,6 +7737,7 @@ static struct gdsc gcc_pcie_6_phy_gdsc = {
.collapse_mask = BIT(13),
.pd = {
.name = "gcc_pcie_6_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE | VOTABLE,
@@ -7749,8 +7762,9 @@ static struct gdsc gcc_usb20_prim_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb20_prim_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7761,8 +7775,9 @@ static struct gdsc gcc_usb30_mp_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb30_mp_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7773,8 +7788,9 @@ static struct gdsc gcc_usb30_prim_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb30_prim_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7785,8 +7801,9 @@ static struct gdsc gcc_usb30_sec_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb30_sec_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7797,8 +7814,9 @@ static struct gdsc gcc_usb30_tert_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb30_tert_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7809,8 +7827,9 @@ static struct gdsc gcc_usb3_mp_ss0_phy_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "gcc_usb3_mp_ss0_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7821,8 +7840,9 @@ static struct gdsc gcc_usb3_mp_ss1_phy_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "gcc_usb3_mp_ss1_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7833,6 +7853,7 @@ static struct gdsc gcc_usb4_0_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb4_0_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -7845,6 +7866,7 @@ static struct gdsc gcc_usb4_1_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb4_1_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -7857,6 +7879,7 @@ static struct gdsc gcc_usb4_2_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb4_2_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -7869,8 +7892,9 @@ static struct gdsc gcc_usb_0_phy_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "gcc_usb_0_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7881,8 +7905,9 @@ static struct gdsc gcc_usb_1_phy_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "gcc_usb_1_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -7893,8 +7918,9 @@ static struct gdsc gcc_usb_2_phy_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "gcc_usb_2_phy_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
- .pwrsts = PWRSTS_RET_ON,
+ .pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
--
2.56.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/8] clk: qcom: gcc-qcs615: Register set_hwmode_dev callback for USB, PCIe GDSCs
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 1/8] clk: qcom: gdsc: Use GenPD hwmode to keep GDSC " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 2/8] clk: qcom: gcc-glymur: Register set_hwmode_dev callback for USB, PCIe GDSCs Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 4/8] clk: qcom: gcc-shikra: " Jagadeesh Kona
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona
Register gdsc_set_hw_stay_on as set_hwmode_dev callback for USB & PCIe
GDSCs to allow the USB & PCIe consumer drivers to keep the GDSC ON based on
the requirement in USB host mode and PCIe non-D3 cold usecases.
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
drivers/clk/qcom/gcc-qcs615.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/qcom/gcc-qcs615.c b/drivers/clk/qcom/gcc-qcs615.c
index f205de3a936170413b21173c7af9668c14495369..76d835346632ed672e0cfd896723b84c185de270 100644
--- a/drivers/clk/qcom/gcc-qcs615.c
+++ b/drivers/clk/qcom/gcc-qcs615.c
@@ -2654,6 +2654,7 @@ static struct gdsc pcie_0_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "pcie_0_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
};
@@ -2676,6 +2677,7 @@ static struct gdsc usb20_sec_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "usb20_sec_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
};
@@ -2687,6 +2689,7 @@ static struct gdsc usb30_prim_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "usb30_prim_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
};
--
2.56.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/8] clk: qcom: gcc-shikra: Register set_hwmode_dev callback for USB, PCIe GDSCs
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
` (2 preceding siblings ...)
2026-11-26 18:57 ` [PATCH 3/8] clk: qcom: gcc-qcs615: " Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend Jagadeesh Kona
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona
Register gdsc_set_hw_stay_on as set_hwmode_dev callback for USB & PCIe
GDSCs to allow the USB & PCIe consumer drivers to keep the GDSC ON based on
the requirement in USB host mode and PCIe non-D3 cold usecases.
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
drivers/clk/qcom/gcc-shikra.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/qcom/gcc-shikra.c b/drivers/clk/qcom/gcc-shikra.c
index 13c99a883e29877d9a929f26ca0b3b04b1ea0b11..075a9a5e503d0a1aa9ea2c772216a19f0feb16b5 100644
--- a/drivers/clk/qcom/gcc-shikra.c
+++ b/drivers/clk/qcom/gcc-shikra.c
@@ -4036,6 +4036,7 @@ static struct gdsc gcc_pcie_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_pcie_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -4048,6 +4049,7 @@ static struct gdsc gcc_usb20_gdsc = {
.clk_dis_wait_val = 0xf,
.pd = {
.name = "gcc_usb20_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -4060,6 +4062,7 @@ static struct gdsc gcc_usb30_prim_gdsc = {
.clk_dis_wait_val = 0x2,
.pd = {
.name = "gcc_usb30_prim_gdsc",
+ .set_hwmode_dev = gdsc_set_hw_stay_on,
},
.pwrsts = PWRSTS_OFF_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
--
2.56.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
` (3 preceding siblings ...)
2026-11-26 18:57 ` [PATCH 4/8] clk: qcom: gcc-shikra: " Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 19:18 ` sashiko-bot
2026-11-26 18:57 ` [PATCH 6/8] phy: qcom: combo: Keep the PHY GDSC ON during host " Jagadeesh Kona
` (3 subsequent siblings)
8 siblings, 1 reply; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona, Krishna Kurapati,
Prashanth K
From: Krishna Kurapati <krishna.kurapati@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@oss.qualcomm.com>
Signed-off-by: Prashanth K <prashanth.k@oss.qualcomm.com>
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/8] phy: qcom: combo: Keep the PHY GDSC ON during host bus suspend
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
` (4 preceding siblings ...)
2026-11-26 18:57 ` [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 7/8] phy: qcom: usb: " Jagadeesh Kona
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona, Prashanth K
From: Prashanth K <prashanth.k@oss.qualcomm.com>
Keep the PHY GDSC ON while the PHY is runtime suspended in host mode,
so that PHY can resume without losing PHY state. Allow it to turn off
when init_count is zero, or when set_hwmode_dev() isn't supported.
This allows PHY to consume lesser power when nothing is connected.
Signed-off-by: Prashanth K <prashanth.k@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index bb921ee643dec46265015b9d11d1f669834fc2d4..d8b7cfd9644d49780d706a14bee9e7f314cbdb19 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -16,6 +16,7 @@
#include <linux/of_graph.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include <linux/slab.h>
@@ -2592,6 +2593,9 @@ struct qmp_phy_cfg {
unsigned int pcs_usb_offset;
bool invert_cc_polarity;
+
+ /* true, if GDSC must stay enabled while this PHY is in use across suspend */
+ bool toggle_gdsc;
};
struct qmp_combo {
@@ -3432,6 +3436,7 @@ static const struct qmp_phy_cfg glymur_usb3dpphy_cfg = {
.num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
.vreg_list = qmp_phy_vreg_refgen,
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_refgen),
+ .toggle_gdsc = true,
};
static const struct qmp_phy_cfg nord_usb3dpphy_cfg = {
@@ -4723,16 +4728,25 @@ static void qmp_combo_disable_autonomous_mode(struct qmp_combo *qmp)
static int __maybe_unused qmp_combo_runtime_suspend(struct device *dev)
{
struct qmp_combo *qmp = dev_get_drvdata(dev);
+ const struct qmp_phy_cfg *cfg = qmp->cfg;
dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->phy_mode);
guard(mutex)(&qmp->phy_mutex);
+ dev_pm_genpd_set_hwmode(dev, false);
if (!qmp->init_count) {
dev_vdbg(dev, "PHY not initialized, bailing out\n");
return 0;
}
+ /*
+ * Keep the PHY GDSC ON during suspend, so that phy can resume
+ * without losing its state after host mode bus suspend.
+ */
+ if (cfg->toggle_gdsc)
+ dev_pm_genpd_set_hwmode(dev, true);
+
qmp_combo_enable_autonomous_mode(qmp);
clk_disable_unprepare(qmp->pipe_clk);
--
2.56.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 7/8] phy: qcom: usb: Keep the PHY GDSC ON during host bus suspend
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
` (5 preceding siblings ...)
2026-11-26 18:57 ` [PATCH 6/8] phy: qcom: combo: Keep the PHY GDSC ON during host " Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 8/8] PCI: qcom: Keep GDSC enabled during non-D3cold suspend Jagadeesh Kona
2026-11-26 19:21 ` [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend sashiko-bot
8 siblings, 0 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona, Prashanth K
From: Prashanth K <prashanth.k@oss.qualcomm.com>
Keep the PHY GDSC ON while the PHY is runtime suspended in host mode,
so that PHY can resume without losing PHY state. Allow it to turn off
when init_count is zero, or when set_hwmode_dev() isn't supported.
This allows PHY to consume lesser power when nothing is connected.
Signed-off-by: Prashanth K <prashanth.k@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index cd1ebe707bbe4ce790f964956391c561d2d1e223..20f64ffe4d3bdb283ce6185c94dbe021f4ec3d3c 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -15,6 +15,7 @@
#include <linux/of_address.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include <linux/slab.h>
@@ -1506,6 +1507,9 @@ struct qmp_phy_cfg {
/* Offset from PCS to PCS_USB region */
unsigned int pcs_usb_offset;
+
+ /* true, if GDSC must stay enabled while this PHY is in use across suspend */
+ bool toggle_gdsc;
};
struct qmp_usb {
@@ -1956,6 +1960,7 @@ static const struct qmp_phy_cfg glymur_usb3_uniphy_cfg = {
.vreg_list = qmp_phy_vreg_l,
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
.regs = qmp_v7_usb3phy_regs_layout,
+ .toggle_gdsc = true,
};
static int qmp_usb_serdes_init(struct qmp_usb *qmp)
@@ -2197,14 +2202,24 @@ static void qmp_usb_disable_autonomous_mode(struct qmp_usb *qmp)
static int __maybe_unused qmp_usb_runtime_suspend(struct device *dev)
{
struct qmp_usb *qmp = dev_get_drvdata(dev);
+ const struct qmp_phy_cfg *cfg = qmp->cfg;
dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->mode);
+ dev_pm_genpd_set_hwmode(dev, false);
+
if (!qmp->phy_initialized) {
dev_vdbg(dev, "PHY not initialized, bailing out\n");
return 0;
}
+ /*
+ * Keep the PHY GDSC ON during suspend, so that phy can resume
+ * without losing its state after host mode bus suspend.
+ */
+ if (cfg->toggle_gdsc)
+ dev_pm_genpd_set_hwmode(dev, true);
+
qmp_usb_enable_autonomous_mode(qmp);
clk_disable_unprepare(qmp->pipe_clk);
--
2.56.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 8/8] PCI: qcom: Keep GDSC enabled during non-D3cold suspend
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
` (6 preceding siblings ...)
2026-11-26 18:57 ` [PATCH 7/8] phy: qcom: usb: " Jagadeesh Kona
@ 2026-11-26 18:57 ` Jagadeesh Kona
2026-11-26 19:21 ` [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend sashiko-bot
8 siblings, 0 replies; 11+ messages in thread
From: Jagadeesh Kona @ 2026-11-26 18:57 UTC (permalink / raw)
To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
Jerome Brunet, Thinh Nguyen, Greg Kroah-Hartman, Vinod Koul,
Neil Armstrong, Manivannan Sadhasivam, Lorenzo Pieralisi,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
Ulf Hansson
Cc: Ajit Pandey, Imran Shaik, Taniya Das, linux-arm-msm, linux-clk,
linux-usb, linux-phy, linux-pci, Jagadeesh Kona,
Krishna Chaitanya Chundru
From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
The PCIe controller powers down the link during D3cold suspend but the
GDSC is required to be kept ON for non-D3 cold usecases.
Set the GDSC hwmode to true for non-D3cold suspend paths to keep the
GDSC ON during suspend since the link remains operational and the
controller resources are still required and set it to false for the D3cold
link shutdown sequence to disable the GDSC.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
---
drivers/pci/controller/dwc/pcie-qcom.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index eba1b2cb30f0a22b22a40aaf2ec75cafc12b054b..a4cbd7dc896e5472dd2cfda3846c6ff38cf34ef3 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -26,6 +26,7 @@
#include <linux/pci.h>
#include <linux/pci-ecam.h>
#include <linux/pci-pwrctrl.h>
+#include <linux/pm_domain.h>
#include <linux/pm_opp.h>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
@@ -2495,7 +2496,12 @@ static int qcom_pcie_suspend_noirq(struct device *dev)
if (pcie->use_pm_opp)
dev_pm_opp_set_opp(pcie->pci->dev, NULL);
+
+ dev_pm_genpd_set_hwmode(dev, false);
} else {
+ /* Keep the GDSC ON in non-D3 cold usecase. */
+ dev_pm_genpd_set_hwmode(dev, true);
+
/*
* Set minimum bandwidth required to keep data path
* functional during suspend.
--
2.56.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend
2026-11-26 18:57 ` [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend Jagadeesh Kona
@ 2026-11-26 19:18 ` sashiko-bot
0 siblings, 0 replies; 11+ messages in thread
From: sashiko-bot @ 2026-11-26 19:18 UTC (permalink / raw)
To: Jagadeesh Kona
Cc: linux-clk, linux-usb, linux-phy, linux-pci, vkoul, neil.armstrong,
olteanv
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] usb: dwc3: qcom: GenPD hwmode not reset in dwc3_qcom_resume()
or remove
--
commit 497ba54c561a27a707fe8980a8ab1233948ec270
Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend
This commit toggles GenPD hardware mode in dwc3_qcom_suspend() so the USB
GDSC stays powered during host-mode wakeup suspend and turns off otherwise.
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index 5a68025ccea5e..99dce28dda065 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
[ ... ]
> @@ -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;
[Severity: Medium]
Should dwc3_qcom_resume() also reset dev_pm_genpd_set_hwmode(qcom->dev,
false)?
Once a host-mode suspend enables hwmode (setting sc->hw_stay_on = true in
the GDSC), dwc3_qcom_resume() leaves it enabled while the controller is
active. If the driver is later unbound or unloaded, dwc3_qcom_remove()
resumes the device and detaches from GenPD without calling
dwc3_qcom_suspend(), so gdsc_disable() sees sc->hw_stay_on set and leaves
the GDSC powered on in hardware. If the driver is then re-probed,
genpd_add_device() reinitializes dev_gpd_data(dev)->hw_mode to false while
sc->hw_stay_on remains true, causing future dev_pm_genpd_set_hwmode(dev,
false) calls to short-circuit.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-usb-pcie-gdsc-suspend-v1-0-485a08ffdc6f@oss.qualcomm.com?part=5
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
` (7 preceding siblings ...)
2026-11-26 18:57 ` [PATCH 8/8] PCI: qcom: Keep GDSC enabled during non-D3cold suspend Jagadeesh Kona
@ 2026-11-26 19:21 ` sashiko-bot
8 siblings, 0 replies; 11+ messages in thread
From: sashiko-bot @ 2026-11-26 19:21 UTC (permalink / raw)
To: Jagadeesh Kona; +Cc: linux-usb, linux-pci
Sashiko has finished reviewing this 8-patch series:
- Patches 1-4 and 6-8: no issues found.
- Patch 5 ("usb: dwc3: qcom: Add support to keep GDSC On during..."): 1
potential issue (1 Medium)
A detailed review has been sent as a separate reply to patch 5.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-usb-pcie-gdsc-suspend-v1-0-485a08ffdc6f@oss.qualcomm.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-11-26 19:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 1/8] clk: qcom: gdsc: Use GenPD hwmode to keep GDSC " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 2/8] clk: qcom: gcc-glymur: Register set_hwmode_dev callback for USB, PCIe GDSCs Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 3/8] clk: qcom: gcc-qcs615: " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 4/8] clk: qcom: gcc-shikra: " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend Jagadeesh Kona
2026-11-26 19:18 ` sashiko-bot
2026-11-26 18:57 ` [PATCH 6/8] phy: qcom: combo: Keep the PHY GDSC ON during host " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 7/8] phy: qcom: usb: " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 8/8] PCI: qcom: Keep GDSC enabled during non-D3cold suspend Jagadeesh Kona
2026-11-26 19:21 ` [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox