Questions tagged [device-tree]

The Device Tree is a data structure for describing hardware. Rather than hard coding every detail of a device into an operating system, many aspects of the hardware can be described in a data structure that is passed to the operating system at boot time. The device tree is used both by Open Firmware, and in the standalone Flattened Device Tree (FDT) form.

Device Trees are related to open firmware. It is often abbreviated as DT. They are a mechanism to pass hardware parameters to an OS from a boot loader. Device Trees are common on embedded PowerPC CPUs and more recently ARM CPUs. There is a lot of effort in the Linux kernel to support and use Device trees.

The main benefit is that one kernel binary may support many systems, even ones not conceived when the binary was built.

The device tree supports variable length data with keys, much like XML. Also, by itself, it does not define what the keys mean beyond a few standard details like an address, etc. For instance, it doesn't describe how a video controller entry should look. It is fairly detailed on CPU, memory and bus topologies.

References

Related Tags

  • - older PC BIOS standard, competing with DT/Open Firmware
  • -new PC BIOS standard, competing with DT/Open Firmware
  • - an embedded boot loader which functions as a BIOS on many embedded systems. u-boot supports passing devices trees to an OS.
630 questions
54
votes
3 answers

How to compile dts Linux device tree source files to dtb?

I have a device tree file (.dts) and I want to compile the file for my powerpc based board. How can I do it on my machine, which is not powerpc based?? Can I do it with the DTC installed on my Ubuntu system? Or will it be more like using a separate…
30
votes
1 answer

Device tree compiler not recognizes C syntax for include files

I want to compile my board device tree manually. I have downloaded the latest version of dtc from its official source, but when I try to run the following command, I get an error advising me to change all #include directives to /include/ and so on…
Saleh
  • 1,819
  • 1
  • 17
  • 44
29
votes
1 answer

How to add i2c devices on the Beaglebone Black using device tree overlays?

Why should I read this? If you have a Beaglebone Black (BBB) and you want to wire up your own devices to it (not capes), you might already have heard about the device tree. In my case I wanted to connect a RTC device to the I2C bus on the BBB. There…
IlikePepsi
  • 645
  • 1
  • 8
  • 18
29
votes
5 answers

Tool to visualize the device tree file (dtb) used by the Linux kernel?

I am looking for a tool which can graphically represent the hardware device tree used in linux kernel. I am trying to understand linux kernel for particular arm chipset. It would be a really useful tool to have.
Punit Soni
  • 1,229
  • 3
  • 17
  • 26
28
votes
2 answers

Quick rebuild of device tree only with Yocto/bitbake?

So, each time I modify the device tree I typically change the dts in a custom recipe and rebuild the image. The rebuild takes a long time since it rebuilds the entire kernel, and then the image needs to be built and finally deployed to the target…
Jonatan
  • 3,752
  • 4
  • 36
  • 47
23
votes
3 answers

Why Device Tree Structure (DTS) file is needed both in bootloader and kernel source code?

Bootloaders like U-Boot that do not implement the Open Firmware API, are expected to pass to the kernel a binary form of the flattened device tree - LinuxFDTBlob Why are the DTS files present in the kernel as well? Isn't that redundant? As an…
Hamzahfrq
  • 696
  • 1
  • 6
  • 25
22
votes
4 answers

How to program Linux .dts device tree files?

I'm going to launch a Linux on my development board, and i need a dts file (device tree file) to describe the whole hardware. But I only know very little about the syntax of this file which is not enough to run Linux properly on the board. What i…
Ezio
  • 1,116
  • 4
  • 13
  • 25
21
votes
1 answer

What is the difference between .dts file and .dtsi file?

What is the difference between .dts file and .dtsi file? Is there a difference when generating device tree blobs? When to use one or the other?
Leos313
  • 5,152
  • 6
  • 40
  • 69
18
votes
2 answers

Hello Word Device Tree Based device driver

I have read and almost gone through all the linux kernel documentation on the device tree and device tree overlays.I am not able to understand if we have to create a new entree in the device tree of the platform or to create a new overlay for the…
Raulp
  • 7,758
  • 20
  • 93
  • 155
17
votes
4 answers

Difference between dts and ACPI

We can declare platform device information in dts file, rather than hard coding every data into operating system. Taking "arm" architecture as example. it supports dts and we will take dts from arch/arm/boot/dts/xx.dts. Convert this…
anikhan
  • 1,147
  • 3
  • 18
  • 44
14
votes
2 answers

imx6 Device Tree compilation -- FATAL ERROR: Unable to parse input tree

I am working on Embedded Linux for TX6U-8010 based on Freescale imx6. I am trying to compile dtb using the device tree compiler (dtc). However when I use the command: dtc -O dtb -o imx6dl-tx6u-801x.dtb imx6dl-tx6u-801x.dts ...I get the following…
mkpeker
  • 173
  • 1
  • 1
  • 5
14
votes
2 answers

How to put comments in device tree source files

How do i put multiline or single line comments in device tree source files. I couldn't find it anywhere. Does the default c way of using comments work?
mdsingh
  • 973
  • 2
  • 13
  • 20
14
votes
2 answers

ARM Linux Atags vs Device Tree

What is the difference between device tree and ATAGs? Also, are ATAGs a must and does the kernel expect them at a fixed address, or does it expect them in r0-r3?
user435739
13
votes
2 answers

Named GPIOs in DeviceTree

I am trying to create a device tree for an embedded system, and would like to expose a few GPIOs to userspace. These are not and should not be used by kernel drivers. For instance, there is a USB device soldered to the board that is controlled by…
FazJaxton
  • 7,544
  • 6
  • 26
  • 32
12
votes
1 answer

Linux kernel dtb vs dtbo

I am developing a device driver for a device.I wanted to know besides writing the device driver what and when it is necessary for it - a device tree blob (dtb) or a device tree overlay (dtbo). Is it possible to dynamically insert the dtb (after…
Raulp
  • 7,758
  • 20
  • 93
  • 155
1
2 3
41 42