Menu Close

Device Tree Special Nodes

This article talks about the other special nodes that exist in device trees.

For related subjects, please refer to the SOC Table of Contents.


There are 3 special child nodes in the root node “/”: “aliases”, “chosen”, and “memory”.



After opening system-top.dts, we can see the contents of the node aliases from lines 19 to 27.


         ethernet0 = &gem0;

         i2c0 = &i2c_2;

         i2c1 = &i2c0;

         i2c2 = &i2c1;

         serial0 = &uart0;

         serial1 = &uart1;

         spi0 = &qspi;


The main purpose of the aliases node is to define aliases, with the ultimate goal of making it easier to access nodes (not from device trees).



The chosen node usually has two properties: “bootargs” and “stdout-path”. We can see the contents of the node chosen from lines 15 to 18 of system-top.dts.


         bootargs = “console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait”;

         stdout-path = “serial0:115200n8”;


In chosen, stdout-path = “serial0:115200n8”, meaning standard output devices use the serial port serial0. In system-top.dts, serial0 is an alias which points to uart0; “115200” means that the serial port has a Baud rate of 115200, “n” means that is no check digit, and “8” means there are 8 data bits.



The memory node mainly deals with memory and RAM as shown in lines 28 to 31 of system-top.dts.


         device_type = “memory”;

         reg = <0x0 0x20000000>;


Note that this node mainly helps specify the system memory’s base address as well as the system memory size. “reg = <0x0 0x20000000>” sets the starting address as 0x0, and the size as 0x20000000 which equates to 512 MB. This node typically only has these two properties, and the property value of device_type is set as “memory”.

Posted in Textbook and Training Project

Related Articles

Leave a Reply

Your email address will not be published.

Leave the field below empty!