All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: arm@kernel.org, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Chen-Yu Tsai <wens@csie.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	ionela.voinescu@arm.com,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	chris.redpath@arm.com, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 06/15] arm: dts: sun: Add missing cooling device properties for CPUs
Date: Fri, 25 May 2018 16:01:52 +0530	[thread overview]
Message-ID: <eded393f4b508a1f377f9af6859a3b82a6787e1c.1527244201.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1527244200.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1527244200.git.viresh.kumar@linaro.org>

The cooling device properties, like "#cooling-cells" and
"dynamic-power-coefficient", should either be present for all the CPUs
of a cluster or none. If these are present only for a subset of CPUs of
a cluster then things will start falling apart as soon as the CPUs are
brought online in a different order. For example, this will happen
because the operating system looks for such properties in the CPU node
it is trying to bring up, so that it can register a cooling device.

Add such missing properties.

Fix other missing properties (clocks, OPP, clock latency) as well to
make it all work.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 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(+)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index c72992556a86..debc0bf22ea3 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -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@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@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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index e529e4ff2174..35372a0cfc8d 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 8d278ee001e9..4e92741b24a7 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -132,21 +132,30 @@
 		};
 
 		cpu@1 {
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 			operating-points-v2 = <&cpu0_opp_table>;
+			#cooling-cells = <2>;
 		};
 
 		cpu@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@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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 41d57c76f290..9dff6887923c 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -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@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@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>;
 		};
 	};
 
-- 
2.15.0.194.g9af6a3dea062

WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/15] arm: dts: sun: Add missing cooling device properties for CPUs
Date: Fri, 25 May 2018 16:01:52 +0530	[thread overview]
Message-ID: <eded393f4b508a1f377f9af6859a3b82a6787e1c.1527244201.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1527244200.git.viresh.kumar@linaro.org>

The cooling device properties, like "#cooling-cells" and
"dynamic-power-coefficient", should either be present for all the CPUs
of a cluster or none. If these are present only for a subset of CPUs of
a cluster then things will start falling apart as soon as the CPUs are
brought online in a different order. For example, this will happen
because the operating system looks for such properties in the CPU node
it is trying to bring up, so that it can register a cooling device.

Add such missing properties.

Fix other missing properties (clocks, OPP, clock latency) as well to
make it all work.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 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(+)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index c72992556a86..debc0bf22ea3 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index e529e4ff2174..35372a0cfc8d 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 8d278ee001e9..4e92741b24a7 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -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>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 41d57c76f290..9dff6887923c 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -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>;
 		};
 	};
 
