From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Ondrej Jirman <megous@megous.com>, linux-sunxi@googlegroups.com
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"moderated list:ARM/Allwinner sunXi SoC support"
<linux-arm-kernel@lists.infradead.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ARM: dts: sun8i-a83t: Add thermal trip points/cooling maps
Date: Mon, 24 Feb 2020 18:06:20 +0100 [thread overview]
Message-ID: <2e4213a6-2aaf-641c-f741-9503f3ffd5fe@linaro.org> (raw)
In-Reply-To: <20200224165417.334617-1-megous@megous.com>
On 24/02/2020 17:54, Ondrej Jirman wrote:
> This enables passive cooling by down-regulating CPU voltage
> and frequency.
>
> For the trip points, I used values from the BSP code directly.
>
> The critical trip point value is 30°C above the maximum recommended
> ambient temperature (70°C) for the SoC from the datasheet, so there's
> some headroom even at such a high ambient temperature.
>
> Signed-off-by: Ondrej Jirman <megous@megous.com>
> ---
> arch/arm/boot/dts/sun8i-a83t.dtsi | 60 +++++++++++++++++++++++++++----
> 1 file changed, 54 insertions(+), 6 deletions(-)
>
> v2:
> - added more detail to the commit description
>
> diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
> index 74ac7ee9383cf..53c2b6a836f27 100644
> --- a/arch/arm/boot/dts/sun8i-a83t.dtsi
> +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
> @@ -72,7 +72,7 @@ cpu0: cpu@0 {
> #cooling-cells = <2>;
> };
>
> - cpu@1 {
> + cpu1: cpu@1 {
> compatible = "arm,cortex-a7";
> device_type = "cpu";
> clocks = <&ccu CLK_C0CPUX>;
> @@ -83,7 +83,7 @@ cpu@1 {
> #cooling-cells = <2>;
> };
>
> - cpu@2 {
> + cpu2: cpu@2 {
> compatible = "arm,cortex-a7";
> device_type = "cpu";
> clocks = <&ccu CLK_C0CPUX>;
> @@ -94,7 +94,7 @@ cpu@2 {
> #cooling-cells = <2>;
> };
>
> - cpu@3 {
> + cpu3: cpu@3 {
> compatible = "arm,cortex-a7";
> device_type = "cpu";
> clocks = <&ccu CLK_C0CPUX>;
> @@ -116,7 +116,7 @@ cpu100: cpu@100 {
> #cooling-cells = <2>;
> };
>
> - cpu@101 {
> + cpu101: cpu@101 {
> compatible = "arm,cortex-a7";
> device_type = "cpu";
> clocks = <&ccu CLK_C1CPUX>;
> @@ -127,7 +127,7 @@ cpu@101 {
> #cooling-cells = <2>;
> };
>
> - cpu@102 {
> + cpu102: cpu@102 {
> compatible = "arm,cortex-a7";
> device_type = "cpu";
> clocks = <&ccu CLK_C1CPUX>;
> @@ -138,7 +138,7 @@ cpu@102 {
> #cooling-cells = <2>;
> };
>
> - cpu@103 {
> + cpu103: cpu@103 {
> compatible = "arm,cortex-a7";
> device_type = "cpu";
> clocks = <&ccu CLK_C1CPUX>;
> @@ -1188,12 +1188,60 @@ cpu0_thermal: cpu0-thermal {
> polling-delay-passive = <0>;
> polling-delay = <0>;
> thermal-sensors = <&ths 0>;
> +
> + trips {
> + cpu0_hot: cpu-hot {
> + temperature = <80000>;
> + hysteresis = <2000>;
> + type = "passive";
> + };
> +
> + cpu0_very_hot: cpu-very-hot {
> + temperature = <100000>;
> + hysteresis = <0>;
> + type = "critical";
> + };
> + };
> +
> + cooling-maps {
> + cpu-hot-limit {
> + trip = <&cpu0_hot>;
> + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> + };
> + };
> };
>
> cpu1_thermal: cpu1-thermal {
> polling-delay-passive = <0>;
No polling to mitigate?
> polling-delay = <0>;
> thermal-sensors = <&ths 1>;
> +
> + trips {
> + cpu1_hot: cpu-hot {
> + temperature = <80000>;
> + hysteresis = <2000>;
> + type = "passive";
I'm curious, can you really reach this temperature with a cortex-a7
running at 1.2GHz max?
> + };
> +
> + cpu1_very_hot: cpu-very-hot {
> + temperature = <100000>;
> + hysteresis = <0>;
> + type = "critical";
> + };
> + };
> +
> + cooling-maps {
> + cpu-hot-limit {
> + trip = <&cpu1_hot>;
> + cooling-device = <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> + };
> + };
> };
>
> gpu_thermal: gpu-thermal {
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2020-02-24 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 16:54 Ondrej Jirman
2020-02-24 17:06 ` Daniel Lezcano [this message]
2020-02-24 17:23 ` Ondřej Jirman
2020-02-24 17:39 ` Ondřej Jirman
2020-02-24 17:56 ` Daniel Lezcano
2020-02-24 18:33 ` Ondřej Jirman
2020-02-25 9:05 ` Maxime Ripard
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=2e4213a6-2aaf-641c-f741-9503f3ffd5fe@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=megous@megous.com \
--cc=mripard@kernel.org \
--cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®