Thread (4 messages) 4 messages, 1 author, 2026-02-06
STALE165d

[PATCH v2 1/3] arm64: dts: freescale: ten64: add emc2301 fan controller and thermal set points

From: Mathew McBride <hidden>
Date: 2026-02-06 05:26:23
Also in: linux-devicetree, lkml
Subsystem: arm/freescale layerscape arm architecture, the rest · Maintainers: Frank Li, Linus Torvalds

Add support for using the on-board EMC2301 fan controller as
a cooling device for the main SoC.

This functionality only became available in the mainline
kernel recently, so the fan controller has been absent from the
mainline DTS copy until now.

The thermal set points are intended for the Ten64
Desktop appliance, it is anticipated that users of the board
in other installations will be able to override these through
their own FDT overlay or by a fixup function in the system firmware.

Signed-off-by: Mathew McBride <redacted>
---
 .../arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts
index 71765ec91745..35470c0a928f 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts
@@ -68,6 +68,42 @@ led-2 {
 		};
 	};
 
+	thermal-zones {
+		soc-thermal {
+			trips {
+				fanlow0: fanlow0 {
+					temperature = <60000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+				fanmid0: fanmid0 {
+					temperature = <65000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+				fanmax0: fanmax0 {
+					temperature = <70000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+			};
+			cooling-maps {
+				map2 {
+					trip = <&fanlow0>;
+					cooling-device = <&casefan 0 3>;
+				};
+				map3 {
+					trip = <&fanmid0>;
+					cooling-device = <&casefan 4 7>;
+				};
+				map4 {
+					trip = <&fanmax0>;
+					cooling-device = <&casefan 8 THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+	};
+
 	sfp_xg0: dpmac2-sfp {
 		compatible = "sff,sfp";
 		i2c-bus = <&sfplower_i2c>;
@@ -253,6 +289,20 @@ usbhub: usb-hub@2d {
 		reg = <0x2d>;
 	};
 
+	fan_controller: emc2301@2f {
+		compatible = "microchip,emc2305";
+		reg = <0x2f>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		#pwm-cells = <3>;
+
+		casefan: fan@0 {
+			reg = <0x0>;
+			pwms = <&fan_controller 26000 0 1>;
+			#cooling-cells = <2>;
+		};
+	};
+
 	uc: board-controller@7e {
 		compatible = "traverse,ten64-controller";
 		reg = <0x7e>;
-- 
2.51.2

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help