From a22484f5ec95da028675d2f1f00d3e5f855a860d Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 15 Jan 2016 10:27:03 -0800 Subject: 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. --- board/toradex/colibri_imx7/colibri_imx7.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; -- cgit v1.2.3