aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0480-Reduce-noise-from-rpi-poe-hat-fan.patch
blob: 7c50843102fd55412a29c95b63651b6a5c1438f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From 863dace20e48954a7e013a2e88e27c692ce165b0 Mon Sep 17 00:00:00 2001
From: Nick B <nick@pelagiris.org>
Date: Mon, 9 Mar 2020 09:05:39 -0400
Subject: [PATCH] Reduce noise from rpi poe hat fan

This adds 2 extra states, at 40c and 45c, with PWM of 31 and 63 (out
of 255) for the rpi poe hat fan.  This significantly improves user
experience by providing a smoother ramp up of the fan, from a pwm 0
to 31 to 63 then finally to 150, and additionally makes it very easy
for users to further tweak the values as needed for their specific
application.

The possible concerns I have are that a hysteresis of 2000 (2c) could
be too narrow, and that running the fan more at a reduced temperature
(40000 - 40c) could cause problems.

Signed-off-by: Nick B <nick@pelagiris.org>
---
 .../arm/boot/dts/overlays/rpi-poe-overlay.dts | 35 ++++++++++++++++---
 1 file changed, 30 insertions(+), 5 deletions(-)

--- a/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
+++ b/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
@@ -14,9 +14,9 @@
 				compatible = "raspberrypi,rpi-poe-fan";
 				firmware = <&firmware>;
 				cooling-min-state = <0>;
-				cooling-max-state = <2>;
+				cooling-max-state = <4>;
 				#cooling-cells = <2>;
-				cooling-levels = <0 150 255>;
+				cooling-levels = <0 31 63 150 255>;
 				status = "okay";
 			};
 		};
@@ -27,12 +27,21 @@
 		__overlay__ {
 			trips {
 				trip0: trip0 {
-					temperature = <50000>;
-					hysteresis = <5000>;
+					temperature = <40000>;
+					hysteresis = <2000>;
 					type = "active";
 				};
 				trip1: trip1 {
-
+					temperature = <45000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+				trip2: trip2 {
+					temperature = <50000>;
+					hysteresis = <2000>;
+					type = "active";
+				};
+				trip3: trip3 {
 					temperature = <55000>;
 					hysteresis = <5000>;
 					type = "active";
@@ -47,6 +56,14 @@
 					trip = <&trip1>;
 					cooling-device = <&fan0 1 2>;
 				};
+				map2 {
+					trip = <&trip2>;
+					cooling-device = <&fan0 2 3>;
+				};
+				map3 {
+					trip = <&trip3>;
+					cooling-device = <&fan0 3 4>;
+				};
 			};
 		};
 	};
@@ -58,6 +75,10 @@
 			poe_fan_temp0_hyst =	<&trip0>,"hysteresis:0";
 			poe_fan_temp1 =		<&trip1>,"temperature:0";
 			poe_fan_temp1_hyst =	<&trip1>,"hysteresis:0";
+			poe_fan_temp2 =		<&trip2>,"temperature:0";
+			poe_fan_temp2_hyst =	<&trip2>,"hysteresis:0";
+			poe_fan_temp3 =		<&trip3>,"temperature:0";
+			poe_fan_temp3_hyst =	<&trip3>,"hysteresis:0";
 		};
 	};
 
@@ -66,5 +87,9 @@
 		poe_fan_temp0_hyst =	<&trip0>,"hysteresis:0";
 		poe_fan_temp1 =		<&trip1>,"temperature:0";
 		poe_fan_temp1_hyst =	<&trip1>,"hysteresis:0";
+		poe_fan_temp2 =		<&trip2>,"temperature:0";
+		poe_fan_temp2_hyst =	<&trip2>,"hysteresis:0";
+		poe_fan_temp3 =		<&trip3>,"temperature:0";
+		poe_fan_temp3_hyst =	<&trip3>,"hysteresis:0";
 	};
 };