[U-Boot] omap24xx_i2c: i2c 16-bit write to pcf8575

Hello,
My platform is a dra7xx_evm. My code baseline is denx master
I am trying to write to the pcf8575 i2c gpio expander at address 0x21 (bit P4)
I can read 16-bit okay in this version, but 16-bit writing is not working.
// Display current values i2c md 21 0.0 2 0000: f7 eb ..
// Set bit P4 to 1 i2c mw 21 0.0 0xffeb 2
// But it remains at 0xf7 i2c md 21 0.0 2 0000: f7 eb ..
When we put scopes on the i2c lines, it seems that the i2c mw transaction produces a longer i2c bus sequence that does not map to the [Start:Addr:W:A:P7-P0:A:P17-P10:A:Stop] that the pcf8575 device expects.
Either I am invoking "i2c mw" incorrectly, or the oma24xx_i2c driver is not handling i2c 16-bit writes correctly yet.
Any hints will be appreciated. Thanks for everyone's time
-- Richard Retanubun

On Wed, Mar 05, 2014 at 04:01:47PM -0500, Richard Retanubun wrote:
Hello,
My platform is a dra7xx_evm. My code baseline is denx master
I am trying to write to the pcf8575 i2c gpio expander at address 0x21 (bit P4)
I can read 16-bit okay in this version, but 16-bit writing is not working.
// Display current values i2c md 21 0.0 2 0000: f7 eb ..
// Set bit P4 to 1 i2c mw 21 0.0 0xffeb 2
// But it remains at 0xf7 i2c md 21 0.0 2 0000: f7 eb ..
When we put scopes on the i2c lines, it seems that the i2c mw transaction produces a longer i2c bus sequence that does not map to the [Start:Addr:W:A:P7-P0:A:P17-P10:A:Stop] that the pcf8575 device expects.
Either I am invoking "i2c mw" incorrectly, or the oma24xx_i2c driver is not handling i2c 16-bit writes correctly yet.
Any hints will be appreciated. Thanks for everyone's time
Have you tried doing it progmatically rather than via the command line? You may indeed be running into something we don't support in "i2c mw", if I skim the comments right.
participants (2)
-
Richard Retanubun
-
Tom Rini