AnsweredAssumed Answered

i.MX28 i2c1 bus issue with last linux kernel

Question asked by Julien Morand on Jan 14, 2014
Latest reply on Feb 27, 2014 by Julien Morand

Hi community,

 

I have made a custom board with an i.MX287 processor. I'm currently using Yocto to compile and use the mainline kernel (3.12) / U-boot 2013.10.

 

Everything is working great so far (boot from SD card, SPI, USB, ethernet, i2c0) except the i2c1 bus.

I have enabled the i2c device interface to see my i2c busses in /dev.

Using the i2c-tools gives the following output:

 

i2cdetect -y -r 0

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: 20 21 22 -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

 

For i2c1 bus I get a "Failed to get PIO reg. write descriptor." error.

Here is my device tree configuration:

 

  i2c0: i2c@80058000 {

       pinctrl-names = "default";

       pinctrl-0 = <&i2c0_pins_a>;

       status = "okay";

  };

 

  i2c1: i2c@8005a000 {

       pinctrl-names = "default";

       pinctrl-0 = <&i2c1_pins_a>;

       status = "okay";

  };*/

 

i2c1_pins_a: i2c1@0 {

     reg = <0>;

     fsl,pinmux-ids = <

     0x30a1 /* MX28_PAD_AUART2_CTS__I2C1_SCL

     0x30b1 /* MX28_PAD_AUART2_RTS__I2C1_SDA

     >;

     fsl,drive-strength = <1>;

     fsl,voltage = <1>;

     fsl,pull-up = <1>;

};

 

First I've tried these patches:

[PATCH 1/3 V2] i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller -- Linux I2C

[PATCH 2/3 V4] i2c: mxs: Rework the PIO mode operation -- Linux I2C

[PATCH 3/3 V3] i2c: mxs: Fix PIO mode on i.MX23 -- Linux I2C

 

But it's even worse...this time neither i2c0 nor i2c1 bus is working. I get a "PIO: Failed to send SELECT command!" error.

 

Finally, switching bus i2c1 to bit banging allow me to use it but clock frequency is around 35kHz.

 

i2c1 {

       compatible = "i2c-gpio";

       pinctrl-0 = <&i2c1_pins_gpio>;

       pinctrl-names = "default";

       gpios = <

            &gpio3 11 0 /* sda */

            &gpio3 10 0 /* scl */

       >;

       i2c-gpio,delay-us = <2>;

       #address-cells = <1>;

       #size-cells = <0>;

       status = "okay";

  };

 

It would be great to find a solution so we can use the i2c1 bus with the i2c-mxs driver.

 

Does anyone have any suggestions to help me correct this bug ?

 

Thanks a lot in advance for your time.

Outcomes