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.

Linux/AM5728: I2C camera detection issue

Part Number: AM5728

Tool/software: Linux

Hello Experts,

I have an camera board connected to AM5728 based EVM board, (BEAGLEBOARD_X15)

And connected the I2C camera (MT9V024) on I2C5 interface on my custom board and getting the below i2c errors while I am doing i2cdetect.

omap_i2c 4807c000.i2c: timeout waiting for bus ready

What could be the reason for this ?

BTW, we have connected 30Ohms series resistors on I2C lines, it could affect anything ?

I probed the I2C signals, seems SCL is low and SDL is in HIGH.

Seems, slave is pulling SCL to LOW ?? if yes, what could be reason for this ? attached the my i2c5 portion of schematics.\

SDK : am57xx-evm-linux-sdk-src-04.03.00.05

Kernel : linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae

I2C_SCL and I2C_SDA are connected directly to camera.

This is my pinmux settings for I2C5.

i2c5_pins_default: i2c5_pins_default {

pinctrl-single,pins = <
DRA7XX_CORE_IOPAD(0x36B4, (PIN_INPUT_PULLUP | MUX_MODE10))// mcasp1_axr0.i2c5_sda
DRA7XX_CORE_IOPAD(0x36B8, (PIN_INPUT_PULLUP | MUX_MODE10))// mcasp1_axr1.i2c5_scl
>;
};

If needed, I can share our camera extension complete board schematics via chat message.

Thanks for the help.

Any help greatly appreciated.

  • Hi,

    You can refer to the camera board schematics, available in the AM572x GP EVM schematics zip file: www.ti.com/.../tidria3
  • Sorry Biser, indeed that didn't answer my issues/question.

    I referred the reference schematics, that didn't help to debug my issue, it doesn't have any series resistors on I2C lines, is that makes any difference ?

    Connected the I2C camera (MT9V024) on I2C5 interface on my custom board and getting the below i2c errors while I am doing i2cdetect.

    omap_i2c 4807c000.i2c: timeout waiting for bus ready

    What could be the reason for this ?

    R1 & R2 are 4.7K resistors and R12 & R40 are 30Ohm resistors.

    Q1) BTW, we have connected 30Ohms series resistors on I2C lines, it could affect anything ?

    I probed the I2C signals, seems SCL is low and SDL is in HIGH.

    Q2) Seems, slave is pulling SCL to LOW ?? if yes, what could be reason for this ? attached the my i2c5 portion of schematics.

    SDK : am57xx-evm-linux-sdk-src-04.03.00.05

    Kernel : linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae

    I referred the below TI wiki and didn't get any clue for my issue.

  • Serial resistors are not needed on I2C lines. How did you check if the slave is pulling SCL low? Did you see the same issue without your camera board?
  • Thanks Biser for your reply.
    I probed the SCL and SDA lines and SCL is always low and SDA is in HIGH.
    And I am getting below error message in console while executing 'i2cdetect' command and this commands takes ~1minutes to complete the scanning of the I2C5 bus, and I am not seeing this weird behavior if I remove the camera connector.

    Can you please let me know the possible reasons for getting this issue ?

    omap_i2c 4807c000.i2c: timeout waiting for bus ready
  • Titus Stalin said:
    and I am not seeing this weird behavior if I remove the camera connector.

    So it looks like the add-on board is indeed halting the I2C.

  • Thanks Biser, shared my camera schematics via chat, can you please have look and shed some lights on this.
    Thanks for the help.
  • Hi,

    I looked at it. I don't see anything on the hardware side that could be causing this. However there are some things you need to check on the software side. The Processor SDK default configuration runs on the AM572x GP EVM, which has several peripherals attached to I2C5 - LCD board EEPROM, Touchscreen controller, COM8 expansion connector. You will need to remove all these from the device tree.
  • Hi Biser,

    We have started to debug the issue again.

    I have attached the Linux boot log.

    Here is my pinmux settings for i2c5 bus (i2cdetect -y -r 4)

    When I do "i2cdetect -y -r 4", and getting below errors in linux console.

    Can you please check if need any change in SW ?

    [ 0.563976] omap_i2c 4807c000.i2c: could not find pctldev for node /ocp/l4@4a000000/scm@2000/pinmux@1400/i2c5_pins_default, deferring probe

    [ 109.620862] omap_i2c 4807c000.i2c: timeout waiting for bus ready
    [ 110.640847] omap_i2c 4807c000.i2c: timeout waiting for bus ready
    [ 111.660858] omap_i2c 4807c000.i2c: timeout waiting for bus ready
    [ 112.680841] omap_i2c 4807c000.i2c: timeout waiting for bus ready

    &i2c5 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&i2c5_pins_default>;
    clock-frequency = <100000>;//100KHz

    };

    i2c5_pins_default: i2c5_pins_default {
    pinctrl-single,pins = <
    DRA7XX_CORE_IOPAD(0x36B4, (PIN_INPUT_PULLUP | PIN_INPUT_SLEW | MUX_MODE10))// mcasp1_axr0.i2c5_sda
    DRA7XX_CORE_IOPAD(0x36B8, (PIN_INPUT_PULLUP | PIN_INPUT_SLEW | MUX_MODE10))// mcasp1_axr1.i2c5_scl
    >;
    };

  • Hello Titus,

    1) Are you still on SDK 4.3?

    2) Your attached txt file no longer exists. You may need to re-attach it.

    3) What does i2cdetect -l return?

    4) Are you saying "i2cdetect -y -r 4" results in "timeout waiting for bus ready"? If so, could you double-check your pinmuxing? Are you doing any i2c pinmuxing in uboot that might conflict with later pinmuxing?

    Regards,
    Nick
  • Thanks Nick for your response and sorry for the delayed response.
    Currently we root caused to power issue in our boards.
    e2e.ti.com/.../2660341
    Will update on the progress.
    Thanks again!
  • Hello Titus,

    I am marking this thread resolved since power debug should continue on your other post.

    Regards,

    Nick

  • Thanks Nick.
    Yes, now we are able to see the i2c slaves on our I2C5 bus.
    Thanks for your support.
  • Glad to hear it Titus! Let us know if you have further issues down the road.

    Regards,
    Nick