* [PATCH RFT RFC 1/3] arm64: dts: qcom: sc8280xp: Add lower cluster idle states
2023-06-19 16:18 [PATCH RFT RFC 0/3] Fix up SC8280XP idle states Konrad Dybcio
@ 2023-06-19 16:18 ` Konrad Dybcio
2023-07-05 12:47 ` Konrad Dybcio
2023-06-19 16:18 ` [PATCH RFT RFC 2/3] arm64: dts: qcom: sc8280xp: Add missing CPU " Konrad Dybcio
2023-06-19 16:18 ` [PATCH RFT RFC 3/3] arm64: dts: qcom: sc8280xp: Fix up idle state periods Konrad Dybcio
2 siblings, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2023-06-19 16:18 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Johan Hovold
Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
Konrad Dybcio, Krzysztof Kozlowski, Konrad Dybcio
Apart from a total LLCC + APSS power collapse, SC8280XP can also put
either the DSU rail (CPU + L3), or VDD_CX in power collapse.
Add support for these lower idle states to allow more flexibility.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index ac0596dfdbc4..d524f851cb53 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -285,7 +285,23 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
};
domain-idle-states {
- CLUSTER_SLEEP_0: cluster-sleep-0 {
+ CLUSTER_SLEEP_L3_PC: 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_CX_OFF: cluster-sleep-1 {
+ compatible = "domain-idle-state";
+ arm,psci-suspend-param = <0x41002344>;
+ entry-latency-us = <3263>;
+ exit-latency-us = <4562>;
+ min-residency-us = <8467>;
+ };
+
+ CLUSTER_SLEEP_APSS_OFF: cluster-sleep-2 {
compatible = "domain-idle-state";
arm,psci-suspend-param = <0x4100c344>;
entry-latency-us = <3263>;
@@ -632,7 +648,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_L3_PC &CLUSTER_SLEEP_CX_OFF &CLUSTER_SLEEP_APSS_OFF>;
};
};
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH RFT RFC 1/3] arm64: dts: qcom: sc8280xp: Add lower cluster idle states
2023-06-19 16:18 ` [PATCH RFT RFC 1/3] arm64: dts: qcom: sc8280xp: Add lower cluster " Konrad Dybcio
@ 2023-07-05 12:47 ` Konrad Dybcio
0 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-07-05 12:47 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Johan Hovold
Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
Konrad Dybcio, Krzysztof Kozlowski
On 19.06.2023 18:18, Konrad Dybcio wrote:
> Apart from a total LLCC + APSS power collapse, SC8280XP can also put
> either the DSU rail (CPU + L3), or VDD_CX in power collapse.
>
> Add support for these lower idle states to allow more flexibility.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> index ac0596dfdbc4..d524f851cb53 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
> @@ -285,7 +285,23 @@ BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
> };
>
> domain-idle-states {
> - CLUSTER_SLEEP_0: cluster-sleep-0 {
> + CLUSTER_SLEEP_L3_PC: cluster-sleep-0 {
I guess this is misleading.
cluster-sleep-0 would be APSS_OFF (cores and caches have no power)
cluster-sleep-1 is ok (the CX rail is 0.0W)
cluster-sleep-2 would be AOSS_SLEEP (a.k.a. we've entered the SLEEP
state within RPMh and the system needs to be woken up by PDC)
Konrad
> + compatible = "domain-idle-state";
> + arm,psci-suspend-param = <0x41000044>;
> + entry-latency-us = <2752>;
> + exit-latency-us = <3048>;
> + min-residency-us = <6118>;
> + };
> +
> + CLUSTER_SLEEP_CX_OFF: cluster-sleep-1 {
> + compatible = "domain-idle-state";
> + arm,psci-suspend-param = <0x41002344>;
> + entry-latency-us = <3263>;
> + exit-latency-us = <4562>;
> + min-residency-us = <8467>;
> + };
> +
> + CLUSTER_SLEEP_APSS_OFF: cluster-sleep-2 {
> compatible = "domain-idle-state";
> arm,psci-suspend-param = <0x4100c344>;
> entry-latency-us = <3263>;
> @@ -632,7 +648,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_L3_PC &CLUSTER_SLEEP_CX_OFF &CLUSTER_SLEEP_APSS_OFF>;
> };
> };
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RFT RFC 2/3] arm64: dts: qcom: sc8280xp: Add missing CPU idle states
2023-06-19 16:18 [PATCH RFT RFC 0/3] Fix up SC8280XP idle states Konrad Dybcio
2023-06-19 16:18 ` [PATCH RFT RFC 1/3] arm64: dts: qcom: sc8280xp: Add lower cluster " Konrad Dybcio
@ 2023-06-19 16:18 ` Konrad Dybcio
2023-06-19 16:18 ` [PATCH RFT RFC 3/3] arm64: dts: qcom: sc8280xp: Fix up idle state periods Konrad Dybcio
2 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-06-19 16:18 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Johan Hovold
Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
Konrad Dybcio, Krzysztof Kozlowski, Konrad Dybcio
Between WFI (C1) and rail power collapse (C4), the Cortex cores on the
SC8280XP can also be shut down on their own (C3).
Describe that missing idle state.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 36 ++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index d524f851cb53..b8f2ec9477f5 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -264,6 +264,16 @@ idle-states {
entry-method = "psci";
LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "little-power-collapse";
+ arm,psci-suspend-param = <0x40000003>;
+ entry-latency-us = <549>;
+ exit-latency-us = <901>;
+ min-residency-us = <1774>;
+ local-timer-stop;
+ };
+
+ LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
compatible = "arm,idle-state";
idle-state-name = "little-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
@@ -274,6 +284,16 @@ LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
};
BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
+ compatible = "arm,idle-state";
+ idle-state-name = "big-power-collapse";
+ arm,psci-suspend-param = <0x40000003>;
+ entry-latency-us = <523>;
+ exit-latency-us = <1244>;
+ min-residency-us = <2207>;
+ local-timer-stop;
+ };
+
+ BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
compatible = "arm,idle-state";
idle-state-name = "big-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
@@ -601,49 +621,49 @@ psci {
CPU_PD0: power-domain-cpu0 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
};
CPU_PD1: power-domain-cpu1 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
};
CPU_PD2: power-domain-cpu2 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
};
CPU_PD3: power-domain-cpu3 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&LITTLE_CPU_SLEEP_0>;
+ domain-idle-states = <&LITTLE_CPU_SLEEP_0 &LITTLE_CPU_SLEEP_1>;
};
CPU_PD4: power-domain-cpu4 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
};
CPU_PD5: power-domain-cpu5 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
};
CPU_PD6: power-domain-cpu6 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
};
CPU_PD7: power-domain-cpu7 {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
- domain-idle-states = <&BIG_CPU_SLEEP_0>;
+ domain-idle-states = <&BIG_CPU_SLEEP_0 &BIG_CPU_SLEEP_1>;
};
CLUSTER_PD: power-domain-cpu-cluster0 {
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH RFT RFC 3/3] arm64: dts: qcom: sc8280xp: Fix up idle state periods
2023-06-19 16:18 [PATCH RFT RFC 0/3] Fix up SC8280XP idle states Konrad Dybcio
2023-06-19 16:18 ` [PATCH RFT RFC 1/3] arm64: dts: qcom: sc8280xp: Add lower cluster " Konrad Dybcio
2023-06-19 16:18 ` [PATCH RFT RFC 2/3] arm64: dts: qcom: sc8280xp: Add missing CPU " Konrad Dybcio
@ 2023-06-19 16:18 ` Konrad Dybcio
2 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2023-06-19 16:18 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Johan Hovold
Cc: Marijn Suijten, linux-arm-msm, devicetree, linux-kernel,
Konrad Dybcio, Krzysztof Kozlowski, Konrad Dybcio
Some of the values were wrong, which may have painted a wrong picture
to the scheduler. Fix it.
Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index b8f2ec9477f5..d7894465a0d2 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -277,9 +277,9 @@ LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
compatible = "arm,idle-state";
idle-state-name = "little-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
- entry-latency-us = <355>;
- exit-latency-us = <909>;
- min-residency-us = <3934>;
+ entry-latency-us = <702>;
+ exit-latency-us = <915>;
+ min-residency-us = <4001>;
local-timer-stop;
};
@@ -297,9 +297,9 @@ BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
compatible = "arm,idle-state";
idle-state-name = "big-rail-power-collapse";
arm,psci-suspend-param = <0x40000004>;
- entry-latency-us = <241>;
- exit-latency-us = <1461>;
- min-residency-us = <4488>;
+ entry-latency-us = <526>;
+ exit-latency-us = <1854>;
+ min-residency-us = <5555>;
local-timer-stop;
};
};
@@ -324,9 +324,9 @@ CLUSTER_SLEEP_CX_OFF: cluster-sleep-1 {
CLUSTER_SLEEP_APSS_OFF: cluster-sleep-2 {
compatible = "domain-idle-state";
arm,psci-suspend-param = <0x4100c344>;
- entry-latency-us = <3263>;
+ entry-latency-us = <3638>;
exit-latency-us = <6562>;
- min-residency-us = <9987>;
+ min-residency-us = <9826>;
};
};
};
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread