]> www.infradead.org Git - users/willy/xarray.git/commitdiff
arm64: dts: imx8mp-phyboard-pollux-rdk: add gpio-fan
authorYannic Moog <y.moog@phytec.de>
Tue, 24 Sep 2024 07:53:04 +0000 (09:53 +0200)
committerShawn Guo <shawnguo@kernel.org>
Thu, 17 Oct 2024 08:46:22 +0000 (16:46 +0800)
A GPIO fan may be connected to Pollux fan header. The fan should
activate at 60°C and stay active until critical SoC temperature is
reached and the board shuts down.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts

index 50debe821c4212464bf87a5fbfa96b2403f1a186..9b551a50533f4636b7aec6c4c73754e2bc823dbb 100644 (file)
@@ -9,6 +9,7 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 #include <dt-bindings/leds/leds-pca9532.h>
 #include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/thermal/thermal.h>
 #include "imx8mp-phycore-som.dtsi"
 
 / {
                pwms = <&pwm3 0 50000 0>;
        };
 
+       fan0: fan {
+               compatible = "gpio-fan";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_fan>;
+               gpio-fan,speed-map = <0     0
+                                     13000 1>;
+               gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
+               #cooling-cells = <2>;
+       };
+
        panel1_lvds: panel-lvds {
                compatible = "edt,etml1010g3dra";
                backlight = <&backlight_lvds>;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
        };
+
+       thermal-zones {
+               soc-thermal {
+                       trips {
+                               active1: trip2 {
+                                       temperature = <60000>;
+                                       hysteresis = <2000>;
+                                       type = "active";
+                               };
+                       };
+
+                       cooling-maps {
+                               map1 {
+                                       trip = <&active1>;
+                                       cooling-device = <&fan0 1 THERMAL_NO_LIMIT>;
+                               };
+                       };
+               };
+       };
 };
 
 /* TPM */
                >;
        };
 
+       pinctrl_fan: fan0grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_SPDIF_RX__GPIO5_IO04       0x16
+               >;
+       };
+
        pinctrl_flexcan1: flexcan1grp {
                fsl,pins = <
                        MX8MP_IOMUXC_SAI5_RXD2__CAN1_RX         0x154