Skip to contentSkip to conversation

Subject: [PATCH v1 0/7] Add mt7986 thermal and pwm

PATCH Applied Frank Wunderlich 5 participants 17 messages Apr 21, 2023 – May 29, 2023

Subsystems (4)

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

From: Frank Wunderlich <[email protected]>

This series add thermal and pwm related devicetree-nodes and necessary dt-bindings.

I left pwm-fan for r3 for now as i cannot test this completely due to missing 2 pin-jack and 3v3 pwm-level which my fan cannot handle (starts spinning at ~3V).

Daniel Golle (4):
arm64: dts: mt7986: add thermal and efuse
arm64: dts: mt7986: add PWM
arm64: dts: mt7986: add thermal-zones
arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts

Frank Wunderlich (3):
dt-bindings: nvmem: mediatek: efuse: add support for mt7986
dt-bindings: iio: adc: Add support for MT7986
arm64: dts: mt7986: add PWM to BPI-R3

 .../iio/adc/mediatek,mt2701-auxadc.yaml       |  1 +
 .../bindings/nvmem/mediatek,efuse.yaml        |  1 +
 .../dts/mediatek/mt7986a-bananapi-bpi-r3.dts  | 44 +++++++++
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi     | 89 +++++++++++++++++++
 4 files changed, 135 insertions(+)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/7 dt-bindings: nvmem: mediatek: efuse: add support for mt7986

From: Frank Wunderlich <[email protected]>

Add compatible string for mt7986 SoC.

---
 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +1 -0
index 75e0a516e59a..e3894f9d566e 100644
@@ -27,6 +27,7 @@ properties:
           - enum:
               - mediatek,mt7622-efuse
               - mediatek,mt7623-efuse
+              - mediatek,mt7986-efuse
               - mediatek,mt8173-efuse
               - mediatek,mt8183-efuse
               - mediatek,mt8186-efuse
Signature · 1 line
2.34.1
maintainer
#4 lore raw

Re: [PATCH v1 1/7] dt-bindings: nvmem: mediatek: efuse: add support for mt7986

In reply to Frank Wunderlich

+Srinivas as he is the maintainer

Quoted 14 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add compatible string for mt7986 SoC.

---
  Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml | 1 +
  1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +0 -0
index 75e0a516e59a..e3894f9d566e 100644

Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml properties: · line 30

Quoted 4 lines
Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +1 -0
@@ -27,6 +27,7 @@ properties:
            - enum:
                - mediatek,mt7622-efuse
                - mediatek,mt7623-efuse
+              - mediatek,mt7986-efuse

Srinivas, will you take this patch through your tree or would you prefer that I take it through the my MediaTek arm-soc tree? It's a trivial patch.

Best regards,
Matthias

Quoted 3 lines
Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +0 -0
                - mediatek,mt8173-efuse
                - mediatek,mt8183-efuse
                - mediatek,mt8186-efuse
#5 lore raw

PATCH 2/7 dt-bindings: iio: adc: Add support for MT7986

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add compatible string and specific clock property for mt7986.

---
 .../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml      | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml +1 -0
index 7f79a06e76f5..6168b44ea72c 100644
@@ -26,6 +26,7 @@ properties:
           - mediatek,mt2712-auxadc
           - mediatek,mt6765-auxadc
           - mediatek,mt7622-auxadc
+          - mediatek,mt7986-auxadc
           - mediatek,mt8173-auxadc
       - items:
           - enum:
Signature · 1 line
2.34.1
maintainer
#6 lore raw

Re: [PATCH v1 2/7] dt-bindings: iio: adc: Add support for MT7986

Quoted 5 lines · On Fri, 21 Apr 2023 15:20:42 +0200 Frank Wunderlich <[email protected]> wrote:

From: Frank Wunderlich <[email protected]>

Add compatible string and specific clock property for mt7986.

Given how trivial this is, I'll apply it without waiting for the DT maintainers to get to it.

Applied to the togreg branch of iio.git and pushed out as testing for 0-day to take a look at it.

Thanks,

Jonathan

Quoted 16 lines
---
 .../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml      | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml +1 -0
index 7f79a06e76f5..6168b44ea72c 100644
@@ -26,6 +26,7 @@ properties:
           - mediatek,mt2712-auxadc
           - mediatek,mt6765-auxadc
           - mediatek,mt7622-auxadc
+          - mediatek,mt7986-auxadc
           - mediatek,mt8173-auxadc
       - items:
           - enum:
#7 lore raw

Aw: Re: [PATCH v1 2/7] dt-bindings: iio: adc: Add support for MT7986

regards Frank

Quoted 13 lines

Gesendet: Sonntag, 23. April 2023 um 15:02 Uhr
Von: "Jonathan Cameron" <[email protected]>
An: "Frank Wunderlich" <[email protected]>
Cc: [email protected], "Frank Wunderlich" <[email protected]>, "Lars-Peter Clausen" <[email protected]>, "Rob Herring" <[email protected]>, "Krzysztof Kozlowski" <[email protected]>, "Matthias Brugger" <[email protected]>, "AngeloGioacchino Del Regno" <[email protected]>, "Srinivas Kandagatla" <[email protected]>, "Hui.Liu" <[email protected]>, "Zhiyong Tao" <[email protected]>, "Andrew-CT Chen" <[email protected]>, "Lala Lin" <[email protected]>, [email protected], [email protected], [email protected], [email protected], "Daniel Golle" <[email protected]>
Betreff: Re: [PATCH v1 2/7] dt-bindings: iio: adc: Add support for MT7986

Quoted 4 lines · On Fri, 21 Apr 2023 15:20:42 +0200 Frank Wunderlich <[email protected]> wrote:

From: Frank Wunderlich <[email protected]>

Add compatible string and specific clock property for mt7986.

Quoted 7 lines
Quoted 1 line

Given how trivial this is, I'll apply it without waiting for the DT maintainers to get to it.

Applied to the togreg branch of iio.git and pushed out as testing for 0-day to take a look at it.

Hi,

i cannot find it in next and here:

https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml?h=togreg

was it dropped?

regards Frank

Quoted 22 lines

Thanks,

Jonathan

Quoted 16 lines
---
 .../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml      | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml +1 -0
index 7f79a06e76f5..6168b44ea72c 100644
@@ -26,6 +26,7 @@ properties:
           - mediatek,mt2712-auxadc
           - mediatek,mt6765-auxadc
           - mediatek,mt7622-auxadc
+          - mediatek,mt7986-auxadc
           - mediatek,mt8173-auxadc
       - items:
           - enum:
maintainer
#8 lore raw

Re: [PATCH v1 2/7] dt-bindings: iio: adc: Add support for MT7986

Quoted 24 lines · On Mon, 8 May 2023 17:53:01 +0200 Frank Wunderlich <[email protected]>…

regards Frank

Quoted 13 lines

Gesendet: Sonntag, 23. April 2023 um 15:02 Uhr
Von: "Jonathan Cameron" <[email protected]>
An: "Frank Wunderlich" <[email protected]>
Cc: [email protected], "Frank Wunderlich" <[email protected]>, "Lars-Peter Clausen" <[email protected]>, "Rob Herring" <[email protected]>, "Krzysztof Kozlowski" <[email protected]>, "Matthias Brugger" <[email protected]>, "AngeloGioacchino Del Regno" <[email protected]>, "Srinivas Kandagatla" <[email protected]>, "Hui.Liu" <[email protected]>, "Zhiyong Tao" <[email protected]>, "Andrew-CT Chen" <[email protected]>, "Lala Lin" <[email protected]>, [email protected], [email protected], [email protected], [email protected], "Daniel Golle" <[email protected]>
Betreff: Re: [PATCH v1 2/7] dt-bindings: iio: adc: Add support for MT7986

Quoted 4 lines · On Fri, 21 Apr 2023 15:20:42 +0200 Frank Wunderlich <[email protected]> wrote:

From: Frank Wunderlich <[email protected]>

Add compatible string and specific clock property for mt7986.

Quoted 7 lines
Quoted 1 line

Given how trivial this is, I'll apply it without waiting for the DT maintainers to get to it.

Applied to the togreg branch of iio.git and pushed out as testing for 0-day to take a look at it.

