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.

DM8168内核不能使用I2C1问题



您好!我在调8168内核I2C驱动,发现I2C0可以正常访问,而I2C1一直访问不了,相应引脚上根本没有信号出来。

  在《TI816x-PSP-04.00.00.09-DataSheet.pdf》P4页发现一句话:

“Though I2C1 control from kernel is not supported, it is possible to add this support by editing

arch/arm/plat-omap/i2c.c and arch/arm/mach-omap2/board-ti8168evm.c for 'Bus 2'”

如果想访问BUS2,具体应该怎么改上面那两个文件?谢谢!

目前我做的修改为下面标的红色部分,凡是还是没效果,i2c1一直没有信号出来。

在uboot中给了i2c1的时钟:

evm.c,peripheral_enable()中:

__raw_writel(0x2, CM_ALWON_I2C_1_CLKCTRL);

while(((__raw_readl(CM_ALWON_I2C_1_CLKCTRL) & 0x70000) >> 16) != 0) ;

在内核arch/arm/plat-omap/i2c.c

static struct resource i2c_resources[][2] = {

{ I2C_RESOURCE_BUILDER(0, 0) },

{ I2C_RESOURCE_BUILDER(0, 0) },

};

static struct platform_device omap_i2c_devices[] = {

I2C_DEV_BUILDER(1, i2c_resources[0], &i2c_pdata[0]),

I2C_DEV_BUILDER(2, i2c_resources[1], &i2c_pdata[1]),

};