我在嵌入式产品的 dts 文件中找到了这个片段。
为什么我们有 NAND 闪存时还要有 NOR 闪存?
下面localbus节点中提到的LCS0,LCS1是什么意思?
localbus@a8405000 {
#address-cells = <2>;
#size-cells = <1>;
compatible = "fsl,mpc8313-elbc", "fsl,elbc", "simple-bus";
reg = <0xa8405000 0x1000>;
interrupts = <77 0x8>;
interrupt-parent = <&ipic>;
// CS0 and CS1 are swapped when
// booting from nand, but the
// addresses are the same.
// ranges = <0x0 0x0 0xfe000000 0x01000000 /* LCS0: NOR BOOT */
ranges = <0x0 0x0 0xfe000000 0x02000000 /* LCS0: NOR BOOT */
0x1 0x0 0xa8000000 0x00040000 /* LCS1: NAND CONTROLLER */
// 0x2 0x0 0xa0000000 0x04000000 /* LCS2: FGPA */
0x2 0x0 0xa0000000 0x04000000>; /* LCS2: FGPA */
// 0x3 0x0 0xff000000 0x01000000>; /* LCS3: NOR RESERVE */
flash@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
// reg = <0x0 0x0 0x1000000>; /* 16MB */
reg = <0x0 0x0 0x2000000>; /* 32MB */
bank-width = <2>;
device-width = <1>;
u-boot@0 {
reg = <0x0 0x80000>;
};
xxxx@80000 {
reg = <0x080000 0x1000000>;
};
log@1080000 {
reg = <0x1080000 0x2c0000>;
};
inventry@1340000 {
reg = <0x1340000 0x20000>;
};
xxxxx@1360000 {
reg = <0x1360000 0x20000>;
};
xxxxx@1380000 {
reg = <0x1380000 0x20000>;
};
xxxxx@13a0000 {
reg = <0x13a0000 0x20000>;
};
reserve-nor1@13c0000 {
reg = <0x13c0000 0xc40000>;
};
dummy1@2000000 {
reg = <0x2000000 0x0>;
};
dummy2@2000000 {
reg = <0x2000000 0x0>;
};
};
nand@1,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,mpc8313-fcm-nand",
"fsl,elbc-fcm-nand";
reg = <0x1 0x0 0x40000>; /* NAND CONTROLLER 256KB */
dtb-0@0 {
reg = <0x0 0x20000>;
};
kernel-0@20000 {
reg = <0x20000 0x400000>;
};
rootfs-0@420000 {
reg = <0x420000 0x099e0000>;
};
dtb-1@9e00000 {
reg = <0x09e00000 0x20000>;
};
kernel-1@9e20000 {
reg = <0x09e20000 0x400000>;
};
rootfs-1@a220000 {
reg = <0x0a220000 0x099e0000>;
};
internal@13c00000 {
reg = <0x13c00000 0x6400000>;
};
xxxx-log@1a000000 {
reg = <0x1a000000 0x6000000>;
};
};
};
我完全不明白下面的代码片段是什么意思
// CS0 and CS1 are swapped when
// booting from nand, but the
// addresses are the same.
// ranges = <0x0 0x0 0xfe000000 0x01000000 /* LCS0: NOR BOOT */
ranges = <0x0 0x0 0xfe000000 0x02000000 /* LCS0: NOR BOOT */
0x1 0x0 0xa8000000 0x00040000 /* LCS1: NAND CONTROLLER */
// 0x2 0x0 0xa0000000 0x04000000 /* LCS2: FGPA */
0x2 0x0 0xa0000000 0x04000000>; /* LCS2: FGPA */
// 0x3 0x0 0xff000000 0x01000000>; /* LCS3: NOR RESERVE */