Fan control on Rock Pi 4C+?

When reading the Radxa docs they mention the following:

Thermal governor

This module is used to adjust the fan and other temperature options. Generally, we select power_allocator when using DC fan or fanless, select step_wise when using PWM fan. Note: If you connect the fan directly to the GPIO on 5V and GND pins, it would not be controlled and always work.

And according to support it is possible to connect a non-pwm fan to the fan connector on the board an control it to turn on and off when it hits a specific temperature.

I got a 5V fan (2-pin), which is connected to the fan connector on the board. How do I setup the temperature control in DietPi?

There is no such option in DietPi to control a fan. Depending on board, there might be manuall steps needed to enable this.

Got this reply from Radxa support:

We have a basic temp control that turn the fan on when SoC is over 60 degrees: https://github.com/radxa/kernel/blob/09ee8aa06b5afbfae6b1e270b7aedcffca835549/arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts#L226-L254

This requires the thermal governor to be set as step-wise: https://docs.radxa.com/en/template/sbc/os-config/rsetup#thermal-governor

If you set the thermal governor to userspace, you can control the fan manually via sysf cooling device node: https://www.kernel.org/doc/Documentation/thermal/sysfs-api.txt

Don’t know if it is possible to use this to do a simple on and off control of the fan port. On if it’s above 60 degrees and off if under.