* [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control
@ 2021-03-09 15:19 Russell King - ARM Linux admin
2021-03-09 15:20 ` [PATCH 1/2] arm64: dts: marvell: clearfog-gt-8k: add pwm-fan Russell King
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King - ARM Linux admin @ 2021-03-09 15:19 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Rob Herring, Sebastian Hesselbarth
Cc: devicetree, linux-arm-kernel
Hi,
This patch series adds the DT descriptions to control a PWM fan on the
SolidRun Clearfog GT8k platform.
.../dts/marvell/armada-8040-clearfog-gt-8k.dts | 127 +++++++++++++++++++++
1 file changed, 127 insertions(+)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] arm64: dts: marvell: clearfog-gt-8k: add pwm-fan
2021-03-09 15:19 [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control Russell King - ARM Linux admin
@ 2021-03-09 15:20 ` Russell King
2021-03-09 15:20 ` [PATCH 2/2] arm64: dts: marvell: clearfog-gt-8k: add cooling maps Russell King
2021-04-02 19:49 ` [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control Gregory CLEMENT
2 siblings, 0 replies; 4+ messages in thread
From: Russell King @ 2021-03-09 15:20 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Rob Herring, Sebastian Hesselbarth
Cc: linux-arm-kernel, devicetree
Add pwm-fan support for controlling the fan speed.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts | 7 +++++++
1 file changed, 7 insertions(+)
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 eb01cc96ba7a..b1723ac0aeec 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,6 +31,13 @@
ethernet2 = &cp1_eth2;
};
+ pwm {
+ compatible = "pwm-fan";
+ pinctrl-names = "default";
+ pinctrl-0 = <&cp0_fan_pwm_pins>;
+ pwms = <&cp0_gpio2 16 40000>;
+ };
+
v_3_3: regulator-3-3v {
compatible = "regulator-fixed";
regulator-name = "v_3_3";
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm64: dts: marvell: clearfog-gt-8k: add cooling maps
2021-03-09 15:19 [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control Russell King - ARM Linux admin
2021-03-09 15:20 ` [PATCH 1/2] arm64: dts: marvell: clearfog-gt-8k: add pwm-fan Russell King
@ 2021-03-09 15:20 ` Russell King
2021-04-02 19:49 ` [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control Gregory CLEMENT
2 siblings, 0 replies; 4+ messages in thread
From: Russell King @ 2021-03-09 15:20 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Rob Herring, Sebastian Hesselbarth
Cc: linux-arm-kernel, devicetree
Add cooling maps suitable for a Noctua NF-A4/10 fan attached to the
heat sink. The fan will toggle between two speeds in operation which
seems to be normal behaviour. More fine-grained steps may help to
reduce this.
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 b1723ac0aeec..0ec0d5625818 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>;
pinctrl-names = "default";
pinctrl-0 = <&cp0_fan_pwm_pins>;
pwms = <&cp0_gpio2 16 40000>;
@@ -109,6 +112,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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control
2021-03-09 15:19 [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control Russell King - ARM Linux admin
2021-03-09 15:20 ` [PATCH 1/2] arm64: dts: marvell: clearfog-gt-8k: add pwm-fan Russell King
2021-03-09 15:20 ` [PATCH 2/2] arm64: dts: marvell: clearfog-gt-8k: add cooling maps Russell King
@ 2021-04-02 19:49 ` Gregory CLEMENT
2 siblings, 0 replies; 4+ messages in thread
From: Gregory CLEMENT @ 2021-04-02 19:49 UTC (permalink / raw)
To: Russell King - ARM Linux admin, Andrew Lunn, Rob Herring,
Sebastian Hesselbarth
Cc: devicetree, linux-arm-kernel
Hi Russell,
> Hi,
>
> This patch series adds the DT descriptions to control a PWM fan on the
> SolidRun Clearfog GT8k platform.
>
> .../dts/marvell/armada-8040-clearfog-gt-8k.dts | 127 +++++++++++++++++++++
> 1 file changed, 127 insertions(+)
>
Applied on mvebu/dt64
Thanks,
Gregory
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-02 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 15:19 [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control Russell King - ARM Linux admin
2021-03-09 15:20 ` [PATCH 1/2] arm64: dts: marvell: clearfog-gt-8k: add pwm-fan Russell King
2021-03-09 15:20 ` [PATCH 2/2] arm64: dts: marvell: clearfog-gt-8k: add cooling maps Russell King
2021-04-02 19:49 ` [PATCH 0/2] arm64: clearfog-gt-8k: Add DT for fan control Gregory CLEMENT
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).