TI中文支持网
TI专业的中文技术问题搜集分享网站

am335x dts文件疑惑

am335x在arch/arm/boot/dts目录下有2个dts文件

am335x-evm.dts和am33xx.dtsi

am335-evm.dts里面应该是配置各个驱动的dts文件,那么am33xx.dtsi里面的内容都是用来做什么的?我看了下里面好多模块的status都是“disabled.”

zizhen hu:

回复 Steven Liu1:

基本我理解是说两个文件是合并一起的,am33xx.dtsi里面的内容是基础模块的配置,和am335x-evm.dts配合生成最后的dtb文件。但是在dtsi中的下面这个段是用来做什么的?其中没有mmc,mmc也可以工作。

aliases { i2c0 = &i2c0; i2c1 = &i2c1; i2c2 = &i2c2; serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; serial3 = &uart3; serial4 = &uart4; serial5 = &uart5; d_can0 = &dcan0; d_can1 = &dcan1;usb0 = &usb0;usb1 = &usb1;phy0 = &usb0_phy;phy1 = &usb1_phy; ethernet0 = &cpsw_emac0; ethernet1 = &cpsw_emac1; };

Steven Liu1:

回复 zizhen hu:

http://stackoverflow.com/questions/17738709/dts-file-explanation-aliases

In the aliases section of a DTS, we see entries of the format

property = &label;

Each of the entries consists of :a. property — A new property defined here.b. &label — Complete DTS path to the node referenced by the label.

It basically assigns the value of b to a. Henceforth, the long-name to the node identified by the label can be accessed using the shorthand property.

Note that the RHS of this assignment is using labels and NOT the short-names of the individual nodes. Just like a label in C code refers to an instruction on the line where it is defined, a labelin DTS refers to the individual node (using its complete long path) that is defined on that line.

For example, considering the following DTS,lxr.free-electrons.com/source/arch/powerpc/boot/dts/mpc8313erdb.dts

赞(0)
未经允许不得转载:TI中文支持网 » am335x dts文件疑惑
分享到: 更多 (0)