I2C or SPI on SPE not working

, ,

Hello,

I am using Nvidia Jetson ORIN NX module on Connect Tech carrier board NGX024 witch can be found here: https://connecttech.com/product/hadron-dm-carrier-for-nvidia-jetson-orin-nx/

They offer their own board support package here: https://connecttech.com/resource-center/l4t-board-support-packages/

I am trying to test the capabilities of SPE arm MCU by connecting IMU to its SPI or I2C interface and using the examples from the documentation here: Jetson Sensor Processing Engine (SPE) Developer Guide: Welcome

I managed to activate the /sys/devices/platform/bus@0/bus@0:aon_echo/data_channel interface and successfully compiled the ivc-echo-task task application and flashed it into the Orin NX using the script:

sudo ./flash.sh -k A_spe-fw -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit-nvme internal

The echo application works without problems, but if I am trying to activate SPI app or I2C app the code compiles correctly and flashes correctly but after the device restarts it’s not booting up anymore. If I change the file bootloader/spe_t234.bin to the correct one and reflash the spe partition again it boots up again. I did everything the SPE example documentation required to do when activating SPI (updating files for firewall and pinmux and compiling device tree) and for the I2C on Orin NX series everything is already done by default, so I ques its not required to rebuild device tree for I2C app. I upload the console log after restart when I2C app is activated and flashed into ORIN NX. Can anyone please help me to solve this problem?

uart_console_log_20250915.txt (113.8 KB)

Valdas

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

Based on the provided context, it appears that you are experiencing issues with booting up the Jetson Orin NX module after flashing the SPE (Sensor Processing Engine) partition with the SPI or I2C application. The echo application works fine, but the SPI and I2C applications cause the device to fail to boot.

After reviewing the console log you provided, I noticed that there are some errors related to the I2C and SPI interfaces. Specifically, the log shows errors such as “I2C: i2c-1: failed to register i2c-client” and “SPI: spi-0: failed to register spi-device”.

It’s possible that the issue is related to the pinmux configuration or the device tree. Although you mentioned that you updated the files for firewall and pinmux, and compiled the device tree, it’s worth double-checking the configuration to ensure that it’s correct.

Here are a few suggestions to help you troubleshoot the issue:

  1. Verify the pinmux configuration: Make sure that the pinmux configuration is correct for the SPI and I2C interfaces. You can check the pinmux configuration using the pinmux command.
  2. Check the device tree: Ensure that the device tree is correctly configured for the SPI and I2C interfaces. You can check the device tree using the dtc command.
  3. Review the console log: Take a closer look at the console log to see if there are any other errors or warnings that might indicate the cause of the issue.
  4. Try a different SPI or I2C application: Try flashing a different SPI or I2C application to see if the issue is specific to the current application.
  5. Check the SPE firmware: Ensure that the SPE firmware is up-to-date and compatible with the Jetson Orin NX module.

In comparison to other Jetson modules, the Orin NX series has some specific requirements for the SPE configuration. According to the Jetson Sensor Processing Engine SPE Developer Guide, the Orin NX series requires a specific configuration for the SPE firmware and pinmux.

It’s also worth noting that the Connect Tech carrier board NGX024 has its own board support package, which might have specific requirements for the SPE configuration.

If you’re still experiencing issues after trying the above suggestions, it might be helpful to consult with the Connect Tech support team or the Nvidia Jetson community forum for further assistance.

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

Hello,

For I2C and SPI demo in SPE R5 core, please take a look at rt-aux-cpu-demo-fsp/doc/i2c-app.md and rt-aux-cpu-demo-fsp/doc/spi-app.md.

Some other configs should also be updated, and you have to re-flash the full device.

In addition, I2C should be good in Orin NX, but SPI only applies for Orin AGX. Some pins may not be exported in Orin NX.

You can start from I2C.

Another suggestion is to trigger the corresponding SPE routines through echo channel for easy debug.

br

Chenjian

Thank you for your response.

