Support for enabling SPI on Jetson Nano 2GB Kit

Hi, we are working on enabling the SPI on Jetson Nano 2GB developer kit. We have tested the SPI with file and it is working fine.

We have added SPI patch (hdr40_pinmux) on dtsi file and tested with Jetson nano 4GB kit and eMMC based board, it is working fine. We have applied the same patch(hdr40_pinmux) and tested with 2GB kit but SPI is not working(loopback test).

We have compared custom-jetsonIO dtb and our SPI patch enabled DTB, it looks same. Can you please tell us, Is there anything I need to add for Jetson Nano 2GB kit?

Have a compare the REG for those two device.

sudo cat /sys/kernel/debug/tegra_pinctrl_reg | grep -i spi

sudo cat /sys/kernel/debug/tegra_gpio

Nano_2GB.txt (2.5 KB)
Nano_4GB.txt (4.7 KB)

Thanks for the quick reply @ShaneCCC. Attached the log files.

The configure looks the same with my configure on r32.7.1
My test result as below. BTW could you try jetson-io for Nano 2G to confirm it.

nvidia@nvidia-desktop:~$ sudo ./spidev_test -d /dev/spidev0.0 -g16 -zzz
using device: /dev/spidev0.0
setting spi mode for read,write
setting spi bpw
setting max speed for rd/wr
spi mode: 0
bits per word: 8 bytes per word: 1
max speed: 10000000 Hz (10000 KHz)
no. runs: 1
Using seed:0x62318d17
loop count = 0
using sequential pattern ....
transfer bytes [16]
0000: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
transfer: Return actual transfer length: 16
receive bytes [16]
0000: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
transfer: received packet size:16 len:16 stat:0
/dev/spidev0.0: TEST PASSED
====== Transfer stats ====
       total: 16B (0KiB 0MiB)
       total: 1P
       ioerr: 0B (0KiB 0MiB)
       ioerr: 0P
  wire total: -1B/s (0KB/s)
       total: -1B/s (0KB/s)
  wire total: -1P/s
       total: -1P/s
       total: 16B (0KiB 0MiB)
       total: 1P
        good: 16B (0KiB 0MiB)
        good: 1P
       ioerr: 0P
     dataerr: 0P
        good: -1B/s (0KB/s)
        good: -1P/s
 packet drop: -1/10000

  Total time: 0.000570s

Hi @ShaneCCC, we have tested with jetson-io and it is working fine. We need to add the patch in Jetson nano 2GB dtsi file. Is there anything we have missed? Thanks in advance

I would suggest to unassemble the /boot/kernel_tegra210-p3448-0002-p3449-0000-b00-user-custom.dtb to compare with your to figure the root cause.

Confirm the dtb by /boot/extlinux/extlinux.conf

1 Like

Hi @ShaneCCC, We have compared both(user custom and our’s) the dtb and looks fine.
kernel_tegra210-p3448-0003-p3542-0000-user-custom.txt (3.2 KB)
tegra210-p3448-0003-p3542-0000.txt (3.3 KB)

Please check the attached files and share your comments on the same.

What’s the result from below command.

sudo cat /proc/device-tree/pinmux@700008d4/common/spi*/nvidia,function

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