DTB_FILE setting not used in JetPack 6.0

Hi NVidia Team

For JetPack 6.0 we use two different dtb files for the bootloader and the kernel, as our custom carrier otherwise needs a lot longer to boot up. The only difference between the bootloader-dtb and the kernel-dtb is that we disable the ethernet controller for the RGMII Interface. In the board configuration file for the flashing, we specified this with the following two settings:

DTB_FILE=“name_of_kernel_dtb”
TBCDTB_FILE=“name_of_bootloader_dtb”

However now when we flash our device, it seems that the specified bootloader-dtb is used also for the kernel-dtb. We can see this as the RGMII Interface will not come up and in the “/proc/device-tree/” the controller is disabled. Using an FDT entry in extlinux.conf and pointing to the kernel-dtb, the Interface comes up and the controller is enabled.

Is this a bug in the flash.sh script or do we need to use a different setting for our case?
Thank you.

Kind regards

Hi,

You may want to first clarify what device you are using.
Xavier is not supported by JetPack 6.

For the device tree issue, flashing log will tell you what file is used to flash what partitions.
Please provide the log so we can further check it.

Hi DaveYYY

Sorry my mistake, we are using the AGX Orin, can you please move the topic?
Thank you.

Sure.
I have moved it to the right section.
Then please help check your flashing log.

Hi DaveYYY

Thank you.

Here is the flashing log:
log.txt (582.8 KB)

Let us know if you need anything else.

Are these the right files?

copying dtbfile(/home/janick/nvidia/nvidia_sdk/JetPack_6.0_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/kernel/dtb/tegra234-brla4-agx-orin.dtb)… done.
copying tbcdtbfile(/home/janick/nvidia/nvidia_sdk/JetPack_6.0_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/kernel/dtb/tegra234-brla4-agx-orin-eqos-disabled.dtb)… done.

I can see file names are different, so it’s not a bug in our script.

Hi DaveYYY

Then this would mean that the system does not use the kernel-dtb partition for the device tree?
Our dtb files should be correct, as with the FDT entry, it works.
At the moment, we can use the workaround with the FDT entry. However it seems odd that it does not work without it. Could you please check this?
Thank you.

Booting log will show whether dtb is taken from the file in rootfs or the kernel-dtb partition.
Can you please attach the log here?

Hi DaveYYY

Here the log files, one without the FDT entry and one with:
log_without_FDT.txt (71.0 KB)
log_with_FDT.txt (71.3 KB)

It seems weird.
Can you add some more obvious changes to your kernel dtb, like modifying the dts path, or the dtb build time, to make sure the file really takes effect?

Hi DaveYYY

There seems no more an entry for the dts path or the build time. However our change must take effect, as for the bootloader-dtb, we disable the ethernet@2310000 controller and we see after that it is disabled:

cat /proc/device-tree/bus@0/ethernet@2310000/status
disabled

And then when adding the FDT entry with the exact same DTB file we specified in the config file with the DTB_FILE entry in our flash configuration, we see that the status changes to okay:

cat /proc/device-tree/bus@0/ethernet@2310000/status
okay

Or you can run our kernel building script to build dtbs so the build time is updated.
Then check sudo dmesg | grep DTB to check whether it’s there.

We used the building script to build our custom dtb. It seems that there is not anymore a build time inside the device tree.

You should get stuff like this:

We build all dtb files with the sources and the command make dtbs as described here:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/Kernel/KernelCustomization.html#sd-kernel-kernelcustomization

We can also check the dtb file of the DevKit and there is neither a buildtime nor a path.

Did you test changing the bootloader-dtb file for the DevKit to something else than the kernel-dtb and it works on your side?

OK, so looks like that is changed on JetPack 6.
Will verify and get back to you tomorrow.

Hi,

I tried adding nvidia,dtsfilename and nvidia,dtbbuildtime back to my kernel dtb, and these two nodes do appear under /proc/device-tree/ after the device boots into kernel.

Please add this piece of code back into the corresponding kernel dts under Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/:

	nvidia,dtsfilename = __FILE__;
	nvidia,dtbbuildtime = __DATE__, __TIME__;

Flash the device again see if it’s there.

Hi DaveYYY

We added the setting to our device tree, in the bootloader-dtb we put the “nvidia,dtsfilename” BOOTLOADER_DTB, and in the kernel-dtb the “nvidia,dtsfilename” KERNEL_DTB. Now after a flashing the device (flash_log.txt for reference), we see without any FDT entry in the extlinux.conf the following output:

cat /proc/device-tree/nvidia,dtsfilename
BOOTLOADER_DTB

With the FDT entry:

cat /proc/device-tree/nvidia,dtsfilename
KERNEL_DTB

So our changes take effect, but without an FDT entry, it seems like the bootloader-dtb file is also used for the kernel.

flash_log.txt (569.8 KB)

Hi,

Did you make any changes in bootloader/UEFI stuff?
Can this be reproduced on a DevKit?

I tried locally on my Orin Nano, and I still don’t see it:

