am335x在arch/arm/boot/dts目录下有2个dts文件
am335x-evm.dts和am33xx.dtsi
am335-evm.dts里面应该是配置各个驱动的dts文件,那么am33xx.dtsi里面的内容都是用来做什么的?我看了下里面好多模块的status都是“disabled.”
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
am335x在arch/arm/boot/dts目录下有2个dts文件
am335x-evm.dts和am33xx.dtsi
am335-evm.dts里面应该是配置各个驱动的dts文件,那么am33xx.dtsi里面的内容都是用来做什么的?我看了下里面好多模块的status都是“disabled.”
am33xx.dtsi文件中都是对于SoC中所有模块最基础架构的定义,比如寄存器地址,中断号之类的,这些共性的东西是不会随着板子设计应用的改变而改变的。
而am335x-evm.dts文件中,是根据自己的实际办卡应用中做的配置,简而言之,用了哪些接口,使用怎样的pinmux配置,这种类型的信息都会体现在这个板级配置文件中,并且最终在这里吧status修改成为okay生效。
一般来说,我们不建议修改am33xx.dtsi这种SoC架构基础文件,你只要修改你自己的板级配置文件DTS就可以了。
基本我理解是说两个文件是合并一起的,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;
};
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