arm: dts: Fix OPP and cooling device properties
Subsystems (8)
cover arm: dts: Fix OPP and cooling device properties
This fixes missing OPP and cooling device properties for CPUs for the ARM 32 bit platforms. This is build tested by the zero day testing infrastructure as well.
Individual maintainers can pick the patches to their SoC trees or I will ask ARM SoC maintainers to pick them up later.
--
viresh
Viresh Kumar (15):
arm: dts: armada: Fix "#cooling-cells" property's name
arm: dts: ls1021a: Add missing cooling device properties for CPUs
arm: dts: mediatek: Add missing cooling device properties for CPUs
arm: dts: rk322x: Add missing cooling device properties for CPUs
arm: dts: uniphier: Add missing cooling device properties for CPUs
arm: dts: sun: Add missing cooling device properties for CPUs
arm: dts: exynos: Add missing cooling device properties for CPUs
arm: dts: dra74x: Add missing cooling device properties for CPUs
arm: dts: omap: Add missing cooling device properties for CPUs
arm: dts: rk3288: Add missing cooling device properties for CPUs
arm: dts: berlin: Add missing OPP properties for CPUs
arm: dts: highbank: Add missing OPP properties for CPUs
arm: dts: r8a7743: Add missing OPP properties for CPUs
arm: dts: qcom: Add missing OPP properties for CPUs
arm: dts: imx: Add missing OPP properties for CPUs
arch/arm/boot/dts/armada-385-synology-ds116.dts | 2 +- arch/arm/boot/dts/berlin2.dtsi | 10 +++ arch/arm/boot/dts/berlin2q.dtsi | 33 ++++++++++ arch/arm/boot/dts/dra74x.dtsi | 10 +++ arch/arm/boot/dts/exynos3250.dtsi | 16 +++++ arch/arm/boot/dts/exynos4210.dtsi | 13 ++++ arch/arm/boot/dts/exynos4412.dtsi | 9 +++ arch/arm/boot/dts/exynos5250.dtsi | 23 +++++++ arch/arm/boot/dts/highbank.dts | 30 +++++++++ arch/arm/boot/dts/imx6dl.dtsi | 23 +++++++ arch/arm/boot/dts/imx6q-cm-fx6.dts | 66 +++++++++++++++++++ arch/arm/boot/dts/imx6q.dtsi | 87 ++++++++++++++++++++++++- arch/arm/boot/dts/imx7d.dtsi | 5 ++ arch/arm/boot/dts/ls1021a.dtsi | 1 + arch/arm/boot/dts/mt7623.dtsi | 3 + arch/arm/boot/dts/omap5.dtsi | 14 ++++ arch/arm/boot/dts/qcom-ipq4019.dtsi | 24 +++++++ arch/arm/boot/dts/r8a7743.dtsi | 9 +++ arch/arm/boot/dts/rk322x.dtsi | 3 + arch/arm/boot/dts/rk3288.dtsi | 54 +++++++++++++++ arch/arm/boot/dts/sun6i-a31.dtsi | 30 +++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 13 ++++ arch/arm/boot/dts/sun8i-a33.dtsi | 9 +++ arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 3 + 25 files changed, 495 insertions(+), 4 deletions(-)
Signature · 1 line
2.15.0.194.g9af6a3dea062
PATCH 1/15 arm: dts: armada: Fix "#cooling-cells" property's name
It should be "#cooling-cells" instead of "cooling-cells". Fix it.
--- arch/arm/boot/dts/armada-385-synology-ds116.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-synology-ds116.dts +1 -1
@@ -139,7 +139,7 @@ 3700 5 3900 6 4000 7>; - cooling-cells = <2>; + #cooling-cells = <2>; }; gpio-leds {
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 01/15] arm: dts: armada: Fix "#cooling-cells" property's name
Hi Viresh,
Quoted 3 lines · Viresh Kumar
It should be "#cooling-cells" instead of "cooling-cells". Fix it.
Signed-off-by Viresh Kumar <[email protected]>
Applied on mvebu/fixes
Thanks,
Gregory
Quoted 20 lines
--- arch/arm/boot/dts/armada-385-synology-ds116.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/armada-385-synology-ds116.dts +1
-1@@ -139,7 +139,7 @@ 3700 5 3900 6 4000 7>; - cooling-cells = <2>; + #cooling-cells = <2>; }; gpio-leds {Signature · 1 line
2.15.0.194.g9af6a3dea062
Signature · 3 lines
Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com
PATCH 2/15 arm: dts: ls1021a: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
--- arch/arm/boot/dts/ls1021a.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/ls1021a.dtsi +1 -0
@@ -84,6 +84,7 @@ device_type = "cpu"; reg = <0xf01>; clocks = <&clockgen 1 0>; + #cooling-cells = <2>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Shawn Guo
AppliedRe: [PATCH 02/15] arm: dts: ls1021a: Add missing cooling device properties for CPUs
Quoted 11 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Signed-off-by Viresh Kumar <[email protected]>
Applied, thanks.
PATCH 3/15 arm: dts: mediatek: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
--- arch/arm/boot/dts/mt7623.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/mt7623.dtsi +3 -0
@@ -92,6 +92,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; };
@@ -103,6 +104,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; };
@@ -114,6 +116,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 03/15] arm: dts: mediatek: Add missing cooling device properties for CPUs
Quoted 11 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Signed-off-by Viresh Kumar <[email protected]>
pushed to v4.18-next/dts32
Thanks
Quoted 33 lines
--- arch/arm/boot/dts/mt7623.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm/boot/dts/mt7623.dtsi +3
-0@@ -92,6 +92,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; };@@ -103,6 +104,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; };@@ -114,6 +116,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; };
PATCH 4/15 arm: dts: rk322x: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
--- arch/arm/boot/dts/rk322x.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/rk322x.dtsi +3 -0
@@ -80,6 +80,7 @@ reg = <0xf01>; resets = <&cru SRST_CORE1>; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; /* min followed by max */ enable-method = "psci"; };
@@ -89,6 +90,7 @@ reg = <0xf02>; resets = <&cru SRST_CORE2>; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; /* min followed by max */ enable-method = "psci"; };
@@ -98,6 +100,7 @@ reg = <0xf03>; resets = <&cru SRST_CORE3>; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; /* min followed by max */ enable-method = "psci"; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Heiko Stuebner
maintainerRe: [PATCH 04/15] arm: dts: rk322x: Add missing cooling device properties for CPUs
Am Freitag, 25. Mai 2018, 12:31:50 CEST schrieb Viresh Kumar:
Quoted 11 lines
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Signed-off-by Viresh Kumar <[email protected]>
applied for 4.19
Thanks
Heiko
PATCH 5/15 arm: dts: uniphier: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
--- arch/arm/boot/dts/uniphier-pxs2.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/uniphier-pxs2.dtsi +3 -0
@@ -36,6 +36,7 @@ enable-method = "psci"; next-level-cache = <&l2>; operating-points-v2 = <&cpu_opp>; + #cooling-cells = <2>; }; cpu2: cpu at 2 {
@@ -46,6 +47,7 @@ enable-method = "psci"; next-level-cache = <&l2>; operating-points-v2 = <&cpu_opp>; + #cooling-cells = <2>; }; cpu3: cpu at 3 {
@@ -56,6 +58,7 @@ enable-method = "psci"; next-level-cache = <&l2>; operating-points-v2 = <&cpu_opp>; + #cooling-cells = <2>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Masahiro Yamada
AppliedRe: [PATCH 05/15] arm: dts: uniphier: Add missing cooling device properties for CPUs
2018-05-25 19:31 GMT+09:00 Viresh Kumar <[email protected]>:
Quoted 11 lines
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Signed-off-by Viresh Kumar <[email protected]>
Applied to linux-uniphier.
I had already sent a PR for v4.18-rc1 before I received this patch. Please wait for v4.19-rc1.
Thanks.
Quoted 39 lines
--- arch/arm/boot/dts/uniphier-pxs2.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm/boot/dts/uniphier-pxs2.dtsi +3
-1@@ -36,6 +36,7 @@ enable-method = "psci"; next-level-cache = <&l2>; operating-points-v2 = <&cpu_opp>; + #cooling-cells = <2>; }; cpu2: cpu at 2 {@@ -46,6 +47,7 @@ enable-method = "psci"; next-level-cache = <&l2>; operating-points-v2 = <&cpu_opp>; + #cooling-cells = <2>; }; cpu3: cpu at 3 {@@ -56,6 +58,7 @@ enable-method = "psci"; next-level-cache = <&l2>; operating-points-v2 = <&cpu_opp>; + #cooling-cells = <2>; }; }; --2.15.0.194.g9af6a3dea062
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 6/15 arm: dts: sun: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
--- arch/arm/boot/dts/sun6i-a31.dtsi | 30 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 13 +++++++++++++ arch/arm/boot/dts/sun8i-a33.dtsi | 9 +++++++++ arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++++++++ 4 files changed, 61 insertions(+)
arch/arm/boot/dts/sun6i-a31.dtsi +30 -0
@@ -119,18 +119,48 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; };
arch/arm/boot/dts/sun7i-a20.dtsi +13 -0
@@ -122,6 +122,19 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 960000 1400000 + 912000 1400000 + 864000 1300000 + 720000 1200000 + 528000 1100000 + 312000 1000000 + 144000 1000000 + >; + #cooling-cells = <2>; }; };
arch/arm/boot/dts/sun8i-a33.dtsi +9 -0
@@ -132,21 +132,30 @@ }; cpu at 1 { + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; };
arch/arm/boot/dts/sun8i-h3.dtsi +9 -0
@@ -84,21 +84,30 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 06/15] arm: dts: sun: Add missing cooling device properties for CPUs
Hi,
Quoted 8 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Quoted 6 lines
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
The prefix should be sunxi and not sun, but it looks good to me otherwise.
Let me know what your preferred merge method is.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180528/a2bdcdbe/attachment.sig>
Re: [PATCH 06/15] arm: dts: sun: Add missing cooling device properties for CPUs
Quoted 16 lines · Maxime Ripard
Hi,
Quoted 13 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Quoted 6 lines
Quoted 1 line
Signed-off-by Viresh Kumar <[email protected]>The prefix should be sunxi and not sun, but it looks good to me otherwise.
Let me know what your preferred merge method is.
Please pick it up directly and send it as part of your pull request. Do you want me to resend or can you fix the $subject ?
Thanks.
Signature · 1 line
viresh
Re: [PATCH 06/15] arm: dts: sun: Add missing cooling device properties for CPUs
Hi,
Quoted 19 lines · Viresh Kumar
Quoted 18 lines · Maxime Ripard
Hi,
Quoted 14 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
Quoted 7 lines
Quoted 4 lines
The prefix should be sunxi and not sun, but it looks good to me otherwise.
Let me know what your preferred merge method is.
Please pick it up directly and send it as part of your pull request. Do you want me to resend or can you fix the $subject ?
I just tried to apply it, and it failed. We have usually two different PR for the H3 SoCs and the others. Could you split the H3 in a separate patch (and fix the subject in the process?)
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180601/68b1a4e3/attachment.sig>
PATCH v2 1/2 arm: dts: sun8i-h3: Add missing cooling device properties for CPUs
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, clock-names) as well to make it all work.
---
V2: Separated patch for h3.
arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/sun8i-h3.dtsi +9 -0
@@ -84,21 +84,30 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
PATCH v2 2/2 arm: dts: sunxi: Add missing cooling device properties for CPUs
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
---
V2:
- Separated patch for h3
- Fixed subject s/sun/sunxi/
arch/arm/boot/dts/sun6i-a31.dtsi | 30 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 13 +++++++++++++ arch/arm/boot/dts/sun8i-a33.dtsi | 9 +++++++++ 3 files changed, 52 insertions(+)
arch/arm/boot/dts/sun6i-a31.dtsi +30 -0
@@ -119,18 +119,48 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; };
arch/arm/boot/dts/sun7i-a20.dtsi +13 -0
@@ -122,6 +122,19 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 960000 1400000 + 912000 1400000 + 864000 1300000 + 720000 1200000 + 528000 1100000 + 312000 1000000 + 144000 1000000 + >; + #cooling-cells = <2>; }; };
arch/arm/boot/dts/sun8i-a33.dtsi +9 -0
@@ -132,21 +132,30 @@ }; cpu at 1 { + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu at 3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Maxime Ripard
AppliedRe: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs
Quoted 8 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Quoted 6 lines
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
Applied both, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180605/15dccabc/attachment.sig>
Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs
Quoted 9 lines · Maxime Ripard
Quoted 8 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Quoted 8 lines
Quoted 6 lines
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>Applied both, thanks!
Please fix the "ARM" prefix when applying. :)
ChenYu
Re: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs
Quoted 12 lines · Chen-Yu Tsai
Quoted 11 lines · Maxime Ripard
Quoted 10 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>Applied both, thanks!
Please fix the "ARM" prefix when applying. :)
Done, thanks for the reminder :)
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180606/7503a1f4/attachment-0001.sig>
PATCH 7/15 arm: dts: exynos: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
--- arch/arm/boot/dts/exynos3250.dtsi | 16 ++++++++++++++++ arch/arm/boot/dts/exynos4210.dtsi | 13 +++++++++++++ arch/arm/boot/dts/exynos4412.dtsi | 9 +++++++++ arch/arm/boot/dts/exynos5250.dtsi | 23 +++++++++++++++++++++++ 4 files changed, 61 insertions(+)
arch/arm/boot/dts/exynos3250.dtsi +16 -0
@@ -78,6 +78,22 @@ compatible = "arm,cortex-a7"; reg = <1>; clock-frequency = <1000000000>; + clocks = <&cmu CLK_ARM_CLK>; + clock-names = "cpu"; + #cooling-cells = <2>; + + operating-points = < + 1000000 1150000 + 900000 1112500 + 800000 1075000 + 700000 1037500 + 600000 1000000 + 500000 962500 + 400000 925000 + 300000 887500 + 200000 850000 + 100000 850000 + >; }; };
arch/arm/boot/dts/exynos4210.dtsi +13 -0
@@ -55,6 +55,19 @@ device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0x901>; + clocks = <&clock CLK_ARM_CLK>; + clock-names = "cpu"; + clock-latency = <160000>; + + operating-points = < + 1200000 1250000 + 1000000 1150000 + 800000 1075000 + 500000 975000 + 400000 975000 + 200000 950000 + >; + #cooling-cells = <2>; /* min followed by max */ }; };
arch/arm/boot/dts/exynos4412.dtsi +9 -0
@@ -49,21 +49,30 @@ device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0xA01>; + clocks = <&clock CLK_ARM_CLK>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; /* min followed by max */ }; cpu at a02 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0xA02>; + clocks = <&clock CLK_ARM_CLK>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; /* min followed by max */ }; cpu at a03 { device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0xA03>; + clocks = <&clock CLK_ARM_CLK>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; /* min followed by max */ }; };
arch/arm/boot/dts/exynos5250.dtsi +23 -0
@@ -84,6 +84,29 @@ compatible = "arm,cortex-a15"; reg = <1>; clock-frequency = <1700000000>; + clocks = <&clock CLK_ARM_CLK>; + clock-names = "cpu"; + clock-latency = <140000>; + + operating-points = < + 1700000 1300000 + 1600000 1250000 + 1500000 1225000 + 1400000 1200000 + 1300000 1150000 + 1200000 1125000 + 1100000 1100000 + 1000000 1075000 + 900000 1050000 + 800000 1025000 + 700000 1012500 + 600000 1000000 + 500000 975000 + 400000 950000 + 300000 937500 + 200000 925000 + >; + #cooling-cells = <2>; /* min followed by max */ }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
Quoted 5 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order.
Thanks for the patch.
In case of Exynos, the booting CPU always has these information in DT and the booting CPU cannot be changed (chosen by firmware/hardware configuration). Therefore there is no real risk of falling although for correctness of DT your change makes sense.
It is too late for this cycle for me so I'll pick it up after merge window. Alternatively, arm-soc guys can pick it up directly with my tag:
Best regards,
Krzysztof
Quoted 17 lines
For example, this will happen
because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>--- arch/arm/boot/dts/exynos3250.dtsi | 16 ++++++++++++++++ arch/arm/boot/dts/exynos4210.dtsi | 13 +++++++++++++ arch/arm/boot/dts/exynos4412.dtsi | 9 +++++++++ arch/arm/boot/dts/exynos5250.dtsi | 23 +++++++++++++++++++++++ 4 files changed, 61 insertions(+)
Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
Quoted 5 lines · Krzysztof Kozlowski
Thanks for the patch.
In case of Exynos, the booting CPU always has these information in DT and the booting CPU cannot be changed (chosen by
firmware/hardwareconfiguration).
But can the booting CPU be offlined ?
If yes, then this is how things are broken right now.
Build cpufreq driver as module, boot kernel, hotplug out CPU0, insert cpufreq driver and that will try to find these properties in CPU1.
Quoted 6 lines
Therefore there is no real risk of falling although for correctness of DT your change makes sense.
It is too late for this cycle for me so I'll pick it up after merge window. Alternatively, arm-soc guys can pick it up directly with my tag:
Reviewed-by Krzysztof Kozlowski <[email protected]>
No worries, you can pick it up later on.
Signature · 1 line
viresh
Krzysztof Kozlowski
maintainerRe: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
Quoted 7 lines · Viresh Kumar
Quoted 5 lines · Krzysztof Kozlowski
Thanks for the patch.
In case of Exynos, the booting CPU always has these information in DT and the booting CPU cannot be changed (chosen by
firmware/hardwareconfiguration).
Quoted 6 lines
But can the booting CPU be offlined ?
If yes, then this is how things are broken right now.
Build cpufreq driver as module, boot kernel, hotplug out CPU0, insert cpufreq driver and that will try to find these properties in CPU1.
OK, I see the possibility although it is still far away from use cases. You cannot hotplug booting CPU (CPU0) on Exynos kernels. It never worked. Strictly speaking - offlining will work. But bringing it online will likely hang the system.
Best regards,
Krzysztof
Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
Quoted 4 lines · Krzysztof Kozlowski
OK, I see the possibility although it is still far away from use cases. You cannot hotplug booting CPU (CPU0) on Exynos kernels. It never worked. Strictly speaking - offlining will work. But bringing it online will likely hang the system.
True and I used the following out of tree patch for a long time for my dual A15 exynos to make hotplug work.
Signature · 1 line
viresh
Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
In reply to Viresh KumarQuoted 13 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Quoted 8 lines
Signed-off-by Viresh Kumar <[email protected]>--- arch/arm/boot/dts/exynos3250.dtsi | 16 ++++++++++++++++ arch/arm/boot/dts/exynos4210.dtsi | 13 +++++++++++++ arch/arm/boot/dts/exynos4412.dtsi | 9 +++++++++ arch/arm/boot/dts/exynos5250.dtsi | 23 +++++++++++++++++++++++ 4 files changed, 61 insertions(+)
Thanks, applied.
Best regards,
Krzysztof
PATCH 8/15 arm: dts: dra74x: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, supply, clock latency) as well to make it all work.
--- arch/arm/boot/dts/dra74x.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/dra74x.dtsi +10 -0
@@ -18,6 +18,16 @@ compatible = "arm,cortex-a15"; reg = <1>; operating-points-v2 = <&cpu0_opp_table>; + + clocks = <&dpll_mpu_ck>; + clock-names = "cpu"; + + clock-latency = <300000>; /* From omap-cpufreq driver */ + + /* cooling options */ + #cooling-cells = <2>; /* min followed by max */ + + vbb-supply = <&abb_mpu>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 08/15] arm: dts: dra74x: Add missing cooling device properties for CPUs
Quoted 8 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Quoted 4 lines
Add such missing properties.
Fix other missing properties (clocks, supply, clock latency) as well to make it all work.
Applying this one into omap-for-v4.19/dt thanks.
Regards,
Tony
PATCH 9/15 arm: dts: omap: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, supply, clock latency) as well to make it all work.
--- arch/arm/boot/dts/omap5.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/omap5.dtsi +14 -0
@@ -61,6 +61,20 @@ device_type = "cpu"; compatible = "arm,cortex-a15"; reg = <0x1>; + + operating-points = < + /* kHz uV */ + 1000000 1060000 + 1500000 1250000 + >; + + clocks = <&dpll_mpu_ck>; + clock-names = "cpu"; + + clock-latency = <300000>; /* From omap-cpufreq driver */ + + /* cooling options */ + #cooling-cells = <2>; /* min followed by max */ }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 09/15] arm: dts: omap: Add missing cooling device properties for CPUs
Quoted 8 lines · Viresh Kumar
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Quoted 4 lines
Add such missing properties.
Fix other missing properties (clocks, supply, clock latency) as well to make it all work.
Applying this too into omap-for-v4.19/dt thanks.
Tony
PATCH 10/15 arm: dts: rk3288: Add missing cooling device properties for CPUs
In reply to Viresh KumarThe cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
--- arch/arm/boot/dts/rk3288.dtsi | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +54 -0
@@ -122,18 +122,72 @@ compatible = "arm,cortex-a12"; reg = <0x501>; resets = <&cru SRST_CORE1>; + operating-points = < + /* KHz uV */ + 1608000 1350000 + 1512000 1300000 + 1416000 1200000 + 1200000 1100000 + 1008000 1050000 + 816000 1000000 + 696000 950000 + 600000 900000 + 408000 900000 + 312000 900000 + 216000 900000 + 126000 900000 + >; + #cooling-cells = <2>; /* min followed by max */ + clock-latency = <40000>; + clocks = <&cru ARMCLK>; }; cpu2: cpu at 502 { device_type = "cpu"; compatible = "arm,cortex-a12"; reg = <0x502>; resets = <&cru SRST_CORE2>; + operating-points = < + /* KHz uV */ + 1608000 1350000 + 1512000 1300000 + 1416000 1200000 + 1200000 1100000 + 1008000 1050000 + 816000 1000000 + 696000 950000 + 600000 900000 + 408000 900000 + 312000 900000 + 216000 900000 + 126000 900000 + >; + #cooling-cells = <2>; /* min followed by max */ + clock-latency = <40000>; + clocks = <&cru ARMCLK>; }; cpu3: cpu at 503 { device_type = "cpu"; compatible = "arm,cortex-a12"; reg = <0x503>; resets = <&cru SRST_CORE3>; + operating-points = < + /* KHz uV */ + 1608000 1350000 + 1512000 1300000 + 1416000 1200000 + 1200000 1100000 + 1008000 1050000 + 816000 1000000 + 696000 950000 + 600000 900000 + 408000 900000 + 312000 900000 + 216000 900000 + 126000 900000 + >; + #cooling-cells = <2>; /* min followed by max */ + clock-latency = <40000>; + clocks = <&cru ARMCLK>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Heiko Stuebner
maintainerRe: [PATCH 10/15] arm: dts: rk3288: Add missing cooling device properties for CPUs
Am Freitag, 25. Mai 2018, 12:31:56 CEST schrieb Viresh Kumar:
Quoted 8 lines
The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device.
Quoted 6 lines
Add such missing properties.
Fix other missing properties (clocks, OPP, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
applied for 4.19, after adapting the patch to the opp-v2 conversion I Cc'ed you on [for your reference].
Thanks
Heiko
PATCH 11/15 arm: dts: berlin: Add missing OPP properties for CPUs
In reply to Viresh KumarThe OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing properties (clocks, clock latency) as well to make it all work.
--- arch/arm/boot/dts/berlin2.dtsi | 10 ++++++++++ arch/arm/boot/dts/berlin2q.dtsi | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+)
arch/arm/boot/dts/berlin2.dtsi +10 -0
@@ -81,6 +81,16 @@ device_type = "cpu"; next-level-cache = <&l2>; reg = <1>; + + clocks = <&chip_clk CLKID_CPU>; + clock-latency = <100000>; + operating-points = < + /* kHz uV */ + 1200000 1200000 + 1000000 1200000 + 800000 1200000 + 600000 1200000 + >; }; };
arch/arm/boot/dts/berlin2q.dtsi +33 -0
@@ -76,6 +76,17 @@ device_type = "cpu"; next-level-cache = <&l2>; reg = <1>; + + clocks = <&chip_clk CLKID_CPU>; + clock-latency = <100000>; + /* Can be modified by the bootloader */ + operating-points = < + /* kHz uV */ + 1200000 1200000 + 1000000 1200000 + 800000 1200000 + 600000 1200000 + >; }; cpu at 2 {
@@ -83,6 +94,17 @@ device_type = "cpu"; next-level-cache = <&l2>; reg = <2>; + + clocks = <&chip_clk CLKID_CPU>; + clock-latency = <100000>; + /* Can be modified by the bootloader */ + operating-points = < + /* kHz uV */ + 1200000 1200000 + 1000000 1200000 + 800000 1200000 + 600000 1200000 + >; }; cpu at 3 {
@@ -90,6 +112,17 @@ device_type = "cpu"; next-level-cache = <&l2>; reg = <3>; + + clocks = <&chip_clk CLKID_CPU>; + clock-latency = <100000>; + /* Can be modified by the bootloader */ + operating-points = < + /* kHz uV */ + 1200000 1200000 + 1000000 1200000 + 800000 1200000 + 600000 1200000 + >; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
PATCH 12/15 arm: dts: highbank: Add missing OPP properties for CPUs
In reply to Viresh KumarThe OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
--- arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/highbank.dts +30 -0
@@ -56,6 +56,16 @@ next-level-cache = <&L2>; clocks = <&a9pll>; clock-names = "cpu"; + operating-points = < + /* kHz ignored */ + 1300000 1000000 + 1200000 1000000 + 1100000 1000000 + 800000 1000000 + 400000 1000000 + 200000 1000000 + >; + clock-latency = <100000>; }; cpu at 902 {
@@ -65,6 +75,16 @@ next-level-cache = <&L2>; clocks = <&a9pll>; clock-names = "cpu"; + operating-points = < + /* kHz ignored */ + 1300000 1000000 + 1200000 1000000 + 1100000 1000000 + 800000 1000000 + 400000 1000000 + 200000 1000000 + >; + clock-latency = <100000>; }; cpu at 903 {
@@ -74,6 +94,16 @@ next-level-cache = <&L2>; clocks = <&a9pll>; clock-names = "cpu"; + operating-points = < + /* kHz ignored */ + 1300000 1000000 + 1200000 1000000 + 1100000 1000000 + 800000 1000000 + 400000 1000000 + 200000 1000000 + >; + clock-latency = <100000>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 12/15] arm: dts: highbank: Add missing OPP properties for CPUs
Quoted 11 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Quoted 7 lines
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>--- arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
ARM-SOC maintainers, Please apply this.
Rob
Olof Johansson
AppliedRe: [PATCH 12/15] arm: dts: highbank: Add missing OPP properties for CPUs
Quoted 15 lines · Rob Herring
Quoted 14 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Viresh Kumar <[email protected]>--- arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)Acked-by Rob Herring <[email protected]>ARM-SOC maintainers, Please apply this.
Applied to next/dt.
-Olof
Re: [PATCH 12/15] arm: dts: highbank: Add missing OPP properties for CPUs
Quoted 21 lines · Olof Johansson
Quoted 20 lines · Rob Herring
Quoted 18 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>--- arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
Quoted 5 lines
Quoted 3 lines
Acked-by Rob Herring <[email protected]>ARM-SOC maintainers, Please apply this.
Applied to next/dt.
Thanks Olof.
Can you also apply other patches in this series, that haven't been applied yet by SoC maintainers ? And same for the arm64 series..
Signature · 1 line
viresh
Re: [PATCH 12/15] arm: dts: highbank: Add missing OPP properties for CPUs
Quoted 24 lines · Viresh Kumar
Quoted 23 lines · Olof Johansson
Quoted 22 lines · Rob Herring
Quoted 11 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Quoted 7 lines
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>--- arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)Acked-by Rob Herring <[email protected]>
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
ARM-SOC maintainers, Please apply this.
Applied to next/dt.
Thanks Olof.
Can you also apply other patches in this series, that haven't been applied yet by SoC maintainers ? And same for the arm64 series..
This is the kind of patch that should be applied by the maintainers for active platforms, where they have systems to test with and can make sure you haven't regressed something on them.
For very low patch rate platforms we can apply directly through maintainer acks, like in this case.
So, my recommendation is to repost the series to the maintainers. Please don't patchbomb arm at kernel.org though, so keep us off of cc by default (you can add our individual addresses if you want).
Thanks,
-Olof
PATCH 13/15 arm: dts: r8a7743: Add missing OPP properties for CPUs
In reply to Viresh KumarThe OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
--- arch/arm/boot/dts/r8a7743.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/r8a7743.dtsi +9 -0
@@ -98,8 +98,17 @@ reg = <1>; clock-frequency = <1500000000>; clocks = <&cpg CPG_CORE R8A7743_CLK_Z>; + clock-latency = <300000>; /* 300 us */ power-domains = <&sysc R8A7743_PD_CA15_CPU1>; next-level-cache = <&L2_CA15>; + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1500000 1000000>, + <1312500 1000000>, + <1125000 1000000>, + < 937500 1000000>, + < 750000 1000000>, + < 375000 1000000>; }; L2_CA15: cache-controller-0 {
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 13/15] arm: dts: r8a7743: Add missing OPP properties for CPUs
[Cc Biju Das]
Quoted 8 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 6 lines
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
Thanks, this looks good to me and it looks like it should have:
Biju, as the author of the above patch could you take a look over this fix?
Quoted 29 lines
--- arch/arm/boot/dts/r8a7743.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)arch/arm/boot/dts/r8a7743.dtsi +9
-0@@ -98,8 +98,17 @@ reg = <1>; clock-frequency = <1500000000>; clocks = <&cpg CPG_CORE R8A7743_CLK_Z>; + clock-latency = <300000>; /* 300 us */ power-domains = <&sysc R8A7743_PD_CA15_CPU1>; next-level-cache = <&L2_CA15>; + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1500000 1000000>, + <1312500 1000000>, + <1125000 1000000>, + < 937500 1000000>, + < 750000 1000000>, + < 375000 1000000>; }; L2_CA15: cache-controller-0 {Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 13/15] arm: dts: r8a7743: Add missing OPP properties for CPUs
Quoted 13 lines · Simon Horman
[Cc Biju Das]
Quoted 10 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Quoted 8 lines
Quoted 4 lines
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>Thanks, this looks good to me and it looks like it should have:
Fixes 0417814ea140 ("ARM: dts: r8a7743: Add OPP table for frequency scaling")
Sure.
Will you be picking this patch directly and send it part of your pull request ? Maybe add Fixes tag then only ?
Signature · 1 line
viresh
Re: [PATCH 13/15] arm: dts: r8a7743: Add missing OPP properties for CPUs
Quoted 19 lines · Viresh Kumar
Quoted 18 lines · Simon Horman
[Cc Biju Das]
Quoted 14 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
Quoted 8 lines
Quoted 3 lines
Thanks, this looks good to me and it looks like it should have:
Fixes 0417814ea140 ("ARM: dts: r8a7743: Add OPP table for frequency scaling")Sure.
Will you be picking this patch directly and send it part of your pull request ? Maybe add Fixes tag then only ?
Yes, that is my plan. I can handle adding the Fixes tag. But I'll wait to see if Bjiu has an feedback first.
RE: [PATCH 13/15] arm: dts: r8a7743: Add missing OPP properties for CPUs
Hi All,
I have tested this patch on RZ/G1M and I didn't find any issues. r8a7743 is similar to r8a7791. So I assume you will apply the same patch for other R-SoC devices as well.
Apart from this, maybe we need to update the OPP binding documentation. i.e., extend the operating- point usage to other cores in the cluster (Binding 1: operating-points).
Regards,
Biju
Quoted 38 lines
-----Original Message-----
From: Simon Horman [mailto:[email protected]]
Sent: 28 May 2018 12:59
To: Viresh Kumar <[email protected]>
Cc: [email protected]; Magnus Damm <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Vincent Guittot <[email protected]>; [email protected]; Daniel Lezcano <[email protected]>; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; Biju Das <[email protected]>
Subject: Re: [PATCH 13/15] arm: dts: r8a7743: Add missing OPP properties for CPUsQuoted 24 lines · Viresh Kumar
Quoted 22 lines · Simon Horman
[Cc Biju Das]
Quoted 8 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 6 lines
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>Thanks, this looks good to me and it looks like it should have:
Fixes 0417814ea140 ("ARM: dts: r8a7743: Add OPP table for frequencyscaling")
Quoted 7 lines
Quoted 4 lines
Sure.
Will you be picking this patch directly and send it part of your pull request ? Maybe add Fixes tag then only ?
Yes, that is my plan. I can handle adding the Fixes tag. But I'll wait to see if Bjiu has an feedback first.
Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
Re: [PATCH 13/15] arm: dts: r8a7743: Add missing OPP properties for CPUs
Quoted 5 lines · Biju Das
Hi All,
I have tested this patch on RZ/G1M and I didn't find any issues. r8a7743 is similar to r8a7791. So I assume you will apply the same patch for other R-SoC devices as well.
Okay, I have sent V2 for this and it fixes all those platforms as well.
Quoted 3 lines
Apart from this, maybe we need to update the OPP binding documentation. i.e., extend the operating- point usage to other cores in the cluster (Binding 1: operating-points).
Its already done, you need to start using operating-points-v2 property to avoid duplication like this.
Signature · 1 line
viresh
PATCH v2 13/15 arm: dts: r8a77xx: Add missing OPP properties for CPUs
In reply to Viresh KumarThe OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing properties (like, clock latency, voltage tolerance, etc) as well to make it all work.
--- arch/arm/boot/dts/r8a7743.dtsi | 9 +++++++++ arch/arm/boot/dts/r8a7790.dtsi | 34 ++++++++++++++++++++++++++++++++-- arch/arm/boot/dts/r8a7791.dtsi | 14 ++++++++++++-- arch/arm/boot/dts/r8a7793.dtsi | 15 +++++++++++++-- 4 files changed, 66 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7743.dtsi +9 -0
@@ -98,8 +98,17 @@ reg = <1>; clock-frequency = <1500000000>; clocks = <&cpg CPG_CORE R8A7743_CLK_Z>; + clock-latency = <300000>; /* 300 us */ power-domains = <&sysc R8A7743_PD_CA15_CPU1>; next-level-cache = <&L2_CA15>; + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1500000 1000000>, + <1312500 1000000>, + <1125000 1000000>, + < 937500 1000000>, + < 750000 1000000>, + < 375000 1000000>; }; L2_CA15: cache-controller-0 {
arch/arm/boot/dts/r8a7790.dtsi +32 -2
@@ -79,12 +79,12 @@ compatible = "arm,cortex-a15"; reg = <0>; clock-frequency = <1300000000>; - voltage-tolerance = <1>; /* 1% */ clocks = <&cpg CPG_CORE R8A7790_CLK_Z>; - clock-latency = <300000>; /* 300 us */ power-domains = <&sysc R8A7790_PD_CA15_CPU0>; next-level-cache = <&L2_CA15>; capacity-dmips-mhz = <1024>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ /* kHz - uV - OPPs unknown yet */ operating-points = <1400000 1000000>,
@@ -104,6 +104,16 @@ power-domains = <&sysc R8A7790_PD_CA15_CPU1>; next-level-cache = <&L2_CA15>; capacity-dmips-mhz = <1024>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1400000 1000000>, + <1225000 1000000>, + <1050000 1000000>, + < 875000 1000000>, + < 700000 1000000>, + < 350000 1000000>; }; cpu2: cpu@2 {
@@ -115,6 +125,16 @@ power-domains = <&sysc R8A7790_PD_CA15_CPU2>; next-level-cache = <&L2_CA15>; capacity-dmips-mhz = <1024>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1400000 1000000>, + <1225000 1000000>, + <1050000 1000000>, + < 875000 1000000>, + < 700000 1000000>, + < 350000 1000000>; }; cpu3: cpu@3 {
@@ -126,6 +146,16 @@ power-domains = <&sysc R8A7790_PD_CA15_CPU3>; next-level-cache = <&L2_CA15>; capacity-dmips-mhz = <1024>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1400000 1000000>, + <1225000 1000000>, + <1050000 1000000>, + < 875000 1000000>, + < 700000 1000000>, + < 350000 1000000>; }; cpu4: cpu@100 {
arch/arm/boot/dts/r8a7791.dtsi +12 -2
@@ -78,11 +78,11 @@ compatible = "arm,cortex-a15"; reg = <0>; clock-frequency = <1500000000>; - voltage-tolerance = <1>; /* 1% */ clocks = <&cpg CPG_CORE R8A7791_CLK_Z>; - clock-latency = <300000>; /* 300 us */ power-domains = <&sysc R8A7791_PD_CA15_CPU0>; next-level-cache = <&L2_CA15>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ /* kHz - uV - OPPs unknown yet */ operating-points = <1500000 1000000>,
@@ -101,6 +101,16 @@ clocks = <&cpg CPG_CORE R8A7791_CLK_Z>; power-domains = <&sysc R8A7791_PD_CA15_CPU1>; next-level-cache = <&L2_CA15>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1500000 1000000>, + <1312500 1000000>, + <1125000 1000000>, + < 937500 1000000>, + < 750000 1000000>, + < 375000 1000000>; }; L2_CA15: cache-controller-0 {
arch/arm/boot/dts/r8a7793.dtsi +13 -2
@@ -70,10 +70,10 @@ compatible = "arm,cortex-a15"; reg = <0>; clock-frequency = <1500000000>; - voltage-tolerance = <1>; /* 1% */ clocks = <&cpg CPG_CORE R8A7793_CLK_Z>; - clock-latency = <300000>; /* 300 us */ power-domains = <&sysc R8A7793_PD_CA15_CPU0>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ /* kHz - uV - OPPs unknown yet */ operating-points = <1500000 1000000>,
@@ -92,6 +92,17 @@ clock-frequency = <1500000000>; clocks = <&cpg CPG_CORE R8A7793_CLK_Z>; power-domains = <&sysc R8A7793_PD_CA15_CPU1>; + voltage-tolerance = <1>; /* 1% */ + clock-latency = <300000>; /* 300 us */ + + /* kHz - uV - OPPs unknown yet */ + operating-points = <1500000 1000000>, + <1312500 1000000>, + <1125000 1000000>, + < 937500 1000000>, + < 750000 1000000>, + < 375000 1000000>; + next-level-cache = <&L2_CA15>; }; L2_CA15: cache-controller-0 {
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH V2 13/15] arm: dts: r8a77xx: Add missing OPP properties for CPUs
Quoted 8 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 6 lines
Add such missing properties.
Fix other missing properties (like, clock latency, voltage tolerance, etc) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
This looks fine but I will wait to see if there are other reviews before applying.
Re: [PATCH V2 13/15] arm: dts: r8a77xx: Add missing OPP properties for CPUs
In reply to Viresh KumarQuoted 8 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 6 lines
Add such missing properties.
Fix other missing properties (like, clock latency, voltage tolerance, etc) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
Thanks, I took the liberty of changing the prefix of this patch to "ARM: dts: r8a77(43|9[013]):" when applying this patch.
Re: [PATCH V2 13/15] arm: dts: r8a77xx: Add missing OPP properties for CPUs
In reply to Viresh KumarQuoted 8 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 6 lines
Add such missing properties.
Fix other missing properties (like, clock latency, voltage tolerance, etc) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
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
PATCH 14/15 arm: dts: qcom: Add missing OPP properties for CPUs
In reply to Viresh KumarThe OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
--- arch/arm/boot/dts/qcom-ipq4019.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm/boot/dts/qcom-ipq4019.dtsi +24 -0
@@ -75,6 +75,14 @@ reg = <0x1>; clocks = <&gcc GCC_APPS_CLK_SRC>; clock-frequency = <0>; + operating-points = < + /* kHz uV (fixed) */ + 48000 1100000 + 200000 1100000 + 500000 1100000 + 666000 1100000 + >; + clock-latency = <256000>; }; cpu@2 {
@@ -86,6 +94,14 @@ reg = <0x2>; clocks = <&gcc GCC_APPS_CLK_SRC>; clock-frequency = <0>; + operating-points = < + /* kHz uV (fixed) */ + 48000 1100000 + 200000 1100000 + 500000 1100000 + 666000 1100000 + >; + clock-latency = <256000>; }; cpu@3 {
@@ -97,6 +113,14 @@ reg = <0x3>; clocks = <&gcc GCC_APPS_CLK_SRC>; clock-frequency = <0>; + operating-points = < + /* kHz uV (fixed) */ + 48000 1100000 + 200000 1100000 + 500000 1100000 + 666000 1100000 + >; + clock-latency = <256000>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 14/15] arm: dts: qcom: Add missing OPP properties for CPUs
Quoted 10 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Quoted 7 lines
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>--- arch/arm/boot/dts/qcom-ipq4019.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
Qcom maintainers, can you please apply this one ?
Signature · 1 line
viresh
Re: [PATCH 14/15] arm: dts: qcom: Add missing OPP properties for CPUs
In reply to Viresh KumarQuoted 8 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 6 lines
Add such missing properties.
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
FWIW,
Quoted 60 lines
--- arch/arm/boot/dts/qcom-ipq4019.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)arch/arm/boot/dts/qcom-ipq4019.dtsi +24
-1@@ -75,6 +75,14 @@ reg = <0x1>; clocks = <&gcc GCC_APPS_CLK_SRC>; clock-frequency = <0>; + operating-points = < + /* kHz uV (fixed) */ + 48000 1100000 + 200000 1100000 + 500000 1100000 + 666000 1100000 + >; + clock-latency = <256000>; }; cpu@2 {@@ -86,6 +94,14 @@ reg = <0x2>; clocks = <&gcc GCC_APPS_CLK_SRC>; clock-frequency = <0>; + operating-points = < + /* kHz uV (fixed) */ + 48000 1100000 + 200000 1100000 + 500000 1100000 + 666000 1100000 + >; + clock-latency = <256000>; }; cpu@3 {@@ -97,6 +113,14 @@ reg = <0x3>; clocks = <&gcc GCC_APPS_CLK_SRC>; clock-frequency = <0>; + operating-points = < + /* kHz uV (fixed) */ + 48000 1100000 + 200000 1100000 + 500000 1100000 + 666000 1100000 + >; + clock-latency = <256000>; }; }; --2.15.0.194.g9af6a3dea062
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 14/15] arm: dts: qcom: Add missing OPP properties for CPUs
Quoted 11 lines · Amit Kucheria
Quoted 10 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Quoted 7 lines
Quoted 4 lines
Fix other missing property (clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>FWIW,
Reviewed-by Amit Kucheria <[email protected]>
Picking this up for 4.19. thanks.
Andy
PATCH 15/15 arm: dts: imx: Add missing OPP properties for CPUs
In reply to Viresh KumarThe OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Add such missing properties.
Fix other missing properties (like clocks, supply, clock latency) as well to make it all work.
--- arch/arm/boot/dts/imx6dl.dtsi | 23 ++++++++++ arch/arm/boot/dts/imx6q-cm-fx6.dts | 66 +++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6q.dtsi | 87 ++++++++++++++++++++++++++++++++++++-- arch/arm/boot/dts/imx7d.dtsi | 5 +++ 4 files changed, 178 insertions(+), 3 deletions(-)
arch/arm/boot/dts/imx6dl.dtsi +23 -0
@@ -50,6 +50,29 @@ device_type = "cpu"; reg = <1>; next-level-cache = <&L2>; + operating-points = < + /* kHz uV */ + 996000 1250000 + 792000 1175000 + 396000 1150000 + >; + fsl,soc-operating-points = < + /* ARM kHz SOC-PU uV */ + 996000 1175000 + 792000 1175000 + 396000 1175000 + >; + clock-latency = <61036>; /* two CLK32 periods */ + clocks = <&clks IMX6QDL_CLK_ARM>, + <&clks IMX6QDL_CLK_PLL2_PFD2_396M>, + <&clks IMX6QDL_CLK_STEP>, + <&clks IMX6QDL_CLK_PLL1_SW>, + <&clks IMX6QDL_CLK_PLL1_SYS>; + clock-names = "arm", "pll2_pfd2_396m", "step", + "pll1_sw", "pll1_sys"; + arm-supply = <®_arm>; + pu-supply = <®_pu>; + soc-supply = <®_soc>; }; };
arch/arm/boot/dts/imx6q-cm-fx6.dts +66 -0
72 lines not on this page · raw message
arch/arm/boot/dts/imx6q.dtsi +84 -3
109 lines not on this page · raw message
arch/arm/boot/dts/imx7d.dtsi +5 -0
@@ -21,6 +21,11 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + operating-points = < + /* KHz uV */ + 996000 1075000 + 792000 975000 + >; clock-frequency = <996000000>; }; };
Signature · 1 line
2.15.0.194.g9af6a3dea062
Re: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs
Hi Viresh,
Am Freitag, den 25.05.2018, 16:02 +0530 schrieb Viresh Kumar:
Quoted 8 lines
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 4 lines
Add such missing properties.
Fix other missing properties (like clocks, supply, clock latency) as well to make it all work.
This is a lot of duplicate information for what is effectively a shared
cluster wide thing. This does absolutely not _feel_ right.
What problem are you solving here? Why do we need all this duplicate information? Why can't we fix it by falling back to looking at cpu0 if needed?
Regards,
Lucas
Quoted 249 lines
Signed-off-by Viresh Kumar <[email protected]>---
?arch/arm/boot/dts/imx6dl.dtsi??????| 23 ++++++++++ ?arch/arm/boot/dts/imx6q-cm-fx6.dts | 66 +++++++++++++++++++++++++++++ ?arch/arm/boot/dts/imx6q.dtsi???????| 87 ++++++++++++++++++++++++++++++++++++-- ?arch/arm/boot/dts/imx7d.dtsi???????|??5 +++?4 files changed, 178 insertions(+), 3 deletions(-)
arch/arm/boot/dts/imx6dl.dtsi +0
-0@@ -50,6 +50,29 @@ > ? device_type = "cpu"; > ? reg = <1>; > ? next-level-cache = <&L2>;Quoted 23 lines
(quoted diff) +8
-0+ operating-points = < + /* kHz????uV */ + 996000??1250000 + 792000??1175000 + 396000??1150000 + >; + fsl,soc-operating-points = < + /* ARM kHz??SOC-PU uV */Quoted 3 lines
arch/arm/boot/dts/imx6dl.dtsi +3
-0+ 996000 1175000 + 792000 1175000 + 396000 1175000arch/arm/boot/dts/imx6dl.dtsi +12
-0+ >; + clock-latency = <61036>; /* two CLK32 periods */ + clocks = <&clks IMX6QDL_CLK_ARM>, + ?<&clks IMX6QDL_CLK_PLL2_PFD2_396M>, + ?<&clks IMX6QDL_CLK_STEP>, + ?<&clks IMX6QDL_CLK_PLL1_SW>, + ?<&clks IMX6QDL_CLK_PLL1_SYS>; + clock-names = "arm", "pll2_pfd2_396m", "step", + ??????"pll1_sw", "pll1_sys"; + arm-supply = <®_arm>; + pu-supply = <®_pu>; + soc-supply = <®_soc>;Quoted 2 lines
? };
? };?
arch/arm/boot/dts/imx6q-cm-fx6.dts +0
-0@@ -187,6 +187,72 @@ > ? >; ?};?
+&cpu1 {Quoted 19 lines
(quoted diff) +6
-0+ /* + ?* Although the imx6q fuse indicates that 1.2GHz operation is possible, + ?* the module behaves unstable at this frequency. Hence, remove the + ?* 1.2GHz operation point here. + ?*/ + operating-points = <Quoted 5 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +5
-0+ /* kHz uV */ + 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 975000(quoted diff) +2
-0+ >; + fsl,soc-operating-points = <Quoted 5 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +5
-0+ /* ARM kHz SOC-PU uV */ + 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 1175000(quoted diff) +1
-0+ >;arch/arm/boot/dts/imx6q-cm-fx6.dts +3
-0+}; + +&cpu2 {Quoted 19 lines
(quoted diff) +6
-0+ /* + ?* Although the imx6q fuse indicates that 1.2GHz operation is possible, + ?* the module behaves unstable at this frequency. Hence, remove the + ?* 1.2GHz operation point here. + ?*/ + operating-points = <Quoted 5 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +5
-0+ /* kHz uV */ + 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 975000(quoted diff) +2
-0+ >; + fsl,soc-operating-points = <Quoted 5 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +5
-0+ /* ARM kHz SOC-PU uV */ + 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 1175000(quoted diff) +1
-0+ >;arch/arm/boot/dts/imx6q-cm-fx6.dts +3
-0+}; + +&cpu3 {Quoted 19 lines
(quoted diff) +6
-0+ /* + ?* Although the imx6q fuse indicates that 1.2GHz operation is possible, + ?* the module behaves unstable at this frequency. Hence, remove the + ?* 1.2GHz operation point here. + ?*/ + operating-points = <Quoted 5 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +5
-0+ /* kHz uV */ + 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 975000(quoted diff) +2
-0+ >; + fsl,soc-operating-points = <Quoted 5 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +5
-0+ /* ARM kHz SOC-PU uV */ + 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 1175000(quoted diff) +1
-0+ >;arch/arm/boot/dts/imx6q-cm-fx6.dts +2
-0+}; +?&ecspi1 {
Quoted 2 lines
? cs-gpios = <&gpio2 30
GPIO_ACTIVE_HIGH>, <&gpio3 19GPIO_ACTIVE_HIGH>;
? pinctrl-names = "default";arch/arm/boot/dts/imx6q.dtsi +0
-0@@ -50,25 +50,106 @@ > ? soc-supply = <®_soc>; > ? };?
Quoted 33 lines
arch/arm/boot/dts/imx6q.dtsi +0
-1- cpu at 1 {arch/arm/boot/dts/imx6q.dtsi line 53
Quoted 1 line
arch/arm/boot/dts/imx6q.dtsi +1
-0+ cpu1: cpu at 1 {? compatible = "arm,cortex-a9";
?device_type= "cpu";
? reg = <1>;
? next-level-cache = <&L2>;(quoted diff) +11
-0+ operating-points = < + /* kHz????uV */ + 1200000 1275000 + 996000??1250000 + 852000??1250000 + 792000??1175000 + 396000??975000 + >; + fsl,soc-operating-points = < + /* ARM kHz??SOC-PU uV */ + 1200000 1275000Quoted 4 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +4
-0+ 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 1175000arch/arm/boot/dts/imx6dl.dtsi +12
-0+ >; + clock-latency = <61036>; /* two CLK32 periods */ + clocks = <&clks IMX6QDL_CLK_ARM>, + ?<&clks IMX6QDL_CLK_PLL2_PFD2_396M>, + ?<&clks IMX6QDL_CLK_STEP>, + ?<&clks IMX6QDL_CLK_PLL1_SW>, + ?<&clks IMX6QDL_CLK_PLL1_SYS>; + clock-names = "arm", "pll2_pfd2_396m", "step", + ??????"pll1_sw", "pll1_sys"; + arm-supply = <®_arm>; + pu-supply = <®_pu>; + soc-supply = <®_soc>;Quoted 1 line
? };
?
Quoted 33 lines
arch/arm/boot/dts/imx6q.dtsi +0
-1- cpu at 2 {arch/arm/boot/dts/imx6q.dtsi line 87
Quoted 1 line
arch/arm/boot/dts/imx6q.dtsi +1
-0+ cpu2: cpu at 2 {? compatible = "arm,cortex-a9";
?device_type= "cpu";
? reg = <2>;
? next-level-cache = <&L2>;(quoted diff) +11
-0+ operating-points = < + /* kHz????uV */ + 1200000 1275000 + 996000??1250000 + 852000??1250000 + 792000??1175000 + 396000??975000 + >; + fsl,soc-operating-points = < + /* ARM kHz??SOC-PU uV */ + 1200000 1275000Quoted 4 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +4
-0+ 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 1175000arch/arm/boot/dts/imx6dl.dtsi +12
-0+ >; + clock-latency = <61036>; /* two CLK32 periods */ + clocks = <&clks IMX6QDL_CLK_ARM>, + ?<&clks IMX6QDL_CLK_PLL2_PFD2_396M>, + ?<&clks IMX6QDL_CLK_STEP>, + ?<&clks IMX6QDL_CLK_PLL1_SW>, + ?<&clks IMX6QDL_CLK_PLL1_SYS>; + clock-names = "arm", "pll2_pfd2_396m", "step", + ??????"pll1_sw", "pll1_sys"; + arm-supply = <®_arm>; + pu-supply = <®_pu>; + soc-supply = <®_soc>;Quoted 1 line
? };
?
Quoted 33 lines
arch/arm/boot/dts/imx6q.dtsi +0
-1- cpu at 3 {arch/arm/boot/dts/imx6q.dtsi line 121
Quoted 1 line
arch/arm/boot/dts/imx6q.dtsi +1
-0+ cpu3: cpu at 3 {? compatible = "arm,cortex-a9";
?device_type= "cpu";
? reg = <3>;
? next-level-cache = <&L2>;(quoted diff) +11
-0+ operating-points = < + /* kHz????uV */ + 1200000 1275000 + 996000??1250000 + 852000??1250000 + 792000??1175000 + 396000??975000 + >; + fsl,soc-operating-points = < + /* ARM kHz??SOC-PU uV */ + 1200000 1275000Quoted 4 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +4
-0+ 996000 1250000 + 852000 1250000 + 792000 1175000 + 396000 1175000arch/arm/boot/dts/imx6dl.dtsi +12
-0+ >; + clock-latency = <61036>; /* two CLK32 periods */ + clocks = <&clks IMX6QDL_CLK_ARM>, + ?<&clks IMX6QDL_CLK_PLL2_PFD2_396M>, + ?<&clks IMX6QDL_CLK_STEP>, + ?<&clks IMX6QDL_CLK_PLL1_SW>, + ?<&clks IMX6QDL_CLK_PLL1_SYS>; + clock-names = "arm", "pll2_pfd2_396m", "step", + ??????"pll1_sw", "pll1_sys"; + arm-supply = <®_arm>; + pu-supply = <®_pu>; + soc-supply = <®_soc>;Quoted 2 lines
? };
? };?
arch/arm/boot/dts/imx7d.dtsi +0
-0@@ -21,6 +21,11 @@ > ? compatible = "arm,cortex-a7"; > ? device_type = "cpu"; > ? reg = <1>;Quoted 8 lines
(quoted diff) +1
-0+ operating-points = <Quoted 3 lines
arch/arm/boot/dts/imx7d.dtsi +3
-0+ /* KHz uV */ + 996000 1075000 + 792000 975000(quoted diff) +1
-0+ >;? clock-frequency = <996000000>;
? };
? };
Re: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs
Hi Lucas,
Quoted 2 lines · Lucas Stach
This is a lot of duplicate information for what is effectively a shared
cluster wide thing. This does absolutely not _feel_ right.
I cannot agree more :)
Quoted 3 lines
What problem are you solving here? Why do we need all this duplicate information? Why can't we fix it by falling back to looking at cpu0 if needed?
Let me try explaining one of the problem scenarios to you as your platform is a single cluster one. Make cpufreq driver as module, don't insert it, hotplug out CPU0 and now insert the cpufreq driver. The cpufreq core will try adding the cpufreq policy for CPU1 but wouldn't find the required information in the DT node of CPU1 and so will fail or behave incorrectly.
We can't look at CPU0 as we don't know they are related at all. Nothing tells that to us. The right solution to fix the duplication is to move to OPP-v2 bindings, which allow us to create a single OPP table node and refer to it from all the CPU nodes. Because in case of imx platforms getting updated here, we use the old and some platforms specific frequency tables, we have to duplicate it everywhere.
But looking from DT otherwise, all the device should anyway have all the information required right in their node. That can be simplified with things like phandle to opp-v2 node, but still everything needs to be there. We shouldn't really rely on other CPU nodes to make it work. That would be an incomplete definition of the hardware IMHO.
Signature · 1 line
viresh
Re: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs
Quoted 26 lines · Viresh Kumar
Hi Lucas,
Quoted 2 lines · Lucas Stach
This is a lot of duplicate information for what is effectively a shared
cluster wide thing. This does absolutely not _feel_ right.I cannot agree more :)
Quoted 3 lines
What problem are you solving here? Why do we need all this duplicate information? Why can't we fix it by falling back to looking at cpu0 if needed?
Let me try explaining one of the problem scenarios to you as your platform is a single cluster one. Make cpufreq driver as module, don't insert it, hotplug out CPU0 and now insert the cpufreq driver. The cpufreq core will try adding the cpufreq policy for CPU1 but wouldn't find the required information in the DT node of CPU1 and so will fail or behave incorrectly.
We can't look at CPU0 as we don't know they are related at all. Nothing tells that to us. The right solution to fix the duplication is to move to OPP-v2 bindings, which allow us to create a single OPP table node and refer to it from all the CPU nodes. Because in case of imx platforms getting updated here, we use the old and some platforms specific frequency tables, we have to duplicate it everywhere.
Quoted 5 lines
But looking from DT otherwise, all the device should anyway have all the information required right in their node. That can be simplified with things like phandle to opp-v2 node, but still everything needs to be there. We shouldn't really rely on other CPU nodes to make it work. That would be an incomplete definition of the hardware IMHO.
Lucas,
Are you fine with the patch now considering the respond from Viresh?
Shawn
Re: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs
Hi Shawn,
Am Dienstag, den 03.07.2018, 15:12 +0800 schrieb Shawn Guo:
Quoted 33 lines · Viresh Kumar
Quoted 26 lines
Hi Lucas,
Quoted 2 lines · Lucas Stach
This is a lot of duplicate information for what is effectively a shared ?cluster wide thing. This does absolutely not _feel_ right.
I cannot agree more :)
Quoted 3 lines
What problem are you solving here? Why do we need all this duplicate information? Why can't we fix it by falling back to looking at cpu0 if needed?
Let me try explaining one of the problem scenarios to you as your platform is a single cluster one. Make cpufreq driver as module, don't insert it, hotplug out CPU0 and now insert the cpufreq driver. The cpufreq core will try adding the cpufreq policy for CPU1 but wouldn't find the required information in the DT node of CPU1 and so will fail or behave incorrectly.
We can't look at CPU0 as we don't know they are related at all. Nothing tells that to us. The right solution to fix the duplication is to move to OPP-v2 bindings, which allow us to create a single OPP table node and refer to it from all the CPU nodes. Because in case of imx platforms getting updated here, we use the old and some platforms specific frequency tables, we have to duplicate it everywhere.
Quoted 5 lines
But looking from DT otherwise, all the device should anyway have all the information required right in their node. That can be simplified with things like phandle to opp-v2 node, but still everything needs to be there. We shouldn't really rely on other CPU nodes to make it work. That would be an incomplete definition of the hardware IMHO.
Quoted 3 lines
Lucas,
Are you fine with the patch now considering the respond from Viresh?
I still don't like the huge duplication of information in the DT, but I agree that it's currently necessary for correctness. Long term I hope we can get away from cpufreq-imx6 and the custom SoC OPPs, which would allow us to switch over to OPPv2.
So patch is:
Regards,
Lucas
Shawn Guo
AppliedRe: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs
In reply to Viresh KumarQuoted 8 lines · Viresh Kumar
The OPP properties, like "operating-points", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can create an OPP table.
Quoted 6 lines
Add such missing properties.
Fix other missing properties (like clocks, supply, clock latency) as well to make it all work.
Signed-off-by Viresh Kumar <[email protected]>
Applied, thanks.