nvidia@tegra-ubuntu:~$ cd /proc/device-tree
nvidia@tegra-ubuntu:/proc/device-tree$ ls
'#address-cells'       cpus                 dsu-pmu0             interrupt-parent     opp-table-cluster1      regulator-vdd-1v8-ao     reserved-memory       soc1-throttle-alert     tegra-capture-vi    tsc_sig_gen@c6a0000
 aliases               cpu-throttle-alert   dsu-pmu1             mgbe-vm-irq-config   opp-table-cluster2      regulator-vdd-1v8-hs     rtcpu@bc00000         soc2-throttle-alert     tegra-carveouts     vm-irq-config
 bpmp                  cv0-throttle-alert   dsu-pmu2             model                pmu                     regulator-vdd-1v8-sys    scf-pmu               soctherm-oc-event       tegra-hsp@b950000
 bus@0                 cv1-throttle-alert   firmware             name                 psci                    regulator-vdd-3v3-ao     serial                sound                   tegra_mce@e100000
 camera-ivc-channels   cv2-throttle-alert   gpio-keys            nvidia,dtsfilename   pwm-fan                 regulator-vdd-3v3-pcie   serial-number         sram@40000000           tegra-rtcpu-trace
 chosen                dce@d800000          gpu-throttle-alert   nvpmodel             regulator@101           regulator-vdd-3v3-sd    '#size-cells'          __symbols__             thermal-zones
 compatible            display@13800000     hot-surface-alert    opp-table-cluster0   regulator-vdd-1v1-hub   regulator-vdd-5v0-sys    soc0-throttle-alert   tegra-camera-platform   timer
nvidia@tegra-ubuntu:/proc/device-tree$ cat nvidia,dtsfilename 
KERNEL DTBnvidia@tegra-ubuntu:/proc/device-tree$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} root=PARTUUID=6ad01186-14b2-441c-89a6-b5da87bc6c8d rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyS1,115200 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# LABEL backup
#    MENU LABEL backup kernel
#    LINUX /boot/Image.backup
#    INITRD /boot/initrd
#    APPEND ${cbootargs}

We did not make any changes in bootloader/UEFI.

We tested it now with the DevKit (with a 32GB AGX Orin Module) with the same result.
Flash log:
flash_log.txt (569.4 KB)

Without FDT entry:

cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 pcie_aspm=off

cat /proc/device-tree/nvidia,dtsfilename
BOOTLOADER_DTB

With FDT entry:

cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      FDT /boot/dtb/kernel_tegra234-p3737-0000+p3701-0004-nv_.dtb
      APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 pcie_aspm=off
cat /proc/device-tree/nvidia,dtsfilename
KERNEL_DTB

And our jetson-agx-orin-devkit.conf looks the following:

# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# concord-upstream.conf: configuration for "P3701 + P3737"
# (T234 P3710).

source "${LDK_DIR}/p3737-0000-p3701-0000.conf.common";

update_flash_args_p3737_0000_p3701_0000()
{
	# Select the Base DTB based on SKU
	if [ "${board_sku}" = "0000" ]; then
		# Enable VRS11 DCM mode for CPU/GPU/CV rails
		PMIC_CONFIG="tegra234-mb1-bct-pmic-p3701-0005.dts";
		DTB_FILE=tegra234-p3737-0000+p3701-0000-nv.dtb;
	elif [ "${board_sku}" = "0001" ] || [ "${board_sku}" = "0002" ]; then
		DTB_FILE=tegra234-p3737-0000+p3701-0000-nv.dtb;
	elif [ "${board_sku}" = "0004" ]; then
		# Enable VRS11 DCM mode for CPU/GPU/CV rails
		PMIC_CONFIG="tegra234-mb1-bct-pmic-p3701-0005.dts";
		DTB_FILE=tegra234-p3737-0000+p3701-0004-nv_.dtb;
	elif [ "${board_sku}" = "0005" ]; then
		# Enable VRS11 DCM mode for CPU/GPU/CV rails
		PMIC_CONFIG="tegra234-mb1-bct-pmic-p3701-0005.dts";
		DTB_FILE=tegra234-p3737-0000+p3701-0005-nv.dtb;
	else
		echo "Error: Unrecognized module SKU ${board_sku}";
		exit 1;
	fi

	TBCDTB_FILE=tegra234-p3737-0000+p3701-0004-nv_bootloader.dtb;
}

# update_flash_args:
update_flash_args()
{
	update_flash_args_common
	update_flash_args_p3737_0000_p3701_0000
}

DTB_FILE=tegra234-p3737-0000+p3701-0000-nv.dtb;
TBCDTB_FILE="${DTB_FILE}";
OVERLAY_DTB_FILE="L4TConfiguration.dtbo,tegra234-p3737-0000+p3701-0000-dynamic.dtbo,tegra234-carveouts.dtbo,tegra-optee.dtbo,tegra234-p3737-camera-dual-imx274-overlay.dtbo,tegra234-p3737-camera-e3331-overlay.dtbo,tegra234-p3737-camera-e3333-overlay.dtbo,tegra234-p3737-camera-imx185-overlay.dtbo";

In the DTB file tegra234-p3737-0000+p3701-0004-nv_.dtb we only added nvidia,dtsfilename=KERNEL_DTB and in the DTB file tegra234-p3737-0000+p3701-0004-nv_bootloader.dtb nvidia,dtsfilename=BOOTLOADER_DTB.