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
4
votes
5 answers

My custom cape's devicetree fails to load at boot, but can be loaded manually

If I load my own device-tree overlay from a shell it loads fine, but if I try to load it at boot, it won't do so. What am I missing? It is a debian BeagleBone Black that I set up using bone-debian-7.4-2014-04-23-2gb.img.xz Linux beaglebone…
handros
  • 597
  • 1
  • 5
  • 14
4
votes
3 answers

BBB - Automatically load a Device Tree overlay on boot

I have a device tree overlay: /dts-v1/; /plugin/; / { compatible = "ti,beaglebone", "ti,beaglebone-black"; part-number = "mousetraps"; version = "00A1"; /*…
Don Branson
  • 13,631
  • 10
  • 59
  • 101
4
votes
2 answers

Associate existing Linux device structure with device file

I'm developing with a PowerPC 405 embedded in a Virtex4 FPGA with Linux kernel 2.6.33. Up until now, I've been writing drivers for platform devices implemented in the FPGA in the form of kernel loadable modules. The devices are registered using the…
Benjamin Leinweber
  • 2,774
  • 1
  • 24
  • 41
3
votes
2 answers

Building .dtbo overlay for BBB using bitbake

I built a yocto distro (rocko) for my BBB using kernel linux-ti-staging-4.14 with a custom device tree. Since I need to port an old project from Debian to Yocto, I also needed to enable the UIO features in the kernel, which works fine too. Now I…
x'mpl'
  • 113
  • 13
3
votes
0 answers

Zephyr RTOS and i.MX RT1020 eval board accessing Arduino header pins via Device Tree

I'm thinking about doing a project using an NXP eval board with the RT 1020 processor. I want to experiment with and get familiar with Zephyr RTOS. How, in code, would I access the various Arduino header PINS with the given Device Tree snippet? …
Chimera
  • 5,884
  • 7
  • 49
  • 81
3
votes
1 answer

Device Tree Vs .Config file | Are they different?

I read that Linux device tree as a datastructure defining the hardware of the device (components present such as I2C, USB etc) Question: How is this different then .config file that tells make-file of the device drivers to be compiled for kernel i.e…
3
votes
2 answers

Why I can't remove device tree node by /delete-node/ on overlay dts?

I want to remove device node on overlay dts , but it doesn't work. sample code as belows: a.dtsi: &soc { gpio_keys { compatible = "gpio-keys"; label = "gpio-keys"; pinctrl-names = "default", "sleep"; pinctrl-0 =…
Andrew
  • 31
  • 1
  • 2
3
votes
0 answers

Is it possible to mount a filesystem included in a FIT image?

I an running an embedded board with U-Boot as the boot loader. I have created a basic FIT image that boots the Linux kernel with the device tree and RootFS images. Currently I boot my FIT image with the command tftpboot boot.itb && bootm, which will…
BakaOsaka
  • 53
  • 6
3
votes
1 answer

Device Tree dependency between two nodes

I have two device tree nodes, one sets a gpio pin and the other one configures one i2c bus, ex: &gpio2 { en-gpio { gpio-hog; gpios = <5 0>; output-high; }; }; &i2c1 { gpiom1: gpio@27 { compatible = "microchip,mcp23008"; …
Mihai
  • 972
  • 2
  • 13
  • 35
3
votes
1 answer

How do I use pwm-beeper module in Linux Kernel?

I have set my PWM driven beeper up as per the Linux device tree documentation. I see that this results in an extra input device in /sys/class/input: root:/sys/class/input/input0# ls capabilities device event0 id modalias …
Adam Lee
  • 2,983
  • 7
  • 35
  • 47
3
votes
1 answer

SPI driver, searching where to start

I'm new with Android developpemnent but I want to write a SPI driver to connect a SPI IC and then an Android application to send and receive data from and to the IC. From there, I don't really know where to create the driver (and what it should…
fleclerc
  • 43
  • 5
3
votes
2 answers

Creating a Device-Tree for the hardware on a PCI device

I'm in the process of writing a Linux device-driver for some custom hardware controlled via a PCIe card. The PCIe card contains an FPGA implementing SPI and I2C bus masters along with other custom firmware. There are already platform-bus…
RichC
  • 31
  • 4
3
votes
0 answers

How to specify Physical memory Offset for ARM platform that uses ARCH_MULTIPLATFORM=y?

Background: I am working on upgrading kernel to version 4.9 on an ARMv7 based SoC. Earlier kernel used single platform build (ARCH_MULTIPLATFORM = n) and hence the PHYS_OFFSET was enabled to accept my system custom physical RAM start address. With…
Harry_767
  • 31
  • 3
3
votes
0 answers

Building a device tree to run a Linux kernel on a Rockchip rk3288 board

I am trying to run a Linux kernel on a Rockchip rk3288 board. This boards runs a native Android kernel. I extracted the Device Tree Source (DTS) from Android to use it as reference to build a custom DTS for the Linux kernel, following this steps: $…
aicastell
  • 2,182
  • 2
  • 21
  • 33
3
votes
2 answers

What does kernel thermal zone mean in dts file?

In the dts file of my kernel, I have: thermal-zones { cpu0_thermal: cpu0-thermal { thermal-sensors = <&tmuctrl_0>; polling-delay-passive = <1000>; polling-delay = <1000>; trips { cpu_alert0:…
gregoiregentil
  • 1,793
  • 1
  • 26
  • 56