[Phanbell] Enable Fan at 65C * When the temperature drops back to 55, disable again. Change-Id: I682114d238eb3aaeae260eb0494983c31c610ce1
diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8mq-som.dtsi b/arch/arm64/boot/dts/freescale/fsl-imx8mq-som.dtsi index 6461ed1..106ee49 100644 --- a/arch/arm64/boot/dts/freescale/fsl-imx8mq-som.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-imx8mq-som.dtsi
@@ -64,6 +64,12 @@ status ="okay"; }; + fan: gpio_fan { + compatible = "gpio-fan"; + gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; + gpio-fan,speed-map = <0 0>, <8600 1>; + #cooling-cells = <2>; + }; }; &clk { @@ -133,7 +139,6 @@ pinctrl_typec: typecgrp { fsl,pins = < - MX8MQ_IOMUXC_NAND_CLE_GPIO3_IO5 0x16 MX8MQ_IOMUXC_NAND_ALE_GPIO3_IO0 0x19 >; }; @@ -706,3 +711,20 @@ }; }; }; + +&cpu_thermal { + trips { + fan_toggle0: trip4 { + temperature = <65000>; + hysteresis = <10000>; + type = "active"; + }; + }; + + cooling-maps { + map4 { + trip = <&fan_toggle0>; + cooling-device = <&fan 0 1>; + }; + }; +};
diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8mq.dtsi b/arch/arm64/boot/dts/freescale/fsl-imx8mq.dtsi index 30b7d21..f444cf8a 100644 --- a/arch/arm64/boot/dts/freescale/fsl-imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-imx8mq.dtsi
@@ -415,9 +415,9 @@ }; }; - thermal-zones { + thermal_zones: thermal-zones { /* cpu thermal */ - cpu-thermal { + cpu_thermal: cpu-thermal { polling-delay-passive = <250>; polling-delay = <2000>; thermal-sensors = <&tmu>;