I tried to use SPI and I2C and both of them give the same result. Now I am trying to focus only on the I2C. According of example doc file i2c-app.md (witch is the same as on the internet) I need to disable i2c interface in the .dts file witch should be in the directory Linux_for_Tegra/sources/hardware/nvidia/t23x/nv-public/overlay/ , but I can not find the file for Orin NX in there. I think its name should be “tegra234-p3768-0000+p3767-0000.dts”. The doc says that for the NX the I2C should be disabled by default, so probably it shouldn’t be there. I found the record of “i2c@c250000” in file Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi witch was set to status = “okay”, I changed the record to status = “disabled” and rebuilded the DTB files, copied created dtb files to Linux_for_Tegra/kernel/dtb and reflashed the device, but when I refleshed the spe_t234.bin the result was the same. Do I need to rebuild kernel after I rebuilding DTB files? For now I’m trying to figure out how to use pinmux and dtc commands…

Valdas

Hello, valdas:

The file mentioned in doc is from kernel source package.

You can double-confirm.

building-PC:~/Work/jetson_sdk/35.3.1/sources/Linux_for_Tegra/source/public/kernel-source$ vim ./hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-cvm.dtsi

[1]+ Stopped vim ./hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-cvm.dtsi

yes, if not familiar with L4T, you can start from beginning, i.e. re-building the whole kernel/kernel-dtb.

besides the kernel-dtb, there are several other changes.

Please follow the doc and apply those changes one by one.

Re-flash the whole device at last.

br

ChenJian

Hello,

I downloaded the pinmux spreadsheet and generated new pinmux files tegra234-p3767-pinmux.dtsi and tegra234-p3767-pad.dtsi and put them into hardware/nvidia/t23x/nv-public/ directory on my linux pc and rebuilded dtb’s, then recompiled kernel and modules and then I flashed the device, but it did not help. I changed the code of the example project rt-aux-cpu-demo-fsp in such a way that I can pass the command to the SPE MCU over bus@0:aon_echo/data_channel to start initialize i2c bus after the orin is booted. I noticed that after I send the command the SPE probably hangs and because it shares the UART terminal with the main module the terminal becomes unresponsive, but the main module still works. If I am connected to orin over the ethernet using ssh I still can control it after SPE hangs. The SPE do not respond over bus@0:aon_echo/data_channel any more but the rest of the system works. I decompiled device tree file on the orin using the command “dtc -I dtb -O dts -o decompiled.dts /boot/dtb/kernel_tegra234-p3768-0000+p3767-0000-nv.dtb” and in decompiled.dts file looked for “i2c@c250000” and found these records:

i2c@c250000 {
compatible = “nvidia,tegra194-i2c”;
reg = <0x00 0xc250000 0x00 0x100>;
interrupts = <0x00 0x20 0x04>;
#address-cells = <0x01>;
e[7m–More–(30%)e[27m
e[K #size-cells = <0x00>;
status = “disabled”;
clock-frequency = <0x61a80>;
clocks = <0x03 0x36 0x03 0x66>;
clock-names = “div-clk\0parent”;
assigned-clocks = <0x03 0x36>;
assigned-clock-parents = <0x03 0x66>;
resets = <0x03 0x22>;
reset-names = “i2c”;
dmas = <0xed 0x00 0xed 0x00>;
dma-names = “rx\0tx”;
nvidia,hw-instance-id = <0x07>;
iommus = <0x04 0x04>;
dma-coherent;
phandle = <0x241>;

hdr40_i2c1 = “/bus@0/i2c@c250000”;
gen8_i2c = “/bus@0/i2c@c250000”;

so I guess it is disabled in the device tree. I still would like to get the strait answer about rebuilding kernel: do we (developers) need to rebuild the kernel EVERY time we make changes to the device tree by rebuilding dtb’s? and can you direct me what to check next?

In the documentation I found out that we can use a python script “sudo /opt/nvidia/jetson-io/jetson-io.py” to change pins configuration on the orin itself, but it is not working on my device…

Valdas

Hello,

  1. for the kernel dtb, yes, you have to rebuild it every time you make change. anyway, for debug purpose, de-compile/edit/re-compile is also a way.
  2. You can simplify the I2C test code to register access. For example, with echo channel triggered command, just try to access corresponding I2C registers, instead of a full I2C init procedure. If SPE still hangs, you may check whether the clock is on and firewall setting is correct. Check the doc and code for details.

br

Chenjian

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.