This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

i2c-0正常工作,i2c-1会报错:omap_i2c omap_i2c.2: controller timed out

Other Parts Discussed in Thread: TMP102

我使用的是 达芬奇 dm8148 评估板,SDK安装的ipnc_3.8。

i2c2口不能正常的工作,i2c1口工作正常。花费了我很长时间,也没有找到解决的办法。

当我使用i2c2口,对I2C芯片做读写操作的时候出现下面的错误信息。

omap_i2c omap_i2c.2: controller timed out

在板级文件/kernel/arch/arm/mach-omap2/board-ti8148ipnc.c中增加了如下配置(模拟i2c-0,增加对i2c-1的使用)

static struct i2c_board_info __initdata ti814x_i2c1_boardinfo[] = {
// {
// I2C_BOARD_INFO("tmp102", 0x49),
// },
};

static void __init ti814x_evm_i2c1_init(void)
{
/* There are 4 instances of I2C in TI814X but currently only one
* instance is being used on the TI8148 EVM
*/
#ifndef CONFIG_TI8148_EVM_OPTIMIZED
omap_register_i2c_bus(2, 100, ti814x_i2c1_boardinfo,
ARRAY_SIZE(ti814x_i2c1_boardinfo));
#else
omap_register_i2c_bus(2, 100, ti814x_i2c1_boardinfo,
ARRAY_SIZE(ti814x_i2c1_boardinfo));
#endif
}

ti814x_evm_i2c1_init();

最终就是报错:omap_i2c omap_i2c.2: controller timed out