Skip to contentSkip to conversation

clk: qcom: gcc-shikra: Use retention for USB power domains

PATCH In review Akash Kumar 3 participants 3 messages Nov 17 – Nov 20

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: qcom: gcc-shikra: Use retention for USB power domains

The USB subsystem does not expect to lose its state on suspend:

xhci-hcd xhci-hcd.1.auto: xHC error in resume, USBSTS 0x401, Reinit usb usb1: root hub lost power or was reset

To maintain state during suspend, the relevant GDSCs need to stay in retention mode, like they do on other similar SoCs. Change the mode to PWRSTS_RET_ON to fix.

Fixes 01cf3e27824d ("clk: qcom: Add Global clock controller support on Qualcomm Shikra SoC")
---
 drivers/clk/qcom/gcc-shikra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/qcom/gcc-shikra.c +2 -2
index 13c99a883e29..4f860985a8fa 100644
@@ -4049,7 +4049,7 @@ static struct gdsc gcc_usb20_gdsc = {
 	.pd = {
 		.name = "gcc_usb20_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
+	.pwrsts = PWRSTS_RET_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
 };
 
@@ -4061,7 +4061,7 @@ static struct gdsc gcc_usb30_prim_gdsc = {
 	.pd = {
 		.name = "gcc_usb30_prim_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
+	.pwrsts = PWRSTS_RET_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
 };
 
Signature · 1 line
2.43.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 11 lines

The USB subsystem does not expect to lose its state on suspend:

xhci-hcd xhci-hcd.1.auto: xHC error in resume, USBSTS 0x401, Reinit usb usb1: root hub lost power or was reset

To maintain state during suspend, the relevant GDSCs need to stay in retention mode, like they do on other similar SoCs. Change the mode to PWRSTS_RET_ON to fix.

Fixes 01cf3e27824d ("clk: qcom: Add Global clock controller support on Qualcomm Shikra SoC")

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Akash Kumar
Quoted 11 lines · Akash Kumar

The USB subsystem does not expect to lose its state on suspend:

xhci-hcd xhci-hcd.1.auto: xHC error in resume, USBSTS 0x401, Reinit usb usb1: root hub lost power or was reset

To maintain state during suspend, the relevant GDSCs need to stay in retention mode, like they do on other similar SoCs. Change the mode to PWRSTS_RET_ON to fix.

Fixes 01cf3e27824d ("clk: qcom: Add Global clock controller support on Qualcomm Shikra SoC")