BORA Lite SOM/BELK-L/Pheripherals/NOR NAND

From DAVE Developer's Wiki
Jump to: navigation, search


NOR and NAND flash[edit | edit source]

200px-Emblem-important.svg.png

NOR and NAND flash memories cannot be accessed at the same time because they shares some Zynq pins. In U-boot the switching between accesses to NOR and NAND is automatically done by U-boot itself. By default in kernel only NAND flash can be accessed. For NOR support in kernel please contact technical support.

NOR and NAND flashes are managed as MTD devices.

Generally speaking, NAND flash memory partitions are defined using the kernel command line:

Bora> pri mtdparts
mtdparts=mtdparts=pl35x-nand:256K(spl),768K(uboot),256K(env1),256K(env2),6M(fpga),512K(fdt),8M(kernel),-(nand-ubi)
Bora>

adding addmisc to the bootargs parameters list.

The kernel dmesg will configure the NAND partitions in the following way:

[    1.148350] Creating 8 MTD partitions on "pl35x-nand":
[    1.153486] 0x000000000000-0x000000040000 : "spl"
[    1.170502] 0x000000040000-0x000000100000 : "uboot"
[    1.186404] 0x000000100000-0x000000140000 : "env1"
[    1.202301] 0x000000140000-0x000000180000 : "env2"
[    1.218170] 0x000000180000-0x000000780000 : "fpga"
[    1.229456] 0x000000780000-0x000000800000 : "fdt"
[    1.237981] 0x000000800000-0x000001000000 : "kernel"
[    1.244063] 0x000001000000-0x000040000000 : "nand-ubi"
root@bora:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "spl"
mtd1: 000c0000 00020000 "uboot"
mtd2: 00040000 00020000 "env1"
mtd3: 00040000 00020000 "env2"
mtd4: 00600000 00020000 "fpga"
mtd5: 00080000 00020000 "fdt"
mtd6: 00800000 00020000 "kernel"
mtd7: 3f000000 00020000 "nand-ubi"