0001 Bindings for a fan connected to the PWM lines
0002
0003 Required properties:
0004 - compatible : "pwm-fan"
0005 - pwms : the PWM that is used to control the PWM fan
0006 - cooling-levels : PWM duty cycle values in a range from 0 to 255
0007 which correspond to thermal cooling states
0008
0009 Optional properties:
0010 - fan-supply : phandle to the regulator that provides power to the fan
0011 - interrupts : This contains an interrupt specifier for each fan
0012 tachometer output connected to an interrupt source.
0013 The output signal must generate a defined number of
0014 interrupts per fan revolution, which require that
0015 it must be self resetting edge interrupts. See
0016 interrupt-controller/interrupts.txt for the format.
0017 - pulses-per-revolution : define the number of pulses per fan revolution for
0018 each tachometer input as an integer (default is 2
0019 interrupts per revolution). The value must be
0020 greater than zero.
0021
0022 Example:
0023 fan0: pwm-fan {
0024 compatible = "pwm-fan";
0025 #cooling-cells = <2>;
0026 pwms = <&pwm 0 10000 0>;
0027 cooling-levels = <0 102 170 230>;
0028 };
0029
0030 thermal-zones {
0031 cpu_thermal: cpu-thermal {
0032 thermal-sensors = <&tmu 0>;
0033 polling-delay-passive = <0>;
0034 polling-delay = <0>;
0035 trips {
0036 cpu_alert1: cpu-alert1 {
0037 temperature = <100000>; /* millicelsius */
0038 hysteresis = <2000>; /* millicelsius */
0039 type = "passive";
0040 };
0041 };
0042 cooling-maps {
0043 map0 {
0044 trip = <&cpu_alert1>;
0045 cooling-device = <&fan0 0 1>;
0046 };
0047 };
0048 };
0049
0050 Example 2:
0051 fan0: pwm-fan {
0052 compatible = "pwm-fan";
0053 pwms = <&pwm 0 40000 0>;
0054 fan-supply = <®_fan>;
0055 interrupt-parent = <&gpio5>;
0056 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
0057 pulses-per-revolution = <2>;
0058 };
0059
0060 Example 3:
0061 fan0: pwm-fan {
0062 compatible = "pwm-fan";
0063 pwms = <&pwm1 0 25000 0>;
0064 interrupts-extended = <&gpio1 1 IRQ_TYPE_EDGE_FALLING>,
0065 <&gpio2 5 IRQ_TYPE_EDGE_FALLING>;
0066 pulses-per-revolution = <2>, <1>;
0067 };