如何对Linux .dts设备树文件进行编程? [英] How to program Linux .dts device tree files?

查看:596
本文介绍了如何对Linux .dts设备树文件进行编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在开发板上启动Linux,我需要一个dts文件(设备树文件)来描述整个硬件.但是我对该文件的语法了解甚少,不足以在板上正确运行Linux.

I'm going to launch a Linux on my development board, and i need a dts file (device tree file) to describe the whole hardware. But I only know very little about the syntax of this file which is not enough to run Linux properly on the board.

我现在所知道的只是如何描述单元的中断号,频率,地址,父单元及其兼容的驱动器类型(如下所述):

What i know now are only how to describe a unit's interrupt number, frequency, address, parent-unit and its compatible driver type (as described below):

ps7_scuwdt_0: ps7-scuwdt@f8f00620 {
                        compatible = "xlnx,ps7-scuwdt-1.00.a";
                        device_type = "watchdog";
                        interrupt-parent = <&ps7_scugic_0>;
                        interrupts = < 1 14 769 >;
                        reg = < 0xf8f00620 0xe0 >;
                } ;

我不熟悉其他高级用法或语法.

Other advanced usage or grammar is unfamiliar to me.

推荐答案

看一下与您的开发板最相似的板的dts.以此为参考,并根据参考板和开发板之间的差异对dts进行更改.

Take a look at the dts of the board which most closely resembles your dev-board. Use that as a reference and make changes to the dts according to the differences between the reference board and your dev-board.

还请检查以下内容:
-eLinux上的设备树文档项目(有大量的链接可以开始阅读).
-关于设备树基础的系列文章.
-演练迁移到设备树.

Also checkout the following :
- Device-tree Documentation project at eLinux (has a vast collection of links to start reading).
- Series of articles on the basics of device tree.
- Walkthrough of migrating to device-tree.

这篇关于如何对Linux .dts设备树文件进行编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