Skip to contentSkip to conversation

Winbond W83L604G

DISCUSSION Tim Nelson 4 participants 16 messages Jul 5, 2011 – Jul 11, 2011 14 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore

Tim Nelson

author
#0 lore raw

Greetings-

I've got a board with a Winbond W83L604G GPIO controller and I'd like to use it with Debian 6.x for controlling attached LEDs. However, using i2cdetect, I'm not seeing any I2C busses on the system, nor any I2C devices. Does this controller require a specific kernel module for operation? Any tips or pointers on how to make it available for control using I2C?

I've not found a current kernel module for this chip, nor found any reference when grep'ing through the current source tarball. Maybe there simply isn't a module available to use it?

Thanks!

--Tim

A message that is not in the archive (sent off-list or not yet received): 30480104.171.1309877177809.JavaMail.root-N94c1vXlnCs/q/[email protected]

#2 lore raw

You have to install i2c-dev.ko with "insmod i2c-dev.ko". Good luck :)

BR

Shijie

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tim Nelson
Sent: Tuesday, July 05, 2011 10:46 PM
To: [email protected]
Subject: Winbond W83L604G

Greetings-

I've got a board with a Winbond W83L604G GPIO controller and I'd like to use it with Debian 6.x for controlling attached LEDs. However, using i2cdetect, I'm not seeing any I2C busses on the system, nor any I2C devices. Does this controller require a specific kernel module for operation? Any tips or pointers on how to make it available for control using I2C?

I've not found a current kernel module for this chip, nor found any reference when grep'ing through the current source tarball. Maybe there simply isn't a module available to use it?

Thanks!

--Tim

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 6D7A567890E70E4BA49B8A9B365980FA12D99C14BE-QQHDSDV1ERZpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org

author
#4 lore raw

I've done that:

root@aaa:~# lsmod | grep i2c
i2c_dev                 3382  0
i2c_core               12703  1 i2c_dev

But, nothing of interest in dmesg other than:

[108414.944722] i2c /dev entries driver

and running i2cdetect still turns up nothing:

root@aaa:~# i2cdetect -l

Any thoughts? Does this specific Winbond chip require a device specific kernel module to operate such as those found in /lib/modules/2.6.32-5-486/kernel/drivers/i2c/busses ?

Tim Nelson
Systems/Network Support
Rockbochs Inc.
(218)727-4332 x105

----- Original Message -----

Quoted 35 lines

You have to install i2c-dev.ko with "insmod i2c-dev.ko". Good luck :)

BR

Shijie

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tim Nelson
Sent: Tuesday, July 05, 2011 10:46 PM
To: [email protected]
Subject: Winbond W83L604G

Greetings-

I've got a board with a Winbond W83L604G GPIO controller and I'd like to use it with Debian 6.x for controlling attached LEDs. However, using i2cdetect, I'm not seeing any I2C busses on the system, nor any I2C devices. Does this controller require a specific kernel module for operation? Any tips or pointers on how to make it available for control using I2C?

I've not found a current kernel module for this chip, nor found any reference when grep'ing through the current source tarball. Maybe there simply isn't a module available to use it?

Thanks!

--Tim

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 8829587.204.1309885573653.JavaMail.root-N94c1vXlnCs/q/[email protected]

#6 lore raw

Hi Tim,

Quoted 8 lines · Tim Nelson

I've done that:

root@aaa:~# lsmod | grep i2c
i2c_dev                 3382  0
i2c_core               12703  1 i2c_dev

But, nothing of interest in dmesg other than:

Quoted 7 lines
[108414.944722] i2c /dev entries driver

and running i2cdetect still turns up nothing:

root@aaa:~# i2cdetect -l

Any thoughts? Does this specific Winbond chip require a device specific kernel module to operate such as those found in /lib/modules/2.6.32-5-486/kernel/drivers/i2c/busses ?

As I understand it, the W83L604G is a GPIO expander on I2C/SMBus, so what it needs is a driver in drivers/gpio. We don't seem to have support for it yet, unless it is 100% compatible with another device we already support.

