The compatibility between the Linux kernel and the DTB in Jetson Tegra

As we know, the boot loader passes the dtb to the kernel so the kernel can identify the h/w devices which are available in a Jetson Tegra. The latest version of Linux kernel for Tegra is 5.10.104 and the corresponding dtb file is /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb.

If I disassemble this dtb file, its compatible string of the root device node is
compatible = “nvidia,p3737-0000+p3701-0000 nvidia,tegra234 nvidia,tegra23x”.

So my question is: how does the kernel determine whether this dtb is compatible to the kernel or not ? In other words, what should be modified in the Linux source tree before compiling a Linux kernel for Tegra so that the new kernel can work with this dtb file ?

Thanks in advance!

There is no precise method to check this. That is why sometimes user flash wrong dtb for wrong platform.

I’ll add that if there is content in “/proc/device-tree”, then the tree loaded, although it doesn’t mean anything is used. Each driver or kernel feature which might use the device tree won’t care about entries not related to it. If one part is invalid, then it in no way invalidates other parts. It isn’t a tree as a whole which is valid or invalid, it is instead individual nodes being valid or invalid for a give driver+hardware combination.

As an example, often people try to use the dev kit device tree for a third party carrier board, and parts work, but other parts fail when they have a different layout compared to the dev kit carrier board. You would have to identify particular drivers or hardware which fail, and then look closer at that node of the device tree.

Thank you, Linuxdev and Wayne !

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