Skip to main content
67 votes

Is it possible to get the information for a device tree using /sys of a running kernel?

/proc/device-tree or /sys/firmware/devicetree/base /proc/device-tree is a symlink to /sys/firmware/devicetree/base and the kernel documentation says userland should stick to /proc/device-tree: ...
Ciro Santilli OurBigBook.com's user avatar
60 votes

How to list the kernel Device Tree

If dtc is available on your platform (else, install the device-tree-compiler package), you can use: dtc -I fs /sys/firmware/devicetree/base
Alexandre Belloni's user avatar
36 votes
Accepted

Why do embedded systems need device tree while pcs don't?

Peripherals are connected to the main processor via a bus. Some bus protocols support enumeration (also called discovery), i.e. the main processor can ask “what devices are connected to this bus?” and ...
Gilles 'SO- stop being evil''s user avatar
31 votes

Why do embedded systems need device tree while pcs don't?

PCs actually do need a device tree. They just call it something else. It is not correct to say that operating systems for the descendents of PC/AT compatibles assume the existence of things such as ...
JdeBP's user avatar
  • 69.3k
26 votes
Accepted

How to list the kernel Device Tree

The device tree is exposed as a hierarchy of directories and files in /proc. You can cat the files, eg: find /proc/device-tree/ -type f -exec head {} + | less Beware, most file content ends with a ...
meuh's user avatar
  • 51.9k
10 votes

Meaning of an ampersand prefix in a device tree

From: http://developer.toradex.com/device-tree-customization Nodes can be referenced using the ampersand (&) character and the label. Overwriting properties To overwrite a property, the node ...
Xofo's user avatar
  • 649
9 votes
Accepted

How do I tell which device tree blob (dtb file) I'm using?

I'm way late on this, but I implemented this script and I'll address this for anyone who finds this using an internet search engine. This computer on module can be put on almost any off the shelf TS ...
Mark Featherston's user avatar
7 votes
Accepted

How does Linux find/configure something like 'wlan0' when it is not a device that appears in /dev?

In Linux, network interfaces don't have a device node in /dev at all. If you need the list of usable network interfaces e.g. in a script, look into /sys/class/net/ directory; you'll see one symbolic ...
telcoM's user avatar
  • 99.4k
7 votes
Accepted

fprintd: The driver encountered a protocol error with the device

The solution was to update firmware of fingerprint device. I achieved by: Installing fwupd sudo pacman -S fwupd Check if system can see device: fwupdmgr get-devices Refresh firmware database: ...
Jan Černý's user avatar
  • 1,401
5 votes
Accepted

Is a device tree blob tied to a specific linux kernel version?

The Device Tree is supposed to be a stable ABI so a device tree written for any version of the kernel should work with any following kernel version. However, for practical reasons, this is quite ...
Alexandre Belloni's user avatar
4 votes

What are the values of the device tree interrupts property?

You can get some information from the kernel documentation which describes the interrupts property. It goes on with the example of the OpenPIC interrupt controller which has 2 cells: The first ...
meuh's user avatar
  • 51.9k
4 votes
Accepted

How to debug a driver failing to bind to a device on Linux?

