summaryrefslogtreecommitdiff
path: root/board
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-03-09 15:03:31 +0100
commit3eaef296fe01f43d2b2051d1a24082b2e19e0a85 (patch)
tree0cf5d5cd4ce3bf1d28a51816ec8dc3983ead7555 /board
parent439313b2d59815eb6e504a98186260c2495f4bc0 (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. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'board')
-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 e0229c36840..0173192cff6 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;