From: Tony Lindgren <tony@atomide.com>
To: "Pais, Allen" <allen.pais@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups
Date: Mon, 1 Feb 2010 17:53:37 -0800 [thread overview]
Message-ID: <20100202015336.GN22747@atomide.com> (raw)
In-Reply-To: <E0D41E29EB0DAC4E9F3FF173962E9E94026B4CBDEA@dbde02.ent.ti.com>
Hi,
* Pais, Allen <allen.pais@ti.com> [100121 02:31]:
> From 4044fcc9c517e86fbea9f7d3b15d5cf75a767476 Mon Sep 17 00:00:00 2001
> From: Allen Pais <allen.pais@ti.com>
> Date: Thu, 21 Jan 2010 21:00:04 +0530
> Subject: [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups
>
> This patch disables GAIA I2C1 adn I2C4(SR) internal pull-up, to
> use only the external HW resistor >=470 Ohm for the assured
> functionality in HS mode.
>
> While testing the I2C in High Speed mode, it was discovered that
> without a proper pull-up resistor, there is data corruption during
> multi-byte transfer. RTC(time_set) test case was used for testing.
>
> From the analysis done, it was concluded that ideally we need a
> pull-up of 1.6k Ohm(recomended) or atleast 470 Ohm or greater for
> assured performance in HS mode.
Does this apply to 3630 only, or also 34xx? Is this safe to do
always?
BTW, once ready it hould be sent to Samuel Ortiz with linux-omap
list Cc'd:
$ grep -A4 MFD MAINTAINERS
MULTIFUNCTION DEVICES (MFD)
M: Samuel Ortiz <sameo@linux.intel.com>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
S: Supported
F: drivers/mfd/
Regards,
Tony
> Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
> Signed-off-by: Allen Pais <allen.pais@ti.com>
> ---
> drivers/mfd/twl-core.c | 10 ++++++++++
> include/linux/i2c/twl.h | 13 +++++++++++++
> 2 files changed, 23 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
> index 2a76065..7dcb5e9 100644
> --- a/drivers/mfd/twl-core.c
> +++ b/drivers/mfd/twl-core.c
> @@ -965,6 +965,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
> int status;
> unsigned i;
> struct twl4030_platform_data *pdata = client->dev.platform_data;
> + u8 temp;
>
> if (!pdata) {
> dev_dbg(&client->dev, "no platform data?\n");
> @@ -1031,6 +1032,15 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
> if (status < 0)
> goto fail;
> }
> + /* Disable GAIA I2C Pull-up on I2C1 and I2C4(SR) interface
> + * program I2C_SCL_CTRL_PU(bit 0)=0, I2C_SDA_CTRL_PU (bit 2)=0,
> + * SR_I2C_SCL_CTRL_PU(bit 4)=0 and SR_I2C_SDA_CTRL_PU(bit 6)=0.
> + */
> +
> + twl_i2c_read_u8(TWL4030_MODULE_INTBR, &temp, REG_GPPUPDCTR1);
> + temp &= ~(SR_I2C_SDA_CTRL_PU | SR_I2C_SCL_CTRL_PU | \
> + I2C_SDA_CTRL_PU | I2C_SCL_CTRL_PU);
> + twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
>
> status = add_children(pdata, id->driver_data);
> fail:
> diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
> index bf1c5be..2f4faf9 100644
> --- a/include/linux/i2c/twl.h
> +++ b/include/linux/i2c/twl.h
> @@ -168,6 +168,19 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
> int twl6030_interrupt_unmask(u8 bit_mask, u8 offset);
> int twl6030_interrupt_mask(u8 bit_mask, u8 offset);
>
> +/*Interface Bit Register (INTBR) offsets
> + *(Use TWL_4030_MODULE_INTBR)
> + */
> +
> +#define REG_GPPUPDCTR1 0x0F
> +
> +/*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */
> +
> +#define I2C_SCL_CTRL_PU BIT(0)
> +#define I2C_SDA_CTRL_PU BIT(2)
> +#define SR_I2C_SCL_CTRL_PU BIT(4)
> +#define SR_I2C_SDA_CTRL_PU BIT(6)
> +
> /*----------------------------------------------------------------------*/
>
> /*
> --
> 1.6.3.3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-02-02 1:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 10:33 [PATCH 1/2] omap: Disable GAIA I2C1/I2C4 internal pull-ups Pais, Allen
2010-02-02 1:53 ` Tony Lindgren [this message]
2010-02-02 2:58 ` Pais, Allen
2010-02-02 16:56 ` Tony Lindgren
2010-02-02 21:40 ` Sonasath, Moiz
2010-02-03 1:16 ` Pais, Allen
2010-02-02 3:37 ` Paul Walmsley
2010-02-02 21:50 ` Sonasath, Moiz
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=20100202015336.GN22747@atomide.com \
--to=tony@atomide.com \
--cc=allen.pais@ti.com \
--cc=linux-omap@vger.kernel.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