All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] IXP and I2C - support
@ 2007-03-01 15:20 Martijn de Gouw
  2007-03-02  7:05 ` madcat at takaisin.fi
  0 siblings, 1 reply; 5+ messages in thread
From: Martijn de Gouw @ 2007-03-01 15:20 UTC (permalink / raw)
  To: u-boot

Hi,

> and noticed that IXP does not have hardware I2C-support in 
> U-Boot. Has 
> some one made the hardware support? 

the IXP425 does not have hardware I2C support.

> I also checked the soft_i2c, but then I would need to 
> implement gpio for 
> IXP, because U-Boot doesn't seem to have them. So, if some one has 
> already made the support for harware I2C, I think it's easier to 
> integrate that to the my version of U-Boot than trying to get the 
> soft_i2c working.
> 
> Or, if nobody has made the I2C-support, have someone made the 
> gpio-support? I haven't check how much I have to modify the code if I 
> try to use the gpio-code from the kernel.
> 

On our board (pdnb3 from prodrive) we have use software support for
gpio.
Look into this board configure to figure out how to support this.

Regards, martijn de gouw

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

* [U-Boot-Users] IXP and I2C - support
  2007-03-01 15:20 [U-Boot-Users] IXP and I2C - support Martijn de Gouw
@ 2007-03-02  7:05 ` madcat at takaisin.fi
  2007-03-02  7:53   ` Martin Krause
  0 siblings, 1 reply; 5+ messages in thread
From: madcat at takaisin.fi @ 2007-03-02  7:05 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 01, 2007 at 04:20:35PM +0100, Martijn de Gouw wrote:
> On our board (pdnb3 from prodrive) we have use software support for
> gpio.
> Look into this board configure to figure out how to support this.
I got the I2C working on some level. I configured the I2C-commands so I 
could test the I2C from command line.

Iprobe - gets the addresses pretty much what it supposed to be, but the 
problem is the reading with imd -command. Some times the command seems 
to be working almost fine. Some times the results are difrerent every 
time I read the chip when it should be the same since I'm trying to 
read a chip that has constant data(for example eeprom). Most of the time 
not all the data is read. Maybe first 3-4 bytes are ok and rest of the 
bytes are either 00 or ff. 

Should I somehow reset the I2C-bus, am I doing something wrong or maybe 
there is some configuration error or maybe even a bug in a code?! 

I tried to slow down the speed to 40kHz, but no help. The CPU should be 
running at 530MHz, so it should be able to work with the 40kHz bus 
speed.

Thanks.

Teemu K.

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

* [U-Boot-Users] IXP and I2C - support
  2007-03-02  7:05 ` madcat at takaisin.fi
@ 2007-03-02  7:53   ` Martin Krause
  2007-03-02  8:18     ` madcat at takaisin.fi
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Krause @ 2007-03-02  7:53 UTC (permalink / raw)
  To: u-boot

Hi Teemu,

madcat at takaisin.fi wrote on Friday, March 02, 2007 8:05 AM: 
> Iprobe - gets the addresses pretty much what it supposed to be, but
> the 
> problem is the reading with imd -command. Some times the command seems
> to be working almost fine. Some times the results are difrerent every
> time I read the chip when it should be the same since I'm trying to
> read a chip that has constant data(for example eeprom). Most of the
> time 
> not all the data is read. Maybe first 3-4 bytes are ok and rest of the
> bytes are either 00 or ff.
> 
> Should I somehow reset the I2C-bus, am I doing something wrong or
> maybe 
> there is some configuration error or maybe even a bug in a code?!

Msybe you are using the wrong number of address bytes when accessing 
your I2C device. It depends on your device, how many address bytes are
needed (0, 1 or 2 bytes). The number of address bytes is specified
by a "." and the desired number directly after "address" in the imd
command:

# help imd
imd chip address[.0, .1, .2] [# of objects]
    - i2c memory display

Example (read 0x10 bytes from an EEPROM with the I2C address 0x54,
beginning at offset 0 and using one address byte):

# imd 54 0.1 10
0000: 51 2d 02 00 61 02 00 00 c9 b6 35 01 df 32 89 45    Q-..a.....5..2.E

Regards,
Martin

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

* [U-Boot-Users] IXP and I2C - support
  2007-03-02  7:53   ` Martin Krause
@ 2007-03-02  8:18     ` madcat at takaisin.fi
  0 siblings, 0 replies; 5+ messages in thread
From: madcat at takaisin.fi @ 2007-03-02  8:18 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 02, 2007 at 08:53:41AM +0100, Martin Krause wrote:
Hi,

> # help imd
> imd chip address[.0, .1, .2] [# of objects]
>     - i2c memory display
> 
> Example (read 0x10 bytes from an EEPROM with the I2C address 0x54,
> beginning at offset 0 and using one address byte):
This was the case. 0.2 worked for me. Thanks! :)

Teemu K.

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

* [U-Boot-Users] IXP and I2C - support
@ 2007-03-01 12:51 madcat at takaisin.fi
  0 siblings, 0 replies; 5+ messages in thread
From: madcat at takaisin.fi @ 2007-03-01 12:51 UTC (permalink / raw)
  To: u-boot

Hi,

I tried to look from old messages, but I couldn't find the answer.

I have IXP425 - based board that is using U-Boot to startup. Now I need 
I2C-support to U-Boot to be able to access eeprom. I looked through code 
and noticed that IXP does not have hardware I2C-support in U-Boot. Has 
some one made the hardware support? 

I also checked the soft_i2c, but then I would need to implement gpio for 
IXP, because U-Boot doesn't seem to have them. So, if some one has 
already made the support for harware I2C, I think it's easier to 
integrate that to the my version of U-Boot than trying to get the 
soft_i2c working.

Or, if nobody has made the I2C-support, have someone made the 
gpio-support? I haven't check how much I have to modify the code if I 
try to use the gpio-code from the kernel.

Thanks.

- Teemu K.

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

end of thread, other threads:[~2007-03-02  8:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 15:20 [U-Boot-Users] IXP and I2C - support Martijn de Gouw
2007-03-02  7:05 ` madcat at takaisin.fi
2007-03-02  7:53   ` Martin Krause
2007-03-02  8:18     ` madcat at takaisin.fi
  -- strict thread matches above, loose matches on Subject: below --
2007-03-01 12:51 madcat at takaisin.fi

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.