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- rockchip,temp-trips : The property is an array of 2-tuples items, and 21 each item consists of temperature in millicelsius and 22 pwm cooling state. This depends on CONFIG_ROCKCHIP_SYSTEM_MONITOR. 23 If add the property the fan cooling state will be changed 24 by system monitor. Otherwise, use the default thermal governor. 25 26Example: 27 fan0: pwm-fan { 28 compatible = "pwm-fan"; 29 #cooling-cells = <2>; 30 pwms = <&pwm 0 10000 0>; 31 cooling-levels = <0 102 170 230>; 32 }; 33 34 thermal-zones { 35 cpu_thermal: cpu-thermal { 36 thermal-sensors = <&tmu 0>; 37 polling-delay-passive = <0>; 38 polling-delay = <0>; 39 trips { 40 cpu_alert1: cpu-alert1 { 41 temperature = <100000>; /* millicelsius */ 42 hysteresis = <2000>; /* millicelsius */ 43 type = "passive"; 44 }; 45 }; 46 cooling-maps { 47 map0 { 48 trip = <&cpu_alert1>; 49 cooling-device = <&fan0 0 1>; 50 }; 51 }; 52 }; 53 54Example 2: 55 fan0: pwm-fan { 56 compatible = "pwm-fan"; 57 pwms = <&pwm 0 40000 0>; 58 fan-supply = <®_fan>; 59 interrupt-parent = <&gpio5>; 60 interrupts = <1 IRQ_TYPE_EDGE_FALLING>; 61 pulses-per-revolution = <2>; 62 }; 63