This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

J7200XSOMXEVM: Interfacing of ASM330lhh with J7200/DRA 821 EVM

Part Number: J7200XSOMXEVM

Tool/software:

Hello TI Experts,

We are facing issues while integrating the ASM330LHH IMU sensor with the Jacinto J7200 EVM using the Processor SDK Linux: ti-processor-sdk-linux-j7200-evm-10_00_07_03. Below are the detailed steps we have taken so far:

Driver Analysis
- Upon checking the available drivers in the kernel source, we found support for ASM330LHH under the LSM6DSX driver (st_lsm6dsx_core.c and st_lsm6dsx.h).
- These files contain relevant definitions and functions for ASM330LHH.
- Based on this, we concluded that we do not need to write a custom driver, and instead, we can use the existing LSM6DSX driver for ASM330LHH integration.
- We intend to interface the sensor using I2C.

Device Tree Changes
We made the following changes to enable the sensor on main I2C0:

1. k3-j7200-common-proc-board.dts
&main_i2c0 {
    asm330lhh: asm330lhh@6b {
        compatible = "st,lsm6dso";
        reg = <0x6b>; // Address depends on SA0 pin
        status = "okay";
    };
}

2. k3-j7200-som-p0.dtsi
- We added the same node under &main_i2c0.

3. k3-j7200-main.dtsi
main_i2c0: i2c@2000000 {
    status = "okay";
    ...
}

Kernel and Device Tree Compilation
After making the device tree modifications:

export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
make dtbs -j$(nproc)
make Image dtbs -j$(nproc)

- The updated .dtb file was copied to the SD card boot partition.
- We booted the board using U-Boot:

=> ls mmc 1:1
=> setenv fdtfile <your-updated-dtb-file>
=> run bootcmd_mmc1

To verify the loaded .dtb content, we decompiled the k3-j7200-common-proc-board.dtb and confirmed that the i2c@2000000 node exists and includes the asm330lhh sub-node. However, we did not find the main-i2c0 alias or symbolic reference.

Runtime Verification
We attempted to verify the loaded .dtb at runtime using:

dmesg | grep -i dtb

But there was no output, so we are unsure if the updated device tree is actually being loaded.

Next, we tried to probe the I2C bus:

i2cdetect -y 1

Unfortunately, no I2C devices were detected, including the ASM330LHH.

Hardware Connection
- The ASM330LHH sensor is connected to the J9 header on the J7200 EVM.
- We are attaching the relevant schematic snippet for reference.

Our Questions
1. What are the exact steps required to enable main-i2c0 properly in the device tree?
2. How can we confirm that the updated DTB is successfully loaded at boot?
3. Why is i2cdetect not returning any address despite enabling the I2C node and driver?
4. Are we missing any other steps to successfully interface the ASM330LHH over I2C with the J7200 EVM?