Skip to contentSkip to conversation

arm: dts: Fix OPP and cooling device properties

PATCH Applied Viresh Kumar 18 participants 58 messages May 25, 2018 – Jul 21, 2018

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 6782ce481ac9..d8769956cbfc 100644
@@ -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
#2 lore raw

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.

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
index 6782ce481ac9..d8769956cbfc 100644
@@ -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
#3 lore raw

PATCH 2/15 arm: dts: ls1021a: Add missing cooling device properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/ls1021a.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/ls1021a.dtsi +1 -0
index c55d479971cc..f18490548c78 100644
@@ -84,6 +84,7 @@
 			device_type = "cpu";
 			reg = <0xf01>;
 			clocks = <&clockgen 1 0>;
+			#cooling-cells = <2>;
 		};
 	};
 
Signature · 1 line
2.15.0.194.g9af6a3dea062
Applied
#4 lore raw

Re: [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.

Applied, thanks.

#5 lore raw

PATCH 3/15 arm: dts: mediatek: Add missing cooling device properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/mt7623.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/boot/dts/mt7623.dtsi +3 -0
index d1eb123bc73b..1cdc346a05e8 100644
@@ -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
maintainer Applied
#6 lore raw

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.

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
index d1eb123bc73b..1cdc346a05e8 100644
@@ -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>;
 		};
 	};
#7 lore raw

PATCH 4/15 arm: dts: rk322x: Add missing cooling device properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/rk322x.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/boot/dts/rk322x.dtsi +3 -0
index be80e9a2c9af..ef414e39bf3a 100644
@@ -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
maintainer
#8 lore raw

