Enable SPI1 on shipped product

I am looking for a method to enable the spi1 on a production Jetson Nano in a product.

There is no option to do a reflash from an external source so I need a method that can be run on the machines themselves. We are running a minimal linux build so have none of the Nvidia tools on the Jetson itself (but could download and install something if it was required). Fortunately we have not enabled any security features yet. A tool which allows a partial or full image to be installed on the device it is run on would be my ideal.

I have seen elsewhere suggestions that the DTB partitions can be rewritten directly. This has not worked for me and leaves the nano unbootable.

  1. create a full image with spi1 enabled
  2. flash to a Jetson nano and test
  3. extract the DTB partition to a file using DD
  4. write to the main and backup DTB partition on a target device using DD
  5. restart… nano does not boot at all (not even splash screen)

I suspect the partition is failing a signature check?

I have seen the suggestion that the new DTB can be picked up from extlinux.conf. This has not worked either.

  1. create the DTB with spi1 enabled.
  2. write DTB to /boot
  3. update /boot/extlinux/extlinux.conf to load the DTB.

extlinux package is not installed but don’t know if this matters?
I have been told that the production nano pinmux can only be updated early in boot so an updated DTB may not affect the hardware?

Does anyone know of a way to do this update? Has anyone had success with the above methods in which case what am I missing?

Update the extlinux.conf should be able to configure them. Which release?

The build is composed of:

  • Tegra210_Linux_R32.3.1_aarch64
  • Nano_4_3 (for Auvidea JN30B
  • ubuntu-base-18.04.4-base-arm64

nickb61sh,

It’s been a few weeks, have you had any success getting your DTB SPI1 update loaded?

Note that CBoot on Nano (the bootloader that runs just before U-Boot) is responsible for the pinmux programming, so as long as your DTB SPI update is flashed correctly, CBoot will see it and program it (assuming you need to update the pinmux settings for SPI1 for it to work - I’m not sure, but they might be OK out-of-the-box).

Having said that, loading the kernel DTB from extlinux.conf (via the FDT /boot/dtb/tegra210-“your-dtb-here”.dtb line) is done by U-Boot, and hence is too late to change any pinmux, but should allow the kernel to see any changes you’ve made to the SPI1 node. When there’s a FDT line in extlinux.conf, U-Boot takes the original DTB loaded from the partition, and using any changes made by any prior bootloader (nvtboot, CBoot) it merges them with the disk-based DTB, which is then provided to the kernel on boot.

Finally, to flash an updated DTB (I assume you took the DTB blob you read via DD from the partition, decompiled it via dtc, made your changes, then recompiled to a new DTB via dtc?), you do need to sign it. I don’t have the specifics handy right now, I’m sure Shane/Wayne can provide those or a pointer to the Jetson Nano docs that show how to do that, but essentially you use flash.sh to generate a signed image that’s rewritten to the kernel & BL DTB partitions (DXB and RP1 in flash.xml) via the -k option. The updated DTB needs to be in Linux_for_Tegra/kernel/dtb in your BSP, IIRC. Don’t try to rewrite your new DTB via DD from the OS, as it won’t be signed and boot will likely fail (you should see the failure prints on your debug UART).

Hope this helps,

Tom