This is part of a device file (linux/arch/arm/boot/dts/versatile-ab.dts)
uart1: uart@101f2000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x101f2000 0x1000>;
interrupts = <13>;
clocks = <&xtal24mhz>, <&pclk>;
clock-names = "uartclk", "apb_pclk";
};
uart2: uart@101f3000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0x101f3000 0x1000>;
interrupts = <14>;
clocks = <&xtal24mhz>, <&pclk>;
clock-names = "uartclk", "apb_pclk";
};
smc@10100000 {
compatible = "arm,primecell";
reg = <0x10100000 0x1000>;
clocks = <&pclk>;
clock-names = "apb_pclk";
};
mpmc@10110000 {
compatible = "arm,primecell";
reg = <0x10110000 0x1000>;
clocks = <&pclk>;
clock-names = "apb_pclk";
};
I've read about device tree but could not understand it clearly. I understood the kernel during its initialization searches through the device tree and compares the compatible field of the node with that of the driver. so for the uart1 node, it uses just the driver which has compatible field "arm,pl011". What effect does "arm,primecell" in the uart1 compatible field have? What are the nodes smc and mpmc above which has only "arm,primecell" in the compatible field? Are they common for all the node which have "arm,primecell" in the compatible list? (I found many nodes in arm socs or boards have "arm,primecell" in the compatible list. Does the kernel use the nodes data with less compatible (or generic) field (like "arm,primecell"), and overwrite or add information from the node with more compatible(or special) name?
And smc@10100000 and mpmc@10110000 differ only by the name and address. Do node names have special meaning?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…