All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: gcc-sc8280xp: use retention for USB power domains
@ 2022-09-29 16:11 Johan Hovold
  2022-09-29 16:45 ` Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johan Hovold @ 2022-09-29 16:11 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	Rajendra Nayak, linux-arm-msm, linux-clk, linux-kernel,
	Johan Hovold

Since commit d399723950c4 ("clk: qcom: gdsc: Fix the handling of
PWRSTS_RET support) retention mode can be used on sc8280xp to maintain
state during suspend instead of leaving the domain always on.

This is needed to eventually allow the parent CX domain to be powered
down during suspend.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/clk/qcom/gcc-sc8280xp.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

While we're not yet able to fully test this (since we're not hitting CX
power down) this can still go in as we'll need it in some form
eventually.

Note that the PCIe domains should remain always-on until we have driver
support for suspend in place.

Johan


diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c
index 7768e6901dcc..a18ed88f3b82 100644
--- a/drivers/clk/qcom/gcc-sc8280xp.c
+++ b/drivers/clk/qcom/gcc-sc8280xp.c
@@ -6843,17 +6843,12 @@ static struct gdsc ufs_phy_gdsc = {
 	.pwrsts = PWRSTS_OFF_ON,
 };
 
-/*
- * The Qualcomm DWC3 driver suspend implementation appears to be incomplete
- * for sc8280xp so keep the USB power domains always-on for now.
- */
 static struct gdsc usb30_mp_gdsc = {
 	.gdscr = 0xab004,
 	.pd = {
 		.name = "usb30_mp_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
-	.flags = ALWAYS_ON,
+	.pwrsts = PWRSTS_RET_ON,
 };
 
 static struct gdsc usb30_prim_gdsc = {
@@ -6861,8 +6856,7 @@ static struct gdsc usb30_prim_gdsc = {
 	.pd = {
 		.name = "usb30_prim_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
-	.flags = ALWAYS_ON,
+	.pwrsts = PWRSTS_RET_ON,
 };
 
 static struct gdsc usb30_sec_gdsc = {
@@ -6870,8 +6864,7 @@ static struct gdsc usb30_sec_gdsc = {
 	.pd = {
 		.name = "usb30_sec_gdsc",
 	},
-	.pwrsts = PWRSTS_OFF_ON,
-	.flags = ALWAYS_ON,
+	.pwrsts = PWRSTS_RET_ON,
 };
 
 static struct clk_regmap *gcc_sc8280xp_clocks[] = {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: gcc-sc8280xp: use retention for USB power domains
  2022-09-29 16:11 [PATCH] clk: gcc-sc8280xp: use retention for USB power domains Johan Hovold
@ 2022-09-29 16:45 ` Bjorn Andersson
  2022-09-29 23:38 ` Konrad Dybcio
  2022-09-30 11:57 ` Rajendra Nayak
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-09-29 16:45 UTC (permalink / raw)
  To: johan+linaro
  Cc: linux-arm-msm, agross, quic_rjendra, mturquette, linux-kernel,
	konrad.dybcio, sboyd, linux-clk

On Thu, 29 Sep 2022 18:11:24 +0200, Johan Hovold wrote:
> Since commit d399723950c4 ("clk: qcom: gdsc: Fix the handling of
> PWRSTS_RET support) retention mode can be used on sc8280xp to maintain
> state during suspend instead of leaving the domain always on.
> 
> This is needed to eventually allow the parent CX domain to be powered
> down during suspend.
> 
> [...]

Applied, thanks!

