Problem with W83792d
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
Sorry
The chip is NOT showing in /proc/sys/dev/sensors/.
Quoted 95 lines
Hi,
I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0In 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 addres0x400.
But the driver for w83792d searches in0x2cto0x2f(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
Hi Nithin,
Quoted 5 lines
I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0In 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.
Quoted 3 lines
The reply i got from 'Asus' is, it using the slave addres as 0x5e,smbus base addres
0x400. But the driver for w83792d searches in0x2cto0x2f(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.
Signature · 1 line
Jean Delvare
Hi Nithin:
Quoted 7 lines · Nithin
I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0In 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 addres0x400.
But the driver for w83792d searches in0x2cto0x2f(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,
Signature · 2 lines
Mark M. Hoffman mhoffman at lightlink.com
Hi,
This is the output i got while issuing i2cdetect ,In this between 2c and 2f nothing
is seeing?
Quoted 8 lines
[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
Quoted 9 lines
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
Quoted 4 lines · Mark M. Hoffman
Hi Nithin:
Quoted 25 lines · Nithin
Quoted 9 lines
I m working in "ASUS NCL-DE Board " in RHEL 3.0 UP5,with lmsensors-2.10.0 and i2c-2.10.0In 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 addres0x400.
But the driver for w83792d searches in0x2cto0x2f(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
0x5fand write at0x5e". Linux I2C subsystem considers the address to be the 7 bits only, right justified. So when Asus says0x5e, they probably mean what Linux thinks is0x2f.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,
Hi Nithin:
Quoted 22 lines · Nithin
Hi,
This is the output i got while issuing i2cdetect ,In this between 2c and 2f nothing
is seeing?Quoted 16 lines
[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,
Signature · 2 lines
Mark M. Hoffman mhoffman at lightlink.com
Hi Nithin,
Quoted 4 lines
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.
Signature · 1 line
Jean Delvare
Hi,
The problem got solved with the latest BIOS.
Thank you for your quick responses and support.
Thaks
Nithin
Quoted 18 lines · Jean Delvare
Hi Nithin,
Quoted 6 lines
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.