Skip to content

Commit 007d406

Browse files
committed
rockchip: refine fan speed for mmbox anas3035
1 parent 1609903 commit 007d406

File tree

2 files changed

+48
-33
lines changed

2 files changed

+48
-33
lines changed

package/boot/uboot-rockchip/patches/318-rockchip-rk3568-Add-support-for-mmbox-anas3035.patch

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
+};
1919
--- /dev/null
2020
+++ b/arch/arm/dts/rk3568-mmbox-anas3035.dts
21-
@@ -0,0 +1,758 @@
21+
@@ -0,0 +1,762 @@
2222
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2323
+
2424
+/dts-v1/;
@@ -48,34 +48,27 @@
4848
+ pinctrl-0 = <&power_led_pin>, <&sata0_pins>, <&sata1_pins>, <&sata2_pins>;
4949
+
5050
+ power_led: led-0 {
51-
+ color = <LED_COLOR_ID_RED>;
52-
+ function = LED_FUNCTION_POWER;
51+
+ label = "red:power";
5352
+ gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
5453
+ };
5554
+
5655
+ sata0_led: led-1 {
57-
+ color = <LED_COLOR_ID_BLUE>;
58-
+ function = LED_FUNCTION_DISK;
59-
+ /* for to sata2 slot */
60-
+ function-enumerator = <3>;
56+
+ /* for sata2 slot */
57+
+ label = "blue:sata3";
6158
+ gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
6259
+ linux,default-trigger = "disk-activity";
6360
+ };
6461
+
6562
+ sata1_led: led-2 {
66-
+ color = <LED_COLOR_ID_BLUE>;
67-
+ function = LED_FUNCTION_DISK;
68-
+ /* for to sata0 slot */
69-
+ function-enumerator = <1>;
63+
+ /* for sata0 slot */
64+
+ label = "blue:sata1";
7065
+ gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_LOW>;
7166
+ linux,default-trigger = "disk-activity";
7267
+ };
7368
+
7469
+ sata2_led: led-3 {
75-
+ color = <LED_COLOR_ID_BLUE>;
76-
+ function = LED_FUNCTION_DISK;
77-
+ /* for to sata1 slot */
78-
+ function-enumerator = <2>;
70+
+ /* for sata1 slot */
71+
+ label = "blue:sata2";
7972
+ gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>;
8073
+ linux,default-trigger = "disk-activity";
8174
+ };
@@ -95,7 +88,7 @@
9588
+ fan: pwm-fan {
9689
+ compatible = "pwm-fan";
9790
+ #cooling-cells = <2>;
98-
+ cooling-levels = <0 95 145 195 255>;
91+
+ cooling-levels = <0 80 128 175 230 255>;
9992
+ fan-supply = <&vcc5v0_fan>;
10093
+ pwms = <&pwm5 0 50000 0>;
10194
+ };
@@ -234,50 +227,61 @@
234227
+
235228
+&cpu_thermal {
236229
+ trips {
230+
+ cpu_trip_active_cool: cpu-trip-active-cool {
231+
+ temperature = <20000>;
232+
+ hysteresis = <2000>;
233+
+ type = "active";
234+
+ };
235+
+
237236
+ cpu_trip_active_low: cpu-trip-active-low {
238-
+ temperature = <50000>;
237+
+ temperature = <30000>;
239238
+ hysteresis = <2000>;
240239
+ type = "active";
241240
+ };
242241
+
243242
+ cpu_trip_active_med: cpu-trip-active-med {
244-
+ temperature = <60000>;
243+
+ temperature = <40000>;
245244
+ hysteresis = <2000>;
246245
+ type = "active";
247246
+ };
248247
+
249248
+ cpu_trip_active_high: cpu-trip-active-high {
250-
+ temperature = <70000>;
249+
+ temperature = <50000>;
251250
+ hysteresis = <2000>;
252251
+ type = "active";
253252
+ };
254253
+
255254
+ cpu_trip_active_hot: cpu-trip-active-hot {
256-
+ temperature = <75000>;
255+
+ temperature = <60000>;
257256
+ hysteresis = <2000>;
258257
+ type = "hot";
259258
+ };
260259
+ };
261260
+
262261
+ cooling-maps {
262+
+ cpu-active-cool {
263+
+ trip = <&cpu_trip_active_cool>;
264+
+ cooling-device = <&fan THERMAL_NO_LIMIT 1>;
265+
+ };
266+
+
263267
+ cpu-active-low {
264268
+ trip = <&cpu_trip_active_low>;
265-
+ cooling-device = <&fan THERMAL_NO_LIMIT 1>;
269+
+ cooling-device = <&fan 1 2>;
266270
+ };
267271
+
268272
+ cpu-active-med {
269273
+ trip = <&cpu_trip_active_med>;
270-
+ cooling-device = <&fan 1 2>;
274+
+ cooling-device = <&fan 2 3>;
271275
+ };
272276
+
273277
+ cpu-active-high {
274278
+ trip = <&cpu_trip_active_high>;
275-
+ cooling-device = <&fan 2 3>;
279+
+ cooling-device = <&fan 3 4>;
276280
+ };
277281
+
278282
+ cpu-active-hot {
279283
+ trip = <&cpu_trip_active_hot>;
280-
+ cooling-device = <&fan 3 THERMAL_NO_LIMIT>;
284+
+ cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
281285
+ };
282286
+ };
283287
+};

