* [lm-sensors] Problem with W83792d
@ 2006-07-29 10:33 Nithin
2006-07-29 10:52 ` Nithin
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Nithin @ 2006-07-29 10:33 UTC (permalink / raw)
To: lm-sensors
Hi,
I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0
In this board w83792d is the health monitoring chip.
But i am not able to get any of the values.The chip is not even detecting using sensors-detect.
I have inserted modules i2c-i801,i2c-proc,i2c-dev,i2c-core,w83792d.But the chip is showing in
/proc/sys/dev/sensors/.
The reply i got from 'Asus' is, it using the slave addres as 0x5e,smbus base addres 0x400.
But the driver for w83792d searches in 0x2c to 0x2f (static unsigned short normal_i2c_range[] = { 0x2c, 0x2f, SENSORS_I2C_END };)
I have tried using dev-interface also.But that is giving incorrect values.
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
main()
{
int fp,res;
// int addr = 0x5E;
__u8 reg= 0x29; //0x29 is the CPU fan register
fp = open("/dev/i2c-0",O_RDWR);
if(fp = -1) {
printf("Error\n");
exit(0);
}
ioctl(fp,I2C_SLAVE,0x5e); //Slave address 0x5e
// read(fp,res,8); //Not working since it doesn't support i2c level transactions.
res = i2c_smbus_read_byte_data(fp,reg);
printf("%d\n",res);
}
Then i have gone for port programming.
This is the code i have used
#include <sys/io.h>
#include<fcntl.h>
#include<string.h>
#include<stdio.h>
cpufan()
{
unsigned char x,y;
unsigned char fandiv,fandiv2;
// int x;
FILE *fp;
char s[100];
iopl(3);
outb(0xFF,0x400); //Base address is 400
outb(0x29,0x403); //0x29 is the CPU fan register
outb(0x5E,0x404); //Slave addres is 0x5e
outb(0x48,0x402);
while( (inb(0x400)&0x02)!=0x02);
x = inb(0x405);
printf("%u\n",x);
printf("%u\n",1350000/(x*8));
}
main()
{
cpufan();
}
But this program is going infite while loop;
Could any one please help me to solve this issue
Thanks
Nithin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Problem with W83792d
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
@ 2006-07-29 10:52 ` Nithin
2006-07-29 12:00 ` Jean Delvare
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Nithin @ 2006-07-29 10:52 UTC (permalink / raw)
To: lm-sensors
Sorry
The chip is NOT showing in /proc/sys/dev/sensors/.
>Hi,
>
> I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0
>In this board w83792d is the health monitoring chip.
>But i am not able to get any of the values.The chip is not even detecting using sensors-detect.
>I have inserted modules i2c-i801,i2c-proc,i2c-dev,i2c-core,w83792d.But the chip is showing in
>/proc/sys/dev/sensors/.
>The reply i got from 'Asus' is, it using the slave addres as 0x5e,smbus base addres 0x400.
>But the driver for w83792d searches in 0x2c to 0x2f (static unsigned short normal_i2c_range[] = { 0x2c, 0x2f, SENSORS_I2C_END };)
>
>
>I have tried using dev-interface also.But that is giving incorrect values.
>
>#include <stdio.h>
>#include <stdlib.h>
>#include <sys/types.h>
>#include <sys/stat.h>
>#include <fcntl.h>
>#include <linux/i2c-dev.h>
>
>main()
>{
> int fp,res;
>// int addr = 0x5E;
> __u8 reg= 0x29; //0x29 is the CPU fan register
> fp = open("/dev/i2c-0",O_RDWR);
> if(fp = -1) {
> printf("Error\n");
> exit(0);
> }
> ioctl(fp,I2C_SLAVE,0x5e); //Slave address 0x5e
>// read(fp,res,8); //Not working since it doesn't support i2c level transactions.
> res = i2c_smbus_read_byte_data(fp,reg);
>
> printf("%d\n",res);
>}
>
>
>
>Then i have gone for port programming.
>This is the code i have used
>
>#include <sys/io.h>
>#include<fcntl.h>
>#include<string.h>
>#include<stdio.h>
>
>
>cpufan()
>{
> unsigned char x,y;
> unsigned char fandiv,fandiv2;
>// int x;
> FILE *fp;
> char s[100];
>
> iopl(3);
> outb(0xFF,0x400); //Base address is 400
> outb(0x29,0x403); //0x29 is the CPU fan register
> outb(0x5E,0x404); //Slave addres is 0x5e
> outb(0x48,0x402);
> while( (inb(0x400)&0x02)!=0x02);
> x = inb(0x405);
>
> printf("%u\n",x);
> printf("%u\n",1350000/(x*8));
>}
>main()
>{
> cpufan();
>}
>
>But this program is going infite while loop;
>
>Could any one please help me to solve this issue
>
>Thanks
>Nithin
>
>
>
>
>
>
>
>
>
>
>_______________________________________________
>lm-sensors mailing list
>lm-sensors at lm-sensors.org
>http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Problem with W83792d
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
2006-07-29 10:52 ` Nithin
@ 2006-07-29 12:00 ` Jean Delvare
2006-07-29 12:15 ` Mark M. Hoffman
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2006-07-29 12:00 UTC (permalink / raw)
To: lm-sensors
Hi Nithin,
> I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0
> In this board w83792d is the health monitoring chip.
> But i am not able to get any of the values.The chip is not even detecting using sensors-detect.
> I have inserted modules i2c-i801,i2c-proc,i2c-dev,i2c-core,w83792d.But the chip is not showing
> in /proc/sys/dev/sensors/.
Similar issues were reported with various Asus server boards using the
W83792D chip. The problem was that the SMBus is multiplexed on these
boards, and the BIOS didn't leave the multiplexer in the correct
configuration after boot. Each time, Asus did release a BIOS fixing the
issue.
I just asked our Asus contact about your motherboard, I'll let you know
what he thinks. In the meantime, if you are not already using the
latest BIOS available, I would suggest that you upgrade and see if it
helps.
> The reply i got from 'Asus' is, it using the slave addres as 0x5e,smbus base addres 0x400.
> But the driver for w83792d searches in 0x2c to 0x2f (static unsigned short normal_i2c_range[]
> = { 0x2c, 0x2f, SENSORS_I2C_END };)
This is the same. The I2C addresses are 7-bit, but Asus gave you the
value left-padded in a byte. 0x5e >> 1 = 0x2f, so the chip would show
at address 0x2f in Linux. The driver supports that address, so this
isn't the problem.
Please provide the output of "i2cdetect 0". This will scan your SMBus.
If nothing shows at 0x2c-0x2f, then the W83792D chip is not accessible,
and neither the w83792d driver nor user-space code will work, you need
a BIOS update from Asus.
--
Jean Delvare
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Problem with W83792d
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
2006-07-29 10:52 ` Nithin
2006-07-29 12:00 ` Jean Delvare
@ 2006-07-29 12:15 ` Mark M. Hoffman
2006-07-29 13:01 ` Nithin
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mark M. Hoffman @ 2006-07-29 12:15 UTC (permalink / raw)
To: lm-sensors
Hi Nithin:
* Nithin <nithinkj at hcl.in> [2006-07-29 15:51:29 +0530]:
> I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0
> In this board w83792d is the health monitoring chip.
> But i am not able to get any of the values.The chip is not even detecting using sensors-detect.
> I have inserted modules i2c-i801,i2c-proc,i2c-dev,i2c-core,w83792d.But the chip is showing in
> /proc/sys/dev/sensors/.
> The reply i got from 'Asus' is, it using the slave addres as 0x5e,smbus base addres 0x400.
> But the driver for w83792d searches in 0x2c to 0x2f (static unsigned short normal_i2c_range[] = { 0x2c, 0x2f, SENSORS_I2C_END };)
That's probably a small misunderstanding about the I2C address space - it has
7 bits address and the 8th is Read/!Write. So, many device datasheets will
say e.g. "read at 0x5f and write at 0x5e". Linux I2C subsystem considers
the address to be the 7 bits only, right justified. So when Asus says 0x5e,
they probably mean what Linux thinks is 0x2f.
I don't think we've ever seen a sensor chip reported in the range of
0x50-0x5f. That is reserved on PCs for the SPD/EEPROMs on your RAM.
After loading i2c-i801 and i2c-dev, what does 'i2cdetect -y 0' tell you?
Regards,
--
Mark M. Hoffman
mhoffman at lightlink.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Problem with W83792d
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
` (2 preceding siblings ...)
2006-07-29 12:15 ` Mark M. Hoffman
@ 2006-07-29 13:01 ` Nithin
2006-07-29 13:29 ` Mark M. Hoffman
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Nithin @ 2006-07-29 13:01 UTC (permalink / raw)
To: lm-sensors
Hi,
This is the output i got while issuing i2cdetect ,In this between 2c and
2f nothing
is seeing?
> [root at helinium root]# modprobe i2c-i801
> [root at helinium root]# modprobe i2c-dev
> [root at helinium root]# i2cdetect -y 0
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will probe file /dev/i2c-0.
> I will probe address range 0x03-0x77.
> Continue? [Y/n] y
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> 00: XX XX XX XX XX 08 XX XX XX XX XX XX XX
> 10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
> 20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
> 30: XX XX XX 33 XX XX XX XX XX XX XX XX XX XX XX XX
> 40: XX XX XX XX 44 XX XX XX XX XX XX XX XX XX XX XX
> 50: XX XX XX 53 XX XX XX XX XX XX XX XX XX XX XX XX
> 60: XX 61 XX XX XX XX XX XX XX XX XX XX XX XX XX XX
> 70: XX XX XX XX XX XX XX XX
>
Thanks
Nithin
Mark M. Hoffman wrote:
>Hi Nithin:
>
>
>
* Nithin <nithinkj at hcl.in> [2006-07-29 15:51:29 +0530]:
>> I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0
>>In this board w83792d is the health monitoring chip.
>>But i am not able to get any of the values.The chip is not even detecting using sensors-detect.
>>I have inserted modules i2c-i801,i2c-proc,i2c-dev,i2c-core,w83792d.But the chip is showing in
>>/proc/sys/dev/sensors/.
>>The reply i got from 'Asus' is, it using the slave addres as 0x5e,smbus base addres 0x400.
>>But the driver for w83792d searches in 0x2c to 0x2f (static unsigned short normal_i2c_range[] = { 0x2c, 0x2f, SENSORS_I2C_END };)
>>
>>
>
>That's probably a small misunderstanding about the I2C address space - it has
>7 bits address and the 8th is Read/!Write. So, many device datasheets will
>say e.g. "read at 0x5f and write at 0x5e". Linux I2C subsystem considers
>the address to be the 7 bits only, right justified. So when Asus says 0x5e,
>they probably mean what Linux thinks is 0x2f.
>
>I don't think we've ever seen a sensor chip reported in the range of
>0x50-0x5f. That is reserved on PCs for the SPD/EEPROMs on your RAM.
>
>After loading i2c-i801 and i2c-dev, what does 'i2cdetect -y 0' tell you?
>
>Regards,
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Problem with W83792d
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
` (3 preceding siblings ...)
2006-07-29 13:01 ` Nithin
@ 2006-07-29 13:29 ` Mark M. Hoffman
2006-07-31 14:37 ` Jean Delvare
2006-08-02 11:29 ` Nithin
6 siblings, 0 replies; 8+ messages in thread
From: Mark M. Hoffman @ 2006-07-29 13:29 UTC (permalink / raw)
To: lm-sensors
Hi Nithin:
* Nithin <nithinkj at hcl.in> [2006-07-29 18:19:04 +0530]:
>
> Hi,
> This is the output i got while issuing i2cdetect ,In this between 2c and
> 2f nothing
> is seeing?
>
> > [root at helinium root]# modprobe i2c-i801
> > [root at helinium root]# modprobe i2c-dev
> > [root at helinium root]# i2cdetect -y 0
> > WARNING! This program can confuse your I2C bus, cause data loss and worse!
> > I will probe file /dev/i2c-0.
> > I will probe address range 0x03-0x77.
> > Continue? [Y/n] y
> > 0 1 2 3 4 5 6 7 8 9 a b c d e f
> > 00: XX XX XX XX XX 08 XX XX XX XX XX XX XX
> > 10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
> > 20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
> > 30: XX XX XX 33 XX XX XX XX XX XX XX XX XX XX XX XX
> > 40: XX XX XX XX 44 XX XX XX XX XX XX XX XX XX XX XX
> > 50: XX XX XX 53 XX XX XX XX XX XX XX XX XX XX XX XX
> > 60: XX 61 XX XX XX XX XX XX XX XX XX XX XX XX XX XX
> > 70: XX XX XX XX XX XX XX XX
Well, this shows that your I2C bus is working, at least. But obviously
your sensor chip is not visible at 0x2f. As Jean Delvare advised, see
if there is a newer BIOS version available. Otherwise, you'll have to
wait for our Asus contact to reply.
Regards,
--
Mark M. Hoffman
mhoffman at lightlink.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Problem with W83792d
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
` (4 preceding siblings ...)
2006-07-29 13:29 ` Mark M. Hoffman
@ 2006-07-31 14:37 ` Jean Delvare
2006-08-02 11:29 ` Nithin
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2006-07-31 14:37 UTC (permalink / raw)
To: lm-sensors
Hi Nithin,
> I just asked our Asus contact about your motherboard, I'll let you know
> what he thinks. In the meantime, if you are not already using the
> latest BIOS available, I would suggest that you upgrade and see if it
> helps.
Our contact needs the exact version of the motherboard (exact name and
revision if it applies) and the BIOS version you are currently using
(should show at boot time, and dmidecode should tell you too.) Please
provide this information.
--
Jean Delvare
^ permalink raw reply [flat|nested] 8+ messages in thread
* [lm-sensors] Problem with W83792d
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
` (5 preceding siblings ...)
2006-07-31 14:37 ` Jean Delvare
@ 2006-08-02 11:29 ` Nithin
6 siblings, 0 replies; 8+ messages in thread
From: Nithin @ 2006-08-02 11:29 UTC (permalink / raw)
To: lm-sensors
Hi,
The problem got solved with the latest BIOS.
Thank you for your quick responses and support.
Thaks
Nithin
Jean Delvare wrote:
>Hi Nithin,
>
>
>
>>I just asked our Asus contact about your motherboard, I'll let you know
>>what he thinks. In the meantime, if you are not already using the
>>latest BIOS available, I would suggest that you upgrade and see if it
>>helps.
>>
>>
>
>Our contact needs the exact version of the motherboard (exact name and
>revision if it applies) and the BIOS version you are currently using
>(should show at boot time, and dmidecode should tell you too.) Please
>provide this information.
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-08-02 11:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-29 10:33 [lm-sensors] Problem with W83792d Nithin
2006-07-29 10:52 ` Nithin
2006-07-29 12:00 ` Jean Delvare
2006-07-29 12:15 ` Mark M. Hoffman
2006-07-29 13:01 ` Nithin
2006-07-29 13:29 ` Mark M. Hoffman
2006-07-31 14:37 ` Jean Delvare
2006-08-02 11:29 ` Nithin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.