The USB controller on sm6375 doesn't retain its state when the system
goes into low power state and the GDSCs are turned off.
This can be observed by the USB connection not coming back alive after
putting the device into suspend, essentially breaking USB.
Work around this by updating the .pwrsts for the USB GDSCs so they only
transition to retention state in low power.
This change should be reverted when a proper suspend sequence is
implemented in the USB drivers.
Signed-off-by: Konrad Dybcio <[email protected]>
---
v1 -> v2:
- Reword "fix" to "work around", mention it should be temporary
- Add TODO:
drivers/clk/qcom/gcc-sm6375.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-sm6375.c b/drivers/clk/qcom/gcc-sm6375.c
index ad3c4833990d..417a0fd242ec 100644
--- a/drivers/clk/qcom/gcc-sm6375.c
+++ b/drivers/clk/qcom/gcc-sm6375.c
@@ -3534,7 +3534,8 @@ static struct gdsc usb30_prim_gdsc = {
.pd = {
.name = "usb30_prim_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ /* TODO: Change to OFF_ON when USB drivers get proper suspend support */
+ .pwrsts = PWRSTS_RET_ON,
};
static struct gdsc ufs_phy_gdsc = {
--
2.39.2
The USB controller on MSM8996 doesn't retain its state when the system
goes into low power state and the GDSCs are turned off.
This can be observed by the USB connection not coming back alive after
putting the device into suspend, essentially breaking USB.
Work around this by updating the .pwrsts for the USB GDSCs so they only
transition to retention state in low power.
This change should be reverted when a proper suspend sequence is
implemented in the USB drivers.
Signed-off-by: Konrad Dybcio <[email protected]>
---
v1 -> v2:
- Reword "fix" to "work around", mention it should be temporary
- Add TODO:
drivers/clk/qcom/gcc-msm8996.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-msm8996.c b/drivers/clk/qcom/gcc-msm8996.c
index e16163706735..5e44d1bcca9e 100644
--- a/drivers/clk/qcom/gcc-msm8996.c
+++ b/drivers/clk/qcom/gcc-msm8996.c
@@ -3455,7 +3455,8 @@ static struct gdsc usb30_gdsc = {
.pd = {
.name = "usb30",
},
- .pwrsts = PWRSTS_OFF_ON,
+ /* TODO: Change to OFF_ON when USB drivers get proper suspend support */
+ .pwrsts = PWRSTS_RET_ON,
};
static struct gdsc pcie0_gdsc = {
--
2.39.2
The USB controller on msm8998 doesn't retain its state when the system
goes into low power state and the GDSCs are turned off.
This can be observed by the USB connection not coming back alive after
putting the device into suspend, essentially breaking USB.
Work around this by updating the .pwrsts for the USB GDSCs so they only
transition to retention state in low power.
This change should be reverted when a proper suspend sequence is
implemented in the USB drivers.
Signed-off-by: Konrad Dybcio <[email protected]>
---
v1 -> v2:
New patch
drivers/clk/qcom/gcc-msm8998.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
index f1aacbfe6bb4..8790bbdcd2e2 100644
--- a/drivers/clk/qcom/gcc-msm8998.c
+++ b/drivers/clk/qcom/gcc-msm8998.c
@@ -2901,7 +2901,8 @@ static struct gdsc usb_30_gdsc = {
.pd = {
.name = "usb_30_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ /* TODO: Change to OFF_ON when USB drivers get proper suspend support */
+ .pwrsts = PWRSTS_RET_ON,
.flags = VOTABLE,
};
--
2.39.2
On Tue, 7 Mar 2023 13:31:57 +0100, Konrad Dybcio wrote:
> The USB controller on sm6375 doesn't retain its state when the system
> goes into low power state and the GDSCs are turned off.
>
> This can be observed by the USB connection not coming back alive after
> putting the device into suspend, essentially breaking USB.
>
> Work around this by updating the .pwrsts for the USB GDSCs so they only
> transition to retention state in low power.
>
> [...]
Applied, thanks!
[1/3] clk: qcom: gcc-sm6375: Update the .pwrsts for usb gdsc
commit: 03b49487130ed907db787dc7b4e39392f077861b
[2/3] clk: qcom: gcc-msm8996: Update the .pwrsts for usb gdsc
commit: 78a2f2a04fb5f1182f03f2ed1f9433982f66346f
[3/3] clk: qcom: gcc-msm8998: Update the .pwrsts for usb gdsc
commit: 83fddbcc833766d02d8bcdb3a3866f0c20b02349
Best regards,
--
Bjorn Andersson <[email protected]>