Digilent Embedded Linux User Manual
Page 5
Using Zynq with Linux
www.digilentinc.com
page 5 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
brackets
“{}” are either properties of the root nodes or the children of the root node. In Example 1,
the first property of the root node is model. String “Xilinx Zynq ZED” is assigned to it. Property
compatible defines the compatibility of the node, and, in this case, is given the compatibility string
“xlnx,zynq-zed”; The children of the root nodes include the on-board DDR3 SDRAM,
ps7_ddr_0, and the central AXI interconnects for the whole system, ps7_axi_interconnect_0.
There are many more children of the root nodes in the default DTS file.
The following sub-sections introduce the basic structures of nodes and some of the most common
node properties. You can find more detailed information about the device tree under folder
Documentation/devicetree/ in the Linux kernel source.
Device Nodes
Example 2 demonstrates the basic structure of device nodes.
Example 2.
The Name field is the name you assigned to the device tree node. The name of the node is not
required, but should be unique in the whole tree if assigned. You can obtain the phandler of the
device node with the notation &(name).
The part (Generic Name)@(Base Address)actually forms the full name of the device node.
According to conventions, the full name of the device is usually a generic name followed by the base
address of the device. The Generic Name field describes the generic class of the device, such as
Ethernet, qspi, i2c, etc. The Base Address field gives the base address for the device node.
Some devices are virtual devices that do not have a physical memory mapped in the processor
memory space. For these devices, The code drops the @(Base Address) for devices with no
mapped physical memory. In Example 3, the leds defined in the DTS file does not have a base
address, because it utilizes a bit in the GPIO controller to control an on-board LED.
Example 3.
leds {
compatible = "gpio-leds";
mmc_led {
label = "mmc_led";
gpios = <&gpiops 7 0>;
linux,default-trigger = "mmc0";
};
};
(Name) : (Generic Name)@(Base Address) {
compatible: “(compatibility string)”;
reg: < (base address) (size) >;
interrupt-parents: < (interrupt controller phandle) >;
interrupts: < … >;
(param1): “(string value)”;
(param2): < (number value, decimal or hexical) >;
…
};