omap1: I2C mux and clocks for omap7xx
authorCory Maccarrone <darkstar6262@gmail.com>
Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)
committerTony Lindgren <tony@atomide.com>
Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)
This change adds MUX pin configuration and clocks for I2C support
to OMAP 730 and 850-based devices.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/clock_data.c
arch/arm/mach-omap1/i2c.c
arch/arm/mach-omap1/mux.c
arch/arm/plat-omap/include/plat/mux.h

index cf5f017b392c6529f29a77eb6b1797dc7fa46b2e..ab995a9c606caf889d793eb1e6b53384994a919d 100644 (file)
@@ -655,9 +655,9 @@ static struct omap_clk omap_clks[] = {
        CLK("mmci-omap.1", "ick",       &armper_ck.clk, CK_16XX),
        /* Virtual clocks */
        CLK(NULL,       "mpu",          &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310),
-       CLK("i2c_omap.1", "fck",        &i2c_fck,       CK_16XX | CK_1510 | CK_310),
+       CLK("i2c_omap.1", "fck",        &i2c_fck,       CK_16XX | CK_1510 | CK_310 | CK_7XX),
        CLK("i2c_omap.1", "ick",        &i2c_ick,       CK_16XX),
-       CLK("i2c_omap.1", "ick",        &dummy_ck,      CK_1510 | CK_310),
+       CLK("i2c_omap.1", "ick",        &dummy_ck,      CK_1510 | CK_310 | CK_7XX),
        CLK("omap_uwire", "fck",        &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
        CLK("omap-mcbsp.1", "ick",      &dspper_ck,     CK_16XX),
        CLK("omap-mcbsp.1", "ick",      &dummy_ck,      CK_1510 | CK_310),
index bc9d12bc1c61e48864b96bd90c9dba268b997301..1bf4735e27a636285ad512f26b5cff0b7b519748 100644 (file)
 
 #include <plat/i2c.h>
 #include <plat/mux.h>
+#include <plat/cpu.h>
 
 int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
                          struct i2c_board_info const *info,
                          unsigned len)
 {
-       omap_cfg_reg(I2C_SDA);
-       omap_cfg_reg(I2C_SCL);
+       if (cpu_is_omap7xx()) {
+               omap_cfg_reg(I2C_7XX_SDA);
+               omap_cfg_reg(I2C_7XX_SCL);
+       } else {
+               omap_cfg_reg(I2C_SDA);
+               omap_cfg_reg(I2C_SCL);
+       }
 
        return omap_plat_register_i2c_bus(bus_id, clkrate, info, len);
 }
index 5e183cd7611a6e29fb0a99a5b022290676babb5b..07212cc621ae27716c43b4bbf6a81f5ff9c990d5 100644 (file)
@@ -58,6 +58,10 @@ MUX_CFG_7XX("W19_7XX_USB_DCRST",   3,    7,    1,    6,   0, 0)
 MUX_CFG_7XX("MMC_7XX_CMD",         2,    9,    0,    8,   1, 0)
 MUX_CFG_7XX("MMC_7XX_CLK",         2,   13,    0,   12,   1, 0)
 MUX_CFG_7XX("MMC_7XX_DAT0",        2,   17,    0,   16,   1, 0)
+
+/* I2C interface */
+MUX_CFG_7XX("I2C_7XX_SCL",         5,    1,    0,    0,   1, 0)
+MUX_CFG_7XX("I2C_7XX_SDA",         5,    5,    0,    0,   1, 0)
 };
 #define OMAP7XX_PINS_SZ                ARRAY_SIZE(omap7xx_pins)
 #else
index 8ed5f25ab0fd9b0f3e5e20a4b37c72d0eb0efcbe..8f069cc803504dc5a45263635c4ad4f5e1dc93c1 100644 (file)
@@ -179,6 +179,10 @@ enum omap7xx_index {
        MMC_7XX_CMD,
        MMC_7XX_CLK,
        MMC_7XX_DAT0,
+
+       /* I2C */
+       I2C_7XX_SCL,
+       I2C_7XX_SDA,
 };
 
 enum omap1xxx_index {