這是我從我的嵌入式Linux內核的設備樹中抽取的摘錄。 這是我現在該怎麼理解:解密設備樹
1)aemif
接口位於物理地址0x30000000
2)aemif
驅動程序位於一個名爲davinci_aemif.c,它使用一個時鐘稱爲aemif
3)aemif
上有2臺設備,一個是cs2
,另一個是nand
(我不認爲這個假設是正確的)
現在的問題:
1)什麼是reg = <0x21000a00 0x100>;
行?如何在位於0x30000000
的aemif
的地址空間爲0x21000a00
?
2)爲什麼cs2
定義[email protected]
而不是[email protected],0
3)什麼是線reg = <0x2 0x0 0x8000000 0x6 0x0 0x100>;
幹什麼?
4)如何設置信號線(ta,rhold,rstrobe等)的任何解釋都會有幫助。
[email protected] {
compatible = "ti,davinci-aemif";
#address-cells = <0x2>;
#size-cells = <0x1>;
reg = <0x21000a00 0x100>;
ranges = <0x2 0x0 0x30000000 0x8000000 0x3 0x0 0x34000000 0x4000000 0x4 0x0 0x38000000 0x4000000 0x5 0x0 0x3c000000 0x4000000 0x6 0x0 0x21000a00 0x100>;
clocks = <0x11>;
clock-names = "aemif";
[email protected] {
compatible = "ti,davinci-cs";
#address-cells = <0x1>;
#size-cells = <0x1>;
ti,davinci-cs-ta = <0xc>;
ti,davinci-cs-rhold = <0x6>;
ti,davinci-cs-rstrobe = <0x17>;
ti,davinci-cs-rsetup = <0x9>;
ti,davinci-cs-whold = <0x8>;
ti,davinci-cs-wstrobe = <0x17>;
ti,davinci-cs-wsetup = <0x8>;
};
[email protected],0 {
compatible = "ti,davinci-nand";
reg = <0x2 0x0 0x8000000 0x6 0x0 0x100>;
#address-cells = <0x1>;
#size-cells = <0x1>;
ti,davinci-chipselect = <0x0>;
ti,davinci-mask-ale = <0x2000>;
ti,davinci-mask-cle = <0x4000>;
ti,davinci-mask-chipsel = <0x0>;
ti,davinci-ecc-mode = "hw";
ti,davinci-ecc-bits = <0x4>;
ti,davinci-nand-use-bbt;
ti,davinci-no-subpage-write;
clocks = <0x11>;
clock-names = "aemif";
[email protected] {
label = "u-boot";
reg = <0x0 0x100000>;
read-only;
};
[email protected] {
label = "params";
reg = <0x100000 0x80000>;
read-only;
};
[email protected] {
label = "ubifs";
reg = <0x180000 0x1fe80000>;
};
};
};