* [PATCH 00/15] arm: dts: Fix OPP and cooling device properties
@ 2018-05-25 10:31 Viresh Kumar
2018-05-25 10:31 ` [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs Viresh Kumar
0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2018-05-25 10:31 UTC (permalink / raw)
To: arm, Andrew Lunn, Andy Gross, Benoît Cousson, Chen-Yu Tsai,
David Brown, Fabio Estevam, Gregory Clement, Heiko Stuebner,
Jason Cooper, Jisheng Zhang, Krzysztof Kozlowski, Kukjin Kim,
Magnus Damm, Mark Rutland, Masahiro Yamada, Matthias Brugger,
Maxime Ripard, Pengutronix Kernel Team
Cc: Viresh Kumar, Vincent Guittot, ionela.voinescu, Daniel Lezcano,
chris.redpath, devicetree, linux-arm-kernel, linux-arm-msm,
linux-kernel, linux-mediatek, linux-omap, linux-renesas-soc,
linux-rockchip, linux-samsung-soc, linux-soc
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(-)
--
2.15.0.194.g9af6a3dea062
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
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-29 13:18 ` Krzysztof Kozlowski
2018-06-20 18:44 ` Krzysztof Kozlowski
0 siblings, 2 replies; 7+ messages in thread
From: Viresh Kumar @ 2018-05-25 10:31 UTC (permalink / raw)
To: arm, Rob Herring, Mark Rutland, Kukjin Kim, Krzysztof Kozlowski
Cc: Viresh Kumar, Vincent Guittot, ionela.voinescu, Daniel Lezcano,
chris.redpath, devicetree, linux-arm-kernel, linux-samsung-soc,
linux-kernel
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/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(+)
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 962af97c1883..aff5d66ae058 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -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
+ >;
};
};
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index 88fb47cef9a8..b6091c27f155 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -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 */
};
};
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi
index 7b43c10c510b..51f72f0327e5 100644
--- a/arch/arm/boot/dts/exynos4412.dtsi
+++ b/arch/arm/boot/dts/exynos4412.dtsi
@@ -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@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@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 */
};
};
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 2daf505b3d08..69648f83b8b4 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -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 */
};
};
--
2.15.0.194.g9af6a3dea062
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
2018-05-25 10:31 ` [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs Viresh Kumar
@ 2018-05-29 13:18 ` Krzysztof Kozlowski
2018-05-30 4:38 ` Viresh Kumar
2018-06-20 18:44 ` Krzysztof Kozlowski
1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-29 13:18 UTC (permalink / raw)
To: Viresh Kumar
Cc: arm, Rob Herring, Mark Rutland, Kukjin Kim, Vincent Guittot,
ionela.voinescu, Daniel Lezcano, chris.redpath, devicetree,
linux-arm-kernel, linux-samsung-soc@vger.kernel.org, linux-kernel
On Fri, May 25, 2018 at 12:31 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> 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:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
> 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/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(+)
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
2018-05-29 13:18 ` Krzysztof Kozlowski
@ 2018-05-30 4:38 ` Viresh Kumar
2018-05-30 12:32 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2018-05-30 4:38 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: arm, Rob Herring, Mark Rutland, Kukjin Kim, Vincent Guittot,
ionela.voinescu, Daniel Lezcano, chris.redpath, devicetree,
linux-arm-kernel, linux-samsung-soc@vger.kernel.org, linux-kernel
On 29-05-18, 15:18, Krzysztof Kozlowski wrote:
> 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.
> Therefore there is no real risk of falling although
> for correctness of DT your change makes sense.
>
> It is too late for this cycle for me so I'll pick it up after merge window.
> Alternatively, arm-soc guys can pick it up directly with my tag:
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
No worries, you can pick it up later on.
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
2018-05-30 4:38 ` Viresh Kumar
@ 2018-05-30 12:32 ` Krzysztof Kozlowski
2018-05-31 5:22 ` Viresh Kumar
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-30 12:32 UTC (permalink / raw)
To: Viresh Kumar
Cc: arm, Rob Herring, Mark Rutland, Kukjin Kim, Vincent Guittot,
ionela.voinescu, Daniel Lezcano, chris.redpath, devicetree,
linux-arm-kernel, linux-samsung-soc@vger.kernel.org, linux-kernel
On Wed, May 30, 2018 at 6:38 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 29-05-18, 15:18, Krzysztof Kozlowski wrote:
>> 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.
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
2018-05-30 12:32 ` Krzysztof Kozlowski
@ 2018-05-31 5:22 ` Viresh Kumar
0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2018-05-31 5:22 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: arm, Rob Herring, Mark Rutland, Kukjin Kim, Vincent Guittot,
ionela.voinescu, Daniel Lezcano, chris.redpath, devicetree,
linux-arm-kernel, linux-samsung-soc@vger.kernel.org, linux-kernel
On 30-05-18, 14:32, Krzysztof Kozlowski wrote:
> 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
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs
2018-05-25 10:31 ` [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs Viresh Kumar
2018-05-29 13:18 ` Krzysztof Kozlowski
@ 2018-06-20 18:44 ` Krzysztof Kozlowski
1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2018-06-20 18:44 UTC (permalink / raw)
To: Viresh Kumar
Cc: arm, Rob Herring, Mark Rutland, Kukjin Kim, Vincent Guittot,
ionela.voinescu, Daniel Lezcano, chris.redpath, devicetree,
linux-arm-kernel, linux-samsung-soc, linux-kernel
On Fri, May 25, 2018 at 04:01:53PM +0530, Viresh Kumar wrote:
> 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/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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-06-20 18:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-25 10:31 [PATCH 00/15] arm: dts: Fix OPP and cooling device properties Viresh Kumar
2018-05-25 10:31 ` [PATCH 07/15] arm: dts: exynos: Add missing cooling device properties for CPUs Viresh Kumar
2018-05-29 13:18 ` Krzysztof Kozlowski
2018-05-30 4:38 ` Viresh Kumar
2018-05-30 12:32 ` Krzysztof Kozlowski
2018-05-31 5:22 ` Viresh Kumar
2018-06-20 18:44 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox