SPI stops working after sudo apt upgrade on a Jetson Nano

I have the strange problem that after updating the Jetson Nano dev kit b002 SPI stops working.

My test procedure:

  1. I flash a fresh OS with Jetpack 4.6.2 on to the Jetson (with or without SDK dos not matter).
  2. Enable the SPI pins via JetsonIO.py
  3. Reboot
  4. Load driver in the kernel with: sudo modprobe spidev
  5. Test SPI with a loopback test (spidevtest)
  6. SPI works without any problem
  7. run sudo apt update and sudo apt upgrade
  8. Reboot
  9. SPI pins are no longer configured in JetsonIO.py
  10. Enable the SPI pins again
  11. Reboot
  12. Load driver in the kernel with: sudo modprobe spidev
  13. Loopback test does not work any more

If I flash the JetPack version 4.6.3 without the Jetson SDK Components, then SPI does not work after flashing without modification (after steps 1 to 5).

In the sudo apt update process from version 4.6.2 it does upgrade the bootloader and jetson-io to 32.7.3 which is in the Jetpack version 4.6.3.

Does anybody know what the problem could be?

Hi Benutzer2517,

Are you using the devkit or custom board for Jetson Nano?

It seems you should refer to the following instruction to update your board.
NVIDIA Jetson Linux Developer Guide : Over-the-Air Update | NVIDIA Docs

Have you checked the pinmux for SPI related pins in use at this moment?

I use the devkit.

It is described that updating to a new point release, in my case from 32.7.2 to 32.7.3, should be done by sudo apt update followed by a sudo apt upgrade. But this results in the described problem with the SPI.

I checked via JetsonIO.py. Is there another way to check?

Please share the result of the following command.

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

The output looks on both versions (4.6.2 and 4.6.3) identical.
In version 4.6.2 the SPI works in 4.6.3 not.

Bank: 1 Reg: 0x70003050 Val: 0x0000e044 -> spi1_mosi_pc0
Bank: 1 Reg: 0x70003054 Val: 0x0000e044 -> spi1_miso_pc1
Bank: 1 Reg: 0x70003058 Val: 0x0000e044 -> spi1_sck_pc2
Bank: 1 Reg: 0x7000305c Val: 0x0000e048 -> spi1_cs0_pc3
Bank: 1 Reg: 0x70003060 Val: 0x0000e048 -> spi1_cs1_pc4
Bank: 1 Reg: 0x70003064 Val: 0x00006044 -> spi2_mosi_pb4
Bank: 1 Reg: 0x70003068 Val: 0x00006044 -> spi2_miso_pb5
Bank: 1 Reg: 0x7000306c Val: 0x00006044 -> spi2_sck_pb6
Bank: 1 Reg: 0x70003070 Val: 0x00006048 -> spi2_cs0_pb7
Bank: 1 Reg: 0x70003074 Val: 0x00006048 -> spi2_cs1_pdd0
Bank: 1 Reg: 0x70003078 Val: 0x0000e015 -> spi4_mosi_pc7
Bank: 1 Reg: 0x7000307c Val: 0x0000e015 -> spi4_miso_pd0
Bank: 1 Reg: 0x70003080 Val: 0x0000e015 -> spi4_sck_pc5
Bank: 1 Reg: 0x70003084 Val: 0x0000e015 -> spi4_cs0_pc6
Bank: 1 Reg: 0x70003088 Val: 0x00002040 -> qspi_sck_pee0
Bank: 1 Reg: 0x7000308c Val: 0x00002000 -> qspi_cs_n_pee1
Bank: 1 Reg: 0x70003090 Val: 0x00002040 -> qspi_io0_pee2
Bank: 1 Reg: 0x70003094 Val: 0x00002040 -> qspi_io1_pee3
Bank: 1 Reg: 0x70003098 Val: 0x00002040 -> qspi_io2_pee4
Bank: 1 Reg: 0x7000309c Val: 0x00002040 -> qspi_io3_pee5
Bank: 0 Reg: 0x70000b70 Val: 0x00000001 -> drive_qspi_comp_control
Bank: 0 Reg: 0x70000b78 Val: 0x00000001 -> drive_qspi_lpbk_control
Bank: 0 Reg: 0x70000a78 Val: 0x00808000 -> drive_qspi_comp

It seems the pinmux register value wrong for SPI usage.
Could you refer to the following thread to verify SPI loopback test step-by-step?
Jetson Nano SPI Bus Not Working - #10 by KevinFFF

Sadly, I have no time to test this in the near future.
Because it does run with Version 4.62, I will stick with this version.
I still do not understand why it does not work out of the box, if I flash the newer version to the Jetson from the SDK Manager.

You could also use JP4.6.2 with the steps in that thread to verify SPI loopback test.
Using the latest release is just making the status to be synchronized with us.

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