OpenNuvoton / NUC970_U-Boot_v2016.11

U-Boot v2016.11 for NUC970, N9H30, and NUC980
29 stars 45 forks source link

NUC970 SPI NAND support #17

Closed lightelf76 closed 5 years ago

lightelf76 commented 5 years ago

Is it possible to boot NUC970 from SPI NAND flash? like Winbond/Gigadevice? I see no mention in the manual and NuWriter for NUC970. But, I also see no clean reasons, why it's not possible. Can you make a clean statement?

yachen commented 5 years ago

No, NUC970 series doesn't support SPI NAND boot. Because boot ROM doesn't support SPI NAND read commands. The NUC980 series supports SPI NAND boot.

Yi-An Chen

-------- Original Message -------- Subject: [OpenNuvoton/NUC970_U-Boot_v2016.11] NUC970 SPI NAND support (#17) From: lightelf76 To: "OpenNuvoton/NUC970_U-Boot_v2016.11" CC: Subscribed

Is it possible to boot NUC970 from SPI NAND flash? like Winbond/Gigadevice? I see no mention in the manual and NuWriter for NUC970. But, I also see no clean reasons, why it's not possible. Can you make a clean statement?

- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_NUC970-5FU-2DBoot-5Fv2016.11_issues_17-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAAKCP4X6BYIKIBOEQPXHFR3PV7ZFVA5CNFSM4HN2GIFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GURAPNQ&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=q-BWmLSxupRfTxXKTZc-PwcPWFWVF6I56h2YjloB4dw&s=YXcwWS6ooHk0TghZRntKe9KlmG2ltGlHZnaPELR_eiw&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKCP4SJRPAQRTUR4CTOWRTPV7ZFVANCNFSM4HN2GIFA&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=q-BWmLSxupRfTxXKTZc-PwcPWFWVF6I56h2YjloB4dw&s=jbkd4j6QbUVnsON5UDKI4pVV_JpEdEYV92qCC8mIsRg&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

lightelf76 commented 5 years ago

Thanks. But what are the commands used by boot ROM to read SPI flash? From W25N01GV datasheet I see commands 03h/0Bh are exactly same as W25Q128FV for first 2048-byte page. So, seems like small portion of code (like U-Boot SPL) can be loaded and used to load next parts of U-Boot. Not perfect, but doable, isn't it?

yachen commented 5 years ago

Hi,

SPI NAND needs 13h to load the content of designated page to its internal SRAM before you can issue 03h to read it out. I think this is because it need to do some ECC calculation.

Sincerely,

Yi-An Chen

lightelf76 commented 5 years ago

Hi, you are right, but at least Winbond and Gigadevice (and possible other) SPI NAND loads content of page 00 into SRAM (and perform ECC) automatically at PowerOn. Moreover, first page is error-free.

yachen commented 5 years ago

Hi,

Yes, SPI NAND flash can load page 0 for you but what about the rest? ROM code won't be able to load SPL which is smaller than a block but larger than a page. And without knowing how to check ECC status, boot ROM cannot tell if the 1st page read from SPI NAND is valid or not. Also SPI NAND tends to use FFh as reset command instead of 66h + 99h which is commonly used by SPI NOR, so in some scenarios (e.g. WDT reset), boot ROM cannot reset SPI NAND to its initial state.

Sincerely,

Yi-An Chen