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.

I2C Timeout issue with CMOS camera

Other Parts Discussed in Thread: TVP5150

Hi,

I am using the DM8168 processor with Silicon revision 2.1. The EZSDK version is 5_05_02_00 and my Linux version linux-2.6.37-psp04.04.00.01.

I am trying to read my camera device (CMOS OV7725) using i2c. I am getting below error while the command to read it in the Linux target console:

root@dm816x-evm:~# i2cdump -f -y 1 0x21 b
     0  1  2  3 omap_i2c omap_i2c.1: Arbitration lost
 4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready
XX omap_i2c omap_i2c.1: timeout waiting for bus ready

So, please let me know what might be the reason for this issue. Since I can able to read other slave devices like touch, TVP5150 device from the same i2c bus.

Thanks in advance.

Regards,
Salih

  • Hi Salih,

    This is your DM816x custom board, right?

    On DM816x TI EVM and EZSDK 5.05.02.00 I have:

    root@dm816x-evm:~# i2cdetect -l

    i2c-1 i2c       OMAP I2C adapter                 I2C adapter

    i2c-2 i2c       OMAP I2C adapter                 I2C adapter

    root@dm816x-evm:~# i2cdump -f -y 1 0x21 b

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

    00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

    root@dm816x-evm:~# i2cdump -f -y 1 0x18 b
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80    ...??......?...?
    10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
    20: 20 00 00 00 20 00 00 00 00 00 00 80 80 00 00 00     ... ......??...
    30: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
    40: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    60: 00 02 00 00 00 00 02 00 00 00 00 00 00 00 00 00    .?....?.........
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    80: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80    ...??......?...?
    90: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
    a0: 20 00 00 00 20 00 00 00 00 00 00 80 80 00 00 00     ... ......??...
    b0: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
    c0: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 02 00 00 00 00 02 00 00 00 00 00 00 00 00 00    .?....?.........
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

    As you can see, in EVM I can dump the registers at the tlv320aic3x codec (addr 0x18) through i2c-1. The dump of device attached at i2c-1 at addr 0x21 gives 0xFF as I have nothing attached there.


    Could you please provide me how exactly you enable the CMOS sensor in linux kernel? Could you please provide me full boot up log?


    See also if the below pointers will be in help:

    BR
    Pavel

  • Hi Pavel,

    Thank you very much for your prompt reply. I have probe the I2C lines using CRO after the Linux OS is launched. I am not getting any Clock as well as data from when I tried to probe my camera slave device.
    I am attaching file in which I am configuring the Camera in the i2c as below:

    /cfs-file/__key/communityserver-discussions-components-files/791/2260.ti81xx_5F00_vpss.zip

    Please advice me on how to solve this issue.

    Thanks in advance.

    Regards,
    Salih

  • Salih,

    What I can advice you is to modify the board-ti8168evm.c file as explained in the below wiki page:

    processors.wiki.ti.com/.../TI81xx_PSP_Porting_Guide

    BR
    Pavel
  • Hi Pavel,

    Thanks for your inputs. Since it is capture device, its supposed to configure in the ti81xx_vpss.c file as like TVP5150 device right if I am not wrong.

    Is it possible to register in the board-ti8168evm.c file?

    Please correct me if I am wrong and advice me to proceed further.

    Thanks in advance.

    Regards,
    Salih

  • I have seen all the links which you are not giving any proper solution for my problem.

    Thanks in advance.

    Regards,
    Salih
  • Hi,

    Did anybody/TI tested OV7725 CMOS camera with DM8168 processor?. If so, please provide the working driver for the same.
    Still I am struggling with this timeout issue. I am not getting, which causing this issue?. I have tried to debug the driver and my i2c client structure getting NULL (to_soc_camera_host(icd->dev.parent)) in the function ov772x_video_probe ().

    So, please provide the proper driver if anybody working with this Device.


    Thanks in advance.

    Regards,
    Salih

  • Hi,

    Did TI tested any camera devices with DM8168 processor?.

    Thanks in advance.

    Regards,
    Salih
  • Hi,

    Any updates on this?. Now, I have changed the complete driver as like TVP5150 driver. Now I can able to read/write registers using i2c. But, while running the saLoopBack application, its stop executing at DQBUF ioctl and keep on waiting for interrupt to complete. Do you have any idea on which part, should I check to solve this issue?.

    I am struggling with this issue for very long time. So please kindly give me any solution to solve this issue.

    Thanks in advance.

    Regards,
    Salih

  • Salih,

    Muhammad Salih said:
    But, while running the saLoopBack application, its stop executing at DQBUF ioctl and keep on waiting for interrupt to complete.

    I do not think this is related to the I2C control interface, while this e2e thread is for I2C control.

    BR
    Pavel

  • Hi Pavel,

    I knew this is not related i2c issue. But the i2c was solved after I made my driver completely as like TVP5150 driver for read/write. With TI provided camera driver (ov772x.c) still I am facing the same issue. I asked in the previous post ("Did TI tested any camera devices with DM8168 processor?."), I didn't get any response for that question.

    Anyhow, if not please suggest me on what to do further?. Should I have to post in some other link or I can get the solution from this thread?

    Thanks in advance.

    Regards,
    Salih