Modifing the Device Tree

Hi all,

I’m using a Rock 5 ITX running Armbian with kernel 6.1.99-vendor . My setup includes an NVMe drive and two SATA SSDs. The SATA SSDs are not being detected with this kernel.

I found this upstream kernel commit, which seems to address the issue.

To apply the fix without modifying the current kernel , I downloaded the Linux v6.15 source (which includes the fix), compiled it, and generated the corresponding DTB. I then replaced the existing DTB at /boot/dtb/rockchip/rk3588-rock-5-itx.dtb with the newly compiled one and rebooted.

Unfortunately, the board fails to boot after this change.

From my understanding, the DTB is read by the bootloader (u-boot), so I thought it could be updated independently of the kernel. However, I may be missing something (I’m relatively new to this). Could anyone clarify what I’m doing wrong or what additional steps are needed to modify the DTB correctly? Any help is appreciated!

Thanks!

I don’t think you can use the mainline dtb with the vendor kernel.

The device tree is loaded by u-boot from storage (emmc, spi, uSD), but u-boot uses it’s own device tree, built-in when u-boot was compiled, not the one it loads from storage. The one loaded from storage is passed to the kernel (just an address in memory where it was loaded). The kernel uses it, not u-boot.

The kernel looks at the device tree for “compatible” strings. Each driver from kernel binds to one or more device tree nodes (hardware components) based on a match between “compatible” strings the device tree has and what the drivers recognizes. For example, “panthor” gpu driver in kernel v7.0 recognizes “mediatek,mt8196-mali”, “rockchip,rk3588-mali” and “arm,mali-valhall-csf” device tree nodes. If it doesn’t find any, it won’t bind.

So, there must be a compatibility between the device tree and the kernel. The device tree is distributed as part of the kernel sources. You can use a device tree from a newer kernel, but not much newer.

I suggest you obtain the vendor kernel sources and add the patch into it.