devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] SM8350 CPU-adjacent fixes
@ 2023-07-05 13:36 Konrad Dybcio
  2023-07-05 13:36 ` [PATCH 1/3] arm64: dts: qcom: sm8350: Add missing cluster sleep state Konrad Dybcio
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-07-05 13:36 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Robert Foss, Vinod Koul
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
	Konrad Dybcio

I noticed there are some holes in the cpuidle and cpufreq on SM8350.
This series attempts to fix that.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (3):
      arm64: dts: qcom: sm8350: Add missing cluster sleep state
      arm64: dts: qcom: sm8350: Fix CPU idle state residency times
      arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq

 arch/arm64/boot/dts/qcom/sm8350.dtsi | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)
---
base-commit: e1f6a8eaf1c271a0158114a03e3605f4fba059ad
change-id: 20230705-topic-sm8350_fixes-2f953c38110f

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


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

* [PATCH 1/3] arm64: dts: qcom: sm8350: Add missing cluster sleep state
  2023-07-05 13:36 [PATCH 0/3] SM8350 CPU-adjacent fixes Konrad Dybcio
@ 2023-07-05 13:36 ` Konrad Dybcio
  2023-07-05 13:36 ` [PATCH 2/3] arm64: dts: qcom: sm8350: Fix CPU idle state residency times Konrad Dybcio
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-07-05 13:36 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Robert Foss, Vinod Koul
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
	Konrad Dybcio

SM8350's cores can be shut off, without engaging full-on SoC-wide power
collapse. Add the missing idle state to allow for that.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index ec451c616f3e..e1a09d4a83c4 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -264,7 +264,15 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
 		};
 
 		domain-idle-states {
-			CLUSTER_SLEEP_0: cluster-sleep-0 {
+			CLUSTER_SLEEP_APSS_OFF: cluster-sleep-0 {
+				compatible = "domain-idle-state";
+				arm,psci-suspend-param = <0x41000044>;
+				entry-latency-us = <2752>;
+				exit-latency-us = <3048>;
+				min-residency-us = <6118>;
+			};
+
+			CLUSTER_SLEEP_AOSS_SLEEP: cluster-sleep-1 {
 				compatible = "domain-idle-state";
 				arm,psci-suspend-param = <0x4100c344>;
 				entry-latency-us = <3263>;
@@ -346,7 +354,7 @@ CPU_PD7: power-domain-cpu7 {
 
 		CLUSTER_PD: power-domain-cpu-cluster0 {
 			#power-domain-cells = <0>;
-			domain-idle-states = <&CLUSTER_SLEEP_0>;
+			domain-idle-states = <&CLUSTER_SLEEP_APSS_OFF &CLUSTER_SLEEP_AOSS_SLEEP>;
 		};
 	};
 

-- 
2.41.0


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

* [PATCH 2/3] arm64: dts: qcom: sm8350: Fix CPU idle state residency times
  2023-07-05 13:36 [PATCH 0/3] SM8350 CPU-adjacent fixes Konrad Dybcio
  2023-07-05 13:36 ` [PATCH 1/3] arm64: dts: qcom: sm8350: Add missing cluster sleep state Konrad Dybcio
