Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) Bindings for a fan connected to the PWM lines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) - compatible	: "pwm-fan"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) - pwms		: the PWM that is used to control the PWM fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) - cooling-levels      : PWM duty cycle values in a range from 0 to 255
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 			which correspond to thermal cooling states
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) Optional properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - fan-supply		: phandle to the regulator that provides power to the fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - interrupts		: This contains a single interrupt specifier which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 			  describes the tachometer output of the fan as an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 			  interrupt source. The output signal must generate a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 			  defined number of interrupts per fan revolution, which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 			  require that it must be self resetting edge interrupts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 			  See interrupt-controller/interrupts.txt for the format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) - pulses-per-revolution : define the tachometer pulses per fan revolution as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 			  an integer (default is 2 interrupts per revolution).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 			  The value must be greater than zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) - rockchip,temp-trips	: The property is an array of 2-tuples items, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 			  each item consists of temperature in millicelsius and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 			  pwm cooling state. This depends on CONFIG_ROCKCHIP_SYSTEM_MONITOR.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 			  If add the property the fan cooling state will be changed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 			  by system monitor. Otherwise, use the default thermal governor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	fan0: pwm-fan {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 		compatible = "pwm-fan";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 		#cooling-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 		pwms = <&pwm 0 10000 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 		cooling-levels = <0 102 170 230>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	thermal-zones {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 		cpu_thermal: cpu-thermal {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 			     thermal-sensors = <&tmu 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 			     polling-delay-passive = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 			     polling-delay = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 			     trips {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 					cpu_alert1: cpu-alert1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 						    temperature = <100000>; /* millicelsius */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 						    hysteresis = <2000>; /* millicelsius */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 						    type = "passive";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 					};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 			     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 			     cooling-maps {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 					map0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 						    trip = <&cpu_alert1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 						    cooling-device = <&fan0 0 1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 					};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 			     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) Example 2:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 	fan0: pwm-fan {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 		compatible = "pwm-fan";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 		pwms = <&pwm 0 40000 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 		fan-supply = <&reg_fan>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 		interrupt-parent = <&gpio5>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 		pulses-per-revolution = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 	};