mxc_i2c driver
Troy,
I am trying to use mxc_i2c driver with multiple buses. I didn't figure out how the bases are set. Can you shed some light on this?
Thanks,
York
Quoted 9 lines · York Sun
Troy,
I am trying to use
mxc_i2cdriver with multiple buses. I didn't figure out how the bases are set. Can you shed some light on this?Thanks,
York
see board/boundary/nitrogen6x/nitrogen6x.c
It calls
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);which is inarch/arm/imx-common/i2c-mxv7.c
This file has an array of base addresses
static void * const i2c_bases[] = {
(void *)I2C1_BASE_ADDR,
(void *)I2C2_BASE_ADDR,
#ifdef I2C3_BASE_ADDR
(void *)I2C3_BASE_ADDR,#endif
};
Quoted 21 lines · Troy Kisky
Quoted 9 lines · York Sun
Troy,
I am trying to use
mxc_i2cdriver with multiple buses. I didn't figure out how the bases are set. Can you shed some light on this?Thanks,
York
see
board/boundary/nitrogen6x/nitrogen6x.cIt calls
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0); setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);which is in
arch/arm/imx-common/i2c-mxv7.cThis file has an array of base addresses
Quoted 8 lines
static void * const i2c_bases[] = { (void *)I2C1_BASE_ADDR, (void *)I2C2_BASE_ADDR, #ifdef I2C3_BASE_ADDR (void *)I2C3_BASE_ADDR,#endif
};
Great! Thanks.
York