Title: Firefly-RK3399 fan control [Print This Page] Author: abutkov Time: 2/10/2019 03:31 Title: Firefly-RK3399 fan control Last edited by abutkov In 2/10/2019 20:41 Editor
I noticed that according to schematics FAN_12V is switched with Q20 that is controlled by Q21 over BL_EN line. And the latter corresponds to GPIO1_A1. So if I export the correct gpio number I can write a simple script that reads temperature from /sys/class/thermal/thermal_zone0/temp and turns the fan on/off due to setpoint (t_high and t_low for hysteresis).
Supposing GPIO1_A1 should be 33 I do:
echo 33 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio33/direction
echo 0 > /sys/class/gpio/gpio33/value
Copy the code
And see the fan keeps turnung. Please correct me if I'm wrong with that idea or I just picked the wrong number for gpio.
UPD1: Seems I have to desolder 10K R702 from PWR_EN_SYS and put it on R701 Author: abutkov Time: 2/10/2019 23:40 Last edited by abutkov In 2/10/2019 20:43 Editor
It was a kind of surgery to perform soldering, I've lost original 0402 so had to put 0805 with wire
And finally it does work:
#!/bin/bash
FAN_ON_TEMP="39000" # operating temperature range in milliC
FAN_OFF_TEMP="35000" # OFF is less than ON for hysteresis