diff mbox

[PATCHv2,1/2] ARM: dts: imx23: Add i2c support

Message ID 1429281806-7934-1-git-send-email-harald@ccbib.org (mailing list archive)
State New, archived
Headers show

Commit Message

Harald Geyer April 17, 2015, 2:43 p.m. UTC
The imx23-olinuxino board has an i2c interface exposed on UEXT connector.
This patch provides the generic devicetree infrastructure for a follow-up
patch to add support to the actual board files.
Tested all three possible pin groups with MOD-LCD1x9 from Olimex.

This patch is based on work by Fadil Berisha with his permission. However
all bugs are mine.

Signed-off-by: Harald Geyer <harald@ccbib.org>
---
changes since v1:
split in generic and board specific patches
 arch/arm/boot/dts/imx23.dtsi |   40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

Comments

Stefan Wahren April 25, 2015, 9:28 a.m. UTC | #1
Hi Harald,

[add Marek and Wolfram]

> Harald Geyer <harald@ccbib.org> hat am 17. April 2015 um 16:43 geschrieben:
>
>
> The imx23-olinuxino board has an i2c interface exposed on UEXT connector.
> This patch provides the generic devicetree infrastructure for a follow-up
> patch to add support to the actual board files.
> Tested all three possible pin groups with MOD-LCD1x9 from Olimex.
>
> This patch is based on work by Fadil Berisha with his permission. However
> all bugs are mine.
>
> Signed-off-by: Harald Geyer <harald@ccbib.org>
> ---
> changes since v1:
> split in generic and board specific patches
> arch/arm/boot/dts/imx23.dtsi | 40 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 39 insertions(+), 1 deletion(-)
>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Marek Vasut April 26, 2015, 7:28 p.m. UTC | #2
On Saturday, April 25, 2015 at 11:28:30 AM, Stefan Wahren wrote:
> Hi Harald,
> 
> [add Marek and Wolfram]

Thanks!

> > Harald Geyer <harald@ccbib.org> hat am 17. April 2015 um 16:43
> > geschrieben:
> > 
> > 
> > The imx23-olinuxino board has an i2c interface exposed on UEXT connector.
> > This patch provides the generic devicetree infrastructure for a follow-up
> > patch to add support to the actual board files.
> > Tested all three possible pin groups with MOD-LCD1x9 from Olimex.
> > 
> > This patch is based on work by Fadil Berisha with his permission. However
> > all bugs are mine.
> > 
> > Signed-off-by: Harald Geyer <harald@ccbib.org>
> > ---
> > changes since v1:
> > split in generic and board specific patches
> > arch/arm/boot/dts/imx23.dtsi | 40
> > +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39
> > insertions(+), 1 deletion(-)
> 
> Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
Shawn Guo April 27, 2015, 12:35 p.m. UTC | #3
On Fri, Apr 17, 2015 at 02:43:24PM +0000, Harald Geyer wrote:
> The imx23-olinuxino board has an i2c interface exposed on UEXT connector.
> This patch provides the generic devicetree infrastructure for a follow-up
> patch to add support to the actual board files.
> Tested all three possible pin groups with MOD-LCD1x9 from Olimex.
> 
> This patch is based on work by Fadil Berisha with his permission. However
> all bugs are mine.
> 
> Signed-off-by: Harald Geyer <harald@ccbib.org>

Applied both, thanks.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index bbcfb5a..c892d58 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -308,6 +308,39 @@ 
 					fsl,voltage = <MXS_VOLTAGE_HIGH>;
 					fsl,pull-up = <MXS_PULL_ENABLE>;
 				};
+
+				i2c_pins_a: i2c@0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						MX23_PAD_I2C_SCL__I2C_SCL
+						MX23_PAD_I2C_SDA__I2C_SDA
+					>;
+					fsl,drive-strength = <MXS_DRIVE_8mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_ENABLE>;
+				};
+
+				i2c_pins_b: i2c@1 {
+					reg = <1>;
+					fsl,pinmux-ids = <
+						MX23_PAD_LCD_ENABLE__I2C_SCL
+						MX23_PAD_LCD_HSYNC__I2C_SDA
+					>;
+					fsl,drive-strength = <MXS_DRIVE_8mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_ENABLE>;
+				};
+
+				i2c_pins_c: i2c@2 {
+					reg = <2>;
+					fsl,pinmux-ids = <
+						MX23_PAD_SSP1_DATA1__I2C_SCL
+						MX23_PAD_SSP1_DATA2__I2C_SDA
+					>;
+					fsl,drive-strength = <MXS_DRIVE_8mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_ENABLE>;
+				};
 			};
 
 			digctl@8001c000 {
@@ -444,8 +477,13 @@ 
 				status = "disabled";
 			};
 
-			i2c@80058000 {
+			i2c: i2c@80058000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "fsl,imx23-i2c";
 				reg = <0x80058000 0x2000>;
+				interrupts = <27>;
+				clock-frequency = <100000>;
 				dmas = <&dma_apbx 3>;
 				dma-names = "rx-tx";
 				status = "disabled";