i2cdetect fails on a Asus P5ND2-Sli Deluxe
Hi,
My kernel is 2.6.14, i2c-nforce2 & it87, which are known to work with lm-sensors, are built-in kernel, on a Debian sarge.
it87 works fine (I'll come back later on this, I have a few questions), but i2c-nforce2 fails :
marsu{pts/0}:~/[1]/> i2cdetect
Error: No i2c-bus specified!
Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]
i2cdetect -l
i2cdetect -V
I2CBUS is an integer
With -a, probe all addresses (NOT RECOMMENDED)
With -q, uses only quick write commands for probing (NOT RECOMMENDED) With -r, uses only read byte commands for probing (NOT RECOMMENDED) If provided, FIRST and LAST limit the probing range.
With -l, lists installed busses only
Error: No I2C busses found!
Be sure you have done 'modprobe i2c-dev'
and also modprobed your i2c bus drivers
My kernel is set as :
CONFIG_I2C=yCONFIG_I2C_CHARDEV=yCONFIG_I2C_ALGOBIT=yCONFIG_I2C_ISA=yCONFIG_I2C_NFORCE2=yCONFIG_FB_NVIDIA_I2C=y (for framebuffer, but now, it's not the problem)
What's wrong ??
Thanks in advance.
Signature · 1 line
Fred.
Hi Fred,
Quoted 6 lines
And lspci sounds good :
0000:00:0a.0 ISA bridge: nVidia Corporation: Unknown device 0030 (rev a3)
Subsystem: Asustek Computer, Inc.: Unknown device 818a
Flags: bus master, 66MHz, fast devsel, latency 0
Quoted 7 lines
0000:00:0a.1 SMBus: nVidia Corporation: Unknown device 0034 (rev a2)
Subsystem: Asustek Computer, Inc.: Unknown device 818a
Flags: 66MHz, fast devsel, IRQ 3
I/O ports at e400 [size2]
I/O ports at 5000 [sized]
I/O ports at 5100 [sized]
Capabilities: <available only to root>
It doesn't, actually. Device 0x0034 isn't supported by the i2c-nforce2 driver (yet). No wonder it doesn't work.
What kind of nForce chip is it? If it brand new?
You may take your chance and add 0x0034 to the list of IDs in drivers/i2c/busses/i2c-nforce2.c. If your chip is actually compatible with the earlier incarnations, it may work. Or it may not work, and may even do bad things. Unless you have a datasheet, it's impossible for us to tell. And you're on your own if something bad happens, of course.
If you try it out, please let us know the outcome.
Signature · 1 line
Jean Delvare
Jean Delvare a ?crit :
Quoted 18 lines
Hi Fred,
Quoted 6 lines
And lspci sounds good :
0000:00:0a.0 ISA bridge: nVidia Corporation: Unknown device 0030 (rev a3)
Subsystem: Asustek Computer, Inc.: Unknown device 818a
Flags: bus master, 66MHz, fast devsel, latency 0Quoted 7 lines
0000:00:0a.1 SMBus: nVidia Corporation: Unknown device 0034 (rev a2)
Subsystem: Asustek Computer, Inc.: Unknown device 818a
Flags: 66MHz, fast devsel, IRQ 3
I/O ports at e400 [size2]
I/O ports at 5000 [sized]
I/O ports at 5100 [sized]
Capabilities: <available only to root>
Quoted 2 lines
It doesn't, actually. Device
0x0034isn't supported by the i2c-nforce2 driver (yet). No wonder it doesn't work.
argh ! :-(
Quoted 1 line
What kind of nForce chip is it? If it brand new?
Asus user guide says it's a nvidia nForce4 MCP-04.
Quoted 6 lines
You may take your chance and add
0x0034to the list of IDs indrivers/i2c/busses/i2c-nforce2.c. If your chip is actually compatible with the earlier incarnations, it may work. Or it may not work, and may even do bad things. Unless you have a datasheet, it's impossible for us to tell. And you're on your own if something bad happens, of course.
Hmmm, I don't know where to add it in i2c-nforce2.c :-(
Any help, plz ?
Signature · 1 line
Fred.
Hi Fred,
Quoted 11 lines
Quoted 6 lines
You may take your chance and add
0x0034to the list of IDs indrivers/i2c/busses/i2c-nforce2.c. If your chip is actually compatible with the earlier incarnations, it may work. Or it may not work, and may even do bad things. Unless you have a datasheet, it's impossible for us to tell. And you're on your own if something bad happens, of course.Hmmm, I don't know where to add it in
i2c-nforce2.c:-(Any help, plz ?
That would be it:
drivers/i2c/busses/i2c-nforce2.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/i2c/busses/i2c-nforce2.c +2 -0
@@ -30,6 +30,7 @@ nForce3 Pro150 MCP 00D4 nForce3 250Gb MCP 00E4 nForce4 MCP 0052 + nForce4 MCP-04 0034 This driver supports the 2 SMBuses that are included in the MCP of the nForce2/3/4 chipsets.
@@ -257,6 +258,7 @@ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0034) }, { 0 } };
USE AT YOUR OWN RISK! Without a datasheet, I can't say whether this new chip is compatible with the older ones. Chances are, it is. But again maybe not. If you try it out, please let us know the outcome.
Signature · 1 line
Jean Delvare
Jean Delvare a ?crit :
Quoted 2 lines
chip is compatible with the older ones. Chances are, it is. But again maybe not. If you try it out, please let us know the outcome.
Seems to work fine, this time ;-)
dmesg:
i2c /dev entries driveri2c_adapter i2c-0: nForce2 SMBus adapter at 0x5000 i2c_adapter i2c-1: nForce2 SMBus adapter at 0x5100
i2cdetect -l:
i2c-1 unknown SMBus nForce2 adapter at 5100
Algorithm unavailable
i2c-0 unknown SMBus nForce2 adapter at 5000
Algorithm unavailable
But..., a stupid question : what can I do with this i2c busses ? What is used for, knowing that it87 provides temp, fan, volt etc. What does "Algorithm unavailable" mean?
Which one must I use (PCF ? PCA ?)
Thanks, anyway.
Signature · 1 line
Fred.
fred a ?crit :
Quoted 1 line
But..., a stupid question : what can I do with this i2c busses ?
Now, I can see eeprom with xsensors.
I have 4 x 1 GB (DDR2) on my mobo.
xsensors displays I have 4 modules, yes,
but with memory type of 8 and memory size of 14 MB !
Signature · 1 line
Fred.
fred a ?crit :
Quoted 9 lines
fred a ?crit :
Quoted 1 line
But..., a stupid question : what can I do with this i2c busses ?
Now, I can see eeprom with xsensors.
I have 4 x 1 GB (DDR2) on my mobo.
xsensors displays I have 4 modules, yes,
but with memory type of 8 and memory size of 14 MB !
Works fine too with amd64/EM64T debian distro.
(with the same results for RAM modules).
Signature · 1 line
Fred.
Hi Fred,
Quoted 5 lines
Quoted 1 line
But..., a stupid question : what can I do with this i2c busses ?
Now, I can see eeprom with xsensors.
I have 4 x 1 GB (DDR2) on my mobo.
xsensors displays I have 4 modules, yes,
but with memory type of 8 and memory size of 14 MB !
xsensors most probably doesn't know about DDR2 memory modules. You may try the following patch. That's a quick hack and I have no way to test it (no DDR2 SDRAM here). Please let me know if it works. If it does, I'll send it to Kris Kersey.
src/gui.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-)
src/gui.c +20 -3
@@ -332,6 +332,19 @@ widget->style->fg_gc[GTK_WIDGET_STATE (widget) ], theme,54 ,150 , 161, 0, 75, 30 ); + }else if ( current->curvalue =8 ) { +gdk_draw_drawable ( widget->window, + widget->style->fg_gc[GTK_WIDGET_STATE + (widget) ], theme,55 ,120 , +0 ,0 ,57 ,30 ); +gdk_draw_drawable ( widget->window, + widget->style->fg_gc[GTK_WIDGET_STATE + (widget) ], theme,36 ,0 , +57 ,0 ,18 ,30 ); +gdk_draw_drawable ( widget->window, + widget->style->fg_gc[GTK_WIDGET_STATE + (widget) ], theme,112 ,120 , +75 ,0 ,104 ,30 ); }else { gdk_draw_drawable( widget->window, widget->style->fg_gc[ GTK_WIDGET_STATE
@@ -403,7 +416,7 @@ }else {sensors_get_feature ( current->name,SENSORS_EEPROM_TYPE , &tempD ); -if ( tempD =4.0 || tempD =7.0 ) { +if ( tempD =4.0 || tempD =7.0 || tempD =8.0 ) {sensors_get_feature (current->name,SENSORS_EEPROM_ROWADDR , &a); sensors_get_feature(current->name, SENSORS_EEPROM_COLADDR,
@@ -414,8 +427,12 @@ &d); result = (((int ) a) &0x0f ) + (((int ) b) &0x0f ) -17 ; -if (result >0 && result <=12 && c <=8 && d <=8 ) - result = (1 << result) * ((int ) c) * ((int ) d); +if ( tempD =8.0 ) {/* DDR2 */ + result = (1 << result) * ((((int ) c) &0x07 ) +1 ) + * ((int ) d); + + }else if (result >0 && result <=12 && c <=8 && d <=8 ) + result = (1 << result) * ((int ) c) * ((int ) d); } gdk_draw_drawable( widget->window,
Note that eeproms are not sensors though, and our ultimate goal is to drop support for non-sensors devices in libsensors.
Signature · 1 line
Jean Delvare
Jean Delvare a ?crit :
Quoted 11 lines
Hi Fred,
Quoted 6 lines
Quoted 1 line
But..., a stupid question : what can I do with this i2c busses ?
Now, I can see eeprom with xsensors.
I have 4 x 1 GB (DDR2) on my mobo.
xsensors displays I have 4 modules, yes,
but with memory type of 8 and memory size of 14 MB !
Quoted 3 lines
xsensors most probably doesn't know about DDR2 memory modules. You may try the following patch. That's a quick hack and I have no way to test it (no DDR2 SDRAM here). Please let me know if it works. If it does,
Ok, I'm going to try it.
And about algo PCA & PCF ?
Do I need them ?
Signature · 1 line
Fred.
fred a ?crit :
Quoted 14 lines
Jean Delvare a ?crit :
Quoted 12 lines
Hi Fred,
Quoted 6 lines
Quoted 1 line
But..., a stupid question : what can I do with this i2c busses ?
Now, I can see eeprom with xsensors.
I have 4 x 1 GB (DDR2) on my mobo.
xsensors displays I have 4 modules, yes,
but with memory type of 8 and memory size of 14 MB !
Quoted 5 lines
Quoted 3 lines
xsensors most probably doesn't know about DDR2 memory modules. You may try the following patch. That's a quick hack and I have no way to test it (no DDR2 SDRAM here). Please let me know if it works. If it does,
Ok, I'm going to try it.
That works much better !
I don't have 1024 MB but 1 24 MB : 0 does not appears. I don't know why.
PS : xsensors works fine, but sensord still complains :
Dec 13 23:25:01 marsu sensord: Adapter: SMBus nForce2 adapter at 5000 Dec 13 23:25:01 marsu sensord: Algorithm: Unavailable from sysfs Dec 13 23:25:01 marsu sensord: Memory type: Invalid Dec 13 23:25:01 marsu sensord: Memory size (MB): Invalid 14 10 97 4
PS2 : why it87 is not supported by xsensors ?
Thanks, Jean.
Signature · 1 line
Fred.
Hi Fred,
Quoted 2 lines
And about algo PCA & PCF ?
Do I need them ?
No, you don't. Algorithms are internal bus driver implementation details, which non-developers don't have to care about. Ultimately, I'd like to remove any reference to them in user-space, as this tends to confuse users a lot. Anyone interesting in taking that particular job, just speak up. It's probably quite easy.
Signature · 1 line
Jean Delvare
Hi Fred,
Quoted 3 lines
That works much better !
I don't have 1024 MB but 1 24 MB : 0 does not appears. I don't know why.
Looks like a bug in xsensors, it has code to drop leading zeroes in memory module sizes, but that code is broken and actually strips all zeroes, not just leading ones. 1024 is the first power of 2 which needs a zero, so I guess the bug went unnoticed because even now, 1 GB memory modules are quite rare.
Please give a try to the following patch, which I expect to fix it:
src/gui.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
src/gui.c +2 -6
@@ -460,13 +460,11 @@ (widget) ], theme, x, highLow, 54, 0, 18, 30 ); -if ( result >=100 ) { +if ( result >=100 || x !=198 ) { curInt = result /100 ; result = result %100 ;get_pm_location ( curInt, &x ); - }else { - x =198 ; } gdk_draw_drawable( widget->window,
@@ -474,13 +472,11 @@ (widget) ], theme, x, highLow, 72, 0, 18, 30 ); -if ( result >=10 ) { +if ( result >=10 || x !=198 ) { curInt = result /10 ; result = result %10 ;get_pm_location ( curInt, &x ); - }else { - x =198 ; } gdk_draw_drawable( widget->window,
Quoted 3 lines
PS : xsensors works fine, but sensord still complains :
Dec 13 23:25:01 marsu sensord: Adapter: SMBus nForce2 adapter at 5000 Dec 13 23:25:01 marsu sensord: Algorithm: Unavailable from sysfs
Note that it isn't an error. You may ignore any message related to algorithms safely, see my other post. We'll drop them soon (I hope).
Quoted 2 lines
Dec 13 23:25:01 marsu sensord: Memory type: Invalid Dec 13 23:25:01 marsu sensord: Memory size (MB): Invalid 14 10 97 4
Lack of support for DDR2 SDRAM. We have dropped eeprom support entirely from sensord in the next release anyway. There's little interest in continuously polling read-only data, isn't it?
Quoted 1 line
PS2 : why it87 is not supported by xsensors ?
it87 is. You have (I guess) it8712, which is only supported in xsensors 0.47, while Sarge ships 0.46. Try 0.47 with my two patches and it should work fine.
Signature · 1 line
Jean Delvare
Jean Delvare a ?crit :
Quoted 1 line
Please give a try to the following patch, which I expect to fix it:
Yes, it does !
Great. :-)
Quoted 7 lines
Quoted 3 lines
PS : xsensors works fine, but sensord still complains :
Dec 13 23:25:01 marsu sensord: Adapter: SMBus nForce2 adapter at 5000 Dec 13 23:25:01 marsu sensord: Algorithm: Unavailable from sysfsNote that it isn't an error. You may ignore any message related to algorithms safely, see my other post. We'll drop them soon (I hope).
Ok.
Quoted 8 lines
Quoted 3 lines
Dec 13 23:25:01 marsu sensord: Memory type: Invalid Dec 13 23:25:01 marsu sensord: Memory size (MB): Invalid 14 10 97 4Lack of support for DDR2 SDRAM. We have dropped eeprom support entirely from sensord in the next release anyway. There's little interest in continuously polling read-only data, isn't it?
No, it's nice to see 1024 MB on xsensors :-)))
Quoted 7 lines
Quoted 2 lines
PS2 : why it87 is not supported by xsensors ?
it87 is. You have (I guess) it8712, which is only supported in xsensors 0.47, while Sarge ships 0.46. Try 0.47 with my two patches and it should work fine.
Yes. It works fine.
My Asus mobo is very happy.
Thanks a lot for your job, Jean.
Signature · 1 line
Fred.