October 2017
Intermediate to advanced
586 pages
14h 8m
English
Every node must have a name in the form <name>[@<address>], where <name> is a string that can be up to 31 characters in length, and [@<address>] is optional, depending on whether the node represents an addressable device or not. <address> should be the primary address used to access the device. An example of device naming is as follows:
expander@20 {
compatible = "microchip,mcp23017";
reg = <20>;
[...]
};
Here is another example:
i2c@021a0000 {
compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
reg = <0x021a0000 0x4000>;
[...]
};
On the other hand, the label is optional. Labeling a node is useful only if the node is intended to be referenced from a property of another node. You can see a label as a pointer to a node, as explained ...