我这里有个SPI NAND模块,引出了CS DO CLK DI四个脚。模块上面有一个W25N01
请问如果要驱动这个模块,硬件和软件需要如何修改
I have an SPI NAND module here, which leads to the four legs of CS DO CLK DI. There is a W25N01 on the module
May I ask how to modify the hardware and software to drive this module
I have been unable to get the CPU to recognize a W25N01 SPINAND, but it will recognize a W25Q256 SPINOR and boot into u-boot. I am not sure if there is a limited set of supported NANDs? Is there a method to get debug output during mask ROM boot?
The aim is to boot completely from SPI flash (NAND) in my case. Using my own crafted IOB I can boot from SPI NOR flash and use the SD for ‘upgrades’. I can even use the NOR to PXE boot. My official IOB v1.11 arrived today. Maybe that will reveal an error in my own PCB.
Is there a method to get debug output during mask ROM boot?
Answering my own question, I have determined the USB UART bridge plays a part here. I believe external pull-up resistors are needed to change the initial serial noise into boot ROM output. Changing from CH340 to CP2102 fixed this in my case.
I’m sorry, we have not conducted any research on booting the system from SPI Flash. If you wish to implement this functionality, I recommend referring to the documentation provided by the CPU manufacturer to see if there are any relevant instructions available
I have managed to boot from SPI NAND flash successfully now (Winbond W25N01GVxxIG 1Gbit). The only limitation was having to disable QSPI mode and use only x1 mode. I have pushed the relevant commit to github in case anybody is interested.
Try building with commit 1f6e45b on this branch on github while I put something together for the hardware side. It’s currently on a breadboard and I have no spare NAND to rebuild on a custom PCB (currently used with NOR) or IOB.
Once the image is built you unzip the upgrade.zip file onto an SD/TF card and boot. Then cvi_update will run automatically and write to your SPI NAND. Then you can eject the SD and boot from NAND.
I did write code to read/write the NAND myself externally but never got it to boot this way. I am waiting for some new chips to arrive then I will try NAND on IOB.
Here’s a simple single-sided PCB you can build and try. Only tested with SPI NOR flash W25Q256 (32 MByte) so far. Use a jumper between the middle pin and your choice of NOR or NAND to choose
For information, I tested the same PCB (a second home-made board) with SPINAND flash (W25N01) and that also works as expected.
U-Boot
DRAM: 63.3 MiB
gd->relocaddr=0x823e4000. offset=0x21e4000
NAND: Device ID : 0xef 0xaa 0x21 Model: W25N01GVxxIG
Tuning SPINAND run on maximum speed...
fip_info[0] total count=4
hi,
my IOB cannot recognize w25n01gvzeig in u-boot, but I found that the ubboot driver has this NAND. How did you solve this problem? The device ID read by the u-boot is 0xff 0xff. Is there a problem with the driver?