linux-imx 4.9.11 I2C is not working

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

linux-imx 4.9.11 I2C is not working

2,089 Views
daniel_lorenzo
Contributor I

Hi,

We are working on a custom board based on the iMX6Q processor which uses the linux-imx kernel 4.9.11 (linux-imx.git - i.MX Linux Kernel). However, when we send an I2C message to one of our peripherals (we have 4 slaves on the i2c-2 bus, the processor is the unique master) the following error arises from the controller:

[ 82.972843] i2c i2c-2: ioctl, cmd=0x703, arg=0x5c
[ 82.972854] i2c i2c-2: ioctl, cmd=0x720, arg=0x7ec06bbc
[ 82.972865] i2c i2c-2: master_xfer[0] R, addr=0x5c, len=1
[ 82.972871] i2c i2c-2: <i2c_imx_xfer>
[ 82.972877] i2c i2c-2: <i2c_imx_start>
[ 82.973053] i2c i2c-2: <i2c_imx_bus_busy>
[ 83.482804] i2c i2c-2: <i2c_imx_bus_busy> I2C bus is busy
[ 83.482810] i2c i2c-2: Trying i2c bus recovery
[ 83.482854] i2c i2c-2: <i2c_imx_start>
[ 83.483029] i2c i2c-2: <i2c_imx_bus_busy>
[ 83.992804] i2c i2c-2: <i2c_imx_bus_busy> I2C bus is busy
[ 83.992816] i2c i2c-2: <i2c_imx_xfer> exit with: error: -110

Taking a look over with the oscilloscope, we can see that the bus is high when in idle state (as expected). Nevertheless, when we try to begin a transfer the master sets the start condition on the bus, then, the bus remains low (both, SDA and SCL) until the transfer times out and the driver warns that the bus is busy with a timeout error (though it really isn't!). We know it is not a HW issue/bug, since we can manage to communicate via I2C through U-Boot (and older kernel versions, e.g. 4.1.15).

PD: I2C related kernel configuration attached to this post. The default kernel configuration (imx_v7_defconfig) is neither working.

Thank you!

Cheers,

Daniel

0 Kudos
Reply
2 Replies

1,515 Views
igorpadykov
NXP Employee
NXP Employee

Hi Daniel

one can try nxp uboot/linux from codeaurora repository

https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.9.11_1.0.0_ga

uboot-imx - i.MX U-Boot 

also one can try Demo Umages and try to reproduce issue on i.MX6Q Sabre SD board

https://www.nxp.com/webapp/Download?colCode=L4.9.11_1.0.0_MX6QDLSOLOX&appType=license&location=null 


Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,515 Views
daniel_lorenzo
Contributor I

Hi Igor,

As I have said, we're already using NXP Kernel (linux-imx.git - i.MX Linux Kernel ) and our U-Boot is working as expected (though it is not from NXP). Anyway, I have compiled the kernel you mentioned above and the issue persists.

We have also tried with older NXP Kernel (4.1.15) and it does work, but we need the version 4.9.11.

On the other side, we don't have the i.MX6Q Sabre SD board, we are working on a custom board based on the i.MX6Q processor.

Thank you!

Best regards,

Daniel

0 Kudos
Reply