On top of that, you need a driver for the I2C/SMBus controller on your mainboard, to which the W83L604G is connected. Without it, you won't even be able to talk to the W83L604G. You did not tell us anything about your system so we can't tell you which driver that would be - if we have a driver at all. Does lspci say anything about SMBus? If not, what is your system based on?

Signature · 1 line
Jean Delvare

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#8 lore raw

----- Original Message -----

Quoted 28 lines

Hi Tim,

Quoted 10 lines · Tim Nelson

I've done that:

root@aaa:~# lsmod | grep i2c
i2c_dev 3382 0
i2c_core 12703 1 i2c_dev

But, nothing of interest in dmesg other than:

[108414.944722] i2c /dev entries driver
Quoted 7 lines

and running i2cdetect still turns up nothing:

root@aaa:~# i2cdetect -l

Any thoughts? Does this specific Winbond chip require a device specific kernel module to operate such as those found in /lib/modules/2.6.32-5-486/kernel/drivers/i2c/busses ?

As I understand it, the W83L604G is a GPIO expander on I2C/SMBus, so what it needs is a driver in drivers/gpio. We don't seem to have support
for it yet, unless it is 100% compatible with another device we already
support.

Quoted 7 lines

On top of that, you need a driver for the I2C/SMBus controller on your mainboard, to which the W83L604G is connected. Without it, you won't even be able to talk to the W83L604G. You did not tell us anything about your system so we can't tell you which driver that would be - if we have a driver at all. Does lspci say anything about SMBus? If not, what is your system based on?

Greetings Jean-

The board is running an AMD Geode LX CPU with the CS5536 companion chip. Here is the output of lspci:

root@aaa:~# lspci
00:01.0 Host bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] Host Bridge (rev 33)
00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video
00:01.2 Entertainment encryption device: Advanced Micro Devices [AMD] Geode LX AES Security Block
00:0e.0 Ethernet controller: VIA Technologies, Inc. VT6105M [Rhine-III] (rev 96)
00:0f.0 Ethernet controller: VIA Technologies, Inc. VT6105M [Rhine-III] (rev 96)
00:12.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
00:13.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA (rev 03)
00:13.2 IDE interface: Advanced Micro Devices [AMD] CS5536 [Geode companion] IDE (rev 01)
00:13.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC (rev 02)
00:13.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC (rev 02)

There are no SMBus controllers listed. However, The datasheet[1] for the CS5536 notes there is an SMB controller within this chip. Details from the datasheet:

"System Management Bus (SMB) Controller:
— Compatible with Intel System Management Bus,
Industry Standard Two-wire interface, and
ACCESS.bus
— Bus master and slave operation"

--Tim

[1] http://support.amd.com/us/Embedded_TechDocs/33238G_cs5536_db.pdf (Logical block layout on p.13, details on p.14)

A message that is not in the archive (sent off-list or not yet received): 20432649.84.1309963215499.JavaMail.root-N94c1vXlnCs/q/[email protected]

#10 lore raw
Quoted 53 lines · Tim Nelson

----- Original Message -----

Quoted 28 lines

Hi Tim,

Quoted 10 lines · Tim Nelson

I've done that:

root@aaa:~# lsmod | grep i2c
i2c_dev 3382 0
i2c_core 12703 1 i2c_dev

But, nothing of interest in dmesg other than:

[108414.944722] i2c /dev entries driver
Quoted 7 lines

and running i2cdetect still turns up nothing:

root@aaa:~# i2cdetect -l

Any thoughts? Does this specific Winbond chip require a device specific kernel module to operate such as those found in /lib/modules/2.6.32-5-486/kernel/drivers/i2c/busses ?

As I understand it, the W83L604G is a GPIO expander on I2C/SMBus, so what it needs is a driver in drivers/gpio. We don't seem to have support
for it yet, unless it is 100% compatible with another device we already
support.

Quoted 7 lines

On top of that, you need a driver for the I2C/SMBus controller on your mainboard, to which the W83L604G is connected. Without it, you won't even be able to talk to the W83L604G. You did not tell us anything about your system so we can't tell you which driver that would be - if we have a driver at all. Does lspci say anything about SMBus? If not, what is your system based on?

Greetings Jean-

The board is running an AMD Geode LX CPU with the CS5536 companion chip. Here is the output of lspci:

