Note: the problem is observed in the Linux kernel but the question is of a more general nature.
I and another user (Bastian Ruppert <Bastian.Ruppert@sewerin.de>) are experiencing "controller timed out" kernel messages. He has found that there is a suggested workaround for TI devices that do not have their SCL muxed with GPIOs -- the OMAP-L138 appears to be a such a device -- in the I2CTips wiki page. The suggested method follows:
"Option 2: Many devices don't mux SCL/SDA with GPIO since the I2C I/O cells are often special open drain cells. A workaround has been reported to work even on these devices. By configuring the I2C for "free data format" and then reading a byte the I2C will immediately start sending clocks to input data (rather than trying to send an address). This can be used to free up the bus."
Bastian and I have both tried to implement the workaround in the i2c-davinci driver but have not been successful. His implementation follows:
flag |= DAVINCI_I2C_MDR_FDF;// free data format mode
flag &= ~DAVINCI_I2C_MDR_TRX;// receive byte
// Set STT to begin transmit now DXR is loaded
flag |= DAVINCI_I2C_MDR_STT;
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, flag);
Can someone provide us with a procedure for achieving SCL toggle on the OMAP-L138 using the "free data format"-read as described in the wiki page?
Any procedure at the level of the programming interface of the davinci i2c controller would be great. Example implementations of this workaround would also be great.