Fan Interface
The Radxa ROCK 4D features an onboard fan interface. You can connect a fan using a 2-Pin 1.25mm cable (fan operating voltage is 5V) to provide cooling for the motherboard.

User Guide
Connect a fan to the fan interface with the following specifications:
- Interface Type: 2-Pin XH 1.25mm
- Operating Voltage: 5V
Pay attention to the positive and negative polarity when installing the fan.
Configuring Fan Settings
Enter the rsetup
command in the terminal to configure the fan settings using the Rsetup tool.
rsetup
- Use the arrow keys to select the
Hardware
option, then press Enter to confirm.

- Use the arrow keys to select the
Thermal governor
option, then press Enter to confirm.

- Use the arrow keys to select the
step_wise
option, press Space to check thestep_wise
option, then press Enter to confirm.
A *
in the option box indicates that the option is enabled.

Viewing Fan Devices
- Use the
ls
command to view the registered fan devices in the system.
ls /sys/devices/platform/ | grep fan
Terminal will display output similar to:
pwm-fan
radxa-poe-fan
pwm-fan
: Control device for the motherboard's built-in fanradxa-poe-fan
: Control device for the PoE HAT fan
- Locate the PWM Control File
The fan's PWM control files are typically located in the /sys/class/hwmon/
directory. You need to find the hwmon
directory corresponding to pwm-fan
.
Use the ls
command to view the PWM control files for the pwm-fan
device.
ls /sys/class/hwmon/
The terminal will display output similar to:
hwmon0 hwmon1 hwmon2 hwmon3 hwmon4 hwmon5 hwmon6 hwmon7
- Identify the Fan Control Node
Use the ls
command to view the PWM control files for the pwm-fan
device in the hwmon
directory.
ls -l /sys/class/hwmon/hwmon*/device
The terminal will display output similar to:
/sys/class/hwmon/hwmon0/device -> ../../thermal_zone0
/sys/class/hwmon/hwmon1/device -> ../../thermal_zone1
/sys/class/hwmon/hwmon2/device -> ../../thermal_zone2
/sys/class/hwmon/hwmon3/device -> ../../thermal_zone3
/sys/class/hwmon/hwmon4/device -> ../../thermal_zone4
/sys/class/hwmon/hwmon5/device -> ../../thermal_zone5
/sys/class/hwmon/hwmon6/device -> ../../../radxa-poe-fan
/sys/class/hwmon/hwmon7/device -> ../../../pwm-fan
Based on the terminal output, we can control the pwm-fan
through hwmon7
.
Controlling Fan Speed
Use the echo
command to set the fan speed: The PWM control range is typically 0~255 (0=stop, 255=full speed).
- Full Speed
echo 255 | sudo tee /sys/class/hwmon/hwmon7/pwm1
- Half Speed
echo 128 | sudo tee /sys/class/hwmon/hwmon7/pwm1
- Turn Off Fan
echo 0 | sudo tee /sys/class/hwmon/hwmon7/pwm1
Interface Specifications
For detailed interface specifications, please refer to the Hardware Design: Schematics in the download section.
Pin# | Name |
---|---|
1 | FAN-PWM |
2 | VCC5V0_SYS_S5 |
3 | GND |
4 | GND |