forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/Documentation/devicetree/bindings/hwmon/pwm-fan.txt
....@@ -6,11 +6,26 @@
66 - cooling-levels : PWM duty cycle values in a range from 0 to 255
77 which correspond to thermal cooling states
88
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
+- 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
+
926 Example:
1027 fan0: pwm-fan {
1128 compatible = "pwm-fan";
12
- cooling-min-state = <0>;
13
- cooling-max-state = <3>;
1429 #cooling-cells = <2>;
1530 pwms = <&pwm 0 10000 0>;
1631 cooling-levels = <0 102 170 230>;
....@@ -35,3 +50,13 @@
3550 };
3651 };
3752 };
53
+
54
+Example 2:
55
+ fan0: pwm-fan {
56
+ compatible = "pwm-fan";
57
+ pwms = <&pwm 0 40000 0>;
58
+ fan-supply = <&reg_fan>;
59
+ interrupt-parent = <&gpio5>;
60
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
61
+ pulses-per-revolution = <2>;
62
+ };