aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorThomas Beckler <thomas.beckler@hotmail.com>2020-05-30 23:40:03 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-02-05 22:21:08 +0100
commit450ec48d61254e241ecfaa7d0cf9dec40473469d (patch)
tree2fd005a0aee3179e8fb718ad59e1973ae1c34cd7 /target
parent8d4afab0abc3fc0ea8a240077a5b8dddecbfd6eb (diff)
downloadupstream-450ec48d61254e241ecfaa7d0cf9dec40473469d.tar.gz
upstream-450ec48d61254e241ecfaa7d0cf9dec40473469d.tar.bz2
upstream-450ec48d61254e241ecfaa7d0cf9dec40473469d.zip
kirkwood: use 3 temperature sensors for Zyxel NSA310B
Instead of taking the input of one temperature sensor (temp1), the script takes into account three temperature sensors to control the PWM of the cooling fan. temp1 -> placed on main board temp2 -> placed on main board temp3 -> placed on or close to chipset All three temperatures give valid input for the PWM of the fan on NSA310 and are actually changing. Tested on two NSA310. Signed-off-by: Thomas Beckler <thomas.beckler@hotmail.com> Reviewed-by: Alberto Bursi <bobafetthotmail@gmail.com> [commit title/message facelift, code cleanup] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol20
1 files changed, 16 insertions, 4 deletions
diff --git a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
index c64ed1100c..334a2a08ef 100755
--- a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
+++ b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
@@ -27,10 +27,22 @@ boot() {
;;
zyxel,nsa310b)
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
- echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
- echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes
- echo 23000 > "$path_to_hwmon/temp1_auto_temp_min"
- echo 43000 > "$path_to_hwmon/temp1_auto_temp_max" # next step is 49600 millicelsius, or 50 celsius, 43 celsius is better
+ # use the max. value of (temp1) OR (temp2) OR (temp3) as an input
+ # for the PWM of the cooling fan
+ echo 123 > "$path_to_hwmon/pwm1_auto_channels"
+ # Temperature sensor #1 placed on mainboard
+ echo 30000 > "$path_to_hwmon/temp1_auto_temp_min"
+ echo 49600 > "$path_to_hwmon/temp1_auto_temp_max"
+ # Temperature sensor #2 placed on mainboard
+ # range: 0 to 127000 in steps of 1000 [millicelsius]
+ echo 30000 > "$path_to_hwmon/temp2_auto_temp_min"
+ # range: 0 to 127000 in steps of ???? [millicelsius]
+ echo 49600 > "$path_to_hwmon/temp2_auto_temp_max"
+ # Temperature sensor #3 placed close to a chipset
+ # range: 0 to 60000 in steps of 1000 [millicelsius]
+ echo 23000 > "$path_to_hwmon/temp3_auto_temp_min"
+ # pre-defined steps: 103000, 122000, 143300, 170000 in [millicelsius]
+ echo 103000 > "$path_to_hwmon/temp3_auto_temp_max"
;;
esac
}