How to configure the Jetson AGX Orin as an I2C master or slave, and where can I find documentation on addressing when Orin is used as a slave
*** Please note that this reply is generated by LLM automatically ***
Configuring the Jetson AGX Orin as an I2C master or slave involves modifying the device tree and kernel configuration. Here’s a step-by-step guide:
Configuring Jetson AGX Orin as I2C Master:
- Modify the device tree: Update the
tegra194-p3737-0000-p3509-0000.dts
file to enable the I2C master interface. You can do this by adding the following lines:
&i2c0 { status = "okay"; clock-frequency = <400000>; };
This enables the I2C0 interface with a clock frequency of 400 kHz.
- Configure the kernel: Update the kernel configuration to enable the I2C master driver. You can do this by running the following command:
make menuconfig
Navigate to Device Drivers
> I2C support
> I2C device interface
and select I2C Master (i2c-dev)
.
- Compile and install the kernel: Compile and install the updated kernel using the following commands:
make make modules_install make install
Configuring Jetson AGX Orin as I2C Slave:
- Modify the device tree: Update the
tegra194-p3737-0000-p3509-0000.dts
file to enable the I2C slave interface. You can do this by adding the following lines:
&i2c0 { status = "okay"; clock-frequency = <400000>; slave { compatible = "nvidia,tegra194-i2c-slave"; reg = <0x10>; }; };
This enables the I2C0 interface with a clock frequency of 400 kHz and configures the slave device with a register address of 0x10.
- Configure the kernel: Update the kernel configuration to enable the I2C slave driver. You can do this by running the following command:
make menuconfig
Navigate to Device Drivers
> I2C support
> I2C device interface
> I2C Slave (i2c-slave)
.
- Compile and install the kernel: Compile and install the updated kernel using the following commands:
make make modules_install make install
Addressing when Orin is used as a Slave:
When the Jetson AGX Orin is used as an I2C slave, the addressing is handled by the I2C slave driver. The driver uses the reg
property in the device tree to determine the slave address.
In the example above, the slave address is set to 0x10. This means that the I2C master device will use this address to communicate with the Jetson AGX Orin.
Documentation:
You can find documentation on addressing when Orin is used as a slave in the following resources:
- NVIDIA Jetson AGX Orin Developer Guide: This guide provides detailed information on configuring the I2C interface on the Jetson AGX Orin.
- Linux I2C Documentation: This documentation provides information on the Linux I2C subsystem, including addressing and device tree configuration.
- NVIDIA Jetson AGX Orin Device Tree Source: This repository contains the device tree source files for the Jetson AGX Orin, which can be used as a reference for configuring the I2C interface.
Note: The above instructions are based on the assumption that you are using the default device tree and kernel configuration. You may need to modify the instructions based on your specific use case and configuration.
am using tegra234-p3737-0000+p3701-0008-nv
Jetpack 6.2
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.