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
3
votes
1 answer

Read gpio value through /dev/input/eventX

I used to handle gpio in user space with /sys/class/gpio. Problem is that I need to use this gpio in a kernel driver. Due to the gpio request from the kernel driver, I cannot manipulate this gpio through /sys/class/gpio. However I was able to use it…
ArthurLambert
  • 749
  • 1
  • 7
  • 30
3
votes
0 answers

what is the correct syntax for aliases in linux device tree .dts file?

The dtc compiler gives no help in identifying syntax errors in .dts files. I have the following DT node (simplified): &amba_pl { ntscpal { compatible = "xlnx,ntscpal-0.1"; ..... }; }; This is working just fine and my…
Andres Gonzalez
  • 2,129
  • 5
  • 29
  • 43
3
votes
1 answer

In an ARM device tree file, what do the three interrupt values mean

A device tree source for a typical ARM device would have the interrupt-controller section: interrupt-controller@f8f01000 { compatible = "arm,cortex-a9-gic"; #interrupt-cells = <0x3>; interrupt-controller; reg = <0xf8f01000 0x1000…
Moritz
  • 2,987
  • 3
  • 21
  • 34
3
votes
0 answers

Register snd-soc-dummy in a device tree

I'm trying to register the ALSA dummy codec provided in soc-utils in my device tree source file, to use it with an i2s device driver (sun8i-i2s). I've tried to set the sound-dai field in my i2s configuration as explained here :…
Prewitt
  • 33
  • 2
  • 10
3
votes
1 answer

Linux device driver for banana pi and device tree

I'm trying to write ethernet driver for Linux kernel 4.13.x for Banana Pi M2 ultra. Some time ago so called "device tree" (DT) has been introduced in Linux kernel infrastructure. I have no much experience with using DT while writing device drivers…
user2699113
  • 4,262
  • 3
  • 25
  • 43
3
votes
1 answer

The order in which the device-tree text file is written, does it matter?

Does the order in which a device-tree text file (.dts) is written matter at all ? For example, if you take a node from the top of the file and move it to the bottom, will it change the order of hardware detection, IRQ configuration, or whatever ?
Bludzee
  • 2,733
  • 5
  • 38
  • 46
3
votes
1 answer

How to set a pin between boot and module load for an embedded Linux?

I am facing an interesting problem. I like to set a pin of my cpu. So far I created a module for controlling the pin. This module is setting the default pin configuration(high). The default pin configuration becomes active when the module is loaded.…
Stefan Jaritz
  • 1,999
  • 7
  • 36
  • 60
3
votes
1 answer

How to build device-tree overlays using DKMS?

I am trying to build a device-tree overlay using DKMS for a running kernel (4.4). My naive Makefile is as follows: PWD := $(shell pwd) dtbo-y += my-awsome-overlay.dtbo targets += $(dtbo-y) all: make -C /lib/modules/${kernelver}/build…
sergej
  • 17,147
  • 6
  • 52
  • 89
3
votes
1 answer

Raspberry Pi 2, how to disable device_tree to enable SPI?

I have a Raspberry Pi 2, Model B, and I'd like to use the SPI to talk to another Pi (for later using it for more SPI-devices). I'd also like to use WiringPi for C-coding my program. I thought I would ensure I had everything I needed, so i ran a full…
Rasmus Bækgaard
  • 737
  • 2
  • 11
  • 27
3
votes
0 answers

How to find a device node in /dev from physical USB port?

Given two identical USB devices with the exact same USB descriptors and thus with absolutely no way to differentiate them only using the leaf information of the device information view (the USB device descriptor) as usually done (yes, this device is…
Julio Guerra
  • 5,523
  • 9
  • 51
  • 75
3
votes
1 answer

Linux Kernel - ERROR: Failed to allocate 0x6b3c bytes below 0x1000000

I'm including my rootfs (CONFIG_INITRAMFS_SOURCE) into my kernel, so the kernel has now a size of 17Mb: $ ls -la uImage -rw-r--r-- 1 kkr kkr 17669274 Dec 1 18:59 uImage $ d2h 17669274 0x10D9C9A Since it's compressed, it would occupied uncompressed…
Charly
  • 1,270
  • 19
  • 42
3
votes
1 answer

Device Tree for PHY-less connection to a DSA switch

We have a little problem with creating a device tree for our configuration of a Marvell DSA switch and a Xilinx Zynq processor. They are connected like this: |——————————————| |——————————————————————————————| | e000b000—|———— SGMII…
3
votes
2 answers

pcie device tree 'ranges' property explanation

Can any one explain what each value in ranges property represent. my_pcie_0: pcie@10000000 { #address-cells = <1>; #size-cells = <1>; compatible = "mypcie"; device_type = "pcie"; reg = < 0x40000000 0x00100000 >; ranges = < 0x02000000 0 0xf0000000…
valmiki
  • 701
  • 9
  • 24
3
votes
1 answer

How to configure clock through Device Tree?

I was trying to configure the clock for a new device included to the Kernel. I have an older version of the Kernel, in which the device already included. So I tried to make similar changes to the Kernel for the clock. But in the older version of the…
Vineesh Vijayan
  • 313
  • 1
  • 5
  • 13
3
votes
1 answer

Can I query device tree items without creating a platform device?

I am writing a kernel module intended to functionally test a device driver kernel module for an ARM+FPGA SOC system. My approach involves finding which interrupts the device driver is using by querying the device tree. In the device driver itself, I…
benf
  • 915
  • 1
  • 9
  • 28