From: Richard Zhao <linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] i2c i.MX: Fix divider table
Date: Thu, 5 Jul 2012 22:52:39 +0800 [thread overview]
Message-ID: <20120705145236.GA2735@richard-laptop> (raw)
In-Reply-To: <1341493826-13861-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
On Thu, Jul 05, 2012 at 03:10:26PM +0200, Sascha Hauer wrote:
> Measurements on i.MX1 and i.MX53 have shown that the divider values
> in the datasheets are wrong. the values from first, third and fourth
> column were all measured to be 8 higher than in the datasheet. It
> should be safe to assume that the SoCs between i.MX1 and i.MX53 behave
> the same as the i2c unit is unchanged since the i.MX1.
We may need to check with IC guys? Or you've done?
Thanks
Richard
>
> Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-imx.c | 31 ++++++++++++++++++-------------
> 1 file changed, 18 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 8d6b504..aabbe31 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -98,22 +98,27 @@
> * Document Number: MC9328MXLRM, Rev. 5.1, 06/2007
> *
> * Duplicated divider values removed from list
> + *
> + * These values (mostly) do not match the ones in the datasheet because
> + * measurements have shown that the values are wrong. This was tested
> + * on i.MX1 and i.MX53, so it shoud be safe to assume that the SoCs in
> + * between behave the same.
> */
>
> static u16 __initdata i2c_clk_div[50][2] = {
> - { 22, 0x20 }, { 24, 0x21 }, { 26, 0x22 }, { 28, 0x23 },
> - { 30, 0x00 }, { 32, 0x24 }, { 36, 0x25 }, { 40, 0x26 },
> - { 42, 0x03 }, { 44, 0x27 }, { 48, 0x28 }, { 52, 0x05 },
> - { 56, 0x29 }, { 60, 0x06 }, { 64, 0x2A }, { 72, 0x2B },
> - { 80, 0x2C }, { 88, 0x09 }, { 96, 0x2D }, { 104, 0x0A },
> - { 112, 0x2E }, { 128, 0x2F }, { 144, 0x0C }, { 160, 0x30 },
> - { 192, 0x31 }, { 224, 0x32 }, { 240, 0x0F }, { 256, 0x33 },
> - { 288, 0x10 }, { 320, 0x34 }, { 384, 0x35 }, { 448, 0x36 },
> - { 480, 0x13 }, { 512, 0x37 }, { 576, 0x14 }, { 640, 0x38 },
> - { 768, 0x39 }, { 896, 0x3A }, { 960, 0x17 }, { 1024, 0x3B },
> - { 1152, 0x18 }, { 1280, 0x3C }, { 1536, 0x3D }, { 1792, 0x3E },
> - { 1920, 0x1B }, { 2048, 0x3F }, { 2304, 0x1C }, { 2560, 0x1D },
> - { 3072, 0x1E }, { 3840, 0x1F }
> + { 30, 0x20 }, { 32, 0x21 }, { 34, 0x22 }, { 36, 0x23 },
> + { 38, 0x00 }, { 40, 0x24 }, { 44, 0x25 }, { 48, 0x26 },
> + { 50, 0x03 }, { 52, 0x27 }, { 56, 0x28 }, { 60, 0x05 },
> + { 64, 0x29 }, { 68, 0x06 }, { 72, 0x2A }, { 80, 0x2B },
> + { 88, 0x2C }, { 96, 0x09 }, { 104, 0x2D }, { 112, 0x0A },
> + { 120, 0x2E }, { 136, 0x2F }, { 152, 0x0C }, { 168, 0x30 },
> + { 200, 0x31 }, { 232, 0x32 }, { 248, 0x0F }, { 264, 0x33 },
> + { 288, 0x10 }, { 328, 0x34 }, { 392, 0x35 }, { 456, 0x36 },
> + { 480, 0x13 }, { 520, 0x37 }, { 576, 0x14 }, { 648, 0x38 },
> + { 776, 0x39 }, { 904, 0x3A }, { 960, 0x17 }, { 1032, 0x3B },
> + { 1152, 0x18 }, { 1288, 0x3C }, { 1544, 0x3D }, { 1800, 0x3E },
> + { 1920, 0x1B }, { 2048, 0x3F }, { 2304, 0x1C }, { 2560, 0x1D },
> + { 3072, 0x1E }, { 3840, 0x1F }
> };
>
> struct imx_i2c_struct {
> --
> 1.7.10
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2012-07-05 14:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 13:10 [PATCH] i2c i.MX: Fix divider table Sascha Hauer
2012-07-05 14:23 ` Baruch Siach
[not found] ` <1341493826-13861-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-05 14:52 ` Richard Zhao [this message]
2012-07-05 16:01 ` Sascha Hauer
[not found] ` <20120705160153.GT30009-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-06 0:52 ` Richard Zhao
[not found] ` <20120706005249.GA26888-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>
2012-07-06 6:28 ` Sascha Hauer
[not found] ` <20120706062852.GZ30009-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-11 6:01 ` Richard Zhao
[not found] ` <20120711060121.GB30055-iWYTGMXpHj9ITqJhDdzsOjpauB2SiJktrE5yTffgRl4@public.gmane.org>
2012-07-11 18:38 ` Sascha Hauer
[not found] ` <20120711183838.GM30009-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-11 19:11 ` Troy Kisky
[not found] ` <4FFDCFDB.7020402-Q5RJGjKts06CY9SHAMCTRUEOCMrvLtNR@public.gmane.org>
2012-07-11 19:44 ` Sascha Hauer
2012-07-12 0:45 ` Richard Zhao
2012-07-05 18:06 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2csv3rEs-xseGd6NHxR3wRSZp82ZqNB1mn-_C4=5=nOc6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-05 18:47 ` Sascha Hauer
[not found] ` <20120705184736.GW30009-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-08 9:14 ` Shubhrajyoti Datta
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=20120705145236.GA2735@richard-laptop \
--to=linuxzsc-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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).