
Hi Jagan,
Sorry for late reply to your queries, I copied your query here to make continuation of mail.
Don't know whether you tried this or not.
- Erase bottom 4K sectors using 4K
- Erase middle sectors using SE
- Erase top 4K sectors using 4K
We are able to manage a flash to run in hybrid mode (IE default mode) and in this mode few top 4K sectors get erased by 4K command but no other sectors get erased with 4K cmd. In non hybrid mode, we are able to erase all flash uniformly with SE cmd but 4K is not working.
So we need to remove the SECT_4K flag for s25fs512s if we want uniform commad command for full flash. Also, we need a patch [1] to disable hybrid mode/disable 4K erase.
[1] https://lists.denx.de/pipermail/u-boot/2017-March/285010.html
Thanks SuresH
-----Original Message----- From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Suresh Gupta Sent: Monday, June 12, 2017 7:33 PM To: Jagan Teki jagannadh.teki@gmail.com Cc: u-boot@lists.denx.de; Jagan Teki jagan@openedev.com; Yao Yuan yao.yuan@nxp.com Subject: Re: [U-Boot] [PATCH] sf: Fix s25fs512s erase size and remove SECT_4K flag
-----Original Message----- From: Suresh Gupta Sent: Monday, June 12, 2017 2:18 PM To: 'Jagan Teki' jagannadh.teki@gmail.com Cc: Jagan Teki jagan@amarulasolutions.com; york sun york.sun@nxp.com; u-boot@lists.denx.de; Jagan Teki jagan@openedev.com; Yao Yuan yao.yuan@nxp.com Subject: RE: [U-Boot] [PATCH] sf: Fix s25fs512s erase size and remove SECT_4K flag
-----Original Message----- From: Jagan Teki [mailto:jagannadh.teki@gmail.com] Sent: Monday, June 12, 2017 11:37 AM To: Suresh Gupta suresh.gupta@nxp.com Cc: Jagan Teki jagan@amarulasolutions.com; york sun york.sun@nxp.com; u-boot@lists.denx.de; Jagan Teki jagan@openedev.com; Yao Yuan yao.yuan@nxp.com Subject: Re: [U-Boot] [PATCH] sf: Fix s25fs512s erase size and remove SECT_4K flag
Hi Suresh,
On Thu, Jun 8, 2017 at 1:00 PM, Suresh Gupta suresh.gupta@nxp.com
wrote:
<snip> > > > > So best way is to disable hybrid mode and configure flash in > > Uniform Sector Architecture > > OK, then send patches to Linux and U-Boot will review and take > other suggestions too. >
Thanks Jagan, I will send U-boot patches (after testing) by early next week.
My next point :) to discuss is "32-bit address options". This particular flash do not support below commands /* Bank addr access commands */ #ifdef CONFIG_SPI_FLASH_BAR # define CMD_BANKADDR_BRWR 0x17 # define CMD_BANKADDR_BRRD 0x16 # define CMD_EXTNADDR_WREAR 0xC5 # define CMD_EXTNADDR_RDEAR 0xC8 #endif
Instead of above S25FS512S flash support 32-bit address commands like 4READ, 4P4E and many more which require 32 bit address directly pass on
wires.
Jagan, So, Do we have any plan to fix this? Yao Yuan already send one patch [1] for same. I think this is a decent approach [1]. If required I will resend this patch with
little changes.
Don't know whether you tried this or not.
- Erase bottom 4K sectors using 4K
- Erase middle sectors using SE
- Erase top 4K sectors using 4K
I will try all combinations and let you know the results.
Jagan, The problem here is, I have all board in which we disable hybrid mode and we write this in nonvolatile register. So on my boards 4K erase (0x20) is not working on any of the sectors. Please suggest.
Hybrid mode of this flash supports,
- Physical set of eight 4-kbytes sectors and - one 224-kbytes sector at the top or bottom of address space with - all remaining sectors of 256 kbytes.
So even if we are able to erase eight sectors via cmd 4K and rest via 256 kbyte(0xd8) Then what about one sector of 224 Kbytes. And how we tell user about this erase pattern.
Again, my suggestion is to disable hybrid mode (volatile) and we may revisit if anyone come up with different approach Please suggest.
Thanks SuresH
thanks!
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot