Flattened Device Tree
is a mechanism for describing computer hardware resources, which cannot be
probed or self enumerated, in a uniform and portable way.
The primary consumers of this technology are
where a lot of designs are based on similar chips, but have different
assignment of pins, memory layout, addresses bindings, interrupts routing and
Configuration data, which cannot be self discovered in run-time, has to be
supplied from external source.
The concept of a flattened device tree is a
platform and architecture independent approach for resolving such problems.
The idea is inherited from Open Firmware IEEE 1275 device-tree notion, and has
been successfully adopted by the embedded industry.
The scheme works in the following way:
- Hardware platform resources are
described in a human readable text source format, where all non
self-enumerating information is gathered.
- This source description is converted
into a binary object i.e. a flattened device tree
which is passed to the kernel at boot time.
- The kernel (driver) learns about hardware resources details and dependencies
from this [externally supplied] blob, which eliminates the need for embedding
any information about the underlying platform hardware resources in the kernel.
- The flattened device tree mechanism in principle does not depend on any
particular first-stage bootloader or firmware features.
The only overall
requirement for the environment is to provide a complete device tree
description to the kernel.
layer allows any platform code in the kernel to retrieve information about
hardware resources from a unified origin, which brings advantages to the
embedded applications (eliminates hard-coded configuration approach, enforces
code to be data driven and extensible) leading to easier porting and