Hi,
We are trying to establish a command channel between our image sensor and the DM388 using I2C via wires connecting to I2C2_SDA and I2C2_SCL pins (with the sensor assigned a slave address of 0x04 and clock at 100kHz).
Using IPNC RDK 3.8 as the code base, we followed the instructions in the TI81xx PSP Porting Guide, in an attempt to enable I2C2.
More specifically, the following lines of code were inserted into board-ti8148evm.c and board-dm385ipnc.c.
static struct i2c_board_info __initdata ti814x_i2c_boardinfo2[] = {
{
I2C_BOARD_INFO("s100_command", 0x04),
},
};
static void __init ti814x_evm_i2c_init(void)
{
omap_register_i2c_bus(1, 100, ti814x_i2c_boardinfo,
ARRAY_SIZE(ti814x_i2c_boardinfo));
omap_register_i2c_bus(2, 100, ti814x_i2c_boardinfo2,
ARRAY_SIZE(ti814x_i2c_boardinfo2));
}
We leave i2c.c unchanged since the original code looks okay for our purpose.
void __init omap2_i2c_mux_pins(int bus_id)
{
....
if (cpu_is_ti814x() && bus_id == 3) {
sprintf(mux_name, "uart0_dcdn.i2c2_scl_mux0");
omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
sprintf(mux_name, "uart0_dsrn.i2c2_sda_mux0");
omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
} else {
sprintf(mux_name, "i2c%i_scl.i2c%i_scl", bus_id, bus_id);
omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id);
omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
}
}
After a clean build and update of binaries, the only i2c bus available when rebooting to linux is still /dev/i2c-1, which is enabled by default. And obviously running i2cdetect -l only generates i2c-1 as result.
This is our first attempt at using I2C2, so we probably have missed something obvious. Any pointer would be greatly appreciated.