]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM:mach-mx5/mx53_ard: Add I2C2 and I2C3 support
authorAndre Silva <andre.silva@freescale.com>
Wed, 22 Jun 2011 19:33:05 +0000 (16:33 -0300)
committerSascha Hauer <s.hauer@pengutronix.de>
Thu, 23 Jun 2011 07:48:13 +0000 (09:48 +0200)
Signed-off-by: Andre Silva <andre.silva@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx5/Kconfig
arch/arm/mach-mx5/board-mx53_ard.c

index 5b16f398a320772525894e00379e2c24c4716ffe..6a47d4c9dd17611945f38de3420b325543e7a19b 100644 (file)
@@ -213,6 +213,7 @@ config MACH_MX53_ARD
        bool "Support MX53 ARD platforms"
        select SOC_IMX53
        select IMX_HAVE_PLATFORM_IMX2_WDT
+       select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
        help
index 7dd54b9f86823147cf889b99648f9b4392c4e919..70ae25e6830bebad6abd2e84a0b5012cca72ee35 100644 (file)
@@ -84,6 +84,12 @@ static iomux_v3_cfg_t mx53_ard_pads[] = {
        MX53_PAD_PATA_DATA11__ESDHC1_DAT7,
        MX53_PAD_GPIO_1__GPIO1_1,
        MX53_PAD_GPIO_9__GPIO1_9,
+       /* I2C2 */
+       MX53_PAD_EIM_EB2__I2C2_SCL,
+       MX53_PAD_KEY_ROW3__I2C2_SDA,
+       /* I2C3 */
+       MX53_PAD_GPIO_3__I2C3_SCL,
+       MX53_PAD_GPIO_16__I2C3_SDA,
 };
 
 static struct resource ard_smsc911x_resources[] = {
@@ -120,6 +126,14 @@ static const struct esdhc_platform_data mx53_ard_sd1_data __initconst = {
        .wp_gpio = ARD_SD1_WP,
 };
 
+static struct imxi2c_platform_data mx53_ard_i2c2_data = {
+       .bitrate = 50000,
+};
+
+static struct imxi2c_platform_data mx53_ard_i2c3_data = {
+       .bitrate = 400000,
+};
+
 static void __init mx53_ard_io_init(void)
 {
        mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads,
@@ -127,9 +141,12 @@ static void __init mx53_ard_io_init(void)
 
        gpio_request(ARD_ETHERNET_INT_B, "eth-int-b");
        gpio_direction_input(ARD_ETHERNET_INT_B);
+
+       gpio_request(ARD_I2CPORTEXP_B, "i2cptexp-rst");
+       gpio_direction_output(ARD_I2CPORTEXP_B, 1);
 }
 
- /* Config CS1 settings for ethernet controller */
+/* Config CS1 settings for ethernet controller */
 static int weim_cs_config(void)
 {
        u32 reg;
@@ -179,6 +196,8 @@ static void __init mx53_ard_board_init(void)
 
        imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
        imx53_add_imx2_wdt(0, NULL);
+       imx53_add_imx_i2c(1, &mx53_ard_i2c2_data);
+       imx53_add_imx_i2c(2, &mx53_ard_i2c3_data);
 }
 
 static void __init mx53_ard_timer_init(void)