I am trying to detect multiple devices that are connected to my Jetson TX2 through a custom carrier board using I2C_GP1, I2C_GP2, and I2C_GP3. The TX2 Developer Kit Carrier Board Design Files were used as a guide for the custom carrier board. How can I scan and communicate with these devices on these I2C busses?
Thanks
Hi mmorsy,
You can use i2ctools for this task, the usage is really simple:
sudo i2cdetect -r -y <i2c-bus>
The output would be as follows:
nvidia@nvidia-desktop:~$ sudo i2cdetect -r -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: 30 UU UU UU UU -- -- -- -- -- -- -- -- -- -- --
40: -- UU UU UU UU 45 -- -- UU -- UU -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
More info here: https://linux.die.net/man/8/i2cdetect
-Jafet
Thank you Jafet for your response.
Does correspond to the number associated with I2C_GP1, I2C_GP2, and I2C_GP3?
In your example of “sudo i2cdetect -r -y 2”, should this detect devices on the I2C_GP2_DAT / I2C_GP2_CLK lines?
Thanks
Hi mmorsy,
The I2C connections would be as shown below, it can be obtained from OEM Product Design Guide (Figure 40. I2C Connections): https://developer.nvidia.com/embedded/dlc/jetson-tx2-series-oem-product-design-guide
I2C numeration in device tree starts at 0 (https://developer.ridgerun.com/wiki/index.php?title=JetsonTX2/Getting_Started#I2C). Basically it is as follows:
- I2C_GP0 -> = 1
- I2C_GP1 -> = 0
- I2C_GP2 -> = 6
- I2C_GP3 -> = 8
Hope this info helps,
-Jafet
Thanks so much Jafet. I’ll try that.