SPI Clock Signal Not Present on Jetson Orin Nano Dev Board
Issue Overview
Users are experiencing an issue with the SPI interface on the NVIDIA Jetson Orin Nano Developer Kit. Specifically, when attempting to write data to /dev/spidev0.0 using spi-tools, no clock signal is detected on the SPI0_SCK pin when measured with an oscilloscope. This problem persists even after configuring the pinmux settings.
Possible Causes
- Incorrect pinmux configuration
- SPI driver not properly loaded or initialized
- Hardware issue with the SPI interface
- Software bug in the Jetson Linux SDK
- Misconfiguration in device tree or boot loader settings
Troubleshooting Steps, Solutions & Fixes
-
Verify Jetson-IO availability:
For Jetson Linux 36.3, Jetson-IO should be available. Run the following command:sudo /opt/nvidia/jetson-io/jetson-io.py
Use this tool to configure the SPI pinmux settings if available.
-
Manual pinmux configuration:
If Jetson-IO is not available, ensure the pinmux is correctly configured:- Generate the appropriate dtsi file
- Replace the following files with the generated dtsi:
- bootloader/tegra234-mb1-bct-gpio-p3767-dp-a03.dtsi
- bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi
- bootloader/generic/BCT/tegra234-mb1-bct-padvoltage-p3767-dp-a03.dtsi
- Flash the bootloader using:
./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit nvme0n1p1
-
Verify SPI driver loading:
Check if the SPI driver is properly loaded:lsmod | grep spi
If not present, load the driver manually:
sudo modprobe spidev
-
Perform SPI loopback test:
Short the MISO and MOSI pins, then run the following commands:wget https://raw.githubusercontent.com/torvalds/linux/v5.15/tools/spi/spidev_test.c gcc -o spidev_test spidev_test.c sudo ./spidev_test -D /dev/spidev0.0 -v -p "HelloWorld123456789abcdef"
This test will help determine if the SPI interface is functioning correctly.
-
Check dmesg output:
Examine the kernel log for any SPI-related errors or messages:dmesg | grep -i spi
-
Verify device tree:
Ensure that the SPI controller is properly defined in the device tree:dtc -I fs /sys/firmware/devicetree/base | grep -i spi -A 10
-
Test GPIO functionality:
To isolate whether the issue is specific to SPI or a general pin problem:- Export the SPI0_SCK pin as GPIO
- Set it as an output
- Toggle the pin and verify with an oscilloscope
-
Update Jetson Linux:
If possible, try updating to the latest Jetson Linux version, as the issue may have been resolved in a newer release. -
Contact NVIDIA Support:
If the issue persists after trying these steps, it may be necessary to contact NVIDIA support for further assistance, as there could be a hardware issue or a bug in the current SDK version.
Remember to reboot the system after making any changes to pinmux or device tree configurations to ensure the new settings take effect[1].