Re: [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.

applied for 4.19

Thanks
Heiko

#9 lore raw

PATCH 5/15 arm: dts: uniphier: Add missing cooling device properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/uniphier-pxs2.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/boot/dts/uniphier-pxs2.dtsi +3 -0
index debcbd15c24b..40ed15465095 100644
@@ -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
#10 lore raw

Re: [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.

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
index debcbd15c24b..40ed15465095 100644
@@ -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
#11 lore raw

PATCH 6/15 arm: dts: sun: Add missing cooling device properties for CPUs

In reply to 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.

---
 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
index c72992556a86..debc0bf22ea3 100644
@@ -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
index e529e4ff2174..35372a0cfc8d 100644
@@ -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
index 8d278ee001e9..4e92741b24a7 100644
@@ -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
index 41d57c76f290..9dff6887923c 100644
@@ -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
#12 lore raw

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.

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>
#13 lore raw

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

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
#14 lore raw

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.

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>
#15 lore raw

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
index 41d57c76f290..9dff6887923c 100644
@@ -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
#16 lore raw

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
index c72992556a86..debc0bf22ea3 100644
@@ -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
index e529e4ff2174..35372a0cfc8d 100644
@@ -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
index 8d278ee001e9..4e92741b24a7 100644
@@ -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
#17 lore raw

Re: [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.

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>
#18 lore raw

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.

Applied both, thanks!

Please fix the "ARM" prefix when applying. :)

ChenYu

#19 lore raw

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.

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>
#20 lore raw

PATCH 7/15 arm: dts: exynos: Add missing cooling device properties for CPUs

In reply to 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.

---
 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
index 962af97c1883..aff5d66ae058 100644
@@ -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
index 88fb47cef9a8..b6091c27f155 100644
@@ -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
index 7b43c10c510b..51f72f0327e5 100644
@@ -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
index 2daf505b3d08..69648f83b8b4 100644
@@ -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
maintainer Reviewed-by on v1 7/15
#21 lore raw

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.

---
 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(+)
#22 lore raw

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/hardware configuration).

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:

No worries, you can pick it up later on.

Signature · 1 line
viresh
#23 lore raw

Re: [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/hardware configuration).

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

#24 lore raw

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.

https://git.linaro.org/people/vireshk/backup/linux.git/commit/?h=bkp/exynos/hotplug&id=aab8a906a70b8f1fb15a4b7bd2ee27e6dcabf79d

Signature · 1 line
viresh
maintainer Applied
#25 lore raw

Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs

In reply to Viresh Kumar
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 8 lines
---
 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

#26 lore raw

PATCH 8/15 arm: dts: dra74x: Add missing cooling device properties for CPUs

In reply to 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, 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
index 91e93ab588ca..8f9df09155d8 100644
@@ -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
#27 lore raw

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

#28 lore raw

PATCH 9/15 arm: dts: omap: Add missing cooling device properties for CPUs

In reply to 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, 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
index 732b61a0e990..574ac11c0489 100644
@@ -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
#29 lore raw

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

#30 lore raw

PATCH 10/15 arm: dts: rk3288: Add missing cooling device properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/rk3288.dtsi | 54 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +54 -0
index d7e49d29ace5..752a892847dd 100644
@@ -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
maintainer
#31 lore raw

Re: [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.

applied for 4.19, after adapting the patch to the opp-v2 conversion I Cc'ed you on [for your reference].

Thanks
Heiko

#32 lore raw

PATCH 11/15 arm: dts: berlin: Add missing OPP properties for CPUs

In reply to 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 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
index d575823c5750..487e9de53244 100644
@@ -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
index bf3a6c9a1d34..9cd00ab53f2d 100644
@@ -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
#33 lore raw

PATCH 12/15 arm: dts: highbank: Add missing OPP properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm/boot/dts/highbank.dts +30 -0
index ed14aeac0566..50278715de76 100644
@@ -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
maintainer Acked-by on v1 12/15
#34 lore raw

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.

---
 arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

ARM-SOC maintainers, Please apply this.

Rob

#35 lore raw

Re: [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
---
 arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

ARM-SOC maintainers, Please apply this.

Applied to next/dt.

-Olof

#36 lore raw

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.

---
 arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
Quoted 5 lines
Quoted 3 lines

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
#37 lore raw

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.

---
 arch/arm/boot/dts/highbank.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
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

#38 lore raw

PATCH 13/15 arm: dts: r8a7743: Add missing OPP properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/r8a7743.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/r8a7743.dtsi +9 -0
index 142949d7066f..e4fb31c4f0ee 100644
@@ -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
#39 lore raw

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.

Thanks, this looks good to me and it looks like it should have:

Fixes 0417814ea140 ("ARM: dts: r8a7743: Add OPP table for frequency scaling")

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
index 142949d7066f..e4fb31c4f0ee 100644
@@ -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
#40 lore raw

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.

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
#41 lore raw

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.

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.

#42 lore raw

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 CPUs

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

Thanks, this looks good to me and it looks like it should have:

Fixes 0417814ea140 ("ARM: dts: r8a7743: Add OPP table for frequency

scaling")

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.

#43 lore raw

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
#44 lore raw

PATCH v2 13/15 arm: dts: r8a77xx: Add missing OPP properties for CPUs

In reply to 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 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
index 142949d7066f..e4fb31c4f0ee 100644
@@ -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
index 4d06b154bd7e..c4324b1a2ec4 100644
@@ -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
index 6e1dd7ad7bd6..d1d726a1364a 100644
@@ -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
index 4abecfc0ca98..1e6439b85a6b 100644
@@ -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
Reviewed-by on v2 13/15
#45 lore raw

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.

This looks fine but I will wait to see if there are other reviews before applying.

#46 lore raw

Re: [PATCH V2 13/15] arm: dts: r8a77xx: Add missing OPP properties for CPUs

In reply to Viresh Kumar
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.

Thanks, I took the liberty of changing the prefix of this patch to "ARM: dts: r8a77(43|9[013]):" when applying this patch.

Reviewed-by on v2 13/15
#47 lore raw

Re: [PATCH V2 13/15] arm: dts: r8a77xx: Add missing OPP properties for CPUs

In reply to Viresh Kumar
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.

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
#48 lore raw

PATCH 14/15 arm: dts: qcom: Add missing OPP properties for CPUs

In reply to 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.

---
 arch/arm/boot/dts/qcom-ipq4019.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm/boot/dts/qcom-ipq4019.dtsi +24 -0
index b25daf368012..8c202b359270 100644
@@ -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
#49 lore raw

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.

---
 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
Reviewed-by on v1 14/15
#50 lore raw

Re: [PATCH 14/15] arm: dts: qcom: Add missing OPP properties for CPUs

In reply to Viresh Kumar
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.

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
index b25daf368012..8c202b359270 100644
@@ -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

#51 lore raw

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.

FWIW,

Picking this up for 4.19. thanks.

Andy

#52 lore raw

PATCH 15/15 arm: dts: imx: Add missing OPP properties for CPUs

In reply to 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 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
index b384913c34dd..cc8ffc42d128 100644
@@ -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 = <&reg_arm>;
+			pu-supply = <&reg_pu>;
+			soc-supply = <&reg_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
index 4c9877ec29f2..5434a8aa5602 100644
@@ -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
#53 lore raw

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

---

?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
index b384913c34dd..cc8ffc42d128 100644
@@ -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	1175000
arch/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 = <&reg_arm>;
+			pu-supply = <&reg_pu>;
+			soc-supply = <&reg_soc>;
Quoted 2 lines

? };
? };

?

arch/arm/boot/dts/imx6q-cm-fx6.dts +0 -0
index 65ef4cacbc71..18ae4f3be6e3 100644
@@ -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 19 GPIO_ACTIVE_HIGH>;
? pinctrl-names = "default";

arch/arm/boot/dts/imx6q.dtsi +0 -0
index 70483ce72ba6..78b89bb1bfed 100644
@@ -50,25 +50,106 @@
 > ?			soc-supply = <&reg_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 1275000
Quoted 4 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +4 -0
+				996000	1250000
+				852000	1250000
+				792000	1175000
+				396000	1175000
arch/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 = <&reg_arm>;
+			pu-supply = <&reg_pu>;
+			soc-supply = <&reg_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 1275000
Quoted 4 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +4 -0
+				996000	1250000
+				852000	1250000
+				792000	1175000
+				396000	1175000
arch/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 = <&reg_arm>;
+			pu-supply = <&reg_pu>;
+			soc-supply = <&reg_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 1275000
Quoted 4 lines
arch/arm/boot/dts/imx6q-cm-fx6.dts +4 -0
+				996000	1250000
+				852000	1250000
+				792000	1175000
+				396000	1175000
arch/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 = <&reg_arm>;
+			pu-supply = <&reg_pu>;
+			soc-supply = <&reg_soc>;
Quoted 2 lines

? };
? };

?

arch/arm/boot/dts/imx7d.dtsi +0 -0
index 4c9877ec29f2..5434a8aa5602 100644
@@ -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>;
? };
? };

#54 lore raw

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
#55 lore raw

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

#56 lore raw

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

Applied
#57 lore raw

Re: [PATCH 15/15] arm: dts: imx: Add missing OPP properties for CPUs

In reply to Viresh Kumar
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 clocks, supply, clock latency) as well to make it all work.

Applied, thanks.