linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mtd: spi-nor: Add support for s25fs128s
@ 2020-04-15  8:30 Yicong Yang
  2020-04-20 10:18 ` Tudor.Ambarus
  0 siblings, 1 reply; 6+ messages in thread
From: Yicong Yang @ 2020-04-15  8:30 UTC (permalink / raw)
  To: linux-mtd
  Cc: vigneshr, tudor.ambarus, richard, linuxarm, yangyicong, miquel.raynal

Add support for Cypress s25fs128s flash. Previously the flash is
decoded as s25fl129p1 by mistake.

Add it in the flash info list to correctly decode. No functional
changes. Further capability of the flash will be parsed from bfpt.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
---
Change since v1:
- rebase the patch on v5.7 rc1

 drivers/mtd/spi-nor/spansion.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 6756202..01640c1 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -29,6 +29,8 @@ static const struct flash_info spansion_parts[] = {
 	{ "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
 			      SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			      SPI_NOR_HAS_LOCK | USE_CLSR) },
+	{ "s25fs128s",  INFO6(0x012018, 0x4d0181, 64 * 1024, 256,
+		SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
 	{ "s25fs512s",  INFO6(0x010220, 0x4d0081, 256 * 1024, 256,
 			      SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
 			      USE_CLSR) },
--
2.8.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] mtd: spi-nor: Add support for s25fs128s
  2020-04-15  8:30 [PATCH v2] mtd: spi-nor: Add support for s25fs128s Yicong Yang
@ 2020-04-20 10:18 ` Tudor.Ambarus
  2020-04-20 11:05   ` Sergei Shtylyov
  2020-04-21  3:27   ` Yicong Yang
  0 siblings, 2 replies; 6+ messages in thread
From: Tudor.Ambarus @ 2020-04-20 10:18 UTC (permalink / raw)
  To: yangyicong; +Cc: richard, linux-mtd, vigneshr, linuxarm, miquel.raynal

On Wednesday, April 15, 2020 11:30:33 AM EEST Yicong Yang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> Add support for Cypress s25fs128s flash. Previously the flash is
> decoded as s25fl129p1 by mistake.
> 
> Add it in the flash info list to correctly decode. No functional
> changes. Further capability of the flash will be parsed from bfpt.
> 
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> ---
> Change since v1:
> - rebase the patch on v5.7 rc1
> 
>  drivers/mtd/spi-nor/spansion.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
> index 6756202..01640c1 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -29,6 +29,8 @@ static const struct flash_info spansion_parts[] = {
>         { "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
>                               SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
>                               SPI_NOR_HAS_LOCK | USE_CLSR) },
> +       { "s25fs128s",  INFO6(0x012018, 0x4d0181, 64 * 1024, 256,
> +               SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },

The flash should be named "s25fs128s1" - this would be the flavor with uniform 
64kB sectors. One should add a "s25fs128s0" entry for the flavor with uniform 
256kB sectors.

We usually don't add new flashes if they are not tested. Please specify in the 
commit message with which controller you tested the flash. The minimal test is 
a read, erase, read back, write and read back. This sequence should verify if 
read, erase and pp work fine.

Cheers,
ta


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] mtd: spi-nor: Add support for s25fs128s
  2020-04-20 10:18 ` Tudor.Ambarus
@ 2020-04-20 11:05   ` Sergei Shtylyov
  2020-04-20 12:51     ` Tudor.Ambarus
  2020-04-21  3:33     ` Yicong Yang
  2020-04-21  3:27   ` Yicong Yang
  1 sibling, 2 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2020-04-20 11:05 UTC (permalink / raw)
  To: Tudor.Ambarus, yangyicong
  Cc: richard, miquel.raynal, linux-mtd, vigneshr, linuxarm

On 20.04.2020 13:18, Tudor.Ambarus@microchip.com wrote:

>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
>> content is safe

    Hm?

>> Add support for Cypress s25fs128s flash. Previously the flash is
>> decoded as s25fl129p1 by mistake.
>>
>> Add it in the flash info list to correctly decode. No functional
>> changes. Further capability of the flash will be parsed from bfpt.
>>
>> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
>> ---
>> Change since v1:
>> - rebase the patch on v5.7 rc1
>>
>>   drivers/mtd/spi-nor/spansion.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
>> index 6756202..01640c1 100644
>> --- a/drivers/mtd/spi-nor/spansion.c
>> +++ b/drivers/mtd/spi-nor/spansion.c
>> @@ -29,6 +29,8 @@ static const struct flash_info spansion_parts[] = {
>>          { "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
>>                                SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
>>                                SPI_NOR_HAS_LOCK | USE_CLSR) },
>> +       { "s25fs128s",  INFO6(0x012018, 0x4d0181, 64 * 1024, 256,
>> +               SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> 
> The flash should be named "s25fs128s1" - this would be the flavor with uniform
> 64kB sectors. One should add a "s25fs128s0" entry for the flavor with uniform
> 256kB sectors.
> 
> We usually don't add new flashes if they are not tested. Please specify in the
> commit message with which controller you tested the flash. The minimal test is
> a read, erase, read back, write and read back. This sequence should verify if
> read, erase and pp work fine.

    This chip (as part of the S25FS-S family) most probably requires a 
post-BFPT fixup to make the writes work. I was going to post the patch adding 
this fixup for S25FS512S chip.

> Cheers,
> ta

MBR, Sergei

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] mtd: spi-nor: Add support for s25fs128s
  2020-04-20 11:05   ` Sergei Shtylyov
