Device tree modification does not work

Hi,
I modify spi1 item in the dts file and flash the new dtb to jetson xavier, but it did not work. The detail is :
step1. I download the kernel source, and modify

tegra194-p2888-0001-p2822-0000-common.dtsi

at
kernel_src/hardware/nvidia/platform/t19x/galen/kernel-dts/common
image
I disable the SPIDEV.
step2. I compile the whole kernel, get the

tegra194-p2888-0001-p2822-0000.dtb

at
okernel/arch/arm64/boot/dts

step3. I copy this new dtb file to the host at
nvidia_sdk/jetpack_4.5_linux_jetson_agx_xavier/linux_for_tegra/kernel/dtb

step4. I use the command

sudo ./flash.sh -k kernel-dtb jetson-xavier mmcblk0p1

to flash the dtb file, and it seems work without any error.

But when I cat /proc/device-tree/spi@3210000/status, it still okay.

Is something wrong with my step?
What should I do to next?

Best wishes

Yan

Use the dtc tool to convert the dtb back to dts and check if the spi is really getting disabled.

In fact, I do check the dtb before flash it

And what was the result?

The result is the status has been changed in the new dtb, then I flash the jetson.

I mean I check the modify result is OK, but after flash it to Jetson, the spi@321000 keep the stuats okay.

Then please share the full boot up log from uart and also the dmesg.

Thanks Wayne, I know how to use dmesg, but I never use uart log, can you tell me how to use it?
By the way, after flash new dtb, are these files in /boot/ of jetson will be replace?
I use ls -l command and the /boot dir seems no file date change, it still show 6, May. Could there be a problem with the flash step?

That file will not be updated.

Your log will tell the answer. So share the log first.

dmesg.txt (79.8 KB)
minicom.cap (31.1 KB)
HI Wayne, I got the logs of boot and dmesg, please check it.

Yes, the log tells us what is going on.

[0012.904] I> Loading kernel-dtb binary from rootfs …
[0012.909] I> rootfs path: /sdmmc_user/boot/kernel_tegra194-p2888-0001-p2822-0000-user-custom.dtb
[0012.948] I> Validate kernel-dtb …

Did you run jetson-io before? This makes the bootloader to boot the dtb from the rootfs but not the default partition. That is why the update by flash.sh does not take effect.

Yes Wayne, I use the jetson-io, what should I do to boot the dtb from the default partition?

Can you share what does your /boot/extlinux/extlinux.conf look like now?


sure, I cat the file

extlinux.conf (1.5 KB)
Here is the file.

You can comment out the two “FDT”. Those two will let the bootloader read dtb from rootfs.

Thanks a lot. I can change the device tree as wish.
The final question, if I comment the twe “FDT”, can I still use the jetson-io in the future?

I am not sure if you understand how jetson-io works.

The logic is same, jetson-io replaces the dtb. But this dtb is created on the device and jetson-io just modifies the extlinux.conf to add a “FDT” there. This FDT will force the bootloader to read the dtb from the rootfs, but not the partition.

Thus, if you just want to me to reply a simple yes or no answer to your question here, then my answer is no. If you remove the FDT, then jetson-io’s change will not take effect anymore.

But I think it is easy to come up with a idea for how to workaround this. You can try to think about it by yourself first.

OK, sounds good!
Thanks for your help.

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