Device tree source (dts) – Digilent Embedded Linux User Manual
Page 4

Using Zynq with Linux
www.digilentinc.com
page 4 of 23
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Section II: Device Tree
– Describe Your Hardware to the Linux Kernel
The Linux Kernel is a piece of embedded standalone software running on your hardware. The kernel
provides a standardized interface for application programmers to utilize all hardware resources
without knowing the details. Thus, the kernel has to know every detail about the hardware it is working
on. The Linux Kernel uses the data structure known as Device Tree Blob (DTB) to describe your
hardware. Sometimes DTB is called Flat Device Tree (FDT), Device Tree Binary, or simply Device
Tree.
1
Section II takes a closer look at the device tree and examines how the Linux kernel interprets and
understands your hardware.
Device Tree Source (DTS)
The Device Tree Source (DTS) file is the source file you use to create the device tree data structure
that passes to the kernel during kernel booting. The file is a simple tree structure comprised of nodes
and properties. Properties are key-value pairs, and nodes may contain both properties and child
nodes.
2
(See Example 1.)
Example 1.
We abstracted the part of the device tree source code in Example 1 from the ZedBoard default device
tree source file. In the device tree source file
“/” stands for the root node and everything inside the
1
Hallinan, Christopher. Embedded Linux primer: a practical, real-world approach. Upper Saddle River, NJ:
Prentice Hall, 2007.
2
/dts-v1/;
/ {
model = "Xilinx Zynq ZED";
compatible = "xlnx,zynq-zed";
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <&gic>;
ps7_ddr_0: memory@0 {
device_type = "memory";
reg = <0x00000000 0x20000000>;
};
...
ps7_axi_interconnect_0: axi@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "xlnx,ps7-axi-interconnect-1.00.a", "simple-bus";
ranges ;
gic: intc@f8f01000 {
interrupt-controller;
compatible = "arm,cortex-a9-gic";
#interrupt-cells = <3>;
reg = < 0xf8f01000 0x1000 >,
< 0xf8f00100 0x0100 >;
};
...