target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-mmbox-anas3035.dts

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
fan: pwm-fan {
7373
compatible = "pwm-fan";
7474
#cooling-cells = <2>;
75-
cooling-levels = <0 95 145 195 255>;
75+
cooling-levels = <0 80 128 175 230 255>;
7676
fan-supply = <&vcc5v0_fan>;
7777
pwms = <&pwm5 0 50000 0>;
7878
};
@@ -211,50 +211,61 @@
211211

212212
&cpu_thermal {
213213
trips {
214+
cpu_trip_active_cool: cpu-trip-active-cool {
215+
temperature = <20000>;
216+
hysteresis = <2000>;
217+
type = "active";
218+
};
219+
214220
cpu_trip_active_low: cpu-trip-active-low {
215-
temperature = <50000>;
221+
temperature = <30000>;
216222
hysteresis = <2000>;
217223
type = "active";
218224
};
219225

220226
cpu_trip_active_med: cpu-trip-active-med {
221-
temperature = <60000>;
227+
temperature = <40000>;
222228
hysteresis = <2000>;
223229
type = "active";
224230
};
225231

226232
cpu_trip_active_high: cpu-trip-active-high {
227-
temperature = <70000>;
233+
temperature = <50000>;
228234
hysteresis = <2000>;
229235
type = "active";
230236
};
231237

232238
cpu_trip_active_hot: cpu-trip-active-hot {
233-
temperature = <75000>;
239+
temperature = <60000>;
234240
hysteresis = <2000>;
235241
type = "hot";
236242
};
237243
};
238244

239245
cooling-maps {
246+
cpu-active-cool {
247+
trip = <&cpu_trip_active_cool>;
248+
cooling-device = <&fan THERMAL_NO_LIMIT 1>;
249+
};
250+
240251
cpu-active-low {
241252
trip = <&cpu_trip_active_low>;
242-
cooling-device = <&fan THERMAL_NO_LIMIT 1>;
253+
cooling-device = <&fan 1 2>;
243254
};
244255

245256
cpu-active-med {
246257
trip = <&cpu_trip_active_med>;
247-
cooling-device = <&fan 1 2>;
258+
cooling-device = <&fan 2 3>;
248259
};
249260

250261
cpu-active-high {
251262
trip = <&cpu_trip_active_high>;
252-
cooling-device = <&fan 2 3>;
263+
cooling-device = <&fan 3 4>;
253264
};
254265

255266
cpu-active-hot {
256267
trip = <&cpu_trip_active_hot>;
257-
cooling-device = <&fan 3 THERMAL_NO_LIMIT>;
268+
cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
258269
};
259270
};
260271
};

0 commit comments

Comments
 (0)