Issues compiling dtbs

Hello, I’m following the Sensor Driver Programming guide and am on the Device Registration step trying to get my .dtsi into the blob.

My label for the endpoint of the vi port is not getting recognized at all. I keep getting a phandle error that it can’t find the label.

The error:

~/l4t/64_TX1/Linux_for_Tegra_64_tx1/sources/kernel_source (l4t/l4t-r24.2)$ make dtbs
  CC      scripts/mod/devicetable-offsets.s
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/mod/modpost
  DTC     arch/arm64/boot/dts/tegra210-jetson-cv-p2597-2180-a00-auo-1080p-edp.dtb
  DTC     arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dtb
  DTC     arch/arm64/boot/dts/tegra210-jetson-cv-p2597-2180-a00.dtb
  DTC     arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a02-android-devkit-24x7.dtb
  DTC     arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a02-devkit-24x7.dtb
  DTC     arch/arm64/boot/dts/tegra210-jetson-cv-p2597-2180-a00-sharp-4k-edp.dtb
  DTC     arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a01-android-devkit.dtb
  DTC     arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
  DTC     arch/arm64/boot/dts/tegra210-p4573-2180.dtb
ERROR (phandle_references): Reference to non-existent node or label "daxc02_vi_in0"
ERROR: Input tree has errors, aborting (use -f to force output)

However as far as I can tell I’m doing the exact same thing as all of the other .dtsi files.

Here’s a snippet of the relevant the code:

/ {
    host1x {
        vi {
            ports {
                port@0 { // CSI A
                    status = "okay";
                    daxc02_vi_in0: endpoint {
                        bus-width = <4>;
                        remote-endpoint = <&daxc02_out0>;
                    };
                };
            };
        };

        i2c@546c0000 {
            #address-cells = <1>;
            #size-cells = <0>;

            daxc02@0e {
                <...>
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;

                    port@0 {
                        reg = <0>;
                        daxc02_out0: endpoint {
                            csi-port = <0>;
                            bus-width = <4>;
                            remote-endpoint = <&daxc02_vi_in0>;
                        };
                    };
                };
            };
        };
    };
<...>
};

On line 7 of the snippet I have the label, but the endpoint on line 30 is not seeing it. I’ve checked and rechecked and it’s not the spelling (I even changed the name just to make sure). Can anyone help me figure out what my error is?

I’m curious if you actually need all of those dtb files…looks like some of them generated ok. If one of those generated is what you need, it won’t matter that a different one failed.

Based on the following section in the programming guide…


It looks like the one I’d need would be the tegra210-jetson-cv-base-p2597-2180-a00 which is one of the ones that compiled. I’ll see if it works!

Edit: After reading dmesg it turns out the one the TX1 uses is: tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb (it includes tegra210-jetson-cv-base-p2597-2180-a00)

You were exactly right, looks like I don’t need that one. Thanks linuxdev!

They all worked except for tegra210-p4573-2180.dtb

The reason is that there is a /delete-node/ ports; line in that file which deletes the port (and the label).

Then ,How can change the tegra210-p4573-2180.dtb file?

This issue was almost two years ago, I’m sure it’s been fixed by now.

If you’re interested in modifying the DTB or Kernel look at the “Kernel Customization” chapter in the Development Guide.

FYI, this forum is for TK1 and tegra210-p4573-2180 is for older releases of TX1 (L4T R24.1 and R24.2 used this). If you are asking about that file in relation to anything but an old release of the TX1, then changing that file won’t actually do anything (the file is from the 3.10.96 kernel series).

I use the TX1 at jetson 3.0.
the error is exist.
How can I fix this?

You will want to file this on the TX1 forum…TK1 is different in many ways, and the people in this forum are probably expecting TK1.
[url]https://devtalk.nvidia.com/default/board/164/jetson-tx1/[/url]

FYI, JetPack3.0 would imply L4T R27.1 which is quite out of date. If there is any way to update to R28.2.1 (JetPack3.3) it would be advisable. Different device trees change details depending on release. Any previously mentioned device tree version detail is likely very different than from R27.1 (R27.1 was only used for a short time), so patches either for earlier/later releases or for different carrier boards won’t apply (part of the naming of a device tree is for SoC, module, and carrier board…your device tree specification is somewhat incomplete and incorrect in file naming under R27.1 TX1).

You’ll want to post in the TX1 forum and give details of not just the particular device tree file you are interested in, but also in what it is you want to actually accomplish since that file may not apply with a particular combination of components.