mxs-i2c driver failure.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mxs-i2c driver failure.

1,294 Views
Felix1z
Contributor I

I'm trying to communicate with some i2c device, with slave address 0x20. There is principal driver fault, where driver sends out only slave address, and after that reports "adapter timeout" on any subsequent master_xfers to any other addresses. Confirmed by scope.

the kernel version is 2.6.31, built with latest ltib.

Did anyone experience any issues with mxs-i2c driver?

Labels (1)
0 Kudos
Reply
5 Replies

980 Views
Felix1z
Contributor I

Thank you for the driver, i've temporarily fixed that myself, but wasn't satisfied with results, and rewrite was on my todo list before release. The driver works perfectly.

0 Kudos
Reply

980 Views
hbucknell
Contributor I

I have deleted the attached file above as it included extraneous debug pin twiddling and sysfs files for debug.

Attached is the driver and two DMA related patches that were supplied to me by Freescale

0 Kudos
Reply

980 Views
hbucknell
Contributor I

The I2c driver is not properly implemented for the imx233. Reads are completely broken and the address is also mangled and there is poor error recovery.

Attached is a replacment for the driver on this CPU (it only works with the imx233 and overwrites it for the time being!). I have been working with Freescale's FAE and I am hoping to improve this further and make it work along side the driver for the other CPUs.

0 Kudos
Reply

980 Views
Felix1z
Contributor I

The slave may not ACK it's slave address until it's ready, but that should not cause the driver to get to "locked" state.

the protocol to read register from the chip is -- start, send slave addr+ write cmd, send reg addr, start send slave addr+read cmd, read 1 byte, stop.

What i see on the scope is following : 

  start condition, proper address, nak. (there's no stop!)

then 10 ms later i see  another 9 clocks with register address... it's like driver didn't stopped/reset the dma.

 

any other attempts to access the driver, even with different addresses doesn't produce single clock -- the driver is locked until reset.

0 Kudos
Reply

980 Views
Balaji_ng
Contributor III

Hi,

Check if your slave is connected and is sending an ACK once it receives the command from master. Also check if your I2C lines are pulled up with appropriate resistor values (as per I2C Specifications). 

Regards,

Balaji

0 Kudos
Reply