@ 2023-07-05 13:36 ` Konrad Dybcio
  2023-07-05 13:36 ` [PATCH 3/3] arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq Konrad Dybcio
  2023-07-10  5:07 ` [PATCH 0/3] SM8350 CPU-adjacent fixes Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-07-05 13:36 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Robert Foss, Vinod Koul
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
	Konrad Dybcio

The present values look to have been copypasted from 8150 or 8180.
Fix that.

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

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index e1a09d4a83c4..4981a502d4ce 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -246,8 +246,8 @@ LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
 				compatible = "arm,idle-state";
 				idle-state-name = "silver-rail-power-collapse";
 				arm,psci-suspend-param = <0x40000004>;
-				entry-latency-us = <355>;
-				exit-latency-us = <909>;
+				entry-latency-us = <360>;
+				exit-latency-us = <531>;
 				min-residency-us = <3934>;
 				local-timer-stop;
 			};
@@ -256,8 +256,8 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
 				compatible = "arm,idle-state";
 				idle-state-name = "gold-rail-power-collapse";
 				arm,psci-suspend-param = <0x40000004>;
-				entry-latency-us = <241>;
-				exit-latency-us = <1461>;
+				entry-latency-us = <702>;
+				exit-latency-us = <1061>;
 				min-residency-us = <4488>;
 				local-timer-stop;
 			};

-- 
2.41.0


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

* [PATCH 3/3] arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq
  2023-07-05 13:36 [PATCH 0/3] SM8350 CPU-adjacent fixes Konrad Dybcio
  2023-07-05 13:36 ` [PATCH 1/3] arm64: dts: qcom: sm8350: Add missing cluster sleep state Konrad Dybcio
  2023-07-05 13:36 ` [PATCH 2/3] arm64: dts: qcom: sm8350: Fix CPU idle state residency times Konrad Dybcio
@ 2023-07-05 13:36 ` Konrad Dybcio
  2023-07-10  5:07 ` [PATCH 0/3] SM8350 CPU-adjacent fixes Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-07-05 13:36 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Robert Foss, Vinod Koul
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
	Konrad Dybcio

Add the missing interrupts that communicate the hardware-managed
throttling to Linux.

Fixes: ccbb3abb23a5 ("arm64: dts: qcom: sm8350: Add cpufreq node")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 4981a502d4ce..00083782e533 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -3407,6 +3407,13 @@ cpufreq_hw: cpufreq@18591000 {
 			      <0 0x18593000 0 0x1000>;
 			reg-names = "freq-domain0", "freq-domain1", "freq-domain2";
 
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "dcvsh-irq-0",
+					  "dcvsh-irq-1",
+					  "dcvsh-irq-2";
+
 			clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_GPLL0>;
 			clock-names = "xo", "alternate";
 

-- 
2.41.0


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

* Re: [PATCH 0/3] SM8350 CPU-adjacent fixes
  2023-07-05 13:36 [PATCH 0/3] SM8350 CPU-adjacent fixes Konrad Dybcio
                   ` (2 preceding siblings ...)
  2023-07-05 13:36 ` [PATCH 3/3] arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq Konrad Dybcio
@ 2023-07-10  5:07 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2023-07-10  5:07 UTC (permalink / raw)
  To: Andy Gross, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Robert Foss, Vinod Koul, Konrad Dybcio
  Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel


On Wed, 05 Jul 2023 15:36:20 +0200, Konrad Dybcio wrote:
> I noticed there are some holes in the cpuidle and cpufreq on SM8350.
> This series attempts to fix that.
> 
> 

Applied, thanks!

[1/3] arm64: dts: qcom: sm8350: Add missing cluster sleep state
      commit: 29a687c219e20fd4c6e8c47d214365f0d34e3d3d
[2/3] arm64: dts: qcom: sm8350: Fix CPU idle state residency times
      commit: 91ce3693e2fb685f31d39605a5ad1fbd940804da
[3/3] arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq
      commit: 951151c2bb548e0f6b2c40ab4c48675f5342c914

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

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

end of thread, other threads:[~2023-07-10  5:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-05 13:36 [PATCH 0/3] SM8350 CPU-adjacent fixes Konrad Dybcio
2023-07-05 13:36 ` [PATCH 1/3] arm64: dts: qcom: sm8350: Add missing cluster sleep state Konrad Dybcio
2023-07-05 13:36 ` [PATCH 2/3] arm64: dts: qcom: sm8350: Fix CPU idle state residency times Konrad Dybcio
2023-07-05 13:36 ` [PATCH 3/3] arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq Konrad Dybcio
2023-07-10  5:07 ` [PATCH 0/3] SM8350 CPU-adjacent fixes Bjorn Andersson

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).