A working solution to get the driver to bind to the device is: cgublock: jz4780-cgublock@10000000 { compatible = "simple-bus", "syscon"; #address-cells = <1>; #size-cells = <1&...
malat's user avatar
  • 3,092
4 votes

Device Trees: Difference between labels and aliases?

Aliases are for use by the Linux kernel, but can't be used within the device tree source (DTS) configuration. Meanwhile, labels can be used in your DTS files to extend or modify the node later. e.g. ...
Christopher Patrick Boyd's user avatar
4 votes

Is there a way to delete an alias from an included dtsi file in a dts file?

OK, I found my mistake. An alias is not a node. It is a property. This works: /delete-property/ i2c0;
John Klug's user avatar
  • 323
4 votes

Where is the device tree on the Linux machine, for e.g., Debian or Ubuntu?

x86 PCs don’t use static device trees, they use other mechanisms to enumerate installed hardware (ACPI tables, PCI enumeration, USB...). So you won’t find a corresponding .dtb file in /boot.
Stephen Kitt's user avatar
3 votes

How does kernel know which device tree to load?

Determining which device tree blob (DTB) file, which is compiled from the device tree source (DTS), to load is typically handled by the bootloader. Many device manufacturers will customize the ...
Christopher Patrick Boyd's user avatar
3 votes

How can I tell my kernel not to place external drives before internal ones?

The /dev/sd* device names are assigned in a first-come, first-served order by default, as the storage controller drivers are initialized. If you have several different storage controllers, you might ...
telcoM's user avatar
  • 99.4k
3 votes
Accepted

how to merge device tree overlays to a single .dtb at build time?

You don't need to do this. With this change, overlays are in u-boot! https://github.com/u-boot/u-boot/commit/e6628ad7b99b285b25147366c68a7b956e362878 Enjoy :)
dmitry pervushin's user avatar
3 votes

What is a device tree and a device tree blob?

Minimal reg + interrupt example with QEMU virtual device As others said, the device tree is provided by hardware vendors, and it tells the Linux kernel how to talk to devices. Maybe the two most ...
Ciro Santilli OurBigBook.com's user avatar
2 votes

What are the two values inside angle brackets < > in a device tree .dts file?

Angle brackets (<>) denotes a "32-bit unsigned integer array" and I believe they are often refereed to as "cells". In the case with the reg property, the first value is the (offset) address and ...
sfrank's user avatar
  • 91
2 votes

What are the values of the device tree interrupts property?

As meuh suggested, this information should be available in the kernel device tree bindings documentation. However, it might not be obvious what file to look at, so here are some advice: First check ...
sfrank's user avatar
  • 91
2 votes
Accepted

Why are ARM SoCs so seemingly hard to handle with the Kernel?

I ask myself why there isn't a way to put the device tree, as the hardware description, together with the bootloader on some ROM chip and build the Linux OS independently from any hardware specs, at ...
DepressedDaniel's user avatar
2 votes

Uboot Hangs when Initrd size increased in FIT image

So, as the OP commented, moving the load address fixes the problem. What this highlights is the danger of using fdt_high (or in other cases, initrd_high) to stop U-Boot from relocating contents. In ...
Tom Rini's user avatar
  • 495
2 votes

Linux Device Drivers - Probe function not called, but driver getting deferred

I've been trying to get an MCP2515 running on a Xilinx Zynq under Linux. I found your post while suffering from exactly the same problem. I was going down exactly the same route as you and littered ...
unsightlygod's user avatar
2 votes

How does the same Linux version work on different hardware

The Linux Kernel Map shows in some detail the device control. It contains something called "drivers" and "modules" that can be extended by "Loadable Kernel Modules". E.G.: USB devices generally ...
Fabby's user avatar
  • 5,394
2 votes

How does the same Linux version work on different hardware

The device drivers (i.e. the part of the kernel that interact directly with the hardware) can be compiled as kernel modules. These are separate files, which can be loaded or unloaded by the kernel, as ...
Time4Tea's user avatar
  • 2,405
2 votes
Accepted

How to debug an SDIO configuration problem?

Okay, I found this page which guides me through the basic troubleshooting steps. This was what I was looking for. If you care for our problem itself: Obviously, muxing the pins as MMC (as described ...
Philippos's user avatar
  • 13.5k
2 votes

Linux, how to add "missing" i2c interface?

If you are booting from an SD card, you should be able to find a *.dtb file on there. This compiled device tree file tells the kernel which hardware is available. You can replace it with a custom one ...
Ezra Bühler's user avatar
2 votes
Accepted

Where can I find the device tree source include (.dtsi) files?

The 'dtsi' file you are seeking is in the actual source directory. Not the boot mount. In this case right now the 'dtsi' file is 'compiled into' the 'dtb' files. They function like C header files and ...
HarryM's user avatar
  • 36
1 vote

How does kernel know which device tree to load?

On the same dts directory DTS/{manufacturer-name}/some-dts-evb.dts There are one Makefile, open it and you can see which .dts file will be used for. dtb-$(CONFIG_ARCH_XXXXXX) += some-dts-evb.dtb
evanhutomo's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible