]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
clk: qcom: gcc-sc8180x: Use retention for USB power domains
authorVal Packett <val@packett.cool>
Thu, 12 Mar 2026 11:12:08 +0000 (08:12 -0300)
committerBjorn Andersson <andersson@kernel.org>
Thu, 19 Mar 2026 02:08:52 +0000 (21:08 -0500)
The USB subsystem does not expect to lose its state on suspend:

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

(The reinitialization usually succeeds, but it does slow down resume.)

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: 4433594bbe5d ("clk: qcom: gcc: Add global clock controller driver for SC8180x")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Val Packett <val@packett.cool>
Link: https://lore.kernel.org/r/20260312112321.370983-4-val@packett.cool
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/gcc-sc8180x.c

index 55dabf6259b2947470bf73854796a45b63d76842..b116a9c0b2d9426b466be5355cedd66e8d14689d 100644 (file)
@@ -4172,7 +4172,7 @@ static struct gdsc usb30_sec_gdsc = {
        .pd = {
                .name = "usb30_sec_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
        .flags = POLL_CFG_GDSCR,
 };
 
@@ -4190,7 +4190,7 @@ static struct gdsc usb30_prim_gdsc = {
        .pd = {
                .name = "usb30_prim_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
        .flags = POLL_CFG_GDSCR,
 };
 
@@ -4262,7 +4262,7 @@ static struct gdsc usb30_mp_gdsc = {
        .pd = {
                .name = "usb30_mp_gdsc",
        },
-       .pwrsts = PWRSTS_OFF_ON,
+       .pwrsts = PWRSTS_RET_ON,
        .flags = POLL_CFG_GDSCR,
 };