How should I understand the 'less-compatible' names in the compatible list in device tree?

ckim at etri.re.kr ckim at etri.re.kr
Wed Jan 6 07:58:01 EST 2021


Hello,

I need some help from linux people.

This is part of a device file (linux/arch/arm/boot/dts/versatile-ab.dts)

 

    uart1: uart at 101f2000 {

        compatible = "arm,pl011", "arm,primecell";

        reg = <0x101f2000 0x1000>;

        interrupts = <13>;

        clocks = <&xtal24mhz>, <&pclk>;

        clock-names = "uartclk", "apb_pclk";

    };

 

    uart2: uart at 101f3000 {

        compatible = "arm,pl011", "arm,primecell";

        reg = <0x101f3000 0x1000>;

        interrupts = <14>;

        clocks = <&xtal24mhz>, <&pclk>;

        clock-names = "uartclk", "apb_pclk";

    };

 

    smc at 10100000 {

        compatible = "arm,primecell";

        reg = <0x10100000 0x1000>;

        clocks = <&pclk>;

        clock-names = "apb_pclk";

    };

 

    mpmc at 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 memory controllers? They
differ only by node names. Then, does name have meaning? not allowed to be
given arbitrarily?)  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?

I would really appreciate it if someone explains it to me..

Thank you!

Chan Kim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20210106/abe0c9cc/attachment.html>


More information about the Kernelnewbies mailing list