root@aaa:~# lspci
00:01.0 Host bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] Host Bridge (rev 33)
00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video
00:01.2 Entertainment encryption device: Advanced Micro Devices [AMD] Geode LX AES Security Block
00:0e.0 Ethernet controller: VIA Technologies, Inc. VT6105M [Rhine-III] (rev 96)
00:0f.0 Ethernet controller: VIA Technologies, Inc. VT6105M [Rhine-III] (rev 96)
00:12.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
00:13.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA (rev 03)
00:13.2 IDE interface: Advanced Micro Devices [AMD] CS5536 [Geode companion] IDE (rev 01)
00:13.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC (rev 02)
00:13.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC (rev 02)
Quoted 7 lines

There are no SMBus controllers listed. However, The datasheet[1] for the CS5536 notes there is an SMB controller within this chip. Details from the datasheet:

"System Management Bus (SMB) Controller:
— Compatible with Intel System Management Bus,
Industry Standard Two-wire interface, and
ACCESS.bus
— Bus master and slave operation"

Correct, and we have support for this device. Driver is named scx200_acb. Load it and then "i2cdetect -l" should list the SMBus.

Signature · 1 line
Jean Delvare

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#12 lore raw

----- Original Message -----

Quoted 74 lines · Tim Nelson
Quoted 73 lines

----- Original Message -----

Quoted 29 lines

Hi Tim,

Quoted 10 lines · Tim Nelson

I've done that:

root@aaa:~# lsmod | grep i2c
i2c_dev 3382 0
i2c_core 12703 1 i2c_dev

But, nothing of interest in dmesg other than:

[108414.944722] i2c /dev entries driver
Quoted 7 lines

and running i2cdetect still turns up nothing:

root@aaa:~# i2cdetect -l

Any thoughts? Does this specific Winbond chip require a device specific kernel module to operate such as those found in /lib/modules/2.6.32-5-486/kernel/drivers/i2c/busses ?

As I understand it, the W83L604G is a GPIO expander on I2C/SMBus, so
what it needs is a driver in drivers/gpio. We don't seem to have support
for it yet, unless it is 100% compatible with another device we already
support.

Quoted 11 lines

On top of that, you need a driver for the I2C/SMBus controller on your
mainboard, to which the W83L604G is connected. Without it, you won't
even be able to talk to the W83L604G. You did not tell us anything about your system so we can't tell you which driver that would be
- if
we have a driver at all. Does lspci say anything about SMBus? If not,
what is your system based on?

Greetings Jean-

The board is running an AMD Geode LX CPU with the CS5536 companion chip. Here is the output of lspci:

root@aaa:~# lspci
00:01.0 Host bridge: Advanced Micro Devices [AMD] CS5536 [Geode
companion] Host Bridge (rev 33)
00:01.1 VGA compatible controller: Advanced Micro Devices [AMD]
Geode LX Video
00:01.2 Entertainment encryption device: Advanced Micro Devices
[AMD] Geode LX AES Security Block
00:0e.0 Ethernet controller: VIA Technologies, Inc. VT6105M
[Rhine-III] (rev 96)
00:0f.0 Ethernet controller: VIA Technologies, Inc. VT6105M
[Rhine-III] (rev 96)
00:12.0 Communication controller: Tiger Jet Network Inc. Tiger3XX
Modem/ISDN interface
00:13.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode
companion] ISA (rev 03)
00:13.2 IDE interface: Advanced Micro Devices [AMD] CS5536 [Geode
companion] IDE (rev 01)
00:13.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode
companion] OHC (rev 02)
00:13.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode
companion] EHC (rev 02)

There are no SMBus controllers listed. However, The datasheet[1] for the CS5536 notes there is an SMB controller within this chip. Details from the datasheet:

Quoted 9 lines
Quoted 5 lines

"System Management Bus (SMB) Controller:
— Compatible with Intel System Management Bus,
Industry Standard Two-wire interface, and
ACCESS.bus
— Bus master and slave operation"

Correct, and we have support for this device. Driver is named scx200_acb. Load it and then "i2cdetect -l" should list the SMBus.

YES! The SMBus is now detected. I'll continue working with the i2c toolset further.

