Devicetree
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: devicetree@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Dennis Gilmore <dennis@ausil.us>,
	linux-arm-kernel@lists.infradead.org (moderated list:ARM/Marvell
	Kirkwood and Armada 370, 375, 38x,...),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 4/4] ARM: dts: helios4: wire LM75 into a thermal zone with fan cooling
Date: Sun, 28 Jun 2026 16:00:42 -0700	[thread overview]
Message-ID: <20260628230042.1204293-5-rosenp@gmail.com> (raw)
In-Reply-To: <20260628230042.1204293-1-rosenp@gmail.com>

The LM75 temperature sensor on i2c0 creates a hwmon interface but was
not referenced by any thermal zone, producing:
  hwmon hwmon0: temp1_input not attached to any thermal zone

Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 .../boot/dts/marvell/armada-388-helios4.dts   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
index 626a7339a5d0..6e0452217265 100644
--- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
@@ -8,6 +8,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/thermal/thermal.h>
 #include "armada-388.dtsi"
 #include "armada-38x-solidrun-microsom.dtsi"
 
@@ -68,6 +69,35 @@ reg_5p0v_usb: regulator-5v-usb {
 		vin-supply = <&reg_12v>;
 	};
 
+	thermal-zones {
+		board-thermal {
+			polling-delay-passive = <2000>;
+			polling-delay = <10000>;
+			thermal-sensors = <&temp_sensor>;
+
+			trips {
+				board_alert: board-alert {
+					temperature = <55000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+				board_crit: board-crit {
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&board_alert>;
+					cooling-device = <&fan1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&fan2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+	};
+
 	system-leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -129,6 +159,7 @@ fan1: j10-pwm {
 		pwms = <&gpio1 9 40000>;	/* Target freq:25 kHz */
 		pinctrl-names = "default";
 		pinctrl-0 = <&helios_fan1_pins>;
+		#cooling-cells = <2>;
 	};
 
 	fan2: j17-pwm {
@@ -136,6 +167,7 @@ fan2: j17-pwm {
 		pwms = <&gpio1 23 40000>;	/* Target freq:25 kHz */
 		pinctrl-names = "default";
 		pinctrl-0 = <&helios_fan2_pins>;
+		#cooling-cells = <2>;
 	};
 
 	usb2_phy: usb2-phy {
@@ -201,6 +233,7 @@ temp_sensor: temp@4c {
 					compatible = "ti,lm75";
 					reg = <0x4c>;
 					vcc-supply = <&reg_3p3v>;
+					#thermal-sensor-cells = <0>;
 				};
 
 				eeprom@53 {
-- 
2.54.0


  parent reply	other threads:[~2026-06-28 23:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-28 23:00 [PATCH 0/4] ARM: dts: helios4: add regulator supplies and thermal cooling Rosen Penev
2026-06-28 23:00 ` [PATCH 1/4] ARM: dts: helios4: add vcc-supply to EEPROM Rosen Penev
2026-06-28 23:00 ` [PATCH 2/4] ARM: dts: helios4: add vcc-supply to GPIO expander Rosen Penev
2026-06-28 23:00 ` [PATCH 3/4] ARM: dts: helios4: add SATA regulator supplies Rosen Penev
2026-06-28 23:00 ` Rosen Penev [this message]
2026-06-28 23:13   ` [PATCH 4/4] ARM: dts: helios4: wire LM75 into a thermal zone with fan cooling sashiko-bot

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=20260628230042.1204293-5-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=dennis@ausil.us \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /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