[i2c] [PATCH take2] [POWERPC] i2c: adds support for i2c bus on 8xx

Jochen Friedrich jochen at scram.de
Wed Oct 24 01:47:43 EST 2007


Hi Jean,

> On Wed, 17 Oct 2007 21:20:37 +0200, Jochen Friedrich wrote:
>>>> +	/* Select an arbitrary address.  Just make sure it is unique.
>>>> +	 */
>>>> +	out_8(&i2c->i2c_i2add, 0xfe);
>>>>     
>>> It's a 7-bit address...  and are you sure that 0x7e is unique?  Does this
>>> driver even support slave operation?
>>>   
>> It's in fact 0x7F << 1. The same value is used in the 2.4 driver and
>> in u-boot, as well. Slave operation is not supported.
> 
> I'm not sure what exactly you are doing here, but 0x7f isn't a valid
> 7-bit I2C address.

That's most probably the reason why it is used everywhere in the CPM world
(old driver, u-boot) ;-)

According to the documentation, the CPM enters a loopback mode as soon
as a write access to the I2C address written to i2c_i2add takes place.
This even happens if the CPM is set to master mode. So the only way to make
sure there are no limitations to the I2C addresses which can be used is to
use this invalid address. 0x00 can't be used either or no I2C broadcasts
would be possible.



More information about the Linuxppc-embedded mailing list