[U-Boot] sf: Remove spansion_s25fss_disable_4KB_erase

Yao Yuan yao.yuan at nxp.com
Tue Dec 13 06:27:47 CET 2016


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.

Best Regards,
Yao

-------------- next part --------------
A non-text attachment was scrubbed...
Name: S25FS512S_00.pdf
Type: application/pdf
Size: 1758713 bytes
Desc: S25FS512S_00.pdf
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161213/2303fa58/attachment-0001.pdf>


More information about the U-Boot mailing list