[RFC 09/10] mtd: spi-nor: Disable hybrid mode for SPANSION S25FS-S family
Prabhakar Kushwaha
prabhakar.kushwaha at nxp.com
Thu Dec 21 04:41:23 PST 2017
Hi Cyrille,
> -----Original Message-----
> From: linux-mtd [mailto:linux-mtd-bounces at lists.infradead.org] On Behalf Of
> Prabhakar Kushwaha
> Sent: Saturday, December 09, 2017 10:46 PM
> To: Cyrille Pitchen <cyrille.pitchen at wedev4u.fr>; linux-mtd at lists.infradead.org
> Cc: Poonam Aggrwal <poonam.aggrwal at nxp.com>; boris.brezillon at free-
> electrons.com; dedekind1 at gmail.com; Rajat Srivastava
> <rajat.srivastava at nxp.com>; Suresh Gupta <suresh.gupta at nxp.com>;
> computersforpeace at gmail.com
> Subject: RE: [RFC 09/10] mtd: spi-nor: Disable hybrid mode for SPANSION S25FS-
> S family
>
> Hi Cyrille,
>
> > -----Original Message-----
> > From: Cyrille Pitchen [mailto:cyrille.pitchen at wedev4u.fr]
> > Sent: Wednesday, December 06, 2017 4:28 PM
> > To: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>; linux-
> > mtd at lists.infradead.org
> > Cc: boris.brezillon at free-electrons.com; computersforpeace at gmail.com;
> Rajat
> > Srivastava <rajat.srivastava at nxp.com>; dedekind1 at gmail.com
> > Subject: Re: [RFC 09/10] mtd: spi-nor: Disable hybrid mode for SPANSION S25FS
> -
> > S family
> >
> > Hi Prabhakar,
> >
> > Le 06/12/2017 à 09:15, Prabhakar Kushwaha a écrit :
> > > The S25FS-S family physical sectors may be configured as a hybrid
> > > combination of eight 4-kB parameter sectors at the top or bottom
> > > of the address space with all but one of the remaining sectors
> > > being uniform size.
> > > The default status of the flash is the hybrid architecture.
> > > The parameter sectors and the uniform sectors have different erase
> > > commands.
> > >
> > > This patch disables the hybrid sector architecture which makes the
> > > flash have uniform sector size and uniform erase command.
> > >
> >
> > This issue should be addressed in a generic way, not Spansion specific,
> > by adding support of the optional Sector Map Parameter Table (SFDP).
> > In case of non uniform memories, like this Spansion S25FS-S family or
> > SST26, the Sector Map Parameter Table becomes mandatory as a SFDP table.
> >
> > From the JESD216B specification, about the JEDEC Sector Map Parameter
> Table:
> > """
> > This table is required when a memory device:
> > * Has sectors of more than one size
> > * Or, does not allow all Erase Type commands to be applied to all sectors.
> > """
> >
>
> As I understand from Sector Map Parameter Table, It tell about the flash layout
> and which region support which erase type.
>
> Flash layout can be configured using volatile or non-volatile registers. For e.g.
> Spansion S25FS has following combination
> Device CR3NV[3] CR1NV[2] CR3NV[1] Index Value Description
> FS512S 0 0 1 01h 4-kB sectors at
> bottom with remainder 256-kB sectors
> 0 1 1 03h 4-kB sectors at top
> with remainder 256-kB sectors
> 1 0 1 05h Uniform 256-kB
> sectors
> Once one of the combination programmed. Sector Map Parameter Table help
> with type of erase supported.
>
> My requirement is for setting flash in particular configuration i.e. "05" -->
> Uniform 256-kb. This requirement is getting met with existing patch.
> I don’t want "uniform 256-kb" as default in spi-nor.c as different user may have
> different requirements.
> How to achieve this? Device tree ??
>
Flashes has different layout based on configuration. For e.g. Spansion S25FS supports 3 layout.
Same has been explained in previous mail.
I have requirement of selecting a particular layout of flash. I don’t want to fix/hardcode flash layout in spi-nor.c.
This means layout info should come from defconfig or device tree.
Do we have any such device tree binding available for flash.
--pk
More information about the linux-mtd
mailing list