summaryrefslogtreecommitdiff
path: root/drivers/i2c/mxc_i2c.c
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-01-29 13:46:31 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 14:56:22 +0800
commite2eb170e1557f3213ea945a8ef71944de0ad3a0d (patch)
tree123018be379a32d1795a1727c4d225806c9357e2 /drivers/i2c/mxc_i2c.c
parent643c439f6197e3538e2efe3a27db8408ead8d1d0 (diff)
downloadu-boot-imx-e2eb170e1557f3213ea945a8ef71944de0ad3a0d.zip
u-boot-imx-e2eb170e1557f3213ea945a8ef71944de0ad3a0d.tar.gz
u-boot-imx-e2eb170e1557f3213ea945a8ef71944de0ad3a0d.tar.bz2
MLK-10178-3 i2c:mxc Add i2c support for i.MX7D
Add i2c support for i.MX7D. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit b52cb9d40e71305b7a11b0bbc68fddd8e84e3b17) Conflicts: drivers/i2c/mxc_i2c.c
Diffstat (limited to 'drivers/i2c/mxc_i2c.c')
-rw-r--r--drivers/i2c/mxc_i2c.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index fc5ee35..e328220 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -114,6 +114,9 @@ static u16 i2c_clk_div[50][2] = {
#ifndef CONFIG_SYS_MXC_I2C3_SPEED
#define CONFIG_SYS_MXC_I2C3_SPEED 100000
#endif
+#ifndef CONFIG_SYS_MXC_I2C4_SPEED
+#define CONFIG_SYS_MXC_I2C4_SPEED 100000
+#endif
#ifndef CONFIG_SYS_MXC_I2C1_SLAVE
#define CONFIG_SYS_MXC_I2C1_SLAVE 0
@@ -124,6 +127,9 @@ static u16 i2c_clk_div[50][2] = {
#ifndef CONFIG_SYS_MXC_I2C3_SLAVE
#define CONFIG_SYS_MXC_I2C3_SLAVE 0
#endif
+#ifndef CONFIG_SYS_MXC_I2C4_SLAVE
+#define CONFIG_SYS_MXC_I2C4_SLAVE 0
+#endif
/*
@@ -416,6 +422,11 @@ static void * const i2c_bases[] = {
(void *)I2C1_BASE_ADDR,
(void *)I2C2_BASE_ADDR,
(void *)I2C3_BASE_ADDR
+#elif defined(CONFIG_MX7)
+ (void *)I2C1_BASE_ADDR,
+ (void *)I2C2_BASE_ADDR,
+ (void *)I2C3_BASE_ADDR,
+ (void *)I2C4_BASE_ADDR
#elif defined(CONFIG_VF610)
(void *)I2C0_BASE_ADDR
#elif defined(CONFIG_FSL_LSCH3)
@@ -545,10 +556,19 @@ U_BOOT_I2C_ADAP_COMPLETE(mxc1, mxc_i2c_init, mxc_i2c_probe,
CONFIG_SYS_MXC_I2C2_SLAVE, 1)
#if defined(CONFIG_MX31) || defined(CONFIG_MX35) ||\
defined(CONFIG_MX51) || defined(CONFIG_MX53) ||\
- defined(CONFIG_MX6) || defined(CONFIG_LS102XA)
+ defined(CONFIG_MX6) || defined(CONFIG_LS102XA) ||\
+ defined(CONFIG_MX7)
U_BOOT_I2C_ADAP_COMPLETE(mxc2, mxc_i2c_init, mxc_i2c_probe,
mxc_i2c_read, mxc_i2c_write,
mxc_i2c_set_bus_speed,
CONFIG_SYS_MXC_I2C3_SPEED,
CONFIG_SYS_MXC_I2C3_SLAVE, 2)
#endif
+
+#if defined(CONFIG_MX7)
+U_BOOT_I2C_ADAP_COMPLETE(mxc3, mxc_i2c_init, mxc_i2c_probe,
+ mxc_i2c_read, mxc_i2c_write,
+ mxc_i2c_set_bus_speed,
+ CONFIG_SYS_MXC_I2C4_SPEED,
+ CONFIG_SYS_MXC_I2C4_SLAVE, 3)
+#endif