]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - Documentation/devicetree/bindings/hwmon/pwm-fan.txt
powerpc/cacheinfo: Remove double free
[mirror_ubuntu-hirsute-kernel.git] / Documentation / devicetree / bindings / hwmon / pwm-fan.txt
1 Bindings for a fan connected to the PWM lines
2
3 Required 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
9 Optional 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
21 Example:
22 fan0: pwm-fan {
23 compatible = "pwm-fan";
24 cooling-min-state = <0>;
25 cooling-max-state = <3>;
26 #cooling-cells = <2>;
27 pwms = <&pwm 0 10000 0>;
28 cooling-levels = <0 102 170 230>;
29 };
30
31 thermal-zones {
32 cpu_thermal: cpu-thermal {
33 thermal-sensors = <&tmu 0>;
34 polling-delay-passive = <0>;
35 polling-delay = <0>;
36 trips {
37 cpu_alert1: cpu-alert1 {
38 temperature = <100000>; /* millicelsius */
39 hysteresis = <2000>; /* millicelsius */
40 type = "passive";
41 };
42 };
43 cooling-maps {
44 map0 {
45 trip = <&cpu_alert1>;
46 cooling-device = <&fan0 0 1>;
47 };
48 };
49 };
50
51 Example 2:
52 fan0: pwm-fan {
53 compatible = "pwm-fan";
54 pwms = <&pwm 0 40000 0>;
55 fan-supply = <&reg_fan>;
56 interrupt-parent = <&gpio5>;
57 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
58 pulses-per-revolution = <2>;
59 };