Skip to content

Commit dc91ec0

Browse files
ccarpinteriigorpecovnik
authored andcommitted
rockchip-rk3588: add Rock 5 ITX PWM fan control overlay
The Rock 5 ITX DTB defines the PWM fan as /pwm-fan without a labelled phandle, so the existing rockchip-rk3588-fanctrl overlay (which targets &fan) has no effect on this board. The default cooling-levels in the Rock 5 ITX DTB start at 0, which means the fan receives no PWM signal at idle and falls back to running at full speed regardless of temperature. This overlay patches /pwm-fan directly using target-path, replacing the cooling-levels with a curve that starts at 1 (near-silent at idle) and adds rockchip,temp-trips to ramp the fan gradually across four steps at 45°C, 50°C, 55°C, and 65°C. Tested on Rock 5 ITX running Armbian with linux-vendor-rk35xx 6.1.
1 parent 03192b8 commit dc91ec0

7 files changed

Lines changed: 51 additions & 0 deletions

File tree

patch/kernel/archive/rockchip64-6.12/overlay/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
5656
rockchip-rk3568-hk-uart1.dtbo \
5757
rockchip-rk3568-rock-3a-disable-uart2.dtbo \
5858
rockchip-rk3588-fanctrl.dtbo \
59+
rockchip-rk3588-rock-5-itx-pwm-fan.dtbo \
5960
rockchip-rk3588-sata0.dtbo \
6061
rockchip-rk3588-sata1.dtbo \
6162
rockchip-rk3588-sata2.dtbo \

patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,15 @@ Some NanoPC-T6 boards use a A3A444 eMMC chip. Under heavy I/O load when running
292292
in HS400 mode, this will often result in I/O errors.
293293
Reducing the eMMC frequency from the default 200000000 Hz to 150000000 Hz improves
294294
stability and eliminates the I/O errors.
295+
296+
**********************************
297+
Details for Rock 5 ITX overlays:
298+
299+
### rockchip-rk3588-rock-5-itx-pwm-fan
300+
301+
The Rock 5 ITX DTB defines the fan as a /pwm-fan node without a labelled phandle,
302+
so the generic rockchip-rk3588-fanctrl overlay (which targets &fan) does not apply.
303+
This overlay patches the /pwm-fan node directly, fixing the default cooling-levels
304+
which start at 0 — causing the fan to receive no PWM signal at idle and default to
305+
full speed. The corrected curve starts at 1 (near-silent) and ramps through four
306+
steps tied to temperature trip points (45°C / 50°C / 55°C / 65°C).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/ {
5+
fragment@0 {
6+
target-path = "/pwm-fan";
7+
__overlay__ {
8+
cooling-levels = <1 64 128 192 255>;
9+
rockchip,temp-trips = <45000 1 50000 2 55000 3 65000 4>;
10+
};
11+
};
12+
};

patch/kernel/archive/rockchip64-6.18/overlay/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
6767
rockchip-rk3568-hk-uart1.dtbo \
6868
rockchip-rk3568-rock-3a-disable-uart2.dtbo \
6969
rockchip-rk3588-fanctrl.dtbo \
70+
rockchip-rk3588-rock-5-itx-pwm-fan.dtbo \
7071
rockchip-rk3588-sata0.dtbo \
7172
rockchip-rk3588-sata1.dtbo \
7273
rockchip-rk3588-sata2.dtbo \
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/ {
5+
fragment@0 {
6+
target-path = "/pwm-fan";
7+
__overlay__ {
8+
cooling-levels = <1 64 128 192 255>;
9+
rockchip,temp-trips = <45000 1 50000 2 55000 3 65000 4>;
10+
};
11+
};
12+
};

patch/kernel/archive/rockchip64-7.0/overlay/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
6767
rockchip-rk3568-hk-uart1.dtbo \
6868
rockchip-rk3568-rock-3a-disable-uart2.dtbo \
6969
rockchip-rk3588-fanctrl.dtbo \
70+
rockchip-rk3588-rock-5-itx-pwm-fan.dtbo \
7071
rockchip-rk3588-sata0.dtbo \
7172
rockchip-rk3588-sata1.dtbo \
7273
rockchip-rk3588-sata2.dtbo \
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/ {
5+
fragment@0 {
6+
target-path = "/pwm-fan";
7+
__overlay__ {
8+
cooling-levels = <1 64 128 192 255>;
9+
rockchip,temp-trips = <45000 1 50000 2 55000 3 65000 4>;
10+
};
11+
};
12+
};

0 commit comments

Comments
 (0)