Skip to content

PWM fan speed control for Radxa Rock5b 25W POE hat

License

Notifications You must be signed in to change notification settings

lanefu/fan-control-rock5b-poe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fan-control

A tool to control 25W POE Hat fan speed by temperature automatically for ROCK5B.

Features

  1. Control fan speed by temperature. (above 45 degrees)
  2. set fan speed manually

Prerequisites

Device Tree Overlay enabling PWM8 is required.

Enable pwm8 overlay via armbian-config or add manually

# fetch device tree overlay from vendor kernel
wget https://raw.githubusercontent.com/armbian/linux-rockchip/rk-6.1-rkr1/arch/arm64/boot/dts/rockchip/overlay/rk3588-pwm8-m0.dts

# compile overlay
dtc -O dtb -o rk3588-pwm8-m0.dtbo -b 0 -@ rk3588-pwm8-m0.dts

# copy and update prefix to match armbian default of `rockchip-rk3588'
cp rk3588-pwm8-m0.dtbo /boot/dtb/rockchip/overlay/rockchip-rk3588-pwm8-m0.dtbo

# enable overlay in /boot/armbianEnv.txt -- assumes no other overlays exist
# you may want to do this via armbian-config now instead
echo "overlays=pwm8-m0" >> /boot/armbianEnv.txt

rebooo afterwards to load overlay

Build & install

make package
dpkg -i fan-control*.deb

Usage

systemctl enable fan-control
systemctl start fan-control

Configuration

configuration file locations is /etc/fan-control.json, Configuration parameter description:

Configuration Description
pwmchip pwmchip id, 1 for auto scan
gpio gpio id, 0 is default gpio
pwm-period PWM period
temp-map temperature configuration table
temp temperature, in degrees Celsius
duty duty ratio
duration duration, in second

License

MIT License

About

PWM fan speed control for Radxa Rock5b 25W POE hat

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C 82.9%
  • Shell 11.4%
  • Makefile 5.7%