Thank you for the pointer!

--Tim

A message that is not in the archive (sent off-list or not yet received): 29201825.112.1309965025512.JavaMail.root-N94c1vXlnCs/q/[email protected]

author
#14 lore raw

----- Original Message -----

Quoted 8 lines
Quoted 4 lines

Correct, and we have support for this device. Driver is named scx200_acb. Load it and then "i2cdetect -l" should list the SMBus.

YES! The SMBus is now detected. I'll continue working with the i2c toolset further.

I think I'm *closer* to working with this chip, but not quite there yet!

After loading i2c-dev and scx200_acb, I am now able to see the system SMBus controller:

root@aaa:~# i2cdetect -l
i2c-0   smbus           CS5536 ACB0                             SMBus adapter

Next, I probe for I2C devices on the SMBus:

root@aaa:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- 4c -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

According to the W83L604G datasheet[1], I should be able to control the LED GPIO pins using register 08h. In an attempt to see the current values, I'm using i2cget, but getting no proper results:

root@aaa:~# i2cget -y 0 0x4c 0x8h
Error: Data address invalid!

Thinking I had the wrong i2c device, I tried the other detected device, same results:

root@aaa:~# i2cget -y 0 0x19 0x8h
Error: Data address invalid!

After exhausting my Google-fu, I've seen other examples of this register format, but it is not working here.

Any thoughts on how to proceed next? I feel like I'm --> <-- this close, but just missing something. Once I can read/write the registers properly, I should be able to control the GPIO pins, no?

Thank you!

--Tim

[1] http://www.nuvoton-usa.com/products/winbond_products/pdfs/PCIC/W83L603G604G_E0%201.pdf (Page 7 for specific GP10-GP13 control registers)

A message that is not in the archive (sent off-list or not yet received): 13595453.330.1309984221608.JavaMail.root-N94c1vXlnCs/q/[email protected]

#16 lore raw

Tim Nelson said the following:

Quoted 11 lines

----- Original Message -----

Quoted 8 lines
Quoted 4 lines

Correct, and we have support for this device. Driver is named scx200_acb. Load it and then "i2cdetect -l" should list the SMBus.

YES! The SMBus is now detected. I'll continue working with the i2c toolset further.

I think I'm *closer* to working with this chip, but not quite there yet!

...

Quoted 1 line
root@aaa:~# i2cget -y 0 0x19 0x8h
                                  A
                                  +-------------+
                                                |

I can't state to know what you are doing, but this ('h') does not look correct.

HTH

Signature · 1 line
KR Michael
#17 lore raw
In reply to a message not in the archive

Hi Tim,

Quoted 16 lines · Tim Nelson

Next, I probe for I2C devices on the SMBus:

root@aaa:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- 4c -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

According to the W83L604G datasheet[1], I should be able to control the LED GPIO pins using register 08h. In an attempt to see the current values, I'm using i2cget, but getting no proper results:

Quoted 8 lines
root@aaa:~# i2cget -y 0 0x4c 0x8h
Error: Data address invalid!

Thinking I had the wrong i2c device, I tried the other detected device, same results:

root@aaa:~# i2cget -y 0 0x19 0x8h
Error: Data address invalid!

As pointed out by Michael already, 08h in the datasheet translates to 0x08 in the Linux world.

The correct slave address is certainly 0x19, as the datasheet says that the first 4 address bits are hard-set to 0011b, which means a 7-bit slave address in the 0x18-0x1f range. The device at 0x4c could be a thermal sensor (sensors-detect should tell.)

Quoted 2 lines

(...)
Once I can read/write the registers properly, I should be able to control the GPIO pins, no?

Yes, with i2cget and i2cset you could do that. But I suspect that in the end you will want to write a proper kernel GPIO driver, so that you can benefit from all the nice things gpiolib does for you (including, but not limited to, clear and safe access from other kernel drivers.) There are several examples of such drivers under drivers/gpio (pcf857x and pca953x in particular.)

Signature · 1 line
Jean Delvare

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#19 lore raw

----- Original Message -----

Quoted 2 lines

As pointed out by Michael already, 08h in the datasheet translates to 0x08 in the Linux world.

I'm curious how this conversion translates. Is it as simple as dropping the suffix 'h', no actual math involved? Most other registers are noted with an 'h' suffix as well for this chip.

Quoted 6 lines

The correct slave address is certainly 0x19, as the datasheet says that
the first 4 address bits are hard-set to 0011b, which means a 7-bit slave address in the 0x18-0x1f range. The device at 0x4c could be a thermal sensor (sensors-detect should tell.)

Yes, correct. We have an ITE super-IO sensor onboard for monitoring which is at 0x4c.

Quoted 7 lines

Yes, with i2cget and i2cset you could do that. But I suspect that in the end you will want to write a proper kernel GPIO driver, so that you
can benefit from all the nice things gpiolib does for you (including, but not limited to, clear and safe access from other kernel drivers.) There are several examples of such drivers under drivers/gpio (pcf857x and pca953x in particular.)

This specific implementation purely needs to exist in userland as the only use for the controller is LED status (on, off, blink).

I'm now able to read from the proper register for the GP10-GP13 pins, but I'm not able to write. Example:

root@aaa:~# i2cget -y 0 0x19 0x08
0x00

According to the datasbeet, to set all LEDs from off to on, I'd need to set the 0x08 register to binary '10101010' which is 0xaa in hex. So:

root@aaa:~# i2cset -y 0 0x19 0x08 0xaa
Error: Write failed

Is my binary->hex math incorrect (verified against a few online calcs...)? Am I blatantly missing something else?

--Tim

A message that is not in the archive (sent off-list or not yet received): 19430981.80.1310052758044.JavaMail.root-N94c1vXlnCs/q/[email protected]

#21 lore raw

Hi Tim,

Quoted 5 lines · Tim Nelson

----- Original Message -----

Quoted 2 lines

As pointed out by Michael already, 08h in the datasheet translates to 0x08 in the Linux world.

I'm curious how this conversion translates. Is it as simple as dropping the suffix 'h', no actual math involved? Most other registers are noted with an 'h' suffix as well for this chip.

No math involved. The "h" suffix means hexadecimal. The "0x" prefix means the same. Which one to use depends on the environment and culture. Have fun reading:
http://en.wikipedia.org/wiki/Hexadecimal#Representing_hexadecimal

Quoted 7 lines
Quoted 5 lines

The correct slave address is certainly 0x19, as the datasheet says that
the first 4 address bits are hard-set to 0011b, which means a 7-bit slave address in the 0x18-0x1f range. The device at 0x4c could be a thermal sensor (sensors-detect should tell.)

Yes, correct. We have an ITE super-IO sensor onboard for monitoring which is at 0x4c.

That would be relatively surprising, as ITE super-I/O chips are LPC devices accessed with direct I/O. I think there used to be one old model which could alternatively be accessed over the SMBus (the monitoring block at least) but it would be at address 0x2d rather than 0x4c, and I doubt current chips still support that.

Just try sensors-detect and see what it finds.

Quoted 9 lines
Quoted 7 lines

Yes, with i2cget and i2cset you could do that. But I suspect that in the end you will want to write a proper kernel GPIO driver, so that you
can benefit from all the nice things gpiolib does for you (including, but not limited to, clear and safe access from other kernel drivers.) There are several examples of such drivers under drivers/gpio (pcf857x and pca953x in particular.)

This specific implementation purely needs to exist in userland as the only use for the controller is LED status (on, off, blink).

Well, there is a framework in the kernel for this too.

Quoted 11 lines

I'm now able to read from the proper register for the GP10-GP13 pins, but I'm not able to write. Example:

root@aaa:~# i2cget -y 0 0x19 0x08
0x00

According to the datasbeet, to set all LEDs from off to on, I'd need to set the 0x08 register to binary '10101010' which is 0xaa in hex. So:

root@aaa:~# i2cset -y 0 0x19 0x08 0xaa
Error: Write failed

Is my binary->hex math incorrect (verified against a few online calcs...)? Am I blatantly missing something else?

Your binary->hex is correct, and the command as well, but the chip did not like the write for some reason. You should look at the kernel logs when it failed, there may be a hint. You could also just retry to check if this was maybe a transient error.

