[U-Boot] sf: Remove spansion_s25fss_disable_4KB_erase
Jagan Teki
jagannadh.teki at gmail.com
Mon Mar 20 16:12:09 UTC 2017
Hi,
Let's start the discussion, if possible we may add linux-mtd ML.
Here is the details: from attached pdf Page no:2
In spansion S25FS-S family the physical sectors are grouped as
normal and parameter sectors. Parameter sectors are 4kB in size
with 8 set located at the bottom or top address of a device.
Normal sectors are similar to other flash family with sizes of
64kB or 32 kB.
Do we agree till this point?
To erase whole flash using sector erase(D8h or DCh) won't effect
the parameter sectors, so in order to erase these we must use 4K
sector erase commands (20h or 21h) separately.
So better to erase the whole flash using 4K sector erase instead
of detecting these family parts again and do two different erase
operations.
On Tue, Dec 13, 2016 at 10:57 AM, Yao Yuan <yao.yuan at nxp.com> wrote:
> Hi Jagan,
>
> Do you have any comments?
>
> Thanks for your work and you know it's important for QSPI with S25FS512S.
>
> It seems S25FS512S can't support the SECT_4K, right?
> And it better to retain the disable_4kb, but we can add a flag in dts to select whether enable it.
>
> Best Regards,
> Yao
>
> From: Yao Yuan
> Sent: Wednesday, November 30, 2016 3:23 PM
> To: 'Jagan Teki' <jagan at openedev.com>
> Subject: sf: Remove spansion_s25fss_disable_4KB_erase
>
> Hi Jagan,
>
> I have noticed that you have a patch to:
>
> commit 116e005cfd00021424f5f81eeedd355e4ca72f07
> Author: Jagan Teki <jagan at amarulasolutions.com<mailto:jagan at amarulasolutions.com>>
> Date: Tue Nov 15 22:57:42 2016 +0530
>
> - Removed spansion_s25fss_disable_4KB_erase code
> - Add SECT_4K for S25FS512S chip
>
> Do you have any test for this patch?
> Because with this patch, my QSPI driver can't working with S25FS512S.
>
> As you said,
> In spansion S25FS-S family the physical sectors are grouped as normal and parameter sectors.
> Parameter sectors are 4kB in size with 8 set located at the bottom or top address of a device.
> Normal sectors are similar to other flash family with sizes of 64kB or 32 kB.
>
> Base on the RM and in my understand, not all the erase sectors are 4-kb.
>
> In my case regions are:
>
> 1. 0-32KiB (8*4KiB) - 4K_ERASE (0x20/0x21)
>
> 2. 32 - 256 - SE_CMD (0xd8/0xdc)
>
> 3. Rest of the flash SE_CMD (0xd8/0xdc)
>
> 4. To erase whole flash you can also use CHIP_ERASE_CMD
>
> (0x60/0xC7) command, you just need to add one more mtd
>
> partition that will cover whole flash.
>
> So we can't add SECT_4K for S25FS512S chip.
> If we add SECT_4K for S25FS512S chip, that means all the erase sectors are 4-kb.
> But I think it's not right.
>
> And disable 4kb is necessary for me, I also suggestion to add a flag to select whether enable 4-kb.
>
> if (of_property_read_bool(np, "spi-nor, disable-4kb")) {
>
> spansion_s25fs_disable_4kb_erase();
>
> }
>
> else
>
> ...
>
>
>
> In dts:
>
> &qspi {
>
> qflash0: s25fs512s at 0 {
>
> compatible = "spansion, s25fs512s";
>
> spi-nor, disable-4kb
>
> #address-cells = <1>;
>
> #size-cells = <1>;
>
> spi-max-frequency = <20000000>;
>
> reg = <0>;
>
> };
>
>
> Attachment is the RM for S25FS-S.
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: S25FS-S_Prog_Guide_AN.pdf
Type: application/pdf
Size: 606238 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170320/024c6019/attachment-0001.pdf>
More information about the U-Boot
mailing list