Re: [U-Boot-Users] IXP and I2C - support

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

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.

Hi Teemu,
madcat@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

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.
participants (3)
-
madcat@takaisin.fi
-
Martijn de Gouw
-
Martin Krause