From: Christian Ruppert <christian.ruppert@abilis.com>
To: Shinya Kuribayashi <skuribay@pobox.com>
Cc: mika.westerberg@linux.intel.com, linux-i2c@vger.kernel.org,
wsa@the-dreams.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] i2c-designware: make *CNT values configurable
Date: Wed, 21 Aug 2013 16:39:17 +0200 [thread overview]
Message-ID: <20130821143915.GA3046@ab42.lan> (raw)
In-Reply-To: <520D8B30.9000602@pobox.com>
On Fri, Aug 16, 2013 at 11:15:12AM +0900, Shinya Kuribayashi wrote:
> Hi,
>
> On 8/5/13 6:31 PM, Christian Ruppert wrote:> On Wed, Jul 24, 2013 at 11:31:44PM +0900, Shinya Kuribayashi wrote:
> >>As said before, all t_SCL things should go away. Please forget
> >>about 100kbps, 400kbps, and so on. Bus/clock speed is totally
> >>pointless concept for the I2C bus systems. For example, as long
> >>as tr/tf, tHIGH/tLOW, tHD;STA, etc. are met by _all_ devices in a
> >>certain I2C bus, it doesn't matter that the resulting clock speed
> >>is, say 120 kbps with Standard-mode, or even 800 kbps for Fast-mode.
> >>Nobody in the I2C bus doesn't care about actual bus/clock speed.
> >>
> >>We don't have to care about the resulting bus speed, or rather
> >>we should/must not check to see if it's within the proper range.
> >
> >Actually, the I2C specification clearly defines f_SCL;max (and thus
> >implies t_SCL;min), both in the tables and the timing diagrams. Why can
> >we ignore this constraint while having to meet all the others?
>
> If we meet t_r, t_f, t_HIGH, t_LOW (and t_HIGH in this DW case),
> f_SCL;max will be met by itself.
I'm not sure if I agree with this:
Standard mode:
t_r;min 0ns
t_f;min + 0ns
t_HIGH;min + 4000ns
t_LOW;min + 4700ns
1/f_SCL = 8700ns
==> f_SCL = 115kHz ==> violation of f_SCL;max=100kHz
Fast mode (let's assume V_DD = 5.5V):
t_r;min 20ns
t_f;min + 20ns
t_HIGH;min + 600ns
t_LIW;min + 1300ns
1/f_SCL = 1940ns
==> f_SCL = 515kHz ==> violation of f_SCL;max=400kHz
In my understanding, f_SCL;max condition is only met
a) either if t_HIGH = t_HIGH;min and t_LOW = t_LOW;min
then t_r must be t_r;max and t_f must be t_f;max
b) or if t_r < t_r;max and t_f < t_f;max
then t_HIGH must be > t_HIGH;min and T_LOW must be T_LOW;min
Given that we cannot easily influence t_r and t_f we must adjust t_HIGH
and t_LOW. What am I missing here?
> And again, all I2C master and
> slave devices in the bus don't care about f_SCL; what they do care
> are t_f, t_r, t_HIGH, t_LOW, and so on. That's why I'm saying
> f_SCL is pointless and has no value for HCNT/LCNT calculations.
I partially agree: If I2C devices don't care about f_SCL but only about
t_r, t_f, t_HIGH and t_LOW there's no need to respect the f_SCL;max
constraint. If this is the case, I'm wondering why it is part of the
specification, though.
> Is that clear? What is the point to make sure whether f_SCL
> constraint is met or not? Is there any combination where t_f,
> t_r, t_HIGH, t_LOW, t_HD;SATA are met, but f_SCL is out of range?
> I don't think there is.
See above.
> I'd make a compromise proposal; it's fine to make sure whether the
> resulting f_SCL is within a supported range, but should not make a
> correction of HCNT/LCNT values. Just report warning messages that
> some parameters/calculations might be mis-configured an/or wrong.
Not sure if this is a good idea: If f_SCL is met by design I'm perfectly
happy with dropping the t_HIGH/t_LOW adjustment code, no need to bloat
the kernel with confusing warnings. If f_SCL is not automatically met we
must either make sure t_HIGH/t_LOW are adjusted or we must take the
decision to ignore that constraint and document the reasons behind that
decision accordingly.
Greetings,
Christian
--
Christian Ruppert , <christian.ruppert@abilis.com>
/|
Tel: +41/(0)22 816 19-42 //| 3, Chemin du Pré-Fleuri
_// | bilis Systems CH-1228 Plan-les-Ouates
next prev parent reply other threads:[~2013-08-21 14:39 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 11:45 [PATCH 1/2] i2c-designware: make *CNT values configurable Mika Westerberg
[not found] ` <1373283927-21677-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-07-08 11:45 ` [PATCH 2/2] i2c-designware: configure *CNT values from ACPI Mika Westerberg
[not found] ` <1373283927-21677-2-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-07-10 13:01 ` Mika Westerberg
2013-07-08 13:42 ` [PATCH 1/2] i2c-designware: make *CNT values configurable Christian Ruppert
[not found] ` <20130708134216.GB6402-7oYq3qWSd+k@public.gmane.org>
2013-07-09 8:44 ` Mika Westerberg
[not found] ` <20130709084402.GF4898-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-07-09 16:19 ` Christian Ruppert
[not found] ` <20130709161927.GC30236-7oYq3qWSd+k@public.gmane.org>
2013-07-10 10:52 ` Mika Westerberg
[not found] ` <20130710105215.GY4898-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-07-10 16:56 ` Christian Ruppert
[not found] ` <20130710165634.GA30693-7oYq3qWSd+k@public.gmane.org>
2013-07-11 7:36 ` Mika Westerberg
2013-07-11 10:13 ` Mika Westerberg
[not found] ` <20130711101330.GP4898-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-07-12 7:56 ` Shinya Kuribayashi
[not found] ` <51DFB6C1.4040001-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2013-07-12 8:51 ` Mika Westerberg
[not found] ` <20130712085140.GY4898-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-07-13 5:36 ` Shinya Kuribayashi
[not found] ` <51E0E76B.1040304-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2013-07-16 11:16 ` Christian Ruppert
[not found] ` <20130716111616.GA25835-7oYq3qWSd+k@public.gmane.org>
2013-07-17 14:39 ` Shinya Kuribayashi
[not found] ` <51E6ACBE.7000509-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2013-07-22 13:17 ` Christian Ruppert
[not found] ` <20130722131706.GA24081-7oYq3qWSd+k@public.gmane.org>
2013-07-24 14:31 ` Shinya Kuribayashi
[not found] ` <51EFE550.1000507-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2013-08-05 9:31 ` Christian Ruppert
[not found] ` <20130805093126.GE20936-7oYq3qWSd+k@public.gmane.org>
2013-08-05 10:02 ` Wolfram Sang
2013-08-12 7:48 ` Christian Ruppert
[not found] ` <20130812074800.GA23792-7oYq3qWSd+k@public.gmane.org>
2013-08-12 11:09 ` Wolfram Sang
2013-08-16 2:15 ` Shinya Kuribayashi
2013-08-19 11:36 ` Mika Westerberg
[not found] ` <20130819113604.GN4898-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-08-19 12:22 ` Shinya Kuribayashi
2013-08-21 14:39 ` Christian Ruppert [this message]
[not found] ` <20130821143915.GA3046-7oYq3qWSd+k@public.gmane.org>
2013-08-24 4:58 ` Shinya Kuribayashi
[not found] ` <52183D87.40703-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2013-08-28 15:34 ` Christian Ruppert
2013-10-08 15:00 ` [PATCH 1/2] i2c designware make SCL and SDA falling time configurable Romain Baeriswyl
2013-10-09 7:55 ` Mika Westerberg
2013-10-10 0:54 ` Ryan Mallon
[not found] ` <5255FAB5.7080803-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-13 11:36 ` Shinya Kuribayashi
[not found] ` <525A85D6.3090608-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2014-01-16 19:43 ` Wolfram Sang
2014-01-20 16:43 ` [PATCH v2 " Romain Baeriswyl
[not found] ` <1390236223-22584-1-git-send-email-romainba-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
2014-03-09 8:20 ` Wolfram Sang
[not found] ` <20130828153429.GB7066-7oYq3qWSd+k@public.gmane.org>
2013-10-08 15:00 ` [PATCH 2/2] i2c designware add support of I2C standard mode Romain Baeriswyl
2013-10-09 7:56 ` Mika Westerberg
[not found] ` <20131009075632.GR3521-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-13 11:46 ` Shinya Kuribayashi
2014-01-16 19:33 ` Wolfram Sang
2014-01-20 16:45 ` [PATCH v2 " Romain Baeriswyl
[not found] ` <1390236338-21407-1-git-send-email-romainba-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
2014-03-09 8:07 ` Wolfram Sang
2013-08-19 6:39 ` [PATCH 1/2] i2c-designware: make *CNT values configurable Mika Westerberg
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=20130821143915.GA3046@ab42.lan \
--to=christian.ruppert@abilis.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=skuribay@pobox.com \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).