3

The dtc compiler gives no help in identifying syntax errors in .dts files. I have the following DT node (simplified):

 &amba_pl {
    ntscpal {
        compatible = "xlnx,ntscpal-0.1";
        .....
    };
  };

This is working just fine and my Linux kernel builds correctly. I now want to add an alias for this node like this:

 aliases {
    ntscpal = &amba_pl/ntscpal;
 };

But this gives a dtc error: "FATAL ERROR: Unable to parse input tree" and only gives the line number of the line: "ntscpal = &amba_pl/ntscpal;"

Question: What is wrong with this? I have check several docs on this and I think I am using the correct syntax yet it fails.

Question: does the aliases{} node have to be specified for the root DT node?

Thanks, -Andres

Andres Gonzalez
  • 2,129
  • 5
  • 29
  • 43
  • 1
    The node name (i.e. `&amba_pl`) should not begin with (or contain) an ampersand. The ampersand is used with a label name (e.g. `amba_pl:`) to create a reference. A pdf of the DT specification can be downloaded from [www.devicetree.org](https://www.devicetree.org/specifications/). – sawdust Feb 23 '18 at 21:15
  • 1
    In `ntscpal = &amba_p1/ntscpal;`, the `&amba_p1` will be treated as a reference to a label called `amba_p1`. Nodes in the device tree can be labelled with the label name followed by a `:`, e.g. with `labelname: nodename@address { ... };`, the node can be referred to as `&labelname` from elsewhere in the device tree. Labels can also be attached to properties (name value pairs) in the device tree. – Ian Abbott Mar 02 '18 at 11:57

0 Answers0