From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2 V2] MXS: Set I2C timing registers for mxs-i2c
Date: Sat, 9 Jun 2012 13:40:26 +0200 [thread overview]
Message-ID: <201206091340.26605.marex@denx.de> (raw)
In-Reply-To: <20120609112545.GH30400@pengutronix.de>
Dear Sascha Hauer,
> On Sat, Jun 09, 2012 at 01:11:42PM +0200, Marek Vasut wrote:
> > Dear Sascha Hauer,
> >
> > > On Sat, Jun 09, 2012 at 12:34:47PM +0200, Marek Vasut wrote:
> > > > Dear Shubhrajyoti Datta,
> > > >
> > > > > Didnt understand this.
> > > >
> > > > What exactly, it's running (according to the datasheet) at 95kHz.
> > > >
> > > > > > + .timing0 = 0x00780030,
> > > > > > + .timing1 = 0x00800030,
> > > > > > + .timing2 = 0x0015000d,
> > > > > > +};
> > > > > > +
> > > > > > +const struct mxs_i2c_speed_config mxs_i2c_400kHz_config = {
> > > > > > + .timing0 = 0x000f0007,
> > > > > > + .timing1 = 0x001f000f,
> > > > > > + .timing2 = 0x0015000d,
> > > > > > +};
> > > > > > +
> > > > >
> > > > > How are these values calculated?
> > > >
> > > > They're not calculated, they're presented in the datasheet. There's
> > > > no formula, even though I believe one could be derived given enough
> > > > effort.
> > >
> > > Don't these values depend on the input clock of this unit? I don't
> > > know, just asking.
> >
> > Isn't the i2c block supplied from 24MHz clock source in the mx28?
>
> Maybe. Shouldn't this be checked then or at least mentioned that these
> values assume a certain clock frequency?
27.5.2 - 27.5.4 in the MX28 TRM -- these values are for 24MHz clock indeed.
> I wonder that currently the timing registers are not initialized at all.
> Do they depend on reset defaults or bootloader setup?
They're set to default values in our case -- I dunno if your bootloader always
sets them up differently.
> Sascha
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-06-09 11:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 18:54 [PATCH 1/2 V2] MXS: Set I2C timing registers for mxs-i2c Marek Vasut
2012-06-08 18:54 ` [PATCH 2/2 V2] MXS: Implement DMA support into mxs-i2c Marek Vasut
2012-06-09 4:15 ` [PATCH 1/2 V2] MXS: Set I2C timing registers for mxs-i2c Shubhrajyoti Datta
2012-06-09 10:34 ` Marek Vasut
2012-06-09 10:53 ` Sascha Hauer
2012-06-09 11:11 ` Marek Vasut
2012-06-09 11:25 ` Sascha Hauer
2012-06-09 11:40 ` Marek Vasut [this message]
2012-06-09 12:46 ` Shubhrajyoti Datta
2012-06-09 13:10 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2012-07-06 6:09 Marek Vasut
2012-07-09 10:53 ` Wolfram Sang
2012-07-09 11:07 ` Marek Vasut
2012-07-09 12:05 ` Wolfram Sang
2012-07-09 15:58 ` Marek Vasut
2012-07-10 14:09 ` Robert Schwebel
2012-07-10 15:13 ` Marek Vasut
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=201206091340.26605.marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).