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
6
votes
2 answers

How to specify the device name for uart in device tree(.dts) file?

I was compiling the OpenWrt (A wireless router based on Linux), i added a board to the OpenWrt source, my board has two uart ports, i can declare and enable the two uart ports, the two uart ports are named 'uartfull' and 'uartlite'. The 'uartlite'…
Jiapeng
  • 126
  • 1
  • 5
6
votes
1 answer

Device Tree and manual registration

I'm using Embedded Linux on a board that is mainly configured via the device tree mechanism (.dts/.dtc files), i.e. entries in the device tree file indicate which devices to register and thereby which drivers to load. Is there a way to manually load…
pmf
  • 7,619
  • 4
  • 47
  • 77
6
votes
6 answers

Configuring Pins Mode Beaglebone

In the beagleboard or beaglebone are different modes to work the pin. With the previous kernel they are located in /sys/kernel/debug/omap_mux. Do u know with the last Kernel where are those files?
Margarita Gonzalez
  • 1,127
  • 7
  • 20
  • 39
6
votes
1 answer

Overview/reference manual for Open Firmware Device Trees

I am trying to setup a driver for an embedded PowerPC board, and the correct way to do this today is to use the OpenFirmware Device Tree datastructure (the .dtb file, compiled from a .dts file). Creating a tree is pretty easy, but how do I get my…
jakobengblom2
  • 5,531
  • 2
  • 25
  • 33
5
votes
1 answer

Which is the cleaner way to get a pointer to a struct device in linux?

i'd need to obtain a pointer to a particular device registered in linux. Briefly, this device represents a mii_bus object. The problem is that this device seems doesn't belong to a bus (its dev->bus is NULL) so i can't use for example the function…
MirkoBanchi
  • 2,173
  • 5
  • 35
  • 52
5
votes
1 answer

What does fwnode in struct device do in linux kernel?

In the definition of struct device,there is a fwnode field defined, struct device { ... struct fwnode_handle *fwnode; /* firmware device node */ ... } And the corresponding file is in include/linux/fwnode.h: struct…
downey
  • 51
  • 2
5
votes
1 answer

configfs do not mount device-tree/overlays

I'm working on a Cyclone V SOC FPGA from Altera with a double Cortex-A9 processor. The embedded system (linux 4.15.7) is created with Buildroot-2018.02. U-boot is used to load the system i-e FPGA.rbf file, device tree blob and zImage and everything…
grorel
  • 1,408
  • 15
  • 21
5
votes
1 answer

Linux 4.5 GPIO Interrupt Through Devicetree on Xilinx Zynq Platform

I am using a custom development board with a Zynq XC72010 used to run a Linux 4.5 kernel. I am developing a device driver for a chip we are testing in house and I am having a lot of issues trying to bind a GPIO line to a software IRQ. So far I have…
James Schulman
  • 101
  • 1
  • 7
5
votes
1 answer

gpiod_* vs gpio_* methods in the Linux Kernel

Which of the GPIO APIs in Linux device driver programming is preferable and in what conditions: gpio_set_value() or gpiod_set_value()? One takes the GPIO desc as the object while other takes the GPIO parsed from the device tree.
Raulp
  • 7,758
  • 20
  • 93
  • 155
5
votes
2 answers

Linux Device Tree (DTS): i2c device on USB-I2C bridge

I have an i2c device (touch controller). Usually I would add it to the .dts file like this when it is connected to the SoC i2c master (a tegra chip in my case): i2c@7000c000 { st1332: touchscreen@55 { compatible =…
CliffordVienna
  • 7,995
  • 1
  • 37
  • 57
5
votes
1 answer

Driver code in kernel module doesn't execute?

Why this kernel module doesn't do anything when i load it? #include #include #include #define DEVICE_NAME "hello-1.00.a" #define DRIVER_NAME "hello" MODULE_LICENSE("Dual BSD/GPL"); static…
Luca
  • 1,270
  • 1
  • 18
  • 34
5
votes
1 answer

Unable to compile Linux dtb

I am trying to compile the dts file for beaglebone black. I have cloned the git repository from this location git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git and I get the following errors: for beaglebone black: $ dtc -I dts -O dtb -o…
Prajosh Premdas
  • 970
  • 4
  • 17
  • 40
5
votes
2 answers

Change hearbeat led on beaglebone black with device tree overlay

I am using the Debian wheezy filesystem with Robert Nelson's latest kernel. I want to disable the heartbeat led using a device tree overlay. I understand there are easier ways of doing this but I am only interested in answers using overlays to…
Ray
  • 51
  • 1
  • 2
5
votes
1 answer

DTS file explanation - aliases

I am trying to understand the following snippet from a DTS file. /dts-v1/; / { model = "MPC8313ERDB"; compatible = "MPC8313ERDB", "MPC831xRDB", "MPC83xxRDB"; #address-cells = <1>; #size-cells = <1>; aliases { ethernet0…
5
votes
1 answer

What is Device Tree?Advantages & Disadvantages?

what is Device Tree in Linux ? what is the Advantages and Disadvantages of Device Tree? If anyone know Device Tree in details ,Please help answering above questions .
EnterKEY
  • 1,180
  • 3
  • 11
  • 25