Trying to set up I2C communication with a Raspberry Pi as Master and Jetson as Slave

Trying to set up I2C communication with a Raspberry Pi as Master and Jetson as Slave. Need guidance on enabling I2C Slave mode on Jetson AGX Orin 64 gb development kit. Operating System: Ubuntu 22.04.5 LTS
Kernel: Linux 5.15.148-tegra

Package: nvidia-jetpack
Source: nvidia-jetpack (6.2.1)
Version: 6.2.1+b38

*** Please note that this reply is generated by LLM automatically ***

To enable I2C Slave mode on the Jetson AGX Orin 64GB development kit, you’ll need to modify the device tree and configure the I2C interface. Here’s a step-by-step guide to help you achieve this:

Device Tree Modification

  1. Locate the device tree file for your Jetson AGX Orin module. The file is usually named tegra194-p3668-all-p3509-0000.dtb and can be found in the /boot/dtb directory.
  2. Open the device tree file in a text editor and search for the I2C node that corresponds to the I2C interface you want to use as a slave. For example, if you want to use I2C1 as a slave, search for &i2c1.
  3. Add the following properties to the I2C node to enable slave mode:
&i2c1 {
    // ...
    slave-mode;
    i2c-slave-address = <0x10>; // Replace with your desired slave address
    // ...
};

The slave-mode property enables slave mode, and i2c-slave-address sets the slave address.

I2C Interface Configuration

  1. Load the modified device tree file using the dtb command:
sudo dtb -f /boot/dtb/tegra194-p3668-all-p3509-0000.dtb
  1. Verify that the I2C interface is enabled and configured correctly using the i2cdetect command:
sudo i2cdetect -y -r 1

This command scans the I2C bus and displays the detected devices. You should see your Raspberry Pi (as the master) listed as a device on the bus.

Ubuntu Configuration

  1. Install the i2c-tools package to access I2C utilities:
sudo apt-get install i2c-tools
  1. Add the following lines to the /etc/modules file to load the I2C driver at boot time:
i2c-dev
i2c-omap
  1. Reboot your Jetson AGX Orin module to apply the changes.

Comparison with Other Jetson Modules

The steps above are specific to the Jetson AGX Orin 64GB development kit. If you’re using a different Jetson module, such as the Jetson Orin Series or Jetson AGX Orin, you may need to modify the device tree file and I2C interface configuration accordingly.

For example, on the Jetson Orin Series, the I2C node might be named &i2c2 instead of &i2c1. Be sure to consult the device tree file and documentation for your specific Jetson module to ensure correct configuration.

Raspberry Pi Configuration

On the Raspberry Pi side, you’ll need to configure the I2C master interface to communicate with the Jetson AGX Orin as a slave. This typically involves:

  1. Enabling the I2C interface on the Raspberry Pi using the raspi-config tool.
  2. Installing the i2c-tools package on the Raspberry Pi.
  3. Using the i2cget and i2cset commands to communicate with the Jetson AGX Orin as a slave.

Consult the Raspberry Pi documentation for more information on configuring the I2C master interface.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

i tried it , it did not help.

Do you confirm the device tree by dumping?

sudo dtc -I fs -O dts -o extracted_proc.dts /sys/firmware/devicetree/base