SPI bus not working

I got it to work! For anyone else with this problem, here’s what fixed it for me. Edit /boot/extlinux/extlinux.conf, and check that it’s got an FDT line which specifies which .dtb file to use. This line was missing for me, and the scary thing is that if you specify the wrong .dtb file, you brick the entire system until you reflash everything from scratch (which we’ve had to do several times). How do you tell which .dtb file to use? No idea; we tried a couple different ones before we got it right. Here’s what our /boot/extlinux/extlinux.conf file looks like now:

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      FDT /boot/tegra210-p3448-0002-p3449-0000-b00.dtb
      APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1 nv-auto-config

The FDT line had been missing entirely, and we added it in.

Then, you need to go to that .dtb file, and decompile it to a .dts text file:

dtc -I dtb -O dts -o ~/tegra.dts /boot/tegra210-p3448-0002-p3449-0000-b00.dtb

(-I specifies the input format, -O specifies the output format, and -o specifies the output file location)

Edit that text file with the changes Shane suggested above. Specifically, for each of the spi*_*_* entries, in the nvidia,function field, change “rsvd” to “spi” (so, for spi1, change “rsvd1” to “spi1”, and for spi2, change “rsvd2” to “spi2”).

Now, it’s time to recompile the .dts file back to a .dtb file:

dtc -I dts -O dtb -o ~/tegra.dtb ~/tegra.dts
sudo cp ~/tegra.dtb /boot/tegra210-p3448-0002-p3449-0000-b00.dtb

Reboot, and either it’ll work, or you’ll have bricked your whole system and need to reinstall everything using the sdkmanager tool. This tool runs on your laptop, not the Jetson itself, and must be run on Ubuntu 18.04. If you are running a different OS (including a different version of Ubuntu!), you’ll need to set up a virtual machine running Ubuntu 18.04 to use this tool, or I think Nvidia has docker images of Ubuntu 18.04 with the sdkmanager inside.

1 Like