Subject: Re: i2c-mpc clocking scheme

From: Luotao Fu <[email-masked]>
Date: Thu, 27 Nov 2008 16:49:43 +0100

Timur Tabi wrote:
> On Thu, Nov 27, 2008 at 9:00 AM, Andre Schwarz
> <[email-masked]> wrote:
>> All,
>>
>> is anybody working on some improvements regarding configurable I2C
>> frequency inside the i2c-mpc driver ?
>>
>> If not - would anybody be intersted in getting this done, i.e.
>> configurable via device tree ?
> 
> Maybe I'm missing something, but U-Boot configures the I2C bus speed.

i2c-mpc sets the bus clock in kernel with mpc_i2c_setclock. The bus
speed in kernel is indepedent from u-boot.

> It does this because the algorithm is specific to the SOC itself.  For
> example, the 8544 is different from the 8548.  It would be a mess to
> duplicate this code in the kernel.
> 

I did try to write some mechanismen to make the i2c bus speed
configurable for  mpc5200. I found it quite hard to find some algorithm
to calculate the right values in the Timing table of the I2C bus
controller. Anyhow I gave it up after starring at the datasheet for some
time. ;-) I can't speak for other platforms, which are supported by
i2c-mpc. Anyway, I do think it might be interesting to have configurable
i2c bus speed.

cheers
Luotao Fu
-- 
   Dipl.-Ing. Luotao Fu | Phone: +49-5121-206917-5004
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord     http://www.pengutronix.de