public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] omap24xx_i2c: i2c 16-bit write to pcf8575
@ 2014-03-05 21:01 Richard Retanubun
  2014-03-10 20:10 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Retanubun @ 2014-03-05 21:01 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] omap24xx_i2c: i2c 16-bit write to pcf8575
  2014-03-05 21:01 [U-Boot] omap24xx_i2c: i2c 16-bit write to pcf8575 Richard Retanubun
@ 2014-03-10 20:10 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2014-03-10 20:10 UTC (permalink / raw)
  To: u-boot

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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140310/80f87925/attachment.pgp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-10 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 21:01 [U-Boot] omap24xx_i2c: i2c 16-bit write to pcf8575 Richard Retanubun
2014-03-10 20:10 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox