* [PATCH v2] mtd: spi-nor: Add s25fs256s1 spi-nor flash support
@ 2016-08-07 19:22 Jagan Teki
2016-08-17 8:57 ` Yunhui Cui
0 siblings, 1 reply; 3+ messages in thread
From: Jagan Teki @ 2016-08-07 19:22 UTC (permalink / raw)
To: linux-mtd
Cc: David Woodhouse, linux-kernel, Jagan Teki, Brian Norris,
Yunhui Cui, Michael Trimarchi
Add Spansion s25fs256s1 spi-nor flash to the list of spi_nor_ids.
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.
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.
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Yunhui Cui <yunhui.cui@nxp.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
Changes for v2:
- Fix wrong vendor name in commit message
drivers/mtd/spi-nor/spi-nor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index d0fc165..6ad7779 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -901,6 +901,7 @@ static const struct flash_info spi_nor_ids[] = {
{ "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
{ "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+ { "s25fs256s1", INFO6(0x010219, 0x4d0181, 64 * 1024, 512, SECT_4K) },
{ "s25fl512s", INFO(0x010220, 0x4d00, 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) },
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v2] mtd: spi-nor: Add s25fs256s1 spi-nor flash support
2016-08-07 19:22 [PATCH v2] mtd: spi-nor: Add s25fs256s1 spi-nor flash support Jagan Teki
@ 2016-08-17 8:57 ` Yunhui Cui
2016-08-29 13:24 ` Jagan Teki
0 siblings, 1 reply; 3+ messages in thread
From: Yunhui Cui @ 2016-08-17 8:57 UTC (permalink / raw)
To: Jagan Teki, linux-mtd
Cc: David Woodhouse, linux-kernel, Brian Norris, Michael Trimarchi
On Monday, August 08, 2016 3:22 AM, Jagan Teki wrote:
> Add Spansion s25fs256s1 spi-nor flash to the list of spi_nor_ids.
>
> 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.
>
> 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.
>
> Cc: Brian Norris <computersforpeace@gmail.com>
> Cc: Yunhui Cui <yunhui.cui@nxp.com>
> Cc: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> ---
> Changes for v2:
> - Fix wrong vendor name in commit message
[Yunhui] Actually, This flash is belongs to S25FS-S Family, besides,
S25FS128S 128 Mbit (16 Mbyte)
S25FS256S 256 Mbit (32 Mbyte)
S25FS512S 512 Mbit (64 Mbyte)
They need some specific operations, not the Spansion S25FL128S Family. Thanks
>
> drivers/mtd/spi-nor/spi-nor.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-
> nor.c index d0fc165..6ad7779 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -901,6 +901,7 @@ static const struct flash_info spi_nor_ids[] = {
> { "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128,
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> { "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
> { "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512,
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> + { "s25fs256s1", INFO6(0x010219, 0x4d0181, 64 * 1024, 512,
> SECT_4K) },
> { "s25fl512s", INFO(0x010220, 0x4d00, 256 * 1024, 256,
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> { "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
> { "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) },
> --
> 2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mtd: spi-nor: Add s25fs256s1 spi-nor flash support
2016-08-17 8:57 ` Yunhui Cui
@ 2016-08-29 13:24 ` Jagan Teki
0 siblings, 0 replies; 3+ messages in thread
From: Jagan Teki @ 2016-08-29 13:24 UTC (permalink / raw)
To: Yunhui Cui
Cc: linux-mtd, Michael Trimarchi, Brian Norris, David Woodhouse,
linux-kernel
On Wed, Aug 17, 2016 at 2:27 PM, Yunhui Cui <yunhui.cui@nxp.com> wrote:
>
> On Monday, August 08, 2016 3:22 AM, Jagan Teki wrote:
>
>> Add Spansion s25fs256s1 spi-nor flash to the list of spi_nor_ids.
>>
>> 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.
>>
>> 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.
>>
>> Cc: Brian Norris <computersforpeace@gmail.com>
>> Cc: Yunhui Cui <yunhui.cui@nxp.com>
>> Cc: Michael Trimarchi <michael@amarulasolutions.com>
>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>> ---
>> Changes for v2:
>> - Fix wrong vendor name in commit message
>
> [Yunhui] Actually, This flash is belongs to S25FS-S Family, besides,
> S25FS128S 128 Mbit (16 Mbyte)
> S25FS256S 256 Mbit (32 Mbyte)
> S25FS512S 512 Mbit (64 Mbyte)
> They need some specific operations, not the Spansion S25FL128S Family.
Please point what exactly the specific ops? because I observed S25FL
vs S25FS have change in a way that they erase the whole flash.
--
Jagan Teki.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-29 13:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-07 19:22 [PATCH v2] mtd: spi-nor: Add s25fs256s1 spi-nor flash support Jagan Teki
2016-08-17 8:57 ` Yunhui Cui
2016-08-29 13:24 ` Jagan Teki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®