I tried to connect I2C device to I2C1, I2C3 and I2C4 in DM8148 and I found that only I2C3 can not detect the I2C device. The I2C driver in ezsdk 5.04 has many problems.
1. It uses the function ti814x_enable_i2c2 in mach-omap2/devices.c to enable the function clock, but the function is unnecessary.
static inline void ti814x_enable_i2c2(void)
{
struct clk *fclk;
fclk = clk_get(NULL, "i2c3_fck");
if (!IS_ERR(fclk))
clk_enable(fclk);
else
printk(KERN_WARNING "clk get on i2c3 fck failed\n");
}
2. The following entries in clock814x_data.c does not define omap_i2c.3, so the function in i2c-omap.c can not set the fclk.
CLK("omap_i2c.1", "fck", &i2c1_fck, CK_TI814X | CK_DM385),
CLK("omap_i2c.2", "fck", &i2c2_fck, CK_TI814X | CK_DM385),
CLK(NULL, "i2c3_fck", &i2c3_fck, CK_TI814X | CK_DM385),
CLK("omap_i2c.4", "fck", &i2c4_fck, CK_TI814X | CK_DM385),
3. After I updated these codes, I still can not use I2C3, but I can change the speed to 100KHz now. Does anyone use I2C3 port successfully?