smaeul / sun20i_d1_spl

Mainline-friendly SPL for D1
33 stars 21 forks source link

Support booting from 2Gb MX35LF2GE4AD NAND Flash #4

Closed ftyghome closed 2 years ago

ftyghome commented 2 years ago

Hey:) After getting an Allwinner Nezha D1-H board, I found the SPL is unable to find TOC file and the NAND does not initialized properly. The problem seems to have something to do with the lack of configuration of its MX35LF2GE4AD SPI NAND Flash. In the boot0_head.c, I made some changes to the storage_data array, filled in information about the NAND according to the D1_Linux_SPI-NAND developer guide published by Allwinner. image

Before the change, the SPL failed to get information about the NAND(like sector count per page, page count per block...) and consequently, it failed on finding where the TOC file locates.

image

Now the NAND in Nezha board works fine!

image

ftyghome commented 2 years ago

As a side note, I found that I don't need to change the storage_gpio configuration to make the SPI NAND Flash work 😄

smaeul commented 2 years ago

Thanks! I'm glad you got this working; it will be useful for other Nezha users as well.

Please sign off your changes (per U-Boot/Linux policy), and I will be happy to merge this.

ftyghome commented 2 years ago

Improved the description of commit and signed off :) Thank you!

smaeul commented 2 years ago

Merged this as 0ad88bfdb723b1ac74cca96122918f885a4781ac.