Custom DTB for Orin NX Prevents QSPI Detection


We are developing a custom platform to connect an Orin NX with an FPGA and I’m trying to get the DTB setup for our cutom board but am facing some issues.

To preempt the question which seems to get asked everytime anyone posts a question - the issue is not a devkit problem, there is no issue with the hardware. This is purely a software problem with the DTB. Getting an orin dev kit wont help me.

Some background:

The board we have designed is largely based of the p3509 platform, with only minimal changes. It was designed this way as we wanted to support both Xavier NX and Orin NX 16GB modules.

Or design is basically the p3509, stripped back to the bare minimum - HDMI on the DP1 pins, a PCIe x4 link (C4) to our FPGA, a PCIe x1 link (C1) to an NVMe SSD, a USB3.0 Host port on usb2-1/usb3-0, GBe, and usb2-0 as a peripheral recovery port.

The main change needed in the DTB is that we swapped a GPIO, such that PZ.01 is used for controlling power to the USB3.0 port instead of the recovery port - the design guide wasn’t clear on this. We then use PCC.01 as the VBus detect for recovery port.

We are using Jetson Linux 35.3.1(the latest version?). After much head scratching we finally managed to get the environment setup to compile the kernel.

I started with the Xavier NX, made a modified copy of the DTS source files and modified those to suit. We have been able to successfully compile the DTB and flash the Xavier NX and have it boot and everything work correct.

The problem now arises with moving to the Orin NX 16GB module. If we just use the stock BSP files from t23x/p3768/kernel-dts with no modification, we can compile these without issue to create a DTB file (fully compiled from source, so we know the build process is working correctly).

After a bit of a headache getting the flashing to work with a 30GB SSD (you really need to better document that!), we can successfully flash the Orin NX using and have it boot. Naturally the USB3 host port doesn’t get powered up because we need to modify the DTS files to set the correct vbus-gpio parameters.

The problem

Now the problem arises when it comes to making a custom DTB file. I have done nothing more than modify t23x/p3768/kernel-dts/cvb/tegra234-p3509-a02.dtsi.

First change portsusb2-0 to have:

     mode = "peripheral";

And to set portsusb2-0connector to have

     vbus-gpio = <&tegra_main_gpio TEGRA234_AON_GPIO(CC, 0) GPIO_ACTIVE_LOW>;

Then add portsusb2-1connector to:

    connector {
        compatible = "usb-a-connector", "gpio-usb-a-connector";
        label = "USB3";
        type = "usb-a-connector";
       vbus-gpio = <&tegra_main_gpio TEGRA234_MAIN_GPIO(Z, 1) GPIO_ACTIVE_HIGH>;

I build this as before, copying the new DTB files to the kernel directory. Then run the command again as before. However this time the flash command spits out:

[ 944]: l4t_flash_from_kernel: Successfully flash the external device
[ 944]: l4t_flash_from_kernel: Error flashing qspi
Flash failure
Cleaning up...

Looking at the output from the debug UART port, I can see:

[    7.004115] Run /init as init process
[    7.016822] Root device found: initrd
[    7.017285] Mount initrd as rootfs and enter recovery mode
enable remote access
insmod /lib/modules/5.10.104-tegra/kernel/drivers/mtd/mtd.ko
[    7.024436] mtd: module verification failed: signature and/or required key missing - tainting kernel
insmod /lib/modules/5.10.104-tegra/kernel/drivers/mtd/devices/qspi_mtd.ko
[    7.027961] qspi_mtd spi6.0: unrecognized JEDEC id ffffff
insmod /lib/modules/5.10.104-tegra/kernel/drivers/spi/spi-tegra210-qspi.ko

It can no longer detect the QSPI flash.

If I go back to the original DTB file, everything works fine, the QSPI flash is properly detected.

This seems very similar to this other question which went unanswered:

Is there something obscure going on with the GPIO controllers that might be stopping the QSPI flashin being initialised?

So I have narrowed it down to this line:

vbus-gpio = <&tegra_main_gpio TEGRA234_AON_GPIO(CC, 0) GPIO_ACTIVE_LOW>;

If I remove that, the QSPI flash is detected again.

Never mind. &tegra_aon_gpio.

1 Like

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