Skip to contentSkip to conversation

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

PATCH Applied Akash Kumar 3 participants 3 messages Nov 6 – Nov 8

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

PATCH 1/1 clk: qcom: gcc-sa8775p: 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 08c51ceb12f7 ("clk: qcom: add the GCC driver for sa8775p")
---
 drivers/clk/qcom/gcc-sa8775p.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/qcom/gcc-sa8775p.c +3 -3
index 0e02af686614..47acd1b58f13 100644
@@ -4260,7 +4260,7 @@ static struct gdsc usb20_prim_gdsc = {
 	.pd = {
 		.name = "usb20_prim_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
+	.pwrsts = PWRSTS_RET_ON,
 	.flags = RETAIN_FF_ENABLE | POLL_CFG_GDSCR,
 };
 
@@ -4272,7 +4272,7 @@ static struct gdsc usb30_prim_gdsc = {
 	.pd = {
 		.name = "usb30_prim_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
+	.pwrsts = PWRSTS_RET_ON,
 	.flags = RETAIN_FF_ENABLE | POLL_CFG_GDSCR,
 };
 
@@ -4284,7 +4284,7 @@ static struct gdsc usb30_sec_gdsc = {
 	.pd = {
 		.name = "usb30_sec_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
+	.pwrsts = PWRSTS_RET_ON,
 	.flags = RETAIN_FF_ENABLE | POLL_CFG_GDSCR,
 };
 
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 08c51ceb12f7 ("clk: qcom: add the GCC driver for sa8775p")

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to Akash Kumar
Quoted 10 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.

[...]

Applied, thanks!

[1/1] clk: qcom: gcc-sa8775p: Use retention for USB power domains

      commit: 3c985f4d691286f083c08f90e2b6834eef007607

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>