ARM: dts: imx23: Add i2c support
authorHarald Geyer <harald@ccbib.org>
Fri, 17 Apr 2015 14:43:24 +0000 (14:43 +0000)
committerShawn Guo <shawn.guo@linaro.org>
Wed, 3 Jun 2015 07:03:56 +0000 (15:03 +0800)
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>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/boot/dts/imx23.dtsi

index bbcfb5a19c77009e2cf77253f1e49cee8c6d7035..c892d58e8dad38252dfcdd13c5f758cdc05aca36 100644 (file)
                                        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 {
                                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";