Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sc7280: revert back to PSCI PC mode
@ 2023-12-21 21:48 Chia-I Wu
  2023-12-21 21:55 ` Konrad Dybcio
  0 siblings, 1 reply; 4+ messages in thread
From: Chia-I Wu @ 2023-12-21 21:48 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ulf Hansson, Maulik Shah, linux-arm-msm, devicetree, linux-kernel

This effectively reverts 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add
power-domains for cpuidle states") for sc7280-herobrine.

Fixes: 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add power-domains for cpuidle states")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
---
 .../boot/dts/qcom/sc7280-firmware-tfa.dtsi    | 107 ++++++++++++++++++
 .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi |   1 +
 arch/arm64/boot/dts/qcom/sc7280.dtsi          |   4 +-
 3 files changed, 110 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi

diff --git a/arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi b/arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi
new file mode 100644
index 0000000000000..b3fc03da244d6
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sc7280-firmware-tfa.dtsi
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: BSD-3-Clause
+
+/*
+ * Devices that use SC7280 with TrustedFirmware-A
+ * need PSCI PC mode instead of the OSI mode provided
+ * by Qualcomm firmware.
+ */
+
+&CPU0 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+			   &LITTLE_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+&CPU1 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+			   &LITTLE_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+&CPU2 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+			   &LITTLE_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+&CPU3 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+			   &LITTLE_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+&CPU4 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&BIG_CPU_SLEEP_0
+			   &BIG_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+&CPU5 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&BIG_CPU_SLEEP_0
+			   &BIG_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+&CPU6 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&BIG_CPU_SLEEP_0
+			   &BIG_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+&CPU7 {
+	/delete-property/ power-domains;
+	/delete-property/ power-domain-names;
+
+	cpu-idle-states = <&BIG_CPU_SLEEP_0
+			   &BIG_CPU_SLEEP_1
+			   &CLUSTER_SLEEP_0>;
+};
+
+/delete-node/ &domain_idle_states;
+
+&idle_states {
+	CLUSTER_SLEEP_0: cluster-sleep-0 {
+		compatible = "arm,idle-state";
+		idle-state-name = "cluster-power-down";
+		arm,psci-suspend-param = <0x40003444>;
+		entry-latency-us = <3263>;
+		exit-latency-us = <6562>;
+		min-residency-us = <9926>;
+		local-timer-stop;
+	};
+};
+
+/delete-node/ &CPU_PD0;
+/delete-node/ &CPU_PD1;
+/delete-node/ &CPU_PD2;
+/delete-node/ &CPU_PD3;
+/delete-node/ &CPU_PD4;
+/delete-node/ &CPU_PD5;
+/delete-node/ &CPU_PD6;
+/delete-node/ &CPU_PD7;
+/delete-node/ &CLUSTER_PD;
+
+&apps_rsc {
+	/delete-property/ power-domains;
+};
diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi
index 9ea6636125ad9..09b2d370bf7e0 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi
@@ -19,6 +19,7 @@
 
 #include "sc7280-qcard.dtsi"
 #include "sc7280-chrome-common.dtsi"
+#include "sc7280-firmware-tfa.dtsi"
 
 / {
 	chosen {
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 66f1eb83cca7e..354bf2868eba6 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -383,7 +383,7 @@ core7 {
 			};
 		};
 
-		idle-states {
+		idle_states: idle-states {
 			entry-method = "psci";
 
 			LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
@@ -427,7 +427,7 @@ BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
 			};
 		};
 
-		domain-idle-states {
+		domain_idle_states: domain-idle-states {
 			CLUSTER_SLEEP_0: cluster-sleep-0 {
 				compatible = "domain-idle-state";
 				idle-state-name = "cluster-power-down";
-- 
2.43.0.195.gebba966016-goog


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

* Re: [PATCH] arm64: dts: qcom: sc7280: revert back to PSCI PC mode
  2023-12-21 21:48 [PATCH] arm64: dts: qcom: sc7280: revert back to PSCI PC mode Chia-I Wu
@ 2023-12-21 21:55 ` Konrad Dybcio
  2023-12-21 22:07   ` Chia-I Wu
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2023-12-21 21:55 UTC (permalink / raw)
  To: Chia-I Wu, cros-qcom-dts-watchers, Andy Gross, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
	Maulik Shah, linux-arm-msm, devicetree, linux-kernel

On 21.12.2023 22:48, Chia-I Wu wrote:
> This effectively reverts 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add
> power-domains for cpuidle states") for sc7280-herobrine.
> 
> Fixes: 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add power-domains for cpuidle states")
> Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
> ---
0 explanations?

Konrad

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

* Re: [PATCH] arm64: dts: qcom: sc7280: revert back to PSCI PC mode
  2023-12-21 21:55 ` Konrad Dybcio
@ 2023-12-21 22:07   ` Chia-I Wu
  2023-12-21 23:22     ` Dmitry Baryshkov
  0 siblings, 1 reply; 4+ messages in thread
From: Chia-I Wu @ 2023-12-21 22:07 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: cros-qcom-dts-watchers, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Ulf Hansson, Maulik Shah,
	linux-arm-msm, devicetree, linux-kernel

On Thu, Dec 21, 2023 at 1:55 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 21.12.2023 22:48, Chia-I Wu wrote:
> > This effectively reverts 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add
> > power-domains for cpuidle states") for sc7280-herobrine.
> >
> > Fixes: 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add power-domains for cpuidle states")
> > Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
> > ---
> 0 explanations?
Ouch.  It's in the comment

+ * Devices that use SC7280 with TrustedFirmware-A
+ * need PSCI PC mode instead of the OSI mode provided
+ * by Qualcomm firmware.

and is similar to the case with sc7180-trogdor.  I can send v2 if necessary.

>
> Konrad

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

* Re: [PATCH] arm64: dts: qcom: sc7280: revert back to PSCI PC mode
  2023-12-21 22:07   ` Chia-I Wu
@ 2023-12-21 23:22     ` Dmitry Baryshkov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2023-12-21 23:22 UTC (permalink / raw)
  To: Chia-I Wu
  Cc: Konrad Dybcio, cros-qcom-dts-watchers, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ulf Hansson, Maulik Shah, linux-arm-msm, devicetree, linux-kernel

On Fri, 22 Dec 2023 at 00:07, Chia-I Wu <olvaffe@gmail.com> wrote:
>
> On Thu, Dec 21, 2023 at 1:55 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >
> > On 21.12.2023 22:48, Chia-I Wu wrote:
> > > This effectively reverts 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add
> > > power-domains for cpuidle states") for sc7280-herobrine.
> > >
> > > Fixes: 7925ca85e9561 ("arm64: dts: qcom: sc7280: Add power-domains for cpuidle states")
> > > Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
> > > ---
> > 0 explanations?
> Ouch.  It's in the comment
>
> + * Devices that use SC7280 with TrustedFirmware-A
> + * need PSCI PC mode instead of the OSI mode provided
> + * by Qualcomm firmware.
>
> and is similar to the case with sc7180-trogdor.  I can send v2 if necessary.

Absolutely necessary. And so does the accurate commit subject. The
existing one means that the whole SC7280 PSCI mode is reversed, while
instead you do it only for the TF-A platforms.


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2023-12-21 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-21 21:48 [PATCH] arm64: dts: qcom: sc7280: revert back to PSCI PC mode Chia-I Wu
2023-12-21 21:55 ` Konrad Dybcio
2023-12-21 22:07   ` Chia-I Wu
2023-12-21 23:22     ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox