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 an interrupt specifier for each fan 12 tachometer output connected to an interrupt source. 13 The output signal must generate a defined number of 14 interrupts per fan revolution, which require that 15 it must be self resetting edge interrupts. See 16 interrupt-controller/interrupts.txt for the format. 17- pulses-per-revolution : define the number of pulses per fan revolution for 18 each tachometer input as an integer (default is 2 19 interrupts per revolution). The value must be 20 greater than zero. 21 22Example: 23 fan0: pwm-fan { 24 compatible = "pwm-fan"; 25 #cooling-cells = <2>; 26 pwms = <&pwm 0 10000 0>; 27 cooling-levels = <0 102 170 230>; 28 }; 29 30 thermal-zones { 31 cpu_thermal: cpu-thermal { 32 thermal-sensors = <&tmu 0>; 33 polling-delay-passive = <0>; 34 polling-delay = <0>; 35 trips { 36 cpu_alert1: cpu-alert1 { 37 temperature = <100000>; /* millicelsius */ 38 hysteresis = <2000>; /* millicelsius */ 39 type = "passive"; 40 }; 41 }; 42 cooling-maps { 43 map0 { 44 trip = <&cpu_alert1>; 45 cooling-device = <&fan0 0 1>; 46 }; 47 }; 48 }; 49 50Example 2: 51 fan0: pwm-fan { 52 compatible = "pwm-fan"; 53 pwms = <&pwm 0 40000 0>; 54 fan-supply = <®_fan>; 55 interrupt-parent = <&gpio5>; 56 interrupts = <1 IRQ_TYPE_EDGE_FALLING>; 57 pulses-per-revolution = <2>; 58 }; 59 60Example 3: 61 fan0: pwm-fan { 62 compatible = "pwm-fan"; 63 pwms = <&pwm1 0 25000 0>; 64 interrupts-extended = <&gpio1 1 IRQ_TYPE_EDGE_FALLING>, 65 <&gpio2 5 IRQ_TYPE_EDGE_FALLING>; 66 pulses-per-revolution = <2>, <1>; 67 }; 68