[1/1] clk: gcc-sc8280xp: use retention for USB power domains
      commit: 27da533af9b050e751a419c743096d06017daf0e

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: gcc-sc8280xp: use retention for USB power domains
  2022-09-29 16:11 [PATCH] clk: gcc-sc8280xp: use retention for USB power domains Johan Hovold
  2022-09-29 16:45 ` Bjorn Andersson
@ 2022-09-29 23:38 ` Konrad Dybcio
  2022-09-30 11:57 ` Rajendra Nayak
  2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2022-09-29 23:38 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Michael Turquette, Stephen Boyd, Rajendra Nayak,
	linux-arm-msm, linux-clk, linux-kernel



On 29.09.2022 18:11, Johan Hovold wrote:
> Since commit d399723950c4 ("clk: qcom: gdsc: Fix the handling of
> PWRSTS_RET support) retention mode can be used on sc8280xp to maintain
> state during suspend instead of leaving the domain always on.
> 
> This is needed to eventually allow the parent CX domain to be powered
> down during suspend.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  drivers/clk/qcom/gcc-sc8280xp.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> While we're not yet able to fully test this (since we're not hitting CX
> power down) this can still go in as we'll need it in some form
> eventually.
> 
> Note that the PCIe domains should remain always-on until we have driver
> support for suspend in place.
> 
> Johan
> 
> 
> diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c
> index 7768e6901dcc..a18ed88f3b82 100644
> --- a/drivers/clk/qcom/gcc-sc8280xp.c
> +++ b/drivers/clk/qcom/gcc-sc8280xp.c
> @@ -6843,17 +6843,12 @@ static struct gdsc ufs_phy_gdsc = {
>  	.pwrsts = PWRSTS_OFF_ON,
>  };
>  
> -/*
> - * The Qualcomm DWC3 driver suspend implementation appears to be incomplete
> - * for sc8280xp so keep the USB power domains always-on for now.
> - */
>  static struct gdsc usb30_mp_gdsc = {
>  	.gdscr = 0xab004,
>  	.pd = {
>  		.name = "usb30_mp_gdsc",
>  	},
> -	.pwrsts = PWRSTS_OFF_ON,
> -	.flags = ALWAYS_ON,
> +	.pwrsts = PWRSTS_RET_ON,
>  };
>  
>  static struct gdsc usb30_prim_gdsc = {
> @@ -6861,8 +6856,7 @@ static struct gdsc usb30_prim_gdsc = {
>  	.pd = {
>  		.name = "usb30_prim_gdsc",
>  	},
> -	.pwrsts = PWRSTS_OFF_ON,
> -	.flags = ALWAYS_ON,
> +	.pwrsts = PWRSTS_RET_ON,
>  };
>  
>  static struct gdsc usb30_sec_gdsc = {
> @@ -6870,8 +6864,7 @@ static struct gdsc usb30_sec_gdsc = {
>  	.pd = {
>  		.name = "usb30_sec_gdsc",
>  	},
> -	.pwrsts = PWRSTS_OFF_ON,
> -	.flags = ALWAYS_ON,
> +	.pwrsts = PWRSTS_RET_ON,
>  };
>  
>  static struct clk_regmap *gcc_sc8280xp_clocks[] = {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: gcc-sc8280xp: use retention for USB power domains
  2022-09-29 16:11 [PATCH] clk: gcc-sc8280xp: use retention for USB power domains Johan Hovold
  2022-09-29 16:45 ` Bjorn Andersson
  2022-09-29 23:38 ` Konrad Dybcio
@ 2022-09-30 11:57 ` Rajendra Nayak
  2 siblings, 0 replies; 4+ messages in thread
From: Rajendra Nayak @ 2022-09-30 11:57 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Michael Turquette, Stephen Boyd,
	linux-arm-msm, linux-clk, linux-kernel


On 9/29/2022 9:41 PM, Johan Hovold wrote:
> Since commit d399723950c4 ("clk: qcom: gdsc: Fix the handling of
> PWRSTS_RET support) retention mode can be used on sc8280xp to maintain
> state during suspend instead of leaving the domain always on.
> 
> This is needed to eventually allow the parent CX domain to be powered
> down during suspend.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/clk/qcom/gcc-sc8280xp.c | 13 +++----------
>   1 file changed, 3 insertions(+), 10 deletions(-)
> 
> While we're not yet able to fully test this (since we're not hitting CX
> power down) this can still go in as we'll need it in some form
> eventually.

If sc8280xp supports CX power down, it would be good to also put in the
cxcs offsets so USB RET still works even when you do hit CX power down some
time in the future.

> 
> Note that the PCIe domains should remain always-on until we have driver
> support for suspend in place.
> 
> Johan
> 
> 
> diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c
> index 7768e6901dcc..a18ed88f3b82 100644
> --- a/drivers/clk/qcom/gcc-sc8280xp.c
> +++ b/drivers/clk/qcom/gcc-sc8280xp.c
> @@ -6843,17 +6843,12 @@ static struct gdsc ufs_phy_gdsc = {
>   	.pwrsts = PWRSTS_OFF_ON,
>   };
>   
> -/*
> - * The Qualcomm DWC3 driver suspend implementation appears to be incomplete
> - * for sc8280xp so keep the USB power domains always-on for now.
> - */
>   static struct gdsc usb30_mp_gdsc = {
>   	.gdscr = 0xab004,
>   	.pd = {
>   		.name = "usb30_mp_gdsc",
>   	},
> -	.pwrsts = PWRSTS_OFF_ON,
> -	.flags = ALWAYS_ON,
> +	.pwrsts = PWRSTS_RET_ON,
>   };
>   
>   static struct gdsc usb30_prim_gdsc = {
> @@ -6861,8 +6856,7 @@ static struct gdsc usb30_prim_gdsc = {
>   	.pd = {
>   		.name = "usb30_prim_gdsc",
>   	},
> -	.pwrsts = PWRSTS_OFF_ON,
> -	.flags = ALWAYS_ON,
> +	.pwrsts = PWRSTS_RET_ON,
>   };
>   
>   static struct gdsc usb30_sec_gdsc = {
> @@ -6870,8 +6864,7 @@ static struct gdsc usb30_sec_gdsc = {
>   	.pd = {
>   		.name = "usb30_sec_gdsc",
>   	},
> -	.pwrsts = PWRSTS_OFF_ON,
> -	.flags = ALWAYS_ON,
> +	.pwrsts = PWRSTS_RET_ON,
>   };
>   
>   static struct clk_regmap *gcc_sc8280xp_clocks[] = {

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-30 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 16:11 [PATCH] clk: gcc-sc8280xp: use retention for USB power domains Johan Hovold
2022-09-29 16:45 ` Bjorn Andersson
2022-09-29 23:38 ` Konrad Dybcio
2022-09-30 11:57 ` Rajendra Nayak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.