* [lm-sensors] Tyan S2696 and ADT7470
2007-01-02 15:53 [lm-sensors] Tyan S2696 and ADT7470 Vadim Zeitlin
@ 2007-01-05 22:50 ` Rudolf Marek
2007-01-07 1:33 ` Vadim Zeitlin
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Rudolf Marek @ 2007-01-05 22:50 UTC (permalink / raw)
To: lm-sensors
Hi all,
Thanks for the reports. Unfortunately none of us - Me, Jean or David does not
have any time to write new drivers. We may help answering the questions or give
the hints to start the development but that is all we can do now.
Maybe you or your company can fund the driver devel? Hw/Money/whatever?
For a start someone could look at all those ADT74XX devices, compare the
datasheets and check if they are register compatible? Or at least some of them.
Then the driver could be developed.
> First of all, I'm using 2.6.20-rc3 with the svn version of lm-sensors and
> the patches
>
> http://lists.lm-sensors.org/pipermail/lm-sensors/2006-December/018420.html
> http://lists.lm-sensors.org/pipermail/lm-sensors/2006-October/018128.html
>
> (coretemp and *_msr visibility). The kernel was built with standard Debian
> options using gcc 4.1.
Ok
> Now my problem is that I'm trying to set up lm-sensors on a machine using
> Tyan Tempest i5000XT motherboard (also known as S2696, please see
> http://www.tyan.com/products/html/tempesti5000xt.html). It has, according
> both to the specifications and sensors-detect output, not one but 2
> hardware monitoring chips: W83627EHG and ADT7470:
>
> # sensors-detect
> ...
> Now follows a summary of the probes I have just done.
> Just press ENTER to continue:
>
> Driver `to-be-written' (should be inserted):
> Detects correctly:
> * Bus `SMBus I801 adapter at 18c0'
> Busdriver `i2c-i801', I2C address 0x2e
> Chip `Analog Devices ADT7470' (confidence: 5)
> * Chip `Intel AMB FB-DIMM thermal sensor' (confidence: 9)
Wow :) Even the FB-DIMM are there.
>
> Driver `w83627ehf' (should be inserted):
> Detects correctly:
> * ISA bus, address 0xc00
> Chip `Winbond W83627EHF/EHG Super IO Sensors' (confidence: 9)
>
> Driver `coretemp' (should be inserted):
> Detects correctly:
> * Chip `Intel Core family thermal sensor' (confidence: 9)
>
> Unfortunately it looks that the case fans -- which create the deafening
> noise making the machine all but unusable currently -- are connected to
> ADT7470 and not the W83627EHG because
>
> # sensors
> coretemp-isa-0000
> Adapter: ISA adapter
> temp1: +29 C (high = +85 C)
>
> coretemp-isa-0001
> Adapter: ISA adapter
> temp1: +33 C (high = +85 C)
>
> coretemp-isa-0002
> Adapter: ISA adapter
> temp1: +32 C (high = +85 C)
>
> coretemp-isa-0003
> Adapter: ISA adapter
> temp1: +33 C (high = +85 C)
>
> w83627ehf-isa-0c00
> Adapter: ISA adapter
> VCore: +1.21 V (min = +0.00 V, max = +1.74 V)
> in1: +8.29 V (min = +13.46 V, max = +13.36 V) ALARM
> AVCC: +3.31 V (min = +3.87 V, max = +4.02 V) ALARM
> 3VCC: +3.33 V (min = +2.91 V, max = +2.93 V) ALARM
> in4: +1.26 V (min = +2.00 V, max = +1.87 V) ALARM
> in5: +1.60 V (min = +1.86 V, max = +1.50 V) ALARM
> in6: +5.02 V (min = +3.23 V, max = +4.56 V) ALARM
> VSB: +3.28 V (min = +0.69 V, max = +3.06 V) ALARM
> VBAT: +1.52 V (min = +2.16 V, max = +2.48 V) ALARM
> in9: +1.09 V (min = +0.78 V, max = +1.52 V)
> Case Fan: 0 RPM (min = 3515 RPM, div = 128) ALARM
> CPU Fan: 2083 RPM (min = 5921 RPM, div = 4) ALARM
> Aux Fan: 0 RPM (min = 811 RPM, div = 128) ALARM
> fan5: 0 RPM (min = 168750 RPM, div = 8) ALARM
> Sys Temp: +39 C (high = -65 C, hyst = -75 C) ALARM
> CPU Temp: +34.5 C (high = +80.0 C, hyst = +75.0 C)
> AUX Temp: +33.5 C (high = +80.0 C, hyst = +75.0 C)
>
> (notice the zeros for the case and aux fans). Unsurprisingly, running
> pwmconfig or writing directly to the files mentioned in Documentation/
> hwmon/w83627ehf doesn't affect these fans. More surprisingly, it doesn't
> seem to affect the CPU fan(s) neither but I don't care much about it as
> they're not very noisy anyhow. I care a lot about the 2 case fans though so
> I'd just like to ask if I am doing something wrong with w83627ehf or is it
> just that my guess that these fans are handled by ADT470 is correct?
Yes they are handled via this chip, the temperature used to drive those chips is
obtained from some other simple sensors, strategically placed on different
places on motherboard.
> And, in the latter case, is there any hope for ADT7470 support? I'd be
> very willing to help as much as I can but unfortunately I don't really know
> much about this stuff so I'm afraid I have no chance without some/lots of
> guidance. Of course, I'd be also happy to provide any additional
> information that might help.
If you know how to code in C it should not be a problem to write a driver.
You can use also following commands to reprogram the fans to manual mode:
http://www.analog.com/en/prod/0,2877,ADT7470,00.html
CHeck page 23 of datasheet.
Register 0x68 0x69 are controlling the manual/auto mode
Registers 0x32-0x34 controls the duty cycle.
This sequence will put the chip into manual mode (first two lines)
Last 4 lines set the duty cycle to 50%. This should shut up the fans.
i2cset -y 0 0x2e 0x68 0x0
i2cset -y 0 0x2e 0x69 0x0
i2cset -y 0 0x2e 0x32 0x80
i2cset -y 0 0x2e 0x33 0x80
i2cset -y 0 0x2e 0x34 0x80
i2cset -y 0 0x2e 0x35 0x80
Inspect the fans to see if they are still spinning sufficiently after this!
Hope it helps for a start.
Rudolf
^ permalink raw reply [flat|nested] 6+ messages in thread* [lm-sensors] Tyan S2696 and ADT7470
2007-01-02 15:53 [lm-sensors] Tyan S2696 and ADT7470 Vadim Zeitlin
2007-01-05 22:50 ` Rudolf Marek
@ 2007-01-07 1:33 ` Vadim Zeitlin
2007-01-07 10:42 ` Rudolf Marek
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Vadim Zeitlin @ 2007-01-07 1:33 UTC (permalink / raw)
To: lm-sensors
On Fri, 05 Jan 2007 23:50:28 +0100 Rudolf Marek <r.marek at assembler.cz> wrote:
RM> Thanks for the reports.
Hello Rudolf,
Thanks for your reply!
RM> Unfortunately none of us - Me, Jean or David does not have any time to
RM> write new drivers. We may help answering the questions or give the
RM> hints to start the development but that is all we can do now.
As I work on a few free projects on my own, this is a situation I
understand only too well...
RM> Maybe you or your company can fund the driver devel? Hw/Money/whatever?
Well, I have hardware and am definitely available to do any (preferably
non destructive :-) tests on it. And I can contribute some of my own time.
Unfortunately not much in the way of money.
RM> > # sensors-detect
RM> > ...
RM> > Now follows a summary of the probes I have just done.
RM> > Just press ENTER to continue:
RM> >
RM> > Driver `to-be-written' (should be inserted):
RM> > Detects correctly:
RM> > * Bus `SMBus I801 adapter at 18c0'
RM> > Busdriver `i2c-i801', I2C address 0x2e
RM> > Chip `Analog Devices ADT7470' (confidence: 5)
RM> > * Chip `Intel AMB FB-DIMM thermal sensor' (confidence: 9)
RM>
RM> Wow :) Even the FB-DIMM are there.
Yes, I was quite impressed by sensors-detect seeing them too. Too bad I
can't see their temperature as then I could try simply running the machine
without the (rear) fan, but I'm too afraid to fry the DIMMs -- they seem to
be quite hot.
RM> > Unfortunately it looks that the case fans -- which create the deafening
RM> > noise making the machine all but unusable currently -- are connected to
RM> > ADT7470 and not the W83627EHG
FWIW, I got a reply from Tyan and this is indeed the case.
RM> If you know how to code in C it should not be a problem to write a driver.
Is there any sufficiently clean and simple driver I could use as an
example/starting point by chance?
RM> You can use also following commands to reprogram the fans to manual mode:
RM>
RM> http://www.analog.com/en/prod/0,2877,ADT7470,00.html
RM>
RM> CHeck page 23 of datasheet.
Ah, I started reading the datasheet but didn't reach the most interesting
part, thanks for the page link! I'm going to try it out and report back.
Thanks,
VZ
^ permalink raw reply [flat|nested] 6+ messages in thread* [lm-sensors] Tyan S2696 and ADT7470
2007-01-02 15:53 [lm-sensors] Tyan S2696 and ADT7470 Vadim Zeitlin
2007-01-05 22:50 ` Rudolf Marek
2007-01-07 1:33 ` Vadim Zeitlin
@ 2007-01-07 10:42 ` Rudolf Marek
2007-01-07 21:21 ` Jean Delvare
2007-01-11 16:33 ` Vadim Zeitlin
4 siblings, 0 replies; 6+ messages in thread
From: Rudolf Marek @ 2007-01-07 10:42 UTC (permalink / raw)
To: lm-sensors
> As I work on a few free projects on my own, this is a situation I
> understand only too well...
Ok
> RM> Maybe you or your company can fund the driver devel? Hw/Money/whatever?
>
> Well, I have hardware and am definitely available to do any (preferably
> non destructive :-) tests on it. And I can contribute some of my own time.
> Unfortunately not much in the way of money.
Ok never mind.
>
> RM> > # sensors-detect
> RM> > ...
> RM> > Now follows a summary of the probes I have just done.
> RM> > Just press ENTER to continue:
> RM> >
> RM> > Driver `to-be-written' (should be inserted):
> RM> > Detects correctly:
> RM> > * Bus `SMBus I801 adapter at 18c0'
> RM> > Busdriver `i2c-i801', I2C address 0x2e
> RM> > Chip `Analog Devices ADT7470' (confidence: 5)
> RM> > * Chip `Intel AMB FB-DIMM thermal sensor' (confidence: 9)
> RM>
> RM> Wow :) Even the FB-DIMM are there.
>
> Yes, I was quite impressed by sensors-detect seeing them too. Too bad I
> can't see their temperature as then I could try simply running the machine
> without the (rear) fan, but I'm too afraid to fry the DIMMs -- they seem to
> be quite hot.
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
void main(void) {
unsigned char * addr;
int fd = open("/dev/mem", O_RDONLY);
int i;
int idx;
addr = mmap(0, 128*1024*1024, PROT_READ, MAP_PRIVATE, fd, 0xFE000000);
//addr = mmap(0, 128, PROT_READ, MAP_PRIVATE, fd, 0xd5000000);
//we want function 3,
//4 channels, 16AMB/channel
for (i=0;i<64;i++) {
idx = i*2048;
printf("Intel sig: %02x %02x\n", addr[idx],addr[idx+1]);
//offset 85h function 3
printf("Current temp is: %f (0x%02x)C\n", (addr[idx+(256*3)+0x85] / (float)
2.0), addr[idx+(256*3)+0x85]);
}
munmap(adr, 128*1024*1024);
}
Compile this program and run as root. It should show the FB-DIMM temps. One user
in http://www.lm-sensors.org/ticket/2143 reported that the program hanged the
machine when run multiple times. I added the munmap so maybe it won't anymore.
Please can you try that? If it never displays 8086 it means the base address is
wrong and I would need lspci -xxx to fix it.
>
> RM> > Unfortunately it looks that the case fans -- which create the deafening
> RM> > noise making the machine all but unusable currently -- are connected to
> RM> > ADT7470 and not the W83627EHG
>
> FWIW, I got a reply from Tyan and this is indeed the case.
>
>
> RM> If you know how to code in C it should not be a problem to write a driver.
>
> Is there any sufficiently clean and simple driver I could use as an
> example/starting point by chance?
Yes maybe you can study the w83l785ts.c it is just temperature driver. Most
simple. Also you may read the docs in kernel Documentation/hwmon/ and /i2c/
I had in plan to create some example driver for i2c devices but no time yet :/
> RM> You can use also following commands to reprogram the fans to manual mode:
> RM>
> RM> http://www.analog.com/en/prod/0,2877,ADT7470,00.html
> RM>
> RM> CHeck page 23 of datasheet.
>
> Ah, I started reading the datasheet but didn't reach the most interesting
> part, thanks for the page link! I'm going to try it out and report back.
Yes just run the command it should do the trick.
Rudolf
^ permalink raw reply [flat|nested] 6+ messages in thread* [lm-sensors] Tyan S2696 and ADT7470
2007-01-02 15:53 [lm-sensors] Tyan S2696 and ADT7470 Vadim Zeitlin
` (2 preceding siblings ...)
2007-01-07 10:42 ` Rudolf Marek
@ 2007-01-07 21:21 ` Jean Delvare
2007-01-11 16:33 ` Vadim Zeitlin
4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2007-01-07 21:21 UTC (permalink / raw)
To: lm-sensors
On Sun, 07 Jan 2007 11:42:43 +0100, Rudolf Marek wrote:
> > Is there any sufficiently clean and simple driver I could use as an
> > example/starting point by chance?
>
> Yes maybe you can study the w83l785ts.c it is just temperature driver. Most
> simple. Also you may read the docs in kernel Documentation/hwmon/ and /i2c/
>
> I had in plan to create some example driver for i2c devices but no time yet :/
In theory Documentation/i2c/writing-clients is that example driver, but
in practice it's terribly out-date and thus quite useless. Using a
real, simple driver as an example is probably the best solution, at
least it doesn't get out-of-date as documentation does.
--
Jean Delvare
^ permalink raw reply [flat|nested] 6+ messages in thread* [lm-sensors] Tyan S2696 and ADT7470
2007-01-02 15:53 [lm-sensors] Tyan S2696 and ADT7470 Vadim Zeitlin
` (3 preceding siblings ...)
2007-01-07 21:21 ` Jean Delvare
@ 2007-01-11 16:33 ` Vadim Zeitlin
4 siblings, 0 replies; 6+ messages in thread
From: Vadim Zeitlin @ 2007-01-11 16:33 UTC (permalink / raw)
To: lm-sensors
On Fri, 05 Jan 2007 23:50:28 +0100 Rudolf Marek <r.marek at assembler.cz> wrote:
RM> You can use also following commands to reprogram the fans to manual mode:
RM>
RM> http://www.analog.com/en/prod/0,2877,ADT7470,00.html
RM>
RM> CHeck page 23 of datasheet.
Before doing this I decided to try to read the speeds of the fans, as
explained on the page 21 of the above document:
# i2cget -y 0 0x2e 0x2a
0x80
# i2cget -y 0 0x2e 0x2b
0x0a
# i2cget -y 0 0x2e 0x2c
0xff
# i2cget -y 0 0x2e 0x2d
0xff
# i2cget -y 0 0x2e 0x2e
0x6a
# i2cget -y 0 0x2e 0x2f
0x0c
# i2cget -y 0 0x2e 0x30
0x0a
# i2cget -y 0 0x2e 0x31
0x0e
Using the rule
Fan Speed (RPM) = (90,000 ? 60)/Fan Tach Reading
from the datasheet this corresponds to speeds 2000, 1700 and 1500 RPM and
the 2 last ones must correspond to the case fans (I've thrown away the old
ones and the new ones are spec'd at 1600 and 1400 RPMs respectively), As I
don't have any other case fans, I think the first one must be the CPU fan
(although no idea which one), it's not unreasonable for it to turn at 2000
RPMs. Just in case it can be useful to someone else, here is a script
showing the fans speeds:
http://www.tt-solutions.com/vz/hardware/tyan2696/fanspeed
RM> Register 0x68 0x69 are controlling the manual/auto mode
RM> Registers 0x32-0x34 controls the duty cycle.
RM>
RM> This sequence will put the chip into manual mode (first two lines)
RM> Last 4 lines set the duty cycle to 50%. This should shut up the fans.
RM>
RM> i2cset -y 0 0x2e 0x68 0x0
RM> i2cset -y 0 0x2e 0x69 0x0
RM> i2cset -y 0 0x2e 0x32 0x80
RM> i2cset -y 0 0x2e 0x33 0x80
RM> i2cset -y 0 0x2e 0x34 0x80
RM> i2cset -y 0 0x2e 0x35 0x80
RM>
RM> Inspect the fans to see if they are still spinning sufficiently after this!
Changing 0x69 doesn't seem to do anything. Changing 0x68 clearly does
work, before 0x32 is written the fan 0 spins up to more than 4000 RPMs.
Interestingly enough setting 0x32 to low values, and even 0, doesn't
decrease the fan speed below 2000RPMs anyhow. But setting it to high values
does increase the speed. So it looks like there is indeed enough useful
functionality to write the driver, now the only question is to find time to
do it...
RM> Hope it helps for a start.
In fact what *really* helped was to change the fans. The new ones are
silent enough even at max speed. Of course, now the question is whether
they're fast enough to cool the case sufficiently but I won't know this
until the summer.
Thanks again for your help,
VZ
^ permalink raw reply [flat|nested] 6+ messages in thread