Welcome! Log In Create A New Profile

Advanced

NSA310 fan speed

Posted by sebr 
Re: NSA310 fan speed
March 29, 2016 01:02PM
bobafetthotmail Wrote:
-------------------------------------------------------
> @bodhi: with the dtb now I can activate the red
> usb led AND control the fan speed. Everything
> seems OK.

Thanks for the report!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 fan speed
March 29, 2016 01:51PM
@pld I did some tests about using the ADT controller. It works as advertised. fancontrol is inactive but fan speed is controlled automatically.

its controls are in

/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0
and it works the same as leds, you read the values in the "files" with cat and you write into them with echo 'something' > filename

The documentation about what each file controls is here https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface

It seems I can enable the auto pwm switching with these commands, of course it does not stick after reboot (nor I was expecting it to, this has to be added to a boot script obviously)

cd /sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0 # we go to the folder
ls # to see what files we can work with
echo 2 > pwm1_enable  # enabling automated pwm for fan 1, the only fan in the nsa310
echo 1 > pwm1_auto_channels  # this tells it to track temp1, the "case temp" I think, the one most close to my home ambient temp anyway

echo 23000 > pwm1_auto_temp_min # setting 23 degrees celsius for min temp, for the sake of always spinning the fan 
echo 45000 > pwm1_auto_temp_max #setting 45 degrees celsius for max temp, my hdds complain at these temps



Edited 1 time(s). Last edit at 03/29/2016 03:01PM by bobafetthotmail.
Re: NSA310 fan speed
April 22, 2016 10:59AM
Hi.
I have installed Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi, upgraded to kernel linux-4.5.0-kirkwood-tld-1-bodhi.
Using kirkwood-nsa310.dtb during booting.

My NSA310 sensor is ADT7476.
root@debian:/etc# sensors
adt7476-i2c-0-2e
Adapter: mv64xxx_i2c adapter
in0:          +0.00 V  (min =  +0.00 V, max =  +3.31 V)
Vcore:        +0.00 V  (min =  +0.00 V, max =  +2.99 V)
+3.3V:        +0.00 V  (min =  +2.96 V, max =  +3.61 V)
+5V:          +0.00 V  (min =  +4.48 V, max =  +5.50 V)
+12V:         +0.00 V  (min =  +0.00 V, max = +15.69 V)
fan1:           0 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:           0 RPM  (min =    0 RPM)
temp1:       -128.0 C  (low  = -127.0 C, high = +127.0 C)
                       (crit = +100.0 C, hyst = +96.0 C)
M/B Temp:    -128.0 C  (low  = -127.0 C, high = +127.0 C)
                       (crit = +100.0 C, hyst = +96.0 C)
temp3:       -128.0 C  (low  = -127.0 C, high = +127.0 C)
                       (crit = +100.0 C, hyst = +96.0 C)
cpu0_vid:    +0.000 V
root@debian:/home# lsmod
Module                  Size  Used by
ipv6                  315400  30
evdev                  10805  0
marvell_cesa           25148  0
des_generic            16834  1 marvell_cesa
orion_wdt               6073  0
adt7475                14069  0
hwmon_vid               1560  1 adt7475
gpio_keys               7730  0
sg                     22009  0
sd_mod                 29941  2
sata_mv                25104  1
libata                164641  1 sata_mv
fixed                   2629  0
scsi_mod              175612  3 sg,libata,sd_mod
r8169                  60026  0
root@debian:/home#
Part of /etc/sensors3.conf
chip "adt7476-*" "adt7490-*"

    label in1 "Vcore"
    label in2 "+3.3V"
    label in3 "+5V"
    label in4 "+12V"

    set in2_min  3.3 * 0.90
    set in2_max  3.3 * 1.10
    set in3_min  5.0 * 0.90
    set in3_max  5.0 * 1.10
# Depending on how your ADT7476 is hardwired, you may or may not have
# +12V readings.
#    set in4_min 12.0 * 0.90
#    set in4_max 12.0 * 1.10

    label temp2 "M/B Temp"
How to set up system to run fancontrol or another software to control fan speed. Why sensors cannot read fan speed?
I read few topics about ADT7476 but have no idea how to set up it correct :/

Edit:
I have loaded kirkwood-nsa310a.dtb with LM85 sensor and it works fine.
root@nas:/# sensors
lm85-i2c-0-2e
Adapter: mv64xxx_i2c adapter
in0:          +1.80 V  (min =  +0.00 V, max =  +3.32 V)
Vcore:        +1.10 V  (min =  +0.00 V, max =  +2.99 V)
+3.3V:        +3.23 V  (min =  +2.97 V, max =  +3.63 V)
+5V:          +5.08 V  (min =  +4.50 V, max =  +5.50 V)
+12V:        +12.25 V  (min =  +0.00 V, max = +15.94 V)
fan1:        2048 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:           0 RPM  (min =    0 RPM)
temp1:        +35.0 C  (low  = -127.0 C, high = +127.0 C)
M/B Temp:     +36.0 C  (low  = -127.0 C, high = +127.0 C)
temp3:        +42.0 C  (low  = -127.0 C, high = +127.0 C)
cpu0_vid:    +0.000 V



Edited 2 time(s). Last edit at 04/24/2016 05:11AM by jakubvtt.
Re: NSA310 fan speed
April 26, 2016 04:58PM
when you boot you see a red light in the USB led? If yes, then your dtb is the newer one, kirkwood-nsa310b-lmsensor-redusbled.dtb

Only thing changed is the led though, you can live well with the one you have.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: