I've been trying to test ATS on a RockPro64 with Armbian, and with Werner's changes I can confirm that pwm_fan is now being loaded as a kernel module, but I was still getting the startup error from ATS complaining the FAN_CTL value was missing.
root@RockPro64:/# ats --test
getConditions: Warning, Values { THERMAL0_CTL, THERMAL1_CTL, FAN_CTL }: /sys/class/thermal/thermal_zone0/temp, /sys/class/thermal/thermal_zone1/temp, ERROR
exit 1
I found that pwm1 is now available under `hwmon1`, not `hwmon0`. I'm assuming this is because fan_pwm is loaded as a module, and not included in the kernel as it is with ayufan's kernel.
root@RockPro64:/# ll /sys/class/hwmon/
lrwxrwxrwx 1 root root 0 Jan 17 15:02 hwmon0 -> ../../devices/platform/ff3d0000.i2c/i2c-4/4-0022/power_supply/tcpm-source-psy-4-0022/hwmon0
lrwxrwxrwx 1 root root 0 Jan 17 15:12 hwmon1 -> ../../devices/platform/pwm-fan/hwmon/hwmon1
root@RockPro64:/# ls /sys/class/hwmon/hwmon1/
device name of_node power pwm1 subsystem uevent
To fix this you have to edit `/etc/ats.config` line 64, changing `PWM_CTL = "/sys/class/hwmon/hwmon0/pwm1,` to `PWM_CTL = "/sys/class/hwmon/hwmon1/pwm1,`. Notice `hwmon0` to `hwmon1`.
This will fix the ATS error, but for me the fan will still not spin.
root@RockPro64:/# ats --test
info:'SYSTEM' Table
info: 'BOARD' Table
info: 'NAME' = ROCKPRO64
info: 'CPU' = RK3399
info: 'THERMAL0_CTL' = /sys/class/thermal/thermal_zone0/temp
info: 'THERMAL1_CTL' = /sys/class/thermal/thermal_zone1/temp
info: 'PWM_CTL' = /sys/class/hwmon/hwmon1/pwm1
info: 'MAX_CONTINUOUS_THERMAL_TEMP' = 60
info: 'MIN_CONTINUOUS_THERMAL_TEMP' = 40
info: 'MAX_PWM' = 255
info: 'MIN_PWM' = 40
info: 'ALWAYS_ON' = false
info: 'PROFILE_NAME' = profile0
info: 'PROFILE' = 0
info:'Pratio' timers
info: 'Pratio[ -20 - 40 [' = 0
info: 'Pratio[ 40 ]' = 40
info: 'Pratio[ 41 ]' = 50
info: 'Pratio[ 42 ]' = 61
info: 'Pratio[ 43 ]' = 72
info: 'Pratio[ 44 ]' = 83
info: 'Pratio[ 45 ]' = 93
info: 'Pratio[ 46 ]' = 104
info: 'Pratio[ 47 ]' = 115
info: 'Pratio[ 48 ]' = 126
info: 'Pratio[ 49 ]' = 136
info: 'Pratio[ 50 ]' = 147
info: 'Pratio[ 51 ]' = 158
info: 'Pratio[ 52 ]' = 169
info: 'Pratio[ 53 ]' = 179
info: 'Pratio[ 54 ]' = 190
info: 'Pratio[ 55 ]' = 201
info: 'Pratio[ 56 ]' = 212
info: 'Pratio[ 57 ]' = 222
info: 'Pratio[ 58 ]' = 233
info: 'Pratio[ 59 ]' = 244
info: 'Pratio[ 60 ]' = 255
info: 'Pratio[ 60 - 70 [' = 255
Stopping for[ seconds ]............... 3
CPU Temperature[ max 70 °C ].......... 0
GPU Temperature[ max 70 °C ].......... 0
Fan PWM Duty Cycle value[ 0 - 255 ]... 190
--------------------
Running for[ seconds ]................ 60
CPU Temperature[ max 70 °C ].......... 56
GPU Temperature[ max 70 °C ].......... 55
Fan PWM Duty Cycle value[ 0 - 255 ]... 212
Manually reading pwm1 when running ATS as a service reveals that it is successfully writing a value (0-255):
root@RockPro64:/# cat /sys/class/hwmon/hwmon1/pwm1
222
I've connected the official RockPro64 fan into the `+FAN-` pin header, shown as label 4 (J8) on the board layout https://wiki.pine64.org/index.php/ROCKPro64#Connectors.2C_sockets_and_headers, but it will still not spin.
I tried measuring the voltage across these pins with my terrible multimeter (expecting 10.8 - 13.2V based on the fan specification, or maybe a fraction of that corresponding to the PWM value), but I'm reading 0V. Not too sure where the issue is now.