Quoted 8 lines

Hi,

i cannot find it in next and here:

https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml?h=togreg

was it dropped?

Not dropped, just delayed a little by timing issues.

Delay for a couple of reasons.
1) Pushed out as mentioned above as testing - specifically not to be included in next until I've gotten reports from the autobuilder tests. Normally I would push that out as togreg to be picked up for next around a week later depending on when I next look at IIO patches. But...
2) This was very near the merge window, so I didn't want to put things in next that weren't going in during the merge window + I wanted to be able to rebase on v6.4-rc1 (the togreg public branch is not supposed to ever be rebased unless something has gone wrong). I've just done that rebase and once my local test builds are finished will push out.

So should be visible shortly. These delays are common around merge window time.

Should now be resolved though.

Jonathan

Quoted 24 lines

regards Frank

Quoted 22 lines

Thanks,

Jonathan

Quoted 16 lines
---
 .../devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml      | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml +1 -0
index 7f79a06e76f5..6168b44ea72c 100644
@@ -26,6 +26,7 @@ properties:
           - mediatek,mt2712-auxadc
           - mediatek,mt6765-auxadc
           - mediatek,mt7622-auxadc
+          - mediatek,mt7986-auxadc
           - mediatek,mt8173-auxadc
       - items:
           - enum:  
#9 lore raw

PATCH 3/7 arm64: dts: mt7986: add thermal and efuse

In reply to Frank Wunderlich

From: Daniel Golle <[email protected]>

Add thermal related nodes to mt7986 devicetree.

---
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 37 ++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +36 -1
index 51944690e790..a38965e23825 100644
@@ -323,6 +323,15 @@ spi1: spi@1100b000 {
 			status = "disabled";
 		};
 
+		auxadc: adc@1100d000 {
+			compatible = "mediatek,mt7986-auxadc";
+			reg = <0 0x1100d000 0 0x1000>;
+			clocks = <&infracfg CLK_INFRA_ADC_26M_CK>;
+			clock-names = "main";
+			#io-channel-cells = <1>;
+			status = "disabled";
+		};
+
 		ssusb: usb@11200000 {
 			compatible = "mediatek,mt7986-xhci",
 				     "mediatek,mtk-xhci";
@@ -361,6 +370,21 @@ mmc0: mmc@11230000 {
 			status = "disabled";
 		};
 
+		thermal: thermal@1100c800 {
+			#thermal-sensor-cells = <1>;
+			compatible = "mediatek,mt7986-thermal";
+			reg = <0 0x1100c800 0 0x800>;
+			interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&infracfg CLK_INFRA_THERM_CK>,
+				 <&infracfg CLK_INFRA_ADC_26M_CK>,
+				 <&infracfg CLK_INFRA_ADC_FRC_CK>;
+			clock-names = "therm", "auxadc", "adc_32k";
+			mediatek,auxadc = <&auxadc>;
+			mediatek,apmixedsys = <&apmixedsys>;
+			nvmem-cells = <&thermal_calibration>;
+			nvmem-cell-names = "calibration-data";
+		};
+
 		pcie: pcie@11280000 {
 			compatible = "mediatek,mt7986-pcie",
 				     "mediatek,mt8192-pcie";
@@ -412,6 +436,18 @@ pcie_port: pcie-phy@11c00000 {
 			};
 		};
 
+		efuse: efuse@11d00000 {
+			compatible = "mediatek,mt7986-efuse",
+				     "mediatek,efuse";
+			reg = <0 0x11d00000 0 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			thermal_calibration: calib@274 {
+				reg = <0x274 0xc>;
+			};
+		};
+
 		usb_phy: t-phy@11e10000 {
 			compatible = "mediatek,mt7986-tphy",
 				     "mediatek,generic-tphy-v2";
@@ -553,5 +589,4 @@ wifi: wifi@18000000 {
 			memory-region = <&wmcpu_emi>;
 		};
 	};
-
 };
Signature · 1 line
2.34.1
#10 lore raw

PATCH 4/7 arm64: dts: mt7986: add PWM

In reply to Frank Wunderlich

From: Daniel Golle <[email protected]>