To test the reliability of the SMBus you could dump the whole register map:

# i2cdump -y -r 0x00-0x22 0 0x19
and look for XX's.
Signature · 1 line
Jean Delvare

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#23 lore raw

----- Original Message -----

Quoted 11 lines

Your binary->hex is correct, and the command as well, but the chip did not like the write for some reason. You should look at the kernel logs when it failed, there may be a hint. You could also just retry to check
if this was maybe a transient error.

To test the reliability of the SMBus you could dump the whole register map:

# i2cdump -y -r 0x00-0x22 0 0x19
and look for XX's.

I'm seeing a *lot* of 'XX's present. Here are ten samples:

root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX 00 XX 55 XX XX XX XX ff XX XX    XXXXXX.XUXXXX.XX
10: 3f XX XX XX 00 XX XX XX XX XX ff XX XX XX XX XX    ?XXX.XXXXX.XXXXX
20: 95 92 XX                                           ??X
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX XX XX 55 XX XX XX XX ff XX XX    XXXXXXXXUXXXX.XX
10: XX XX 00 XX XX XX XX XX XX XX XX XX XX XX XX XX    XX.XXXXXXXXXXXXX
20: XX 92 XX                                           X?X
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 9f 00 XX XX XX XX XX XX XX XX XX XX XX XX XX XX    ?.XXXXXXXXXXXXXX
10: XX XX XX 3f XX XX XX XX XX ff XX XX XX XX XX XX    XXX?XXXXX.XXXXXX
20: XX 92 XX                                           X?X
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX 00 00 XX XX XX XX XX XX XX XX    XXXXXX..XXXXXXXX
10: XX XX XX XX XX XX 00 XX XX XX XX XX XX ff ff ff    XXXXXX.XXXXXX...
20: XX XX XX                                           XXX
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX 00 ff XX XX XX XX XX XX XX XX XX ff XX XX    XX..XXXXXXXXX.XX
10: XX XX 00 XX XX XX XX XX XX XX XX ff ff XX ff XX    XX.XXXXXXXX..X.X
20: XX XX XX                                           XXX
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX 00 XX 00 XX XX XX XX XX XX XX XX XX XX XX    XX.X.XXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX ff XX XX XX XX XX XX    XXXXXXXXX.XXXXXX
20: XX 92 XX                                           X?X
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX 00 00 XX XX XX XX XX ff XX XX    XXXXXX..XXXXX.XX
10: XX XX 00 XX XX XX XX XX XX XX XX ff XX ff XX XX    XX.XXXXXXXX.X.XX
20: 95 XX XX                                           ?XX
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 9f XX XX XX XX XX XX XX 55 XX XX ff XX XX XX XX    ?XXXXXXXUXX.XXXX
10: XX 00 XX XX XX XX XX XX XX ff XX XX XX XX XX XX    X.XXXXXXX.XXXXXX
20: XX XX 00                                           XX.
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX 00 XX XX XX XX XX XX XX ff XX XX XX    XXXX.XXXXXXX.XXX
10: XX XX 00 XX 00 XX 00 XX XX XX XX XX XX ff XX XX    XX.X.X.XXXXXX.XX
20: XX XX XX                                           XXX
root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX XX XX XX 9e XX XX ff XX XX XX    XXXXXXXXX?XX.XXX
10: XX 00 00 XX XX XX XX XX XX XX ff ff XX XX XX ff    X..XXXXXXX..XXX.
20: XX XX XX                                           XXX

What does this mean? Unstable SMBus?

--Tim

A message that is not in the archive (sent off-list or not yet received): 21511805.221.1310161730242.JavaMail.root-N94c1vXlnCs/q/[email protected]

#25 lore raw

Hi Tim,

Quoted 16 lines · Tim Nelson

----- Original Message -----

Quoted 4 lines

To test the reliability of the SMBus you could dump the whole register map:

# i2cdump -y -r 0x00-0x22 0 0x19
and look for XX's.

I'm seeing a *lot* of 'XX's present. Here are ten samples:

