* Winbond W83L604G @ 2011-07-05 14:46 Tim Nelson [not found] ` <30480104.171.1309877177809.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-05 14:46 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <30480104.171.1309877177809.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* RE: Winbond W83L604G [not found] ` <30480104.171.1309877177809.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-05 14:59 ` Zhang, Shijie [not found] ` <6D7A567890E70E4BA49B8A9B365980FA12D99C14BE-QQHDSDV1ERZpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Zhang, Shijie @ 2011-07-05 14:59 UTC (permalink / raw) To: Tim Nelson, linux-i2c-u79uwXL29TY76Z2rM5mHXA You have to install i2c-dev.ko with "insmod i2c-dev.ko". Good luck :) BR Shijie -----Original Message----- From: linux-i2c-owner@vger.kernel.org [mailto:linux-i2c-owner@vger.kernel.org] On Behalf Of Tim Nelson Sent: Tuesday, July 05, 2011 10:46 PM To: linux-i2c@vger.kernel.org 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <6D7A567890E70E4BA49B8A9B365980FA12D99C14BE-QQHDSDV1ERZpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <6D7A567890E70E4BA49B8A9B365980FA12D99C14BE-QQHDSDV1ERZpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> @ 2011-07-05 17:06 ` Tim Nelson [not found] ` <8829587.204.1309885573653.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-05 17:06 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA 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 ----- > You have to install i2c-dev.ko with "insmod i2c-dev.ko". Good luck :) > > BR > > Shijie > > -----Original Message----- > From: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > [mailto:linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Tim Nelson > Sent: Tuesday, July 05, 2011 10:46 PM > To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <8829587.204.1309885573653.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <8829587.204.1309885573653.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-06 7:03 ` Jean Delvare [not found] ` <20110706090347.44bd4bbe-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Jean Delvare @ 2011-07-06 7:03 UTC (permalink / raw) To: Tim Nelson; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Tim, On Tue, 5 Jul 2011 12:06:13 -0500 (CDT), Tim Nelson wrote: > 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 ? 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? -- Jean Delvare ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20110706090347.44bd4bbe-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <20110706090347.44bd4bbe-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> @ 2011-07-06 14:40 ` Tim Nelson [not found] ` <20432649.84.1309963215499.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-06 14:40 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA ----- Original Message ----- > Hi Tim, > > On Tue, 5 Jul 2011 12:06:13 -0500 (CDT), Tim Nelson wrote: > > 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 ? > > 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? > 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) ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20432649.84.1309963215499.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <20432649.84.1309963215499.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-06 15:05 ` Jean Delvare [not found] ` <20110706170531.2f3bed19-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Jean Delvare @ 2011-07-06 15:05 UTC (permalink / raw) To: Tim Nelson; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA On Wed, 6 Jul 2011 09:40:15 -0500 (CDT), Tim Nelson wrote: > ----- Original Message ----- > > Hi Tim, > > > > On Tue, 5 Jul 2011 12:06:13 -0500 (CDT), Tim Nelson wrote: > > > 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 ? > > > > 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? > > > > 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" Correct, and we have support for this device. Driver is named scx200_acb. Load it and then "i2cdetect -l" should list the SMBus. -- Jean Delvare ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20110706170531.2f3bed19-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <20110706170531.2f3bed19-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> @ 2011-07-06 15:10 ` Tim Nelson [not found] ` <29201825.112.1309965025512.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-06 15:10 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA ----- Original Message ----- > On Wed, 6 Jul 2011 09:40:15 -0500 (CDT), Tim Nelson wrote: > > ----- Original Message ----- > > > Hi Tim, > > > > > > On Tue, 5 Jul 2011 12:06:13 -0500 (CDT), Tim Nelson wrote: > > > > 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 ? > > > > > > 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? > > > > > > > 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" > > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <29201825.112.1309965025512.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <29201825.112.1309965025512.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-06 20:30 ` Tim Nelson [not found] ` <13595453.330.1309984221608.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-06 20:30 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA ----- Original Message ----- > > > > 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) ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <13595453.330.1309984221608.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <13595453.330.1309984221608.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-07 6:43 ` Michael Lawnick 2011-07-07 8:19 ` Jean Delvare 1 sibling, 0 replies; 16+ messages in thread From: Michael Lawnick @ 2011-07-07 6:43 UTC (permalink / raw) To: Tim Nelson; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Tim Nelson said the following: > ----- Original Message ----- >> > >> > 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! ... > 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 -- KR Michael ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Winbond W83L604G [not found] ` <13595453.330.1309984221608.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-07 6:43 ` Michael Lawnick @ 2011-07-07 8:19 ` Jean Delvare [not found] ` <20110707101931.18379a23-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 1 sibling, 1 reply; 16+ messages in thread From: Jean Delvare @ 2011-07-07 8:19 UTC (permalink / raw) To: Tim Nelson; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Tim, On Wed, 6 Jul 2011 15:30:21 -0500 (CDT), Tim Nelson wrote: > 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! 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.) > (...) > 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.) -- Jean Delvare ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20110707101931.18379a23-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <20110707101931.18379a23-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> @ 2011-07-07 15:32 ` Tim Nelson [not found] ` <19430981.80.1310052758044.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-07 15:32 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA ----- Original Message ----- > 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. > > 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. > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <19430981.80.1310052758044.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <19430981.80.1310052758044.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-07 16:23 ` Jean Delvare [not found] ` <20110707182315.6e28f62a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Jean Delvare @ 2011-07-07 16:23 UTC (permalink / raw) To: Tim Nelson; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Tim, On Thu, 7 Jul 2011 10:32:38 -0500 (CDT), Tim Nelson wrote: > ----- Original Message ----- > > 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 > > 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. > > 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. > 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. -- Jean Delvare ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20110707182315.6e28f62a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <20110707182315.6e28f62a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> @ 2011-07-08 21:48 ` Tim Nelson [not found] ` <21511805.221.1310161730242.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-08 21:48 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA ----- Original Message ----- > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <21511805.221.1310161730242.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <21511805.221.1310161730242.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-09 7:23 ` Jean Delvare [not found] ` <20110709092334.566e6dcd-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Jean Delvare @ 2011-07-09 7:23 UTC (permalink / raw) To: Tim Nelson; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Tim, On Fri, 8 Jul 2011 16:48:50 -0500 (CDT), Tim Nelson wrote: > ----- Original Message ----- > > 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 > (...) > > 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. -- Jean Delvare http://khali.linux-fr.org/wishlist.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20110709092334.566e6dcd-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <20110709092334.566e6dcd-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> @ 2011-07-11 17:31 ` Tim Nelson [not found] ` <2607557.175.1310405514456.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Tim Nelson @ 2011-07-11 17:31 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA ----- Original Message ----- > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <2607557.175.1310405514456.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org>]
* Re: Winbond W83L604G [not found] ` <2607557.175.1310405514456.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> @ 2011-07-11 18:29 ` Jean Delvare 0 siblings, 0 replies; 16+ messages in thread From: Jean Delvare @ 2011-07-11 18:29 UTC (permalink / raw) To: Tim Nelson; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Tim, On Mon, 11 Jul 2011 12:31:54 -0500 (CDT), Tim Nelson wrote: > ----- Original Message ----- > > 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. > > 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? > 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. > 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. -- Jean Delvare http://khali.linux-fr.org/wishlist.html ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2011-07-11 18:29 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-07-05 14:46 Winbond W83L604G Tim Nelson [not found] ` <30480104.171.1309877177809.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-05 14:59 ` Zhang, Shijie [not found] ` <6D7A567890E70E4BA49B8A9B365980FA12D99C14BE-QQHDSDV1ERZpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> 2011-07-05 17:06 ` Tim Nelson [not found] ` <8829587.204.1309885573653.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-06 7:03 ` Jean Delvare [not found] ` <20110706090347.44bd4bbe-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 2011-07-06 14:40 ` Tim Nelson [not found] ` <20432649.84.1309963215499.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-06 15:05 ` Jean Delvare [not found] ` <20110706170531.2f3bed19-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 2011-07-06 15:10 ` Tim Nelson [not found] ` <29201825.112.1309965025512.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-06 20:30 ` Tim Nelson [not found] ` <13595453.330.1309984221608.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-07 6:43 ` Michael Lawnick 2011-07-07 8:19 ` Jean Delvare [not found] ` <20110707101931.18379a23-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 2011-07-07 15:32 ` Tim Nelson [not found] ` <19430981.80.1310052758044.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-07 16:23 ` Jean Delvare [not found] ` <20110707182315.6e28f62a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 2011-07-08 21:48 ` Tim Nelson [not found] ` <21511805.221.1310161730242.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-09 7:23 ` Jean Delvare [not found] ` <20110709092334.566e6dcd-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 2011-07-11 17:31 ` Tim Nelson [not found] ` <2607557.175.1310405514456.JavaMail.root-N94c1vXlnCs/q/FG96+aB0EOCMrvLtNR@public.gmane.org> 2011-07-11 18:29 ` Jean Delvare
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.