This adds pwm node to mt7986.

---
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +14 -0
index a38965e23825..a409d5e845c2 100644
@@ -240,6 +240,20 @@ crypto: crypto@10320000 {
 			status = "disabled";
 		};
 
+		pwm: pwm@10048000 {
+			compatible = "mediatek,mt7986-pwm";
+			reg = <0 0x10048000 0 0x1000>;
+			#clock-cells = <1>;
+			#pwm-cells = <2>;
+			interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&topckgen CLK_TOP_PWM_SEL>,
+				 <&infracfg CLK_INFRA_PWM_STA>,
+				 <&infracfg CLK_INFRA_PWM1_CK>,
+				 <&infracfg CLK_INFRA_PWM2_CK>;
+			clock-names = "top", "main", "pwm1", "pwm2";
+			status = "disabled";
+		};
+
 		uart0: serial@11002000 {
 			compatible = "mediatek,mt7986-uart",
 				     "mediatek,mt6577-uart";
Signature · 1 line
2.34.1
maintainer Applied
#11 lore raw

Re: [PATCH v1 4/7] arm64: dts: mt7986: add PWM

Quoted 6 lines · Frank Wunderlich

From: Daniel Golle <[email protected]>

This adds pwm node to mt7986.

Applied, thanks

Quoted 29 lines
---
  arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +14 -0
index a38965e23825..a409d5e845c2 100644
@@ -240,6 +240,20 @@ crypto: crypto@10320000 {
  			status = "disabled";
  		};
 
+		pwm: pwm@10048000 {
+			compatible = "mediatek,mt7986-pwm";
+			reg = <0 0x10048000 0 0x1000>;
+			#clock-cells = <1>;
+			#pwm-cells = <2>;
+			interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&topckgen CLK_TOP_PWM_SEL>,
+				 <&infracfg CLK_INFRA_PWM_STA>,
+				 <&infracfg CLK_INFRA_PWM1_CK>,
+				 <&infracfg CLK_INFRA_PWM2_CK>;
+			clock-names = "top", "main", "pwm1", "pwm2";
+			status = "disabled";
+		};
+
  		uart0: serial@11002000 {
  			compatible = "mediatek,mt7986-uart",
  				     "mediatek,mt6577-uart";
#12 lore raw

PATCH 5/7 arm64: dts: mt7986: add PWM to BPI-R3

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add pwm node and pinctrl to BananaPi R3 devicetree.

---
 .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts   | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +13 -0
index 2b028141f1f7..782519429497 100644
@@ -274,6 +274,13 @@ mux {
 		};
 	};
 
+	pwm_pins: pwm-pins {
+		mux {
+			function = "pwm";
+			groups = "pwm0", "pwm1_0";
+		};
+	};
+
 	spi_flash_pins: spi-flash-pins {
 		mux {
 			function = "spi";
@@ -344,6 +351,12 @@ mux {
 	};
 };
 
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins>;
+	status = "okay";
+};
+
 &spi0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&spi_flash_pins>;
Signature · 1 line
2.34.1
maintainer Applied
#13 lore raw

Re: [PATCH v1 5/7] arm64: dts: mt7986: add PWM to BPI-R3

Quoted 5 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Add pwm node and pinctrl to BananaPi R3 devicetree.

Applied, thanks

Quoted 35 lines
---
  .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts   | 13 +++++++++++++
  1 file changed, 13 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +13 -0
index 2b028141f1f7..782519429497 100644
@@ -274,6 +274,13 @@ mux {
  		};
  	};
 
+	pwm_pins: pwm-pins {
+		mux {
+			function = "pwm";
+			groups = "pwm0", "pwm1_0";
+		};
+	};
+
  	spi_flash_pins: spi-flash-pins {
  		mux {
  			function = "spi";
@@ -344,6 +351,12 @@ mux {
  	};
  };
 
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins>;
+	status = "okay";
+};
+
  &spi0 {
  	pinctrl-names = "default";
  	pinctrl-0 = <&spi_flash_pins>;
#14 lore raw

PATCH 6/7 arm64: dts: mt7986: add thermal-zones

In reply to Frank Wunderlich

From: Daniel Golle <[email protected]>

Add thermal-zones to mt7986 devicetree.

---
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 40 +++++++++++++++++++++++
 1 file changed, 40 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +40 -0
index a409d5e845c2..845b29a9664a 100644
@@ -603,4 +603,44 @@ wifi: wifi@18000000 {
 			memory-region = <&wmcpu_emi>;
 		};
 	};
