linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sm6115: Fix up cluster idle states
@ 2023-06-13 19:13 Konrad Dybcio
  2023-06-13 19:14 ` Konrad Dybcio
  2023-06-13 19:31 ` Stephan Gerhold
  0 siblings, 2 replies; 3+ messages in thread
From: Konrad Dybcio @ 2023-06-13 19:13 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bhupesh Sharma
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel, Konrad Dybcio

The lowest nibble of the PSCI suspend param denotes the CPU state.
It was mistakenly set to mimic the cluster state, resulting in poking
PSCI with undocumented 0x2 and 0x4 states (both of which seem to be
implemented and undocumented). Also, GDHS cluster param was wrong for C1.

Fix that.

Fixes: b5de1a9ff1f2 ("arm64: dts: qcom: sm6115: Add CPU idle-states")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index 55118577bf92..07d8b842d7be 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -225,7 +225,7 @@ domain-idle-states {
 			CLUSTER_0_SLEEP_0: cluster-sleep-0-0 {
 				/* GDHS */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x40000022>;
+				arm,psci-suspend-param = <0x40000023>;
 				entry-latency-us = <360>;
 				exit-latency-us = <421>;
 				min-residency-us = <782>;
@@ -234,7 +234,7 @@ CLUSTER_0_SLEEP_0: cluster-sleep-0-0 {
 			CLUSTER_0_SLEEP_1: cluster-sleep-0-1 {
 				/* Power Collapse */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x41000044>;
+				arm,psci-suspend-param = <0x41000043>;
 				entry-latency-us = <800>;
 				exit-latency-us = <2118>;
 				min-residency-us = <7376>;
@@ -243,7 +243,7 @@ CLUSTER_0_SLEEP_1: cluster-sleep-0-1 {
 			CLUSTER_1_SLEEP_0: cluster-sleep-1-0 {
 				/* GDHS */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x40000042>;
+				arm,psci-suspend-param = <0x40000023>;
 				entry-latency-us = <314>;
 				exit-latency-us = <345>;
 				min-residency-us = <660>;
@@ -252,7 +252,7 @@ CLUSTER_1_SLEEP_0: cluster-sleep-1-0 {
 			CLUSTER_1_SLEEP_1: cluster-sleep-1-1 {
 				/* Power Collapse */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x41000044>;
+				arm,psci-suspend-param = <0x41000043>;
 				entry-latency-us = <640>;
 				exit-latency-us = <1654>;
 				min-residency-us = <8094>;

---
base-commit: 1f6ce8392d6ff486af5ca96df9ded5882c4b6977
change-id: 20230613-topic-6115idlestates-ba341792ebb2

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@linaro.org>


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

* Re: [PATCH] arm64: dts: qcom: sm6115: Fix up cluster idle states
  2023-06-13 19:13 [PATCH] arm64: dts: qcom: sm6115: Fix up cluster idle states Konrad Dybcio
@ 2023-06-13 19:14 ` Konrad Dybcio
  2023-06-13 19:31 ` Stephan Gerhold
  1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2023-06-13 19:14 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bhupesh Sharma
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel



On 13.06.2023 21:13, Konrad Dybcio wrote:
> The lowest nibble of the PSCI suspend param denotes the CPU state.
> It was mistakenly set to mimic the cluster state, resulting in poking
> PSCI with undocumented 0x2 and 0x4 states (both of which seem to be
> implemented and undocumented). Also, GDHS cluster param was wrong for C1.
> 
> Fix that.
> 
> Fixes: b5de1a9ff1f2 ("arm64: dts: qcom: sm6115: Add CPU idle-states")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
Of course I remember about the tags right after I hit send..

Reported-by: Stephan Gerhold <stephan@gerhold.net>

Konrad
>  arch/arm64/boot/dts/qcom/sm6115.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> index 55118577bf92..07d8b842d7be 100644
> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> @@ -225,7 +225,7 @@ domain-idle-states {
>  			CLUSTER_0_SLEEP_0: cluster-sleep-0-0 {
>  				/* GDHS */
>  				compatible = "domain-idle-state";
> -				arm,psci-suspend-param = <0x40000022>;
> +				arm,psci-suspend-param = <0x40000023>;
>  				entry-latency-us = <360>;
>  				exit-latency-us = <421>;
>  				min-residency-us = <782>;
> @@ -234,7 +234,7 @@ CLUSTER_0_SLEEP_0: cluster-sleep-0-0 {
>  			CLUSTER_0_SLEEP_1: cluster-sleep-0-1 {
>  				/* Power Collapse */
>  				compatible = "domain-idle-state";
> -				arm,psci-suspend-param = <0x41000044>;
> +				arm,psci-suspend-param = <0x41000043>;
>  				entry-latency-us = <800>;
>  				exit-latency-us = <2118>;
>  				min-residency-us = <7376>;
> @@ -243,7 +243,7 @@ CLUSTER_0_SLEEP_1: cluster-sleep-0-1 {
>  			CLUSTER_1_SLEEP_0: cluster-sleep-1-0 {
>  				/* GDHS */
>  				compatible = "domain-idle-state";
> -				arm,psci-suspend-param = <0x40000042>;
> +				arm,psci-suspend-param = <0x40000023>;
>  				entry-latency-us = <314>;
>  				exit-latency-us = <345>;
>  				min-residency-us = <660>;
> @@ -252,7 +252,7 @@ CLUSTER_1_SLEEP_0: cluster-sleep-1-0 {
>  			CLUSTER_1_SLEEP_1: cluster-sleep-1-1 {
>  				/* Power Collapse */
>  				compatible = "domain-idle-state";
> -				arm,psci-suspend-param = <0x41000044>;
> +				arm,psci-suspend-param = <0x41000043>;
>  				entry-latency-us = <640>;
>  				exit-latency-us = <1654>;
>  				min-residency-us = <8094>;
> 
> ---
> base-commit: 1f6ce8392d6ff486af5ca96df9ded5882c4b6977
> change-id: 20230613-topic-6115idlestates-ba341792ebb2
> 
> Best regards,

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

* Re: [PATCH] arm64: dts: qcom: sm6115: Fix up cluster idle states
  2023-06-13 19:13 [PATCH] arm64: dts: qcom: sm6115: Fix up cluster idle states Konrad Dybcio
  2023-06-13 19:14 ` Konrad Dybcio
@ 2023-06-13 19:31 ` Stephan Gerhold
  1 sibling, 0 replies; 3+ messages in thread
From: Stephan Gerhold @ 2023-06-13 19:31 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bhupesh Sharma, Marijn Suijten, linux-arm-msm,
	devicetree, linux-kernel

On Tue, Jun 13, 2023 at 09:13:47PM +0200, Konrad Dybcio wrote:
> The lowest nibble of the PSCI suspend param denotes the CPU state.
> It was mistakenly set to mimic the cluster state, resulting in poking
> PSCI with undocumented 0x2 and 0x4 states (both of which seem to be
> implemented and undocumented). Also, GDHS cluster param was wrong for C1.
> 
> Fix that.
> 
> Fixes: b5de1a9ff1f2 ("arm64: dts: qcom: sm6115: Add CPU idle-states")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm6115.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> index 55118577bf92..07d8b842d7be 100644
> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> @@ -225,7 +225,7 @@ domain-idle-states {
>  			CLUSTER_0_SLEEP_0: cluster-sleep-0-0 {
>  				/* GDHS */
>  				compatible = "domain-idle-state";
> -				arm,psci-suspend-param = <0x40000022>;
> +				arm,psci-suspend-param = <0x40000023>;

I think entering GDHS is also "Core is last in power level" "1=Cluster"
so (1 << 24) should be set here as well (i.e. 0x41...).

Otherwise the fixes look good, thanks for taking a look!

Thanks,
Stephan

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

end of thread, other threads:[~2023-06-13 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13 19:13 [PATCH] arm64: dts: qcom: sm6115: Fix up cluster idle states Konrad Dybcio
2023-06-13 19:14 ` Konrad Dybcio
2023-06-13 19:31 ` Stephan Gerhold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).