root@aaa:~# i2cdump -y -r 0x00-0x22 0 0x19
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX 00 XX 55 XX XX XX XX ff XX XX    XXXXXX.XUXXXX.XX
10: 3f XX XX XX 00 XX XX XX XX XX ff XX XX XX XX XX    ?XXX.XXXXX.XXXXX
20: 95 92 XX                                           ??X
(...)
Quoted 1 line

What does this mean? Unstable SMBus?

Yes. For whatever reason your SMBus misbehaves severely. Maybe a hardware problem. You should try a few dumps from your other device at 0x4c to confirm that this is a bus-wide issue and not only the W83L604G device.

Note that there exists an alternative driver for the I2C bus on SCx200, named scx200_i2c. I seem to remember that it is needed in some cases where the scx200_acb driver doesn't work. Maybe this is your case.

Signature · 2 lines
Jean Delvare
http://khali.linux-fr.org/wishlist.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#27 lore raw

----- Original Message -----

Quoted 11 lines

Yes. For whatever reason your SMBus misbehaves severely. Maybe a hardware problem. You should try a few dumps from your other device at 0x4c to confirm that this is a bus-wide issue and not only the W83L604G
device.

Note that there exists an alternative driver for the I2C bus on SCx200,
named scx200_i2c. I seem to remember that it is needed in some cases where the scx200_acb driver doesn't work. Maybe this is your case.

Greetings Jean-

When attempting a dump of the device at 0x4c, I do *not* get any 'XX' output. What is interesting is that when running 'i2cdetect -y 0', the device at 0x19 shows up only sporadically. It is not present in every run of i2cdetect. The other device at 0x4c shows up every time, and does not contain 'XX' output. Is it safe to assume there is a problem with the Winbond controller? Or, it's usage on this board (hardware problem?) ?

I attempted to load the scx200_i2c module but I'm greeted with:

FATAL: Error inserting scx200_i2c (/lib/modules/2.6.26-2-486/kernel/drivers/i2c/busses/scx200_i2c.ko): No such device

I've tried with and without having the scx200_acb module loaded.

Thoughts?

--Tim

A message that is not in the archive (sent off-list or not yet received): 2607557.175.1310405514456.JavaMail.root-N94c1vXlnCs/q/[email protected]

#29 lore raw

Hi Tim,

Quoted 7 lines · Tim Nelson

----- Original Message -----

Quoted 6 lines

Yes. For whatever reason your SMBus misbehaves severely. Maybe a hardware problem. You should try a few dumps from your other device at 0x4c to confirm that this is a bus-wide issue and not only the W83L604G
device.

Quoted 6 lines
Quoted 4 lines

Note that there exists an alternative driver for the I2C bus on SCx200,
named scx200_i2c. I seem to remember that it is needed in some cases where the scx200_acb driver doesn't work. Maybe this is your case.

When attempting a dump of the device at 0x4c, I do *not* get any 'XX' output. What is interesting is that when running 'i2cdetect -y 0', the device at 0x19 shows up only sporadically. It is not present in every run of i2cdetect.

This is consistent with the many XX's in the dump: the W83L604G device sometimes doesn't ack its slave address (or fails in some other way.) Did you check the kernel logs for error messages?

Quoted 1 line

The other device at 0x4c shows up every time, and does not contain 'XX' output. Is it safe to assume there is a problem with the Winbond controller? Or, it's usage on this board (hardware problem?) ?

I would indeed suspect an incorrect wiring of the W83L604G. You should double check the SCLK, SDAT, VSS and 3VDD connections of the chip. Do you have a second system to test on? This would rule out a hardware sample error.

Quoted 7 lines

I attempted to load the scx200_i2c module but I'm greeted with:

FATAL: Error inserting scx200_i2c (/lib/modules/2.6.26-2-486/kernel/drivers/i2c/busses/scx200_i2c.ko): No such device

I've tried with and without having the scx200_acb module loaded.

Thoughts?

You would indeed need to unload the scx200_acb driver first, but also to load the scx200_gpio driver and maybe to pass the proper scl and sda module parameters. But anyway, I don't think you have to do this. If the device at 0x4c works fine, it's most probably not a problem with the SMBus controller nor with the scx200_acb driver, so using scx200_i2c instead would most certainly not help.

Signature · 2 lines
Jean Delvare
http://khali.linux-fr.org/wishlist.html