+
+	thermal-zones {
+		cpu_thermal: cpu-thermal {
+			polling-delay-passive = <1000>;
+			polling-delay = <1000>;
+			thermal-sensors = <&thermal 0>;
+
+			trips {
+				cpu_trip_crit: crit {
+					temperature = <125000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu_trip_hot: hot {
+					temperature = <120000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+
+				cpu_trip_active_high: active-high {
+					temperature = <115000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+
+				cpu_trip_active_low: active-low {
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+
+				cpu_trip_passive: passive {
+					temperature = <40000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+			};
+		};
+	};
 };
Signature · 1 line
2.34.1
maintainer
#15 lore raw

Re: [PATCH v1 6/7] arm64: dts: mt7986: add thermal-zones

Quoted 27 lines · Frank Wunderlich

From: Daniel Golle <[email protected]>

Add thermal-zones to mt7986 devicetree.

---
  arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 40 +++++++++++++++++++++++
  1 file changed, 40 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +9 -0
index a409d5e845c2..845b29a9664a 100644
@@ -603,4 +603,44 @@ wifi: wifi@18000000 {
  			memory-region = <&wmcpu_emi>;
  		};
  	};
+
+	thermal-zones {
+		cpu_thermal: cpu-thermal {
+			polling-delay-passive = <1000>;
+			polling-delay = <1000>;
+			thermal-sensors = <&thermal 0>;
+
+			trips {
+				cpu_trip_crit: crit {

arch/arm64/boot/dts/mediatek/mt7986a.dtsi wifi: wifi@18000000 { · line 624

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +10 -0
+					temperature = <125000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu_trip_hot: hot {
+					temperature = <120000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};

We don't use above two trips. Please drop them for now.

Regards,
Matthias

Quoted 22 lines
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +21 -0
+
+				cpu_trip_active_high: active-high {
+					temperature = <115000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+
+				cpu_trip_active_low: active-low {
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+
+				cpu_trip_passive: passive {
+					temperature = <40000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+			};
+		};
+	};
  };
#16 lore raw

PATCH 7/7 arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts

In reply to Frank Wunderlich

From: Daniel Golle <[email protected]>

Add pwm-fan and cooling-maps to BananaPi-R3 devicetree.

---
this is based on Patch from openwrt. as my PWM-fan seems to need 5v pwm signal and r3 only provides 3v3 on 3pin-socket it does not work for me.

---
 .../dts/mediatek/mt7986a-bananapi-bpi-r3.dts  | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +31 -0
index 782519429497..29c018bbf29d 100644
@@ -37,6 +37,15 @@ dcin: regulator-12vd {
 		regulator-always-on;
 	};
 
+	fan: pwm-fan {
+		compatible = "pwm-fan";
+		#cooling-cells = <2>;
+		/* cooling level (0, 1, 2) - pwm inverted */
+		cooling-levels = <255 96 0>;
+		pwms = <&pwm 0 10000 0>;
+		status = "okay";
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -132,6 +141,28 @@ sfp2: sfp-2 {
 	};
 };
 
+&cpu_thermal {
+	cooling-maps {
+		cpu-active-high {
+			/* active: set fan to cooling level 2 */
+			cooling-device = <&fan 2 2>;
+			trip = <&cpu_trip_active_high>;
+		};
+
+		cpu-active-low {
+			/* active: set fan to cooling level 1 */
+			cooling-device = <&fan 1 1>;
+			trip = <&cpu_trip_active_low>;
+		};
+
+		cpu-passive {
+			/* passive: set fan to cooling level 0 */
+			cooling-device = <&fan 0 0>;
+			trip = <&cpu_trip_passive>;
+		};
+	};
+};
+
 &crypto {
 	status = "okay";
 };
Signature · 1 line
2.34.1