Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Mathew McBride <matt@traverse.com.au>
To: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	jdelvare@suse.com, linux@roeck-us.net,
	krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
	leoyang.li@nxp.com, robh+dt@kernel.org,
	linux-kernel@vger.kernel.org
Cc: Mathew McBride <matt@traverse.com.au>
Subject: [PATCH 3/3] arm64: dts: ten64: add configuration for fan controller
Date: Wed, 14 Sep 2022 05:30:30 +0000	[thread overview]
Message-ID: <20220914053030.8929-4-matt@traverse.com.au> (raw)
In-Reply-To: <20220914053030.8929-1-matt@traverse.com.au>

The Ten64 desktop appliance has a Noctua NF-A4x20 PWM fan,
controlled by a Microchip EMC2301 PWM fan controller.

This binding allows the fan speed to be slowed to a
quieter level when the system is not busy.

Reference: https://ten64doc.traverse.com.au/hardware/fan-control/

Signed-off-by: Mathew McBride <matt@traverse.com.au>
---
 .../boot/dts/freescale/fsl-ls1088a-ten64.dts  | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts
index ef6c8967533e..fd8261c9a186 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-ten64.dts
@@ -87,6 +87,35 @@ sfp_xg1: dpmac1-sfp {
 		los-gpios = <&sfpgpio 7 GPIO_ACTIVE_HIGH>;
 		maximum-power-milliwatt = <2000>;
 	};
+
+	thermal-zones {
+		soc {
+			trips {
+				fanmid0: fanmid0 {
+					temperature = <60000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+
+				fanmax0: fanmax0 {
+					temperature = <70000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+			};
+
+			cooling-maps {
+				map2 {
+					trip = <&fanmid0>;
+					cooling-device = <&case_fan 0 6>;
+				};
+				map3 {
+					trip = <&fanmax0>;
+					cooling-device = <&case_fan 7 THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+	};
 };
 
 /* XG1 - Upper SFP */
@@ -231,6 +260,20 @@ at97sc: tpm@29 {
 		compatible = "atmel,at97sc3204t";
 		reg = <0x29>;
 	};
+
+	fanctrl: emc2301@2f {
+		reg = <0x2f>;
+		compatible = "microchip,emc2301";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		case_fan: fan@0 {
+			reg = <0>;
+			min-rpm = /bits/ 16 <3000>;
+			max-rpm = /bits/ 16 <5500>;
+			#cooling-cells = <2>;
+		};
+	};
 };
 
 &i2c2 {
-- 
2.30.1


  parent reply	other threads:[~2022-09-14  5:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  5:30 [PATCH 0/3] hwmon: add Microchip EMC230X fan controller driver Mathew McBride
2022-09-14  5:30 ` [PATCH 1/3] hwmon: (emc230x) add Microchip (SMSC) EMC230X fan controller support Mathew McBride
2022-09-14  5:30 ` [PATCH 2/3] dt-bindings: add binding for Microchip EMC230X fan controller family Mathew McBride
2022-09-14  5:30 ` Mathew McBride [this message]
2022-09-14 10:12 ` [PATCH 0/3] hwmon: add Microchip EMC230X fan controller driver Guenter Roeck
2022-09-14 10:24   ` Mathew McBride

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=20220914053030.8929-4-matt@traverse.com.au \
    --to=matt@traverse.com.au \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.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