Hello everybody,
I'm tryng to mount a partition of my 256 MB SPI-NOR Flash memory MT25QU02GCBB8E12-0AUT in Linux, in order to see it as a folder of the file system (/mnt) and store data easily.
I already use the first 128 MB of the memory to store the entire OS, and I succesfully boot from there, so I would like to set the remaining part for data storage. I partitioned into the dts file like this:
&flexspi1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexspi>;
assigned-clock-rates = <80000000>;
status = "okay";
flash0: flash@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
spi-max-frequency = <10000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
/* 128 MB partition dedicated to bootloader, device tree, kernel and rootfs */
partition@0 {
label = "system-readonly";
reg = <0x0000000 0x8000000>;
read-only;
};
/* 128 MB partition dedicated to user data (for example: application, logs) */
partition@8000000{
label = "data";
reg = <0x8000000 0x8000000>;
};
};
};
enabling the mtd-utils I can see the partitions into /proc/mtd

then if I do the following steps I'm able to save files into the /mnt folder:
- flash_erase -j /dev/mtd1 0 0
- modprobe mtdblock
- mount -t jffs2 /dev/mtdblock1 /mnt
- echo 'test' > /mnt/file.txt
but when I reset the board and I try do the mounting step without erasing all the memory it gives me the following error:

Can you tell me what's going on? Is there a way to use this memory as data storage? Thanks.
Best Regards,
Bob