H3/M3-W cpuidle support
Subsystems (2)
cover H3/M3-W cpuidle support
Hi!
This series adds CPU idle support for H3 and M3-W. It's a straight up-port from the BSP.
The part that disables cpuidle for the CA53 cores on M3ULCB is a bit dodgy. Is it a valid assumption that all M3ULCB boards have an ES1.0 SoC?
CU
Uli
Dien Pham (2):
arm64: dts: r8a7795: Add cpuidle support for CA53 cores
arm64: dts: r8a7796: Add cpuidle support for CA53 cores
Khiem Nguyen (2):
arm64: dts: r8a7795: Add cpuidle support for CA57 cores
arm64: dts: r8a7796: Add cpuidle support for CA57 cores
Takeshi Kihara (1):
arm64: dts: r8a7796-m3ulcb: Disable cpuidle support for CA53 cores
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 32 ++++++++++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts | 22 ++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a7796.dtsi | 30 ++++++++++++++++++++++++ 3 files changed, 84 insertions(+)
Signature · 1 line
2.7.4
PATCH 1/5 arm64: dts: r8a7795: Add cpuidle support for CA57 cores
From: Khiem Nguyen <[email protected]>
Enable cpuidle (core shutdown) support for R-Car H3 CA57 cores.
Parameters were found after evaluation by [email protected]; they help to keep the performance and reduce the power consumption.
--- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +18 -0
@@ -123,6 +123,7 @@ power-domains = <&sysc R8A7795_PD_CA57_CPU0>; next-level-cache = <&L2_CA57>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; operating-points-v2 = <&cluster0_opp>; #cooling-cells = <2>;
@@ -135,6 +136,7 @@ power-domains = <&sysc R8A7795_PD_CA57_CPU1>; next-level-cache = <&L2_CA57>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; operating-points-v2 = <&cluster0_opp>; #cooling-cells = <2>;
@@ -147,6 +149,7 @@ power-domains = <&sysc R8A7795_PD_CA57_CPU2>; next-level-cache = <&L2_CA57>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; operating-points-v2 = <&cluster0_opp>; #cooling-cells = <2>;
@@ -159,6 +162,7 @@ power-domains = <&sysc R8A7795_PD_CA57_CPU3>; next-level-cache = <&L2_CA57>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; operating-points-v2 = <&cluster0_opp>; #cooling-cells = <2>;
@@ -221,6 +225,20 @@ cache-unified; cache-level = <2>; }; + + idle-states { + entry-method = "psci"; + + CPU_SLEEP_0: cpu-sleep-0 { + compatible = "arm,idle-state"; + arm,psci-suspend-param = <0x0010000>; + local-timer-stop; + entry-latency-us = <400>; + exit-latency-us = <500>; + min-residency-us = <4000>; + status = "okay"; + }; + }; }; extal_clk: extal {
Signature · 1 line
2.7.4
Re: [PATCH 1/5] arm64: dts: r8a7795: Add cpuidle support for CA57 cores
Hi Uli,
Quoted 4 lines · Ulrich Hecht
From: Khiem Nguyen <[email protected]>
Enable cpuidle (core shutdown) support for R-Car H3 CA57 cores.
Quoted 8 lines
Parameters were found after evaluation by [email protected]; they help to keep the performance and reduce the power consumption.
Signed-off-by Khiem Nguyen <[email protected]>[dien.pham.ry: Apply new cpuidle parameters]Signed-off-by Dien Pham <[email protected]>Signed-off-by Takeshi Kihara <[email protected]>Signed-off-by Ulrich Hecht <[email protected]>
Thanks for your patch!
Quoted 9 lines
arch/arm64/boot/dts/renesas/r8a7795.dtsi +2
-0@@ -221,6 +225,20 @@ cache-unified; cache-level = <2>; }; + + idle-states {
arch/arm64/boot/dts/renesas/r8a7795.dtsi line 239
Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a7795.dtsi +10
-0+ entry-method = "psci"; + + CPU_SLEEP_0: cpu-sleep-0 { + compatible = "arm,idle-state"; + arm,psci-suspend-param = <0x0010000>; + local-timer-stop; + entry-latency-us = <400>; + exit-latency-us = <500>; + min-residency-us = <4000>; + status = "okay";
Usually we just don't specify status for "virtual" nodes (applies to the other patches, too).
arch/arm64/boot/dts/renesas/r8a7795.dtsi line 242
Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a7795.dtsi +2
-0+ }; + }; };
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH 2/5 arm64: dts: r8a7795: Add cpuidle support for CA53 cores
In reply to Ulrich HechtFrom: Dien Pham <[email protected]>
Enables cpuidle (core shutdown) support for R-Car H3 CA53 cores.
--- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +14 -0
@@ -175,6 +175,7 @@ power-domains = <&sysc R8A7795_PD_CA53_CPU0>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -186,6 +187,7 @@ power-domains = <&sysc R8A7795_PD_CA53_CPU1>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -197,6 +199,7 @@ power-domains = <&sysc R8A7795_PD_CA53_CPU2>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -208,6 +211,7 @@ power-domains = <&sysc R8A7795_PD_CA53_CPU3>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -238,6 +242,16 @@ min-residency-us = <4000>; status = "okay"; }; + + CPU_SLEEP_1: cpu-sleep-1 { + compatible = "arm,idle-state"; + arm,psci-suspend-param = <0x0010000>; + local-timer-stop; + entry-latency-us = <700>; + exit-latency-us = <700>; + min-residency-us = <5000>; + status = "okay"; + }; }; };
Signature · 1 line
2.7.4
PATCH 3/5 arm64: dts: r8a7796: Add cpuidle support for CA57 cores
In reply to Ulrich HechtFrom: Khiem Nguyen <[email protected]>
Enable cpuidle (core shutdown) support for R-Car M3-W CA57 cores.
Parameters were found after evaluation by [email protected]; they help to keep the performance and reduce the power consumption.
--- arch/arm64/boot/dts/renesas/r8a7796.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/renesas/r8a7796.dtsi +16 -0
@@ -134,6 +134,7 @@ power-domains = <&sysc R8A7796_PD_CA57_CPU0>; next-level-cache = <&L2_CA57>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; clocks =<&cpg CPG_CORE R8A7796_CLK_Z>; operating-points-v2 = <&cluster0_opp>; #cooling-cells = <2>;
@@ -146,6 +147,7 @@ power-domains = <&sysc R8A7796_PD_CA57_CPU1>; next-level-cache = <&L2_CA57>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0>; clocks =<&cpg CPG_CORE R8A7796_CLK_Z>; operating-points-v2 = <&cluster0_opp>; #cooling-cells = <2>;
@@ -208,6 +210,20 @@ cache-unified; cache-level = <2>; }; + + idle-states { + entry-method = "psci"; + + CPU_SLEEP_0: cpu-sleep-0 { + compatible = "arm,idle-state"; + arm,psci-suspend-param = <0x0010000>; + local-timer-stop; + entry-latency-us = <400>; + exit-latency-us = <500>; + min-residency-us = <4000>; + status = "okay"; + }; + }; }; extal_clk: extal {
Signature · 1 line
2.7.4
PATCH 4/5 arm64: dts: r8a7796: Add cpuidle support for CA53 cores
In reply to Ulrich HechtFrom: Dien Pham <[email protected]>
Enable cpuidle (core shutdown) support for R-Car M3-W CA53 cores.
--- arch/arm64/boot/dts/renesas/r8a7796.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/renesas/r8a7796.dtsi +14 -0
@@ -160,6 +160,7 @@ power-domains = <&sysc R8A7796_PD_CA53_CPU0>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -171,6 +172,7 @@ power-domains = <&sysc R8A7796_PD_CA53_CPU1>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -182,6 +184,7 @@ power-domains = <&sysc R8A7796_PD_CA53_CPU2>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -193,6 +196,7 @@ power-domains = <&sysc R8A7796_PD_CA53_CPU3>; next-level-cache = <&L2_CA53>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_1>; clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; operating-points-v2 = <&cluster1_opp>; };
@@ -223,6 +227,16 @@ min-residency-us = <4000>; status = "okay"; }; + + CPU_SLEEP_1: cpu-sleep-1 { + compatible = "arm,idle-state"; + arm,psci-suspend-param = <0x0010000>; + local-timer-stop; + entry-latency-us = <700>; + exit-latency-us = <700>; + min-residency-us = <5000>; + status = "okay"; + }; }; };
Signature · 1 line
2.7.4
PATCH 5/5 arm64: dts: r8a7796-m3ulcb: Disable cpuidle support for CA53 cores
In reply to Ulrich HechtFrom: Takeshi Kihara <[email protected]>
The revision of the R8A7796 SoC on the M3ULCB board is ES1.0. This revision can not use cpuidle for CA53 cores.
Therefore, this patch disables cpuidle support for CA53 cores.
--- arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts +22 -0
@@ -14,6 +14,12 @@ model = "Renesas M3ULCB board based on r8a7796"; compatible = "renesas,m3ulcb", "renesas,r8a7796"; + cpus { + idle-states { + /delete-node/ cpu-sleep-1; + }; + }; + memory@48000000 { device_type = "memory"; /* first 128MB is reserved for secure area. */
@@ -26,6 +32,22 @@ }; }; +&a53_0 { + /delete-property/ cpu-idle-states; +}; + +&a53_1 { + /delete-property/ cpu-idle-states; +}; + +&a53_2 { + /delete-property/ cpu-idle-states; +}; + +&a53_3 { + /delete-property/ cpu-idle-states; +}; + &du { clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
Signature · 1 line
2.7.4
Hi Uli,
Quoted 2 lines · Ulrich Hecht
This series adds CPU idle support for H3 and M3-W. It's a straight up-port from the BSP.
Thanks for your series!
Quoted 3 lines
The part that disables cpuidle for the CA53 cores on M3ULCB is a bit dodgy. Is it a valid assumption that all M3ULCB boards have an ES1.0 SoC?
Alternatively, is this something that can be handled in the kernel using soc_device_match()?
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Uli,
(with Khiem's address fixed (hopefully))
Quoted 4 lines · Geert Uytterhoeven
Quoted 2 lines · Ulrich Hecht
This series adds CPU idle support for H3 and M3-W. It's a straight up-port from the BSP.
Quoted 8 lines
Thanks for your series!
Quoted 3 lines
The part that disables cpuidle for the CA53 cores on M3ULCB is a bit dodgy. Is it a valid assumption that all M3ULCB boards have an ES1.0 SoC?
Alternatively, is this something that can be handled in the kernel using
soc_device_match()?
Given many Salvator-X boards (incl. mine) also have M3-W ES1.0, and PSCI is involved, I have to ask: is this a hardware (M3-W ES1.0) or firmware (PSCI) issue?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds