1Bindings for a fan connected to the PWM lines 2 3Required properties: 4- compatible : "pwm-fan" 5- pwms : the PWM that is used to control the PWM fan 6- cooling-levels : PWM duty cycle values in a range from 0 to 255 7 which correspond to thermal cooling states 8 9Optional properties: 10- fan-supply : phandle to the regulator that provides power to the fan 11- interrupts : This contains a single interrupt specifier which 12 describes the tachometer output of the fan as an 13 interrupt source. The output signal must generate a 14 defined number of interrupts per fan revolution, which 15 require that it must be self resetting edge interrupts. 16 See interrupt-controller/interrupts.txt for the format. 17- pulses-per-revolution : define the tachometer pulses per fan revolution as 18 an integer (default is 2 interrupts per revolution). 19 The value must be greater than zero. 20 21Example: 22 fan0: pwm-fan { 23 compatible = "pwm-fan"; 24 #cooling-cells = <2>; 25 pwms = <&pwm 0 10000 0>; 26 cooling-levels = <0 102 170 230>; 27 }; 28 29 thermal-zones { 30 cpu_thermal: cpu-thermal { 31 thermal-sensors = <&tmu 0>; 32 polling-delay-passive = <0>; 33 polling-delay = <0>; 34 trips { 35 cpu_alert1: cpu-alert1 { 36 temperature = <100000>; /* millicelsius */ 37 hysteresis = <2000>; /* millicelsius */ 38 type = "passive"; 39 }; 40 }; 41 cooling-maps { 42 map0 { 43 trip = <&cpu_alert1>; 44 cooling-device = <&fan0 0 1>; 45 }; 46 }; 47 }; 48 49Example 2: 50 fan0: pwm-fan { 51 compatible = "pwm-fan"; 52 pwms = <&pwm 0 40000 0>; 53 fan-supply = <®_fan>; 54 interrupt-parent = <&gpio5>; 55 interrupts = <1 IRQ_TYPE_EDGE_FALLING>; 56 pulses-per-revolution = <2>; 57 }; 58