Chinaunix首页 | 论坛 | 博客
  • 博客访问: 885664
  • 博文数量: 286
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1841
  • 用 户 组: 普通用户
  • 注册时间: 2015-05-09 16:26
文章分类

全部博文(286)

文章存档

2016年(38)

2015年(248)

我的朋友

分类: LINUX

2015-09-16 16:59:35

http://blog.csdn.net/hui523hui523hui523/article/details/38681849

点击(此处)折叠或打开

  1. build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.36/arch/mips/ralink/dts/rt3050.dtsi

点击(此处)折叠或打开

  1. / {
  2.     #address-cells = <1>;
  3.     #size-cells = <1>;
  4.     compatible = "ralink,rt3050-soc", "ralink,rt3052-soc", "ralink,rt3350-soc";

  5.     cpus {
  6.         cpu@0 {
  7.             compatible = "mips,mips24KEc";
  8.         };
  9.     };

  10.     chosen {
  11.         bootargs = "console=ttyS0,57600";
  12.     };

  13.     cpuintc: cpuintc@0 {
  14.         #address-cells = <0>;
  15.         #interrupt-cells = <1>;
  16.         interrupt-controller;
  17.         compatible = "mti,cpu-interrupt-controller";
  18.     };

  19.     palmbus@10000000 { //地址
  20.         compatible = "palmbus";
  21.         reg = <0x10000000 0x200000>;
  22.         ranges = <0x0 0x10000000 0x1FFFFF>;

  23.         #address-cells = <1>;
  24.         #size-cells = <1>;

  25.         sysc@0 {
  26.             compatible = "ralink,rt3052-sysc", "ralink,rt3050-sysc";
  27.             reg = <0x0 0x100>;
  28.         };

  29.         timer@100 {
  30.             compatible = "ralink,rt3052-timer", "ralink,rt2880-timer";
  31.             reg = <0x100 0x20>;

  32.             interrupt-parent = <&intc>;
  33.             interrupts = <1>;
  34.         };

  35.         watchdog@120 {
  36.             compatible = "ralink,rt3052-wdt", "ralink,rt2880-wdt";
  37.             reg = <0x120 0x10>;

  38.             resets = <&rstctrl 8>;
  39.             reset-names = "wdt";

  40.             interrupt-parent = <&intc>;
  41.             interrupts = <1>;
  42.         };

  43.         intc: intc@200 {
  44.             compatible = "ralink,rt3052-intc", "ralink,rt2880-intc";
  45.             reg = <0x200 0x100>;

  46.             resets = <&rstctrl 19>;
  47.             reset-names = "intc";

  48.             interrupt-controller;
  49.             #interrupt-cells = <1>;

  50.             interrupt-parent = <&cpuintc>;
  51.             interrupts = <2>;
  52.         };

  53.         memc@300 {
  54.             compatible = "ralink,rt3052-memc", "ralink,rt3050-memc";
  55.             reg = <0x300 0x100>;

  56.             resets = <&rstctrl 20>;
  57.             reset-names = "mc";

  58.             interrupt-parent = <&intc>;
  59.             interrupts = <3>;
  60.         };

  61.         uart@500 {
  62.             compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a";
  63.             reg = <0x500 0x100>;

  64.             resets = <&rstctrl 12>;
  65.             reset-names = "uart";

  66.             interrupt-parent = <&intc>;
  67.             interrupts = <5>;

  68.             reg-shift = <2>;

  69.             status = "disabled";
  70.         };

  71.         gpio0: gpio@600 {
  72.             compatible = "ralink,rt3052-gpio", "ralink,rt2880-gpio";
  73.             reg = <0x600 0x34>; //从0X600开始映射多少地址

  74.             gpio-controller;
  75.             #gpio-cells = <2>;

  76.             ralink,gpio-base = <0>;
  77.             ralink,num-gpios = <24>;
  78.             ralink,register-map = [ 00 04 08 0c
  79.                         20 24 28 2c
  80.                         30 34 ]; //各寄存器的地址

  81.             resets = <&rstctrl 13>;
  82.             reset-names = "pio"; //名字为PIO

  83.             interrupt-parent = <&intc>;
  84.             interrupts = <6>; //中断号为6

  85.             status = "disabled";
  86.         };

  87.         gpio1: gpio@638 {
  88.             compatible = "ralink,rt3052-gpio", "ralink,rt2880-gpio";
  89.             reg = <0x638 0x24>;

  90.             gpio-controller;
  91.             #gpio-cells = <2>;

  92.             ralink,gpio-base = <24>;
  93.             ralink,num-gpios = <16>;
  94.             ralink,register-map = [ 00 04 08 0c
  95.                         10 14 18 1c
  96.                         20 24 ];

  97.             status = "disabled";
  98.         };

  99.         gpio2: gpio@660 {
  100.             compatible = "ralink,rt3052-gpio", "ralink,rt2880-gpio";
  101.             reg = <0x660 0x24>;

  102.             gpio-controller;
  103.             #gpio-cells = <2>;

  104.             ralink,gpio-base = <40>;
  105.             ralink,num-gpios = <12>;
  106.             ralink,register-map = [ 00 04 08 0c
  107.                         10 14 18 1c
  108.                         20 24 ];

  109.             status = "disabled";
  110.         };

  111.         spi@b00 {
  112.             compatible = "ralink,rt3050-spi", "ralink,rt2880-spi";
  113.             reg = <0xb00 0x100>;

  114.             resets = <&rstctrl 18>;
  115.             reset-names = "spi";

  116.             #address-cells = <1>;
  117.             #size-cells = <0>;

  118.             status = "disabled";
  119.         };

  120.         uartlite@c00 {
  121.             compatible = "ralink,rt3052-uart", "ralink,rt2880-uart", "ns16550a";
  122.             reg = <0xc00 0x100>;

  123.             resets = <&rstctrl 19>;
  124.             reset-names = "uartl";

  125.             interrupt-parent = <&intc>;
  126.             interrupts = <12>;

  127.             reg-shift = <2>;
  128.         };

  129.     };

  130.     rstctrl: rstctrl {
  131.         compatible = "ralink,rt3050-reset", "ralink,rt2880-reset";
  132.         #reset-cells = <1>;
  133.     };

  134.     ethernet@10100000 {
  135.         compatible = "ralink,rt3050-eth";
  136.         reg = <0x10100000 10000>;

  137.         interrupt-parent = <&cpuintc>;
  138.         interrupts = <5>;

  139.         status = "disabled";
  140.     };

  141.     esw@10110000 {
  142.         compatible = "ralink,rt3050-esw";
  143.         reg = <0x10110000 8000>;

  144.         interrupt-parent = <&intc>;
  145.         interrupts = <17>;

  146.         status = "disabled";
  147.     };

  148.     wmac@10180000 {
  149.         compatible = "ralink,rt3050-wmac", "ralink,rt2880-wmac";
  150.         reg = <0x10180000 40000>;

  151.         interrupt-parent = <&cpuintc>;
  152.         interrupts = <6>;

  153.         status = "disabled";
  154.     };

  155.     usb@101c0000 {
  156.         compatible = "ralink,rt3050-usb", "snps,dwc2";
  157.         reg = <0x101c0000 40000>;

  158.         interrupt-parent = <&intc>;
  159.         interrupts = <18>;

  160.         resets = <&rstctrl 22>;
  161.         reset-names = "otg";

  162.         status = "disabled";
  163.     };
  164. }

在执行完unflatten_device_tree()后,DTS节点信息被解析出来,保存到allnodes链表中,allnodes会在后面被用到。

随后,当系统启动到board文件时,会调用.init_machine,高通8974平台对应的是msm8974_init()。接着调用of_platform_populate(....)接口,加载平台总线和平台设备。至此,系统平台上的所有已配置的总线和设备将被注册到系统中。注意:不是dtsi文件中所有的节点都会被注册,在注册总线和设备时,会对dts节点的状态作一个判断,如果节点里面的status属性没有被定义,或者status属性被定义了并且值被设为“ok”或者“okay”,其他情况则不被注册到系统中。



阅读(1542) | 评论(0) | 转发(0) |
0

上一篇:shell 脚本测试文件

下一篇:Device Tree (dts)

给主人留下些什么吧!~~