DESK-XZ7-L/Peripherals/NOR

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2024/01/23 DESK-XZ7-L-1.0.1 release



Peripheral NOR[edit | edit source]

Device tree configuration[edit | edit source]

Here below an example of device tree for the Quad-SPI NOR flash configuration used on standard DAVE's kit for the BORA, BORA Xpress and BORA Lite:

From bora.dtsi:

...
...
&qspi {
    flash0: flash@0 {
        // we need to use 128Mbit (16MiB) device compatibile even if
        // the real hardware has a 256Mbit (32MiB) device because of
        // Zynq QSPI controller limits
        compatible = "spansion,s25fl128s1", "jedec,spi-nor";
        #address-cells = <1>;
        #size-cells = <1>;
        reg = <0>;
        spi-tx-bus-width = <1>;
        spi-rx-bus-width = <4>;
        spi-max-frequency = <25000000>;
    };
};
...
...

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

[    0.509067] spi-nor spi0.0: found s25fl256s1, expected s25fl128s1
[    0.515401] spi-nor spi0.0: s25fl256s1 (32768 Kbytes)
[    0.520482] 1 fixed-partitions partitions found on MTD device spi0.0
[    0.526863] Creating 1 MTD partitions on "spi0.0":
[    0.531648] 0x000000000000-0x000002000000 : "boot"

Check the mtd partitions[edit | edit source]

root@boralite:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01600000 00020000 "bootbin"
mtd1: 00040000 00020000 "ubootenv"
mtd2: 1be00000 00020000 "rootfs"