[PATCH 1/2] MXS: Set I2C timing registers for mxs-i2c

Marek Vasut marex at denx.de
Tue May 29 02:46:53 EDT 2012


Dear Ben Dooks,

> On 27/05/12 03:10, Marek Vasut wrote:
> > This patch configures the I2C bus timing registers according
> > to information passed via DT. Currently, 100kHz and 400kHz
> > modes are supported.
> > 
> > Signed-off-by: Marek Vasut<marex at denx.de>
> > Cc: Detlev Zundel<dzu at denx.de>
> > CC: Dong Aisheng<b29396 at freescale.com>
> > CC: Fabio Estevam<fabio.estevam at freescale.com>
> > Cc: Linux ARM kernel<linux-arm-kernel at lists.infradead.org>
> > Cc: linux-i2c at vger.kernel.org
> > CC: Sascha Hauer<s.hauer at pengutronix.de>
> > CC: Shawn Guo<shawn.guo at linaro.org>
> > Cc: Stefano Babic<sbabic at denx.de>
> > CC: Uwe Kleine-König<u.kleine-koenig at pengutronix.de>
> > Cc: Wolfgang Denk<wd at denx.de>
> > Cc: Wolfram Sang<w.sang at pengutronix.de>
> > ---
> > 
> >   Documentation/devicetree/bindings/i2c/i2c-mxs.txt |    1 +
> >   arch/arm/boot/dts/imx28.dtsi                      |    2 +
> >   drivers/i2c/busses/i2c-mxs.c                      |   64
> >   +++++++++++++++++++++ 3 files changed, 67 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt
> > b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt index
> > 1bfc02d..790b5c6 100644
> > --- a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt
> > +++ b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt
> > 
> > @@ -4,6 +4,7 @@ Required properties:
> >   - compatible: Should be "fsl,<chip>-i2c"
> >   - reg: Should contain registers location and length
> >   - interrupts: Should contain ERROR and DMA interrupts
> > 
> > +- speed: Speed of the bus in kHz (400 or 100 are supported)
> > 
> >   Examples:
> > diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
> > index 4634cb8..d927155 100644
> > --- a/arch/arm/boot/dts/imx28.dtsi
> > +++ b/arch/arm/boot/dts/imx28.dtsi
> > @@ -381,6 +381,7 @@
> > 
> >   				compatible = "fsl,imx28-i2c";
> >   				reg =<0x80058000 2000>;
> >   				interrupts =<111 68>;
> > 
> > +				fsl,speed =<400>;
> > 
> >   				status = "disabled";
> >   			
> >   			};
> > 
> > @@ -390,6 +391,7 @@
> > 
> >   				compatible = "fsl,imx28-i2c";
> >   				reg =<0x8005a000 2000>;
> >   				interrupts =<110 69>;
> > 
> > +				fsl,speed =<400>;
> > 
> >   				status = "disabled";
> >   			
> >   			};
> 
> Is there not a standard speed setting in the i2c binding?

Not that I know of, but if someone hinted one to me, I'd gladly rework the 
patches :)

Best regards,
Marek Vasut



More information about the linux-arm-kernel mailing list