linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Péron" <peron.clem@gmail.com>
To: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	"Ondrej Jirman" <megous@megous.com>,
	"Clément Péron" <peron.clem@gmail.com>
Subject: [PATCH 2/7] arm64: dts: allwinner: h6: Add thermal trip points/cooling map
Date: Sun,  5 Apr 2020 12:49:08 +0200	[thread overview]
Message-ID: <20200405104913.22806-3-peron.clem@gmail.com> (raw)
In-Reply-To: <20200405104913.22806-1-peron.clem@gmail.com>

From: Ondrej Jirman <megous@megous.com>

This enables passive cooling by down-regulating CPU voltage
and frequency.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index aef4ae760d5e..d4d3963705f5 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -908,6 +908,30 @@
 			polling-delay-passive = <0>;
 			polling-delay = <0>;
 			thermal-sensors = <&ths 0>;
+
+			trips {
+				cpu_hot_trip: cpu-hot {
+					temperature = <80000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_very_hot_trip: cpu-very-hot {
+					temperature = <100000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				cpu-hot-limit {
+					trip = <&cpu_hot_trip>;
+					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>;
+				};
+			};
 		};
 
 		gpu-thermal {
-- 
2.20.1


  parent reply	other threads:[~2020-04-05 10:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 10:49 [PATCH 0/7] Add support for Allwinner H6 DVFS Clément Péron
2020-04-05 10:49 ` [PATCH 1/7] arm64: dts: allwinner: h6: Add clock to CPU cores Clément Péron
2020-04-05 10:49 ` Clément Péron [this message]
2020-04-05 10:49 ` [PATCH 3/7] arm64: dts: allwinner: h6: set thermal polling time Clément Péron
2020-04-05 11:24   ` [linux-sunxi] " Ondřej Jirman
2020-04-05 14:35     ` Clément Péron
2020-04-05 10:49 ` [PATCH 4/7] arm64: dts: allwinner: h6: Add CPU Operating Performance Points table Clément Péron
2020-04-05 10:49 ` [PATCH 5/7] arm64: dts: allwinner: h6: Add GPU " Clément Péron
2020-04-05 10:49 ` [PATCH 6/7] arm64: configs: Enable sun50i cpufreq nvmem Clément Péron
2020-04-05 10:49 ` [PATCH 7/7] arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Beelink GS1 Clément Péron
2020-04-05 11:31   ` [linux-sunxi] " Ondřej Jirman
2020-04-05 11:51 ` [linux-sunxi] [PATCH 0/7] Add support for Allwinner H6 DVFS Ondřej Jirman
2020-04-05 14:33   ` Clément Péron
2020-04-05 14:54     ` Ondřej Jirman
2020-04-05 15:01       ` Clément Péron
2020-04-05 15:30 ` Clément Péron

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=20200405104913.22806-3-peron.clem@gmail.com \
    --to=peron.clem@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.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;
as well as URLs for NNTP newsgroup(s).