summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-01-15 10:27:03 -0800
committerMax Krummenacher <max.krummenacher@toradex.com>2016-02-17 10:54:09 +0100
commita22484f5ec95da028675d2f1f00d3e5f855a860d (patch)
tree3b4f488a9d7dd2d401db98ee859a703b2a1de693
parent5c3bd800256feca9b2dd83b21c7fc309e9fcce39 (diff)
colibri_imx7: add I2C information for Colibri I2C bus
Add pinmux and I2C setup call to register the Colibri I2C bus. The fourth (I2C4) instance is used for the I2C bus defined in the standard Colibri pinout. Use i2c dev 3 to switch to this bus.
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index e0229c3684..0173192cff 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -93,6 +93,19 @@ struct i2c_pads_info i2c_pad_info1 = {
.gp = IMX_GPIO_NR(1, 5),
},
};
+/* I2C4 for Colibri I2C */
+struct i2c_pads_info i2c_pad_info4 = {
+ .scl = {
+ .i2c_mode = MX7D_PAD_ENET1_RGMII_TD2__I2C4_SCL | PC,
+ .gpio_mode = MX7D_PAD_ENET1_RGMII_TD2__GPIO7_IO8 | PC,
+ .gp = IMX_GPIO_NR(7, 8),
+ },
+ .sda = {
+ .i2c_mode = MX7D_PAD_ENET1_RGMII_TD3__I2C4_SDA | PC,
+ .gpio_mode = MX7D_PAD_ENET1_RGMII_TD3__GPIO7_IO9 | PC,
+ .gp = IMX_GPIO_NR(7, 9),
+ },
+};
#endif
int dram_init(void)
@@ -503,6 +516,7 @@ int board_early_init_f(void)
#ifdef CONFIG_SYS_I2C_MXC
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
+ setup_i2c(3, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info4);
#endif
return 0;