-- 
2.15.0.194.g9af6a3dea062

  parent reply	other threads:[~2018-05-25 10:32 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 10:31 [PATCH 00/15] arm: dts: Fix OPP and cooling device properties Viresh Kumar
2018-05-25 10:31 ` Viresh Kumar
2018-05-25 10:31 ` Viresh Kumar
2018-05-25 10:31 ` [PATCH 01/15] arm: dts: armada: Fix "#cooling-cells" property's name Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-05-28 14:53   ` Gregory CLEMENT
2018-05-28 14:53     ` Gregory CLEMENT
2018-05-28 14:53     ` Gregory CLEMENT
2018-05-25 10:31 ` [PATCH 02/15] arm: dts: ls1021a: Add missing cooling device properties for CPUs Viresh Kumar
2018-07-03  1:35   ` Shawn Guo
2018-05-25 10:31 ` [PATCH 03/15] arm: dts: mediatek: " Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-06-25 14:58   ` Matthias Brugger
2018-06-25 14:58     ` Matthias Brugger
2018-05-25 10:31 ` [PATCH 04/15] arm: dts: rk322x: " Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-06-17 14:47   ` Heiko Stuebner
2018-06-17 14:47     ` Heiko Stuebner
2018-05-25 10:31 ` [PATCH 05/15] arm: dts: uniphier: " Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-06-01  3:25   ` Masahiro Yamada
2018-06-01  3:25     ` Masahiro Yamada
2018-05-25 10:31 ` Viresh Kumar [this message]
2018-05-25 10:31   ` [PATCH 06/15] arm: dts: sun: " Viresh Kumar
2018-05-28  8:44   ` Maxime Ripard
2018-05-28  8:44     ` Maxime Ripard
2018-05-28 10:57     ` Viresh Kumar
2018-05-28 10:57       ` Viresh Kumar
2018-05-28 10:57       ` Viresh Kumar
2018-06-01 15:17       ` Maxime Ripard
2018-06-01 15:17         ` Maxime Ripard
2018-06-05  4:47         ` [PATCH V2 1/2] arm: dts: sun8i-h3: " Viresh Kumar
2018-06-05  4:47           ` Viresh Kumar
2018-06-05  4:47           ` [PATCH V2 2/2] arm: dts: sunxi: " Viresh Kumar
2018-06-05  4:47             ` Viresh Kumar
2018-06-05  7:11             ` Maxime Ripard
2018-06-05  7:11               ` Maxime Ripard
2018-06-05 16:02               ` Chen-Yu Tsai
2018-06-05 16:02                 ` Chen-Yu Tsai
2018-06-06  6:58                 ` Maxime Ripard
2018-06-06  6:58                   ` Maxime Ripard
2018-05-25 10:31 ` [PATCH 07/15] arm: dts: exynos: " Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-05-29 13:18   ` Krzysztof Kozlowski
2018-05-29 13:18     ` Krzysztof Kozlowski
2018-05-30  4:38     ` Viresh Kumar
2018-05-30  4:38       ` Viresh Kumar
2018-05-30 12:32       ` Krzysztof Kozlowski
2018-05-30 12:32         ` Krzysztof Kozlowski
2018-05-31  5:22         ` Viresh Kumar
2018-05-31  5:22           ` Viresh Kumar
2018-06-20 18:44   ` Krzysztof Kozlowski
2018-06-20 18:44     ` Krzysztof Kozlowski
2018-05-25 10:31 ` [PATCH 08/15] arm: dts: dra74x: " Viresh Kumar
2018-07-03  6:43   ` Tony Lindgren
2018-05-25 10:31 ` [PATCH 09/15] arm: dts: omap: " Viresh Kumar
2018-07-03  6:44   ` Tony Lindgren
2018-05-25 10:31 ` [PATCH 10/15] arm: dts: rk3288: " Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-06-17 14:47   ` Heiko Stuebner
2018-06-17 14:47     ` Heiko Stuebner
2018-05-25 10:31 ` [PATCH 11/15] arm: dts: berlin: Add missing OPP " Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-05-25 10:31 ` [PATCH 12/15] arm: dts: highbank: " Viresh Kumar
2018-05-25 10:31   ` Viresh Kumar
2018-07-02 20:25   ` Rob Herring
2018-07-02 20:25     ` Rob Herring
2018-07-02 20:25     ` Rob Herring
2018-07-02 23:27     ` Olof Johansson
2018-07-02 23:27       ` Olof Johansson
2018-07-02 23:27       ` Olof Johansson
2018-07-03  4:13       ` Viresh Kumar
2018-07-03  4:13         ` Viresh Kumar
2018-07-03  4:13         ` Viresh Kumar
2018-07-03 14:46         ` Olof Johansson
2018-07-03 14:46           ` Olof Johansson
2018-07-03 14:46           ` Olof Johansson
2018-05-25 10:31 ` [PATCH 13/15] arm: dts: r8a7743: " Viresh Kumar
2018-05-28  9:23   ` Simon Horman
2018-05-28 10:58     ` Viresh Kumar
2018-05-28 11:58       ` Simon Horman
2018-05-29 13:33         ` Biju Das
2018-05-30  4:47           ` Viresh Kumar
2018-05-30  4:46   ` [PATCH V2 13/15] arm: dts: r8a77xx: " Viresh Kumar
2018-05-31 14:24     ` Simon Horman
2018-06-04  9:57     ` Simon Horman
2018-06-11  9:26     ` Geert Uytterhoeven
2018-05-25 10:32 ` [PATCH 14/15] arm: dts: qcom: " Viresh Kumar
2018-07-18  6:08   ` Viresh Kumar
2018-07-18 10:22   ` Amit Kucheria
2018-07-18 10:22     ` Amit Kucheria
2018-07-21 18:56     ` Andy Gross
2018-07-21 18:56       ` Andy Gross
2018-05-25 10:32 ` [PATCH 15/15] arm: dts: imx: " Viresh Kumar
2018-05-25 10:32   ` Viresh Kumar
2018-05-25 11:46   ` Lucas Stach
2018-05-25 11:46     ` Lucas Stach
2018-05-28 11:07     ` Viresh Kumar
2018-05-28 11:07       ` Viresh Kumar
2018-07-03  7:12       ` Shawn Guo
2018-07-03  7:12         ` Shawn Guo
2018-07-03  8:56         ` Lucas Stach
2018-07-03  8:56           ` Lucas Stach
2018-07-03 12:34   ` Shawn Guo
2018-07-03 12:34     ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eded393f4b508a1f377f9af6859a3b82a6787e1c.1527244201.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=arm@kernel.org \
    --cc=chris.redpath@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ionela.voinescu@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.