admin管理员组文章数量:1402948
I use winbond W25Q02JV nor flash with Xilinx Zynq7000 SoC. This W25Q02JV has four dies (memoy banks) of 64Mb on chip - totally 256MB. I split the flash memory into mtd partitions:
- mtd0 for uboot bootloader
- mtd1 for environment
- mtd2 for Linux+rootfs
- mtd3 - ubifs partition for any data
mtd0+mtd1 has size of 1MB mtd2 is 10MB mtd3 takes up all the remaining memory (256-11=245)
After programming flash U-boot and Linux successfully starts. Linux detects flash correctly (ids, size, addr mode and etc.) But then I trying to erase and format mtd3 to ubifs I loose U-boot and Linux. It looks like during flash erasing spi-nor driver doesn't switch between dies (banks) and it erases the first bank.
Details
- Linux 6.6.40
- my dts:
&qspi {
u-boot,dm-pre-reloc;
status = "okay";
is-dual = <0>;
num-cs = <1>;
flash@0 {
compatible = "jedec,spi-nor", "winbond,w25q02jv";
reg = <0x0>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <4>;
spi-max-frequency = <50000000>;
spi-nor,addr-mode = <4>;
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "qspi-fsbl-uboot";
reg = <0x0 0xE0000>;
};
partition@E0000 {
label = "uboot-env";
reg = <0xE0000 0x20000>;
};
partition@100000 {
label = "linux-with-rootfs";
reg = <0x100000 0xA00000>;
};
partition@B00000 {
label = "any-data";
reg = <0xB00000 0xF500000>;
};
};
};
- To erase mtd3
flash_eraseall /dev/mtd3
Any suggestions - how it can be fixed?
or where can i look for a solution to the problem?
本文标签: flashwinbond W25Q02JV problem can39t use whole memory capacity of nor flashi n linuxStack Overflow
版权声明:本文标题:flash - winbond W25Q02JV problem: can't use whole memory capacity of nor flashi n linux - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744369745a2602960.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论