From: Aaro Koskinen <aaro.koskinen@nokia.com>
To: ext Nishanth Menon <menon.nishanth@gmail.com>
Cc: "Nurkkala Eero.An (EXT-Offcode/Oulu)"
<ext-Eero.Nurkkala@nokia.com>,
"r-woodruff2@ti.com" <r-woodruff2@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: tHigh tLow discussion (was [pacth] I2C bug fixes for L-O and L-Z)
Date: Tue, 24 Feb 2009 11:09:02 +0200 [thread overview]
Message-ID: <49A3B92E.9030101@nokia.com> (raw)
In-Reply-To: <782515bb0902231019l17eaef2crfcb6426fbbbf8d04@mail.gmail.com>
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.
next prev parent reply other threads:[~2009-02-24 9:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 7:02 [pacth] I2C bug fixes for L-O and L-Z Eero Nurkkala
2009-02-16 14:19 ` Woodruff, Richard
2009-02-17 6:02 ` Eero Nurkkala
2009-02-17 6:22 ` Woodruff, Richard
2009-02-20 20:59 ` Woodruff, Richard
2009-02-23 13:37 ` Eero Nurkkala
2009-02-23 17:01 ` tHigh tLow discussion (was [pacth] I2C bug fixes for L-O and L-Z) Nishanth Menon
2009-02-23 18:10 ` ext-Eero.Nurkkala
2009-02-23 18:19 ` Nishanth Menon
2009-02-23 18:20 ` ext-Eero.Nurkkala
2009-02-23 18:25 ` Nishanth Menon
2009-02-23 18:27 ` ext-Eero.Nurkkala
2009-02-23 18:34 ` Nishanth Menon
2009-02-23 18:38 ` ext-Eero.Nurkkala
2009-02-24 9:09 ` Aaro Koskinen [this message]
2009-02-24 9:43 ` ext-Eero.Nurkkala
2009-02-24 11:43 ` Nishanth Menon
2009-02-24 12:47 ` Aaro Koskinen
2009-02-24 12:57 ` Woodruff, Richard
2009-02-24 13:17 ` Woodruff, Richard
2009-02-24 13:23 ` Pakaravoor, Jagadeesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49A3B92E.9030101@nokia.com \
--to=aaro.koskinen@nokia.com \
--cc=ext-Eero.Nurkkala@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=menon.nishanth@gmail.com \
--cc=r-woodruff2@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox