This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

On soft reboot got error i2c_omap i2c_omap.4: timeout waiting for bus ready on omap4430

i have omap4430 based development board and it has ported GB from http://www.omappedia.org/wiki/L27.G.5_OMAP4_GingerBread_Release_Notes

Now it works fine but when i soft reboot Manny times then u-boot shows

timed out in wait_for_bb: I2C_STAT=1000
I2C read: I/O error

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Initializing cgroup subsys cpu
Linux version 2.6.35.7-dirty

And in kernel i see below error many times.

i2c_omap i2c_omap.4: timeout waiting for bus ready
i2c_omap i2c_omap.4: timeout waiting for bus ready
i2c_omap i2c_omap.4: timeout waiting for bus ready
i2c_omap i2c_omap.4: timeout waiting for bus ready
i2c_omap i2c_omap.4: timeout waiting for bus ready
i2c_omap i2c_omap.4: timeout waiting for bus ready
i2c_omap i2c_omap.4: timeout waiting for bus ready


and my all i2c device registration gets failed. Doing hard reboot works fine. So does my linux release missing any patch like https://patchwork.kernel.org/patch/49514/

or anything is missing in u-boot code.?



Regards

Jeegar Patel

  • Hello Jeegar,

     

    It seems I2C bus is in busy state.

     

    Could you check any external device connected to I2C bus driving SDA low ?

    There is a known bug i694 in Errata.

     

    There was a patch for this item.

    http://review.omapzoom.org/#/c/17307/

     

    Thanks and regards,

    Koichiro Tashiro

  • Hi Koichiro

    Thanks for your reply.

    i have applied that patch with some extra work on Linux kernel 2.6.35. Since 2.6.35 has not omap_i2c_reset(); when i have done some soft reboot i faced belows error


    i2c_omap i2c_omap.4: timeout waiting for bus ready

    i2c_omap i2c_omap.4: reset failed
    i2c_omap i2c_omap.4: controller timed out

    On next reboot it worked. earlier there was so many

    i2c_omap i2c_omap.4: timeout waiting for bus ready

    error messages and it was continued until hard reboot,  But with this patch i got once and that time it did not worked and on next reboot it worked fine.

    so is this expected? why i got error like?
    i2c_omap i2c_omap.4: reset failed


    Thanks,

    jeegar

  • Jeegar,

     

    It is not expected behavior. An additional reboot should not be required.

    I guess something wrong in i2c reset function.

     

    Thanks and regards,

    Koichiro Tashiro

  • Hi Koichiro

    Yes you are right  i need to port  omap_i2c_reset() from 3.0 kernel to 2.6 kernel and registered it in below structure.

    static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
            .name   = "i2c",
            .sysc   = &omap44xx_i2c_sysc,
            .rev    = OMAP_I2C_IP_VERSION_2,
            .reset  = &omap_i2c_reset,
    };

    Now it working fine. so you suggested patch was correct but due to my kernel is 2.6 i need some extra effort to make it work.

    Thanks,

    Jeegar patel