Issues facing while updating the customized device tree in L4T 35.4.1

Hello,

I am currently using L4T 35.4.1 from jetpack 5.1.2. Earlier I worked with the L4T 32.5 of jetpack 4.5. I followed some documents to add and update the device tree. I followed the same procedure here also. Below I given the procedure.

  1. After extracting the customized kernel package(public_sources.tbz2).
  2. Copied the device tree into this path
    nx/source/Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/
  3. In this folder, please open tegra194-p3668-common.dtsi file to add a following line:
    include "tegra194-customed-devicetree.dtsi“
  4. please open tegra194-p3509-0000-a00.dtsi file to comment out the following:
    //include "tegra194-camera-jakku-rbpcv2-imx219.dtsi
    and imx477 device tree.
  5. after this, we have to compile the device tree with make -j4 dtbs.
  6. Finally, we need to copy the modified device to the kernel/dtb/ folder. But here
    l4t 32.5 → cp -rfv ~/nx/source/Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/boot/dts/* kernel/dtb/

In L4T 35.4.1, I changed the command like -->cp -rfv ~/nx/source/Linux_for_Tegra/source/public/kernel/kernel-
4.9/arch/arm64/boot/dts/nvidia/* kernel/dtb/

  1. After this I flashed the image with this below command.
    sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1

But after flashing, all the configurations are happened. but after booting, instead of user name window, black screen is coming. Is there steps i missed in my above procedure?

Or whether i have to change my device tree according to this kernel-5.10. My device tree is working for jetpack 4.5.

Please advice me to clear this problem.

Regards,
Kamalesh

A kernel 4.9 device tree is not able to directly work on kernel 5.10.

You should take device tree as part of kernel. For example, if kernel 5.10 driver changes to read some specific field from device tree, then that thing won’t appear in kernel4.9 dtb. In that case, using k4.9 dtb would just lead to crash.

Hello Wayne,

Thank you for your reply.

Now, I am trying to load the driver . I compared two drivers from kernel 4.9 and kernel 5.10. Both drivers are in same structure. Below I mentioned those differences.

  1. tegracam_device_unregister(tc_dev); is added in probe function.

  2. Instead of this &pw->avdd, pdata->regulators.iovdd);, they given &pw->avdd, pdata->regulators.iovdd); in power_get function.

since there is no changes with driver file, same device tree file should work.

Note: Earlier I loaded the driver and device tree successfully, Created video node.

I followed the nvidia kernel customization guide from nvidia, here also same black screen after booting followed.

How to move forward?

Regards,
Kamalesh

Hi,

There is no need to dig into the driver code yet.

Just reply these questions here

  1. Are you still using a rel-32 device tree on rel-35 kernel?

  2. Are you modifying these two files tegra194-p3668-common.dtsi and tegra194-p3509-0000-a00.dtsi on rel-32 and then build the device tree out?

Hi Wayne,

  1. Yes, I am using the same device tree in 35 that I used in 32.6.5.
  2. Yes, I made the changes I mentioned in my previous replies to these two files and successfully created the video node.

Regards,
Kamalesh

Hi,

I hope I can get a more clear answer.

Are you talking about you still use a source code from /public/kernel/kernel-4.9/ build it and copy it to rel-35 BSP kernel/dtb?

Hi,

No, actually i built the dtsi in /public/kernel/kernel-5.10/. But I used the same dtsi file whatever i used in my bsp 32.6.5. after placed the dtsi, compiled the dtbs. Under the nvidia folder which is /public/kernel/kernel-5.10/arch/arm64/boot/dts/nvidia. My device tree file changes reflected.

Finally i copied all the dtb’s under nvidia to the Linux_for_Tegra/kernel/dtb.

Then problem occur.

Regards,
Kamalesh

Please share me the serial console log from UART.

Also, have you tried just build the device tree without changing anything? Will you hit issue in such case?

Hi,

I attached the uart log below. Please see and let me know.

uart_debug.txt (55.6 KB)

Also, have you tried just build the device tree without changing anything? Will you hit issue in such case?
Without changing means, I did not get it. I used the old dtsi in this kernel-5.10. I did not changed anything here, i used the same dtsi only. In boot up window, after all the messges, atlast failed to start openbsd secure shell server messages is keep coming.

Regards,
Kamalesh

Without changing means, I did not get it

I mean your change seems related to a camera thing. But what you are talking about is a boot or display issue.

It means these two issues are not related. Thus, if we just don’t care about anything related to “camera” first, will you see a boot up fine result ? Or you still see a blank screen? “Don’t care” here means “ok, you just try adding nothing, build a device tree from scratch”.

Also, is your UART console able to see the login prompt or not? I don’t see it.

BTW, if you are not modifying camera only, please let me know. As I don’t know what is that “tegra194-customed-devicetree.dtsi“” doing here.

Hi,

I will explain clearly now.

First i flashed the exact package whatever nvidia have the jetpack 5.1.2 (L4T 35.4.1) to our jetson xavier nx. It worked fine.

After this I added my created device tree(tegra194-customed-devicetree.dtsi) in the path /public/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/.
I included my device tree in tegra194-p3668-common.dtsi . I excluded two device tree inclusion (imx219 and imx477) in tegra194-p3509-0000-a00.dtsi. Then i compiled the dtbs —> all the compiled dtbs will store it in /kernel/kernel-5.10/arch/arm64/boot/dts/nvidia/*. Am i right?
I compiled Image also using this command make -j4 Image.
Atlast I transferred the customized image to main Linux_for_Tegra/kernel/ and device from the above nvidia folder to main /kernel/dtb/.
I flashed the image with this command sudo ./flash jetson-xavier-nx-devkit-emmc mmcblk0p1

I powered on the board. All the linux configuration like username, time, language are coming. after all the configuration, user login page is not coming, instead of user login page went black. after powering off and powering on, it is showing in the boot up window like Failed to start openbsd secure shell server.

In uart log, till the ethernet controller messages it is coming, then this is also stopped.

As i told earlier, this is my customized camera device tree file.

Driverwise I given two changes as respect to kernel 4.9 and kernel 5.10. Is it giving any problem here?

Regards,
Kamalesh

Hi,

What I am talking about here is just before you did below thing. Have you tried to build the device tree from scratch without adding anything and apply it to your board? Test if it can boot or not.

Hi,

I done the compilation from scratch without doing any modification and flashed.
But Now, that bootup issue is not coming. so, procedure may be right. For existing dtsi, it is working fine.

Adding external dtsi procedure might be wrong.

Is there any other procedure for adding new dtsi to follow?

Driver is already there in nvidia jetpack. I have to add only the dtsi.
can i upload my dtsi to check?

Note:- I tried the same way in jetpack 4, I achieved video node creation.

Regards,
Kamalesh

Hi,

It could be related to the content you added. As you totally not shared what are those files doing. It is hard for me to check here.

You could try to add things one by one first and see which one is causing crash.

Hi Wayne,

Below I attached the device treewhat i have used in my earlier jetpack 4. Please see and suggest.

devicetree.txt (3.2 KB)
xyz may be the sensor name in the devie tree file.
Whether gpio pins will differ?.

Regards,
kamalesh

You may still try to check if those nodes are correctly existing and located in Jetpack5 on your side.

GPIO pin is matching to hardware thus should not differ.

Hi,

GPIO pin is matching to hardware thus should not differ.
Thank you for the clarification.

You may still try to check if those nodes are correctly existing and located in Jetpack5 on your side.
I checked the imx219 as well as imx477 device in the default nvidia bsp package. These nodes are given in that. So, It is existing in jetpack 5 right?

Regards,
Kamalesh

Hi wayne,

Update:-
I found out the boot up issue. Because of commenting the device tree of imx219 and imx477 is coming.
Now I included my custom device tree without the comment of imx219 and imx477. Flashed to our board. After flashing, my driver is loaded, but in the final device tree under /boot/dtb → imx219,imx477 and xyz details is there. so, Video node is not created. How to remove other two imx sensors and include only my device tree details.

Please help to do this.

Regards,
Kamalesh

Just remove it one by one and see if that causes crash…

It is really hard to debug by such description.

Hi Wayne,

I commented imx477 alone and checked with imx219. Now also issue is not there, it is working. But in main dtb file, imx219 as well as my sensor details is there, node has not been created.

How to move forward?

Generally, how to include the device tree in jetpack 5. Could you please tell me?

One more thing I faced, I commented imx219 in tegra194-p3509-0000-a00.dtsi and checked with imx477. Now this issue came. so what may be the issue?

Why this hdmi issue is coming when i comment imx219? I attached two more images which is sometimes instead of hdmi blank this error is coming. Sorry for this image, i am not able to get this error through uart.

Regards,
Kamalesh