- Subject: Re: [PATCH 1/2 V3] MXS: Set I2C timing registers for mxs-i2c
- From: Marek Vasut <marex@xxxxxxx>
- Date: Sun, 10 Jun 2012 13:53:05 +0200
- Cc: Detlev Zundel <dzu@xxxxxxx>, Dong Aisheng <b29396@xxxxxxxxxxxxx>, Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>, Linux ARM kernel <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, Shawn Guo <shawn.guo@xxxxxxxxxx>, Stefano Babic <sbabic@xxxxxxx>, "Uwe Kleine-König" <u.kleine-koenig@xxxxxxxxxxxxxx>, Wolfgang Denk <wd@xxxxxxx>, Wolfram Sang <w.sang@xxxxxxxxxxxxxx>
- In-reply-to: <1339242351-8797-1-git-send-email-marex@denx.de>
- References: <1339242351-8797-1-git-send-email-marex@denx.de>
- User-agent: KMail/1.13.7 (Linux/3.2.0-2-amd64; KDE/4.8.3; x86_64; ; )
Dear Marek Vasut,
> This patch configures the I2C bus timing registers according
> to information passed via DT. Currently, 100kHz and 400kHz
> modes are supported.
[...]
> +struct mxs_i2c_speed_config {
> + uint32_t timing0;
> + uint32_t timing1;
> + uint32_t timing2;
> +};
> +
> +/* Timing values for the default 24MHz clock supplied into the i2c block.
Thinking about these further -- does anyone have any idea how these numbers were
derived? And possibly even formula for that?
And maybe we should somehow make sure the source runs on 24MHz (how?).
> */ +const struct mxs_i2c_speed_config mxs_i2c_95kHz_config = {
> + .timing0 = 0x00780030,
> + .timing1 = 0x00800030,
> + .timing2 = 0x0015000d,
> +};
> +
> +const struct mxs_i2c_speed_config mxs_i2c_400kHz_config = {
> + .timing0 = 0x000f0007,
> + .timing1 = 0x001f000f,
> + .timing2 = 0x0015000d,
> +};
[...]
Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[LM Sensors]
[Linux USB Devel]
[Linux Media]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]