Hello,
ext Nishanth Menon wrote:
Oops.. copy-paste typo.. :(
tLow = (scll+3) * iclk
tHigh = (sclh+9) * iclk
Vs:
TRM:
tHigh = ( sclh +5 )*iclk period
tLow = ( scll +7 )*iclk period
But my question is this: why are we trying to a different equation
here compared to the equation in the TRM?
The problem with TRM (the table 18-13 you referred earlier) is that it
assumes 50% duty cycle while the correct one is more like 33%. This is
corrected by Eero's patch:
+ fsscll = internal_clk / (dev->speed * 2) - 3;
+ fssclh = internal_clk / (dev->speed * 2) - 9;
this is same as (with internal_clk == 9600 and dev->speed == 400):
scl = internal_clk / dev->speed;
fsscll = scl - scl/3 - 7;
fssclh = scl/3 - 5;
If the code would be like this, then I guess the readers of both TRM
_and_ the I2C spec would be happy?
The problem with Eero's patch is that it changes the internal clock
(again thanks to that confusing table). You should be able to use same
for all modes. Also note that the noise filter is one internel clock
period. Currently the driver uses 19.2 MHz which exceeds the I2C spec
max. So 24 MHz would be a safer choice.
A.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html