[IMX6Q] u-boot How to enable I2C3
Hi,Is IMX6Q u-boot support I2C3 function and how to enable I2C3 ?This is my setting as follows:
static struct i2c_pads_info i2c_pad_info2 = {
.scl = {
.i2c_mode = MX6_PAD_EIM_D17__I2C3_SCL | I2C_PAD,
.gpio_mode = MX6_PAD_EIM_D17__GPIO3_IO17 | I2C_PAD,
.gp = IMX_GPIO_NR(3, 17)
},
.sda = {
.i2c_mode = MX6_PAD_EIM_D18__I2C3_SDA | I2C_PAD,
.gpio_mode = MX6_PAD_EIM_D18__GPIO3_IO18 | I2C_PAD,
.gp = IMX_GPIO_NR(3, 18)
}
};
int board_init(void)
{
...
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
But seem not works in this setting!
My test command is u-boot i2c command:
=>i2c dev 2
=>i2c probe
but "i2c dev 1" is ok!
"i2c dev 2" is no any i2c signal output
My u-boot version is
====================================
U-Boot 2016.03-svn9469 (Aug 16 2019 - 11:14:31 +0800)
arm-poky-linux-gnueabi-gcc (GCC) 5.3.0
GNU ld (GNU Binutils) 2.26.0.20160214
====================================
Hi, This issues has fixed.
I2C3 setting should be
static struct i2c_pads_info i2c_pad_info2 = {
.scl = {
.i2c_mode = MX6_PAD_GPIO_3__I2C3_SCL | I2C_PAD,
.gpio_mode = MX6_PAD_GPIO_3__GPIO1_IO03 | I2C_PAD,
.gp = IMX_GPIO_NR(1, 3)
},
.sda = {
.i2c_mode = MX6_PAD_GPIO_6__I2C3_SDA | I2C_PAD,
.gpio_mode = MX6_PAD_GPIO_6__GPIO1_IO06 | I2C_PAD,
.gp = IMX_GPIO_NR(1, 6)
}
};
页:
[1]