@ 2020-04-20 12:51     ` Tudor.Ambarus
  2020-04-21  3:33     ` Yicong Yang
  1 sibling, 0 replies; 6+ messages in thread
From: Tudor.Ambarus @ 2020-04-20 12:51 UTC (permalink / raw)
  To: linux-mtd
  Cc: vigneshr, sergei.shtylyov, richard, linuxarm, yangyicong, miquel.raynal

On Monday, April 20, 2020 2:05:29 PM EEST Sergei Shtylyov wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> On 20.04.2020 13:18, Tudor.Ambarus@microchip.com wrote:
> >> EXTERNAL EMAIL: Do not click links or open attachments unless you know
> >> the
> >> content is safe
> 
>     Hm?
> 

Please ignore. The mchp email server adds this message in the body of the 
messages received from people outside of the company. I see this so often that 
now I ignore it.

> >> Add support for Cypress s25fs128s flash. Previously the flash is
> >> decoded as s25fl129p1 by mistake.
> >> 
> >> Add it in the flash info list to correctly decode. No functional
> >> changes. Further capability of the flash will be parsed from bfpt.
> >> 
> >> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> >> ---
> >> Change since v1:
> >> - rebase the patch on v5.7 rc1
> >> 
> >>   drivers/mtd/spi-nor/spansion.c | 2 ++
> >>   1 file changed, 2 insertions(+)
> >> 
> >> diff --git a/drivers/mtd/spi-nor/spansion.c
> >> b/drivers/mtd/spi-nor/spansion.c index 6756202..01640c1 100644
> >> --- a/drivers/mtd/spi-nor/spansion.c
> >> +++ b/drivers/mtd/spi-nor/spansion.c
> >> @@ -29,6 +29,8 @@ static const struct flash_info spansion_parts[] = {
> >> 
> >>          { "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
> >>          
> >>                                SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> >>                                SPI_NOR_HAS_LOCK | USE_CLSR) },
> >> 
> >> +       { "s25fs128s",  INFO6(0x012018, 0x4d0181, 64 * 1024, 256,
> >> +               SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> > 
> > The flash should be named "s25fs128s1" - this would be the flavor with
> > uniform 64kB sectors. One should add a "s25fs128s0" entry for the flavor
> > with uniform 256kB sectors.
> > 
> > We usually don't add new flashes if they are not tested. Please specify in
> > the commit message with which controller you tested the flash. The
> > minimal test is a read, erase, read back, write and read back. This
> > sequence should verify if read, erase and pp work fine.
> 
>     This chip (as part of the S25FS-S family) most probably requires a
> post-BFPT fixup to make the writes work. I was going to post the patch
> adding this fixup for S25FS512S chip.
> 

Ok. Please add Yicong in cc or to.
Cheers,
ta



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] mtd: spi-nor: Add support for s25fs128s
  2020-04-20 10:18 ` Tudor.Ambarus
  2020-04-20 11:05   ` Sergei Shtylyov
@ 2020-04-21  3:27   ` Yicong Yang
  1 sibling, 0 replies; 6+ messages in thread
From: Yicong Yang @ 2020-04-21  3:27 UTC (permalink / raw)
  To: Tudor.Ambarus; +Cc: richard, linux-mtd, vigneshr, linuxarm, miquel.raynal

Hi Tudor,


On 2020/4/20 18:18, Tudor.Ambarus@microchip.com wrote:
> On Wednesday, April 15, 2020 11:30:33 AM EEST Yicong Yang wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
>> content is safe
>>
>> Add support for Cypress s25fs128s flash. Previously the flash is
>> decoded as s25fl129p1 by mistake.
>>
>> Add it in the flash info list to correctly decode. No functional
>> changes. Further capability of the flash will be parsed from bfpt.
>>
>> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
>> ---
>> Change since v1:
>> - rebase the patch on v5.7 rc1
>>
>>  drivers/mtd/spi-nor/spansion.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
>> index 6756202..01640c1 100644
>> --- a/drivers/mtd/spi-nor/spansion.c
>> +++ b/drivers/mtd/spi-nor/spansion.c
>> @@ -29,6 +29,8 @@ static const struct flash_info spansion_parts[] = {
>>         { "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
>>                               SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
>>                               SPI_NOR_HAS_LOCK | USE_CLSR) },
>> +       { "s25fs128s",  INFO6(0x012018, 0x4d0181, 64 * 1024, 256,
>> +               SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> The flash should be named "s25fs128s1" - this would be the flavor with uniform 
> 64kB sectors. One should add a "s25fs128s0" entry for the flavor with uniform 
> 256kB sectors.

Yes, it's right. I'll correct it in next version.


>
> We usually don't add new flashes if they are not tested. Please specify in the 
> commit message with which controller you tested the flash. The minimal test is 
> a read, erase, read back, write and read back. This sequence should verify if 
> read, erase and pp work fine.

Sorry for that. I'll mentioned the tests I've done in next version.

I've tested in SPI/Dual/Quad mode with our hisi-sfc-v3xx controller.
All the operations work well, but something wrong with Quad read and I'm managing to
figure it out.

Regards,
Yicong


>
> Cheers,
> ta
>
>


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] mtd: spi-nor: Add support for s25fs128s
  2020-04-20 11:05   ` Sergei Shtylyov
  2020-04-20 12:51     ` Tudor.Ambarus
@ 2020-04-21  3:33     ` Yicong Yang
  1 sibling, 0 replies; 6+ messages in thread
From: Yicong Yang @ 2020-04-21  3:33 UTC (permalink / raw)
  To: Sergei Shtylyov, Tudor.Ambarus
  Cc: richard, miquel.raynal, linux-mtd, vigneshr, linuxarm

Hi Sergei,


On 2020/4/20 19:05, Sergei Shtylyov wrote:
> On 20.04.2020 13:18, Tudor.Ambarus@microchip.com wrote:
>
>> The flash should be named "s25fs128s1" - this would be the flavor with uniform
>> 64kB sectors. One should add a "s25fs128s0" entry for the flavor with uniform
>> 256kB sectors.
>>
>> We usually don't add new flashes if they are not tested. Please specify in the
>> commit message with which controller you tested the flash. The minimal test is
>> a read, erase, read back, write and read back. This sequence should verify if
>> read, erase and pp work fine.
>
>    This chip (as part of the S25FS-S family) most probably requires a post-BFPT fixup to make the writes work. I was going to post the patch adding this fixup for S25FS512S chip.

Thanks for the information, I'll test whether s25fs128s1 needs this fixup with your patch.

Regards,
Yicong


>
>> Cheers,
>> ta
>
> MBR, Sergei
> .
>


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-21  3:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15  8:30 [PATCH v2] mtd: spi-nor: Add support for s25fs128s Yicong Yang
2020-04-20 10:18 ` Tudor.Ambarus
2020-04-20 11:05   ` Sergei Shtylyov
2020-04-20 12:51     ` Tudor.Ambarus
2020-04-21  3:33     ` Yicong Yang
2020-04-21  3:27   ` Yicong Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).