* [PATCH] clk: qcom: gcc-sm8650: Do not turn off USB GDSCs during gdsc_disable()
@ 2025-03-05 19:00 Neil Armstrong
2025-03-06 9:20 ` Taniya Das
2025-04-18 13:23 ` Neil Armstrong
0 siblings, 2 replies; 3+ messages in thread
From: Neil Armstrong @ 2025-03-05 19:00 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-clk, linux-kernel, Neil Armstrong
With PWRSTS_OFF_ON, USB GDSCs are turned off during gdsc_disable(). This
can happen during scenarios such as system suspend and breaks the resume
of USB controller from suspend.
So use PWRSTS_RET_ON to indicate the GDSC driver to not turn off the GDSCs
during gdsc_disable() and allow the hardware to transition the GDSCs to
retention when the parent domain enters low power state during system
suspend.
Fixes: c58225b7e3d7 ("clk: qcom: add the SM8650 Global Clock Controller driver, part 1")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/clk/qcom/gcc-sm8650.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/gcc-sm8650.c b/drivers/clk/qcom/gcc-sm8650.c
index 9dd5c48f33bed5b944a0b25959ef69e7862d0449..fa1672c4e7d814e1e08c79f9cda9463bf1cd1598 100644
--- a/drivers/clk/qcom/gcc-sm8650.c
+++ b/drivers/clk/qcom/gcc-sm8650.c
@@ -3497,7 +3497,7 @@ static struct gdsc usb30_prim_gdsc = {
.pd = {
.name = "usb30_prim_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
@@ -3506,7 +3506,7 @@ static struct gdsc usb3_phy_gdsc = {
.pd = {
.name = "usb3_phy_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
---
base-commit: 7ec162622e66a4ff886f8f28712ea1b13069e1aa
change-id: 20250305-topic-sm8650-upstream-fix-usb-suspend-20979d5a0170
Best regards,
--
Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: qcom: gcc-sm8650: Do not turn off USB GDSCs during gdsc_disable()
2025-03-05 19:00 [PATCH] clk: qcom: gcc-sm8650: Do not turn off USB GDSCs during gdsc_disable() Neil Armstrong
@ 2025-03-06 9:20 ` Taniya Das
2025-04-18 13:23 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Taniya Das @ 2025-03-06 9:20 UTC (permalink / raw)
To: Neil Armstrong, Bjorn Andersson, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-clk, linux-kernel
On 3/6/2025 12:30 AM, Neil Armstrong wrote:
> With PWRSTS_OFF_ON, USB GDSCs are turned off during gdsc_disable(). This
> can happen during scenarios such as system suspend and breaks the resume
> of USB controller from suspend.
>
> So use PWRSTS_RET_ON to indicate the GDSC driver to not turn off the GDSCs
> during gdsc_disable() and allow the hardware to transition the GDSCs to
> retention when the parent domain enters low power state during system
> suspend.
>
> Fixes: c58225b7e3d7 ("clk: qcom: add the SM8650 Global Clock Controller driver, part 1")
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> drivers/clk/qcom/gcc-sm8650.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-sm8650.c b/drivers/clk/qcom/gcc-sm8650.c
> index 9dd5c48f33bed5b944a0b25959ef69e7862d0449..fa1672c4e7d814e1e08c79f9cda9463bf1cd1598 100644
> --- a/drivers/clk/qcom/gcc-sm8650.c
> +++ b/drivers/clk/qcom/gcc-sm8650.c
> @@ -3497,7 +3497,7 @@ static struct gdsc usb30_prim_gdsc = {
> .pd = {
> .name = "usb30_prim_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -3506,7 +3506,7 @@ static struct gdsc usb3_phy_gdsc = {
> .pd = {
> .name = "usb3_phy_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
>
Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
> ---
> base-commit: 7ec162622e66a4ff886f8f28712ea1b13069e1aa
> change-id: 20250305-topic-sm8650-upstream-fix-usb-suspend-20979d5a0170
>
> Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: qcom: gcc-sm8650: Do not turn off USB GDSCs during gdsc_disable()
2025-03-05 19:00 [PATCH] clk: qcom: gcc-sm8650: Do not turn off USB GDSCs during gdsc_disable() Neil Armstrong
2025-03-06 9:20 ` Taniya Das
@ 2025-04-18 13:23 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2025-04-18 13:23 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd
Cc: linux-arm-msm, linux-clk, linux-kernel
Hi Bjorn,
On 05/03/2025 20:00, Neil Armstrong wrote:
> With PWRSTS_OFF_ON, USB GDSCs are turned off during gdsc_disable(). This
> can happen during scenarios such as system suspend and breaks the resume
> of USB controller from suspend.
>
> So use PWRSTS_RET_ON to indicate the GDSC driver to not turn off the GDSCs
> during gdsc_disable() and allow the hardware to transition the GDSCs to
> retention when the parent domain enters low power state during system
> suspend.
>
> Fixes: c58225b7e3d7 ("clk: qcom: add the SM8650 Global Clock Controller driver, part 1")
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> drivers/clk/qcom/gcc-sm8650.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-sm8650.c b/drivers/clk/qcom/gcc-sm8650.c
> index 9dd5c48f33bed5b944a0b25959ef69e7862d0449..fa1672c4e7d814e1e08c79f9cda9463bf1cd1598 100644
> --- a/drivers/clk/qcom/gcc-sm8650.c
> +++ b/drivers/clk/qcom/gcc-sm8650.c
> @@ -3497,7 +3497,7 @@ static struct gdsc usb30_prim_gdsc = {
> .pd = {
> .name = "usb30_prim_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
> @@ -3506,7 +3506,7 @@ static struct gdsc usb3_phy_gdsc = {
> .pd = {
> .name = "usb3_phy_gdsc",
> },
> - .pwrsts = PWRSTS_OFF_ON,
> + .pwrsts = PWRSTS_RET_ON,
> .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
> };
>
>
> ---
> base-commit: 7ec162622e66a4ff886f8f28712ea1b13069e1aa
> change-id: 20250305-topic-sm8650-upstream-fix-usb-suspend-20979d5a0170
>
> Best regards,
Gentle ping !
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-18 13:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 19:00 [PATCH] clk: qcom: gcc-sm8650: Do not turn off USB GDSCs during gdsc_disable() Neil Armstrong
2025-03-06 9:20 ` Taniya Das
2025-04-18 13:23 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox