[SOLVED] Jetson I2C-CAM communication

Hi everyone,

I’m trying to communicate with an i2c device connected on the i2c bus of my Jetson board. I’m having a hard time trying to find any documentation concerning the i2c interface. The only usefull thing that I’ve found is this topic:
https://devtalk.nvidia.com/default/topic/770603/i2c-port-name-and-i2cbus-number/

So far, I’ve connected my i2c device to the CAM_I2C (3.3V) (i2c-2). When I try to use i2cdetect on bus 2 to find my device:
$ sudo i2cdetect -r 2
The scanning is very long and I get this kernel messages:
[ 553.493850] tegra-i2c tegra12-i2c.2: i2c transfer timed out, addr 0x0003, data 0x00

Is there anything I have to do to be able to communicate with my device through this i2c? Do I have to enable something to start the i2c communication?

Moreover, if i try to scan the other i2c’s (i2c-0 for example) the scanning is done as fast as usual (2-3 seconds) without any kernel message. So I’m wondering if there is something special about this i2c-2 in particular.

Thanks for your help!

You might have a hardware issue on your I2C connection.
Using the grinch kernel 19.3.6 and i2ctools I had no trouble programming an EEPROM over HDMI or running detect on the various busses.

I tried it with the grinch kernel, same issues. I had a look at the schematics available here:
http://elinux.org/Jetson/I2C
http://elinux.org/File:J3A2_I2C-highlighted.png

From what I see, I should have 18V on pin 29 (LDO_1) but I’m measuring 0V. I’m wondering if there is something I forgot to enable. A GPIO or specific register to enable the camera I2C?

BTW, what do you mean by “programming an EEPROM over HDMI” ? How is it related to I2C?

OK, problem solved. The LDOs were disabled by default. I’ve been able to activate them using sysfs

echo enabled > /sys/devices/platform/tegra12-i2c.4/i2c-4/4-0040/as3722-regulator.0/regulator/regulator.12/state

Once the LDOs are active I can detect my device using i2cdetect and communicate with it.

The HDMI port has a 5V level I2C you can talk to. I2C is part of the HDMI standard.
Thanks for the LDO tip, someone will find that useful.

Did you just have to enable that regulator? I have the same problem now, scanning i2c-2 for a device connected to the expansion header.

I’m almost positive that this didn’t work for me the first time I tried the 21.3 release, but now it does.

Edit: this does not work for me on 21.3, even after enabling the regulators, but it works reliably on 21.4, so someting must have been fixed.