From: Russell King <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
devicetree@vger.kernel.org,
Gregory Clement <gregory.clement@bootlin.com>,
Jason Cooper <jason@lakedaemon.net>,
Linus Walleij <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-pwm@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Thierry Reding <thierry.reding@gmail.com>,
"Uwe Kleine-Konig" <u.kleine-koenig@pengutronix.de>
Subject: [PATCH RFC 6/6] arm64: dts: clearfog-gt-8k: add cooling maps
Date: Sun, 29 Mar 2020 11:48:30 +0100 [thread overview]
Message-ID: <E1jIVUU-0005hk-AO@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20200329104549.GX25745@shell.armlinux.org.uk>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
.../marvell/armada-8040-clearfog-gt-8k.dts | 122 +++++++++++++++++-
1 file changed, 121 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts b/arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts
index a514ae51ccbf..1e7b47affe26 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts
@@ -31,8 +31,11 @@
ethernet2 = &cp1_eth2;
};
- pwm {
+ fan: pwm {
compatible = "pwm-fan";
+ /* 20% steps */
+ cooling-levels = <0 51 102 153 204 255>;
+ #cooling-cells = <2>;
pwms = <&cp0_gpio2 16 40000>;
};
@@ -107,6 +110,123 @@
};
};
+&ap_thermal_ic {
+ polling-delay = <1000>; /* milliseconds */
+ trips {
+ ap_active: trip-active {
+ temperature = <40000>; /* millicelsius */
+ hysteresis = <4000>; /* millicelsius */
+ type = "active";
+ };
+ };
+ cooling-maps {
+ map0 {
+ trip = <&ap_active>;
+ cooling-device = <&fan THERMAL_NO_LIMIT 4>;
+ };
+ map1 {
+ trip = <&ap_crit>;
+ cooling-device = <&fan 4 5>;
+ };
+ };
+};
+
+&cp0_thermal_ic {
+ polling-delay = <1000>; /* milliseconds */
+ trips {
+ cp0_active0: trip-active0 {
+ temperature = <40000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ cp0_active1: trip-active1 {
+ temperature = <45000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ cp0_active2: trip-active2 {
+ temperature = <50000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ cp0_active3: trip-active3 {
+ temperature = <60000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ };
+ cooling-maps {
+ map0 {
+ trip = <&cp0_active0>;
+ cooling-device = <&fan 0 1>;
+ };
+ map1 {
+ trip = <&cp0_active1>;
+ cooling-device = <&fan 1 2>;
+ };
+ map2 {
+ trip = <&cp0_active2>;
+ cooling-device = <&fan 2 3>;
+ };
+ map3 {
+ trip = <&cp0_active3>;
+ cooling-device = <&fan 3 4>;
+ };
+ map4 {
+ trip = <&cp0_crit>;
+ cooling-device = <&fan 4 5>;
+ };
+ };
+};
+
+&cp1_thermal_ic {
+ polling-delay = <1000>; /* milliseconds */
+ trips {
+ cp1_active0: trip-active0 {
+ temperature = <40000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ cp1_active1: trip-active1 {
+ temperature = <45000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ cp1_active2: trip-active2 {
+ temperature = <50000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ cp1_active3: trip-active3 {
+ temperature = <60000>; /* millicelsius */
+ hysteresis = <2500>; /* millicelsius */
+ type = "active";
+ };
+ };
+ cooling-maps {
+ map0 {
+ trip = <&cp1_active0>;
+ cooling-device = <&fan 0 1>;
+ };
+ map1 {
+ trip = <&cp1_active1>;
+ cooling-device = <&fan 1 2>;
+ };
+ map2 {
+ trip = <&cp1_active2>;
+ cooling-device = <&fan 2 3>;
+ };
+ map3 {
+ trip = <&cp1_active3>;
+ cooling-device = <&fan 3 4>;
+ };
+ map4 {
+ trip = <&cp1_crit>;
+ cooling-device = <&fan 4 5>;
+ };
+ };
+};
+
&uart0 {
status = "okay";
pinctrl-0 = <&uart0_pins>;
--
2.20.1
next prev parent reply other threads:[~2020-03-29 10:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-29 10:45 [PATCH RFC 0/6] PWM fan support on Clearfog gt8k Russell King - ARM Linux admin
2020-03-29 10:48 ` [PATCH RFC 1/6] gpio: mvebu: convert pwm to regmap Russell King
2020-03-29 10:48 ` [PATCH RFC 2/6] gpio: mvebu: honour EPROBE_DEFER for devm_clk_get() Russell King
2020-03-29 13:16 ` Uwe Kleine-König
2020-03-29 13:34 ` Russell King - ARM Linux admin
2020-03-29 18:00 ` Uwe Kleine-König
2020-03-29 18:22 ` Russell King - ARM Linux admin
2020-03-31 16:29 ` Uwe Kleine-König
2020-03-29 10:48 ` [PATCH RFC 3/6] gpio: mvebu: add PWM support for Armada 8k Russell King
2020-03-29 11:00 ` Russell King - ARM Linux admin
2020-03-29 10:48 ` [PATCH RFC 4/6] arm64: dts: armada-cp11x: add pwm support to GPIO blocks Russell King
2020-03-29 10:48 ` [PATCH RFC 5/6] arm64: dts: clearfog-gt-8k: add pwm-fan Russell King
2020-03-29 10:48 ` Russell King [this message]
2020-04-16 7:51 ` [PATCH RFC 0/6] PWM fan support on Clearfog gt8k Linus Walleij
2020-04-16 8:14 ` Russell King - ARM Linux admin
2020-04-16 12:08 ` Linus Walleij
2020-04-16 14:53 ` Russell King - ARM Linux admin
2020-04-16 13:50 ` Andrew Lunn
2020-04-16 14:29 ` Russell King - ARM Linux admin
2020-04-16 14:36 ` Andrew Lunn
2020-04-16 14:41 ` Russell King - ARM Linux admin
2020-04-16 14:37 ` Robin Murphy
2020-04-16 14:42 ` Andrew Lunn
2020-04-16 16:20 ` Robin Murphy
2020-04-16 16:49 ` Andrew Lunn
2020-04-16 14:55 ` Russell King - ARM Linux admin
2020-04-16 15:55 ` Robin Murphy
2020-04-16 16:37 ` Russell King - ARM Linux admin
2020-04-16 16:49 ` Russell King - ARM Linux admin
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=E1jIVUU-0005hk-AO@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=bgolaszewski@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=jason@lakedaemon.net \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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).