Commit 5882d65c authored by Andrius Štikonas's avatar Andrius Štikonas Committed by Heiko Stuebner

arm64: dts: rockchip: Add PWM fan for RockPro64

RockPro64 has a dedicated circuit for driving a 12V fan from PWM1.

At the moment this makes fan spin at full speed. fancontrol can be used
to control fan speed. E.g. the following config file works well:

INTERVAL=10
DEVPATH=hwmon0=devices/platform/pwm-fan
DEVNAME=hwmon0=pwmfan
FCTEMPS=hwmon0/device/pwm1=../thermal/thermal_zone0/temp
MINTEMP=hwmon0/device/pwm1=40
MAXTEMP=hwmon0/device/pwm1=60
MINSTART=hwmon0/device/pwm1=100
MINSTOP=hwmon0/device/pwm1=70

In the future it would be nice to define trip points in dts file,
so that kernel could adjust fan speed itself.
Signed-off-by: default avatarAndrius Štikonas <andrius@stikonas.eu>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 84ebd2da
...@@ -58,6 +58,13 @@ diy-led { ...@@ -58,6 +58,13 @@ diy-led {
}; };
}; };
fan: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
fan-supply = <&vcc12v_dcin>;
pwms = <&pwm1 0 50000 0>;
};
sdio_pwrseq: sdio-pwrseq { sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple"; compatible = "mmc-pwrseq-simple";
clocks = <&rk808 1>; clocks = <&rk808 1>;
...@@ -602,6 +609,10 @@ &pwm0 { ...@@ -602,6 +609,10 @@ &pwm0 {
status = "okay"; status = "okay";
}; };
&pwm1 {
status = "okay";
};
&pwm2 { &pwm2 {
status = "okay"; status = "okay";
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment