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.

i2cdetect fail to detect existing device

Guru 20755 points
Other Parts Discussed in Thread: TCA6416

Hi,

I wander if anyone had siomilar issue:

I am using io exmander (tca6416).

When I first just run i2cdetect without confuiguring the device in board file I did not detect the device (0x20 address), 

but only after adding it to the board file. Is it that i2cdetect utility can give wrong detection although device is connected in hw correctly ?

root@dm814x:~# i2cdetect -r -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@dm814x:~#

Thanks,

Ran

  • Hello,

    is the driver for tca6416 communicating properly via i2c ?

    When you add it in the board file can do a read/write on tca6416 regs ?

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar,

    It seems to work fine, becuase I see in /sys/class/gpio that additional gpios were added (though I haven't yet tried to set any of these gpios).

    I don't have any new printing in kernel boot, but on adding printing to pca953x.c probe() routine, it seems that there was probe without failures.

    I also find another similar question here, so I suspect that i2cdetect might have missed the detection of this device, if it is not configured correctly in board file, still I wander how can it be that i2cdetect fails to detect existing functional hardware.

    Thanks,

    Ran

  • Hi Ran,

    Could you please attach the boot log.


    root@dm814x:~# i2cdetect -r -y 2
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    root@dm814x:~#

    From your i2cdetect log, there is chip with address of 0x20. It was detected.
    Able to communicate to that chip via "i2cget" ?
  • Hi Titus,

    Right, the i2cdetect printing above is *after* adding the correct lines in the board file.

    I just wandered why i2cdetect did not detect anything before doing that. As far as I know, i2cdetect can detect hadrware before it is used by the kernel driver.

    It seems that from some reason it did not succeeded. The importnat thing is that I can communicate with the device (but still wander why i2cdetect missed it before applying the driver)

    Thanks,

    Ran

  • Hi Ran,
    I can also see that you have i2c slave device which has 0x48 address.
    So, you can disable that driver & remove the entry from board file and see still you are able to see that address via i2cdetect.
  • Hi Titus,

    The problem is with address 0x20 (io expander), not with 0x48 (temperature)
    If I remove the driver, I won't see anything with i2cdetect on 0x20 (not UU and not 0x20 , just nothing).
    It seems that i2cdetect can't see the device . I don't mind becuase I get progress anyway now, It is just that it seeems that from some reason i2cdetect can miss devices, I don't know why.

    Thanks,
    Ran