A Device Tree Node Example

A Simple Node

A very simple device tree[1] node sample.

/ {
	node@0 {
		a-string-property = "this is a string";
		a-string-list-property = "a string", "b string";
		a-byte-data-property = [0x01, 0x02, 0x03, 0x04];
		a-cell-property = <1 2 3 4>;
		child-node@0 {
			first-child-property;
			second-child-property = <1>;
			reference-node = <&node1>; // a phandle which reference to another node.
		};
	};
}
Syntqx Highlight !

Every end of bracket of a node needs a semicolon;


  1. https://www.devicetree.org/ ↩︎