Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to introduce RK3288 dts and dtsi

Shulou Source: shulou.com Published: 2022-06-01 03:11:08 10月04日 Update

In this issue, the editor will bring you about how to introduce RK3288 dts and dtsi. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Device Tree is a data structure that describes hardware, which originates from OpenFirmware (OF). In Linux2.6, too many hardware details of ARM architecture are hard-coded in arch/arm/plat-xxx and arch/arm/mach-xxx. After adopting Device Tree, many hardware details can be passed to Linux directly through it, instead of a lot of redundant coding in kernel.

Device Tree consists of a series of named nodes (node) and attributes (property), and the node itself can contain child nodes. The so-called attributes are actually name and value that appear in pairs.

In Device Tree, descriptive information includes (previously, most of this information was hard-coded into kernel):

Quantity and category of CPU

Memory base address and size

Bus and bridge

Peripheral connection

Interrupt controller and interrupt usage

GPIO controller and GPIO usage

Clock controller and Clock usage

It basically draws a tree on the circuit board (composed of CPU, bus and devices). Bootloader will pass the tree to the kernel, and then the kernel can identify the tree and expand the platform_device, i2c_client, spi_device and other devices in the Linux kernel according to it, and the memory, IRQ and other resources used by these devices are also passed to the kernel, and the kernel will bind these resources to the corresponding devices deployed.

The .dts file is an Device Tree description in ASCII text format. Basically, in ARM Linux, a .dts file corresponds to an ARM machine, which is typically placed in the kernel's arch/arm/boot/dts/ directory. Since a SOC may correspond to multiple machine (a SOC can correspond to multiple products and circuit boards), it is inevitable that these .dts files contain many common parts. In order to simplify, the Linux kernel generally abstracts the common part of SOC or the common part of multiple machine into .dtsi, similar to the header file of C language. The .dts corresponding to the other machine is the .dtsi of include.

The above is the editor for you to share how to carry out RK3288 dts and dtsi introduction, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Kernel that is files devices multiple situations controllers hardware coding parts controls information memory content attributes buses circuits circuit boards details nodes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Tech Info Docker Microsoft Apple