Connect multiple i2c devices to jetson

Hi, I need to connect more than 2 devices to Jetson Xavier NX through i2c. For example, I need to connect Adafruit LED segment, LED matrix, and IMU. However, NX has only 2 i2c buses. Is it possible to connect more than two i2c devices?

hello AutoCar,

how about using the i2c multiplexer.
there’re GPIO-based i2c bus multiplexer to route the i2c signals, or, an i2c bus multiplexer/switch to have several child bus.
please also refer to Topic 192486 as see-also.
thanks

Thank you very much @JerryChang

Do you mean this? TCA9548A I2C Multiplexer : ID 2717 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Since I am going to wire a imu, which needs to send out ROS imu message at a frequency of 200 Hz, ss the sharing-i2c-bus going to impact the data rate?

hello AutoCar,

there’s an i2c bus multiplexer used by Xavier NX DevKit,
please check reference device tree, tegra194-camera-jakku-rbpcv2-imx219.dtsi, it’s sharing 0x10 for dual camera devices.
please also see kernel driver, i2c-mux-gpio, which providing access to I2C bus segments from a master I2C bus and a hardware MUX controlled through GPIO pins.

Hi @JerryChang When you said

there’s an i2c bus multiplexer used by Xavier NX DevKit,

Do you mean I do not need additional hardware device (such as the breakout I linked in my previous reply)? Then how can I link 3 i2c devices with the NX GPIO pins?

hello AutoCar,

according to Jetson Xavier NX Product Design Guide, there should be four I2C interfaces.
why you said there’re only 2 i2c bus? since I do not have Xavier NX for confirmation currently; could you please check… $ ls /sys/bus/i2c/devices/i2c-*

BTW,
do you have these i2c devices having the same i2c address?

For these devices, I need to use the SDA, SCL pins. I looked at this printout from JetsonHacks,(https://www.jetsonhacks.com/nvidia-jetson-xavier-nx-gpio-header-pinout/), it showed there are only two sets of SDA/SCL pints for bus 1 and 8. So I believe I can only connect two i2c devices without using any additional hardware.

As for i2c address, imu and LED definitely have different address. Not sure about LED segment and LED matrix, I will check.

hello AutoCar,

it’s reference camera driver to cam_i2cmux at address 0x77 for several camera devices sharing the same i2c address, I don’t have experience to use i2cmux with the expansion header.