2024-04-05 10:02:36

by FLAVIO SULIGOI

[permalink] [raw]
Subject: [PATCH 1/1] mtd: spi-nor: everspin: add em004lxb entry

Add the Everspin EM0004LXB 4Mb (512KB) Industrial STT-MRAM Persistent
Memory.
This device is JEDEC compatible (JESD251 and JESD251-1), but it is not
able to provide SFDP information.

Link: https://www.everspin.com/file/158244/download

Signed-off-by: Flavio Suligoi <[email protected]>
---
drivers/mtd/spi-nor/everspin.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/mtd/spi-nor/everspin.c b/drivers/mtd/spi-nor/everspin.c
index 5f321e24ae7d..4741930ce9a8 100644
--- a/drivers/mtd/spi-nor/everspin.c
+++ b/drivers/mtd/spi-nor/everspin.c
@@ -31,6 +31,14 @@ static const struct flash_info everspin_nor_parts[] = {
.size = SZ_512K,
.sector_size = SZ_512K,
.flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
+ }, {
+ .id = SNOR_ID(0x6b, 0xbb, 0x13),
+ .name = "em004lxb",
+ .size = SZ_512K,
+ .sector_size = SZ_512K,
+ .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR | SPI_NOR_HAS_LOCK |
+ SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6,
+ .no_sfdp_flags = SPI_NOR_SKIP_SFDP,
}
};

--
2.34.1



2024-04-05 13:08:06

by Francesco Dolcini

[permalink] [raw]
Subject: Re: [PATCH 1/1] mtd: spi-nor: everspin: add em004lxb entry

Hello Flavio, thanks for your patch.

On Fri, Apr 05, 2024 at 12:01:04PM +0200, Flavio Suligoi wrote:
> Add the Everspin EM0004LXB 4Mb (512KB) Industrial STT-MRAM Persistent
> Memory.
> This device is JEDEC compatible (JESD251 and JESD251-1), but it is not
> able to provide SFDP information.
>
> Link: https://www.everspin.com/file/158244/download
>
No empty lines in-between tags

> Signed-off-by: Flavio Suligoi <[email protected]>

Francesco

2024-04-05 14:43:46

by Michael Walle

[permalink] [raw]
Subject: Re: [PATCH 1/1] mtd: spi-nor: everspin: add em004lxb entry

Hi Flavio,

On Fri Apr 5, 2024 at 12:01 PM CEST, Flavio Suligoi wrote:
> Add the Everspin EM0004LXB 4Mb (512KB) Industrial STT-MRAM Persistent
> Memory.
> This device is JEDEC compatible (JESD251 and JESD251-1), but it is not
> able to provide SFDP information.

Did you try the at25 driver if it will fit your usecase? Judging
from your last response, it sounds like it will do.

>
> Link: https://www.everspin.com/file/158244/download
>
> Signed-off-by: Flavio Suligoi <[email protected]>
> ---
> drivers/mtd/spi-nor/everspin.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/everspin.c b/drivers/mtd/spi-nor/everspin.c
> index 5f321e24ae7d..4741930ce9a8 100644
> --- a/drivers/mtd/spi-nor/everspin.c
> +++ b/drivers/mtd/spi-nor/everspin.c
> @@ -31,6 +31,14 @@ static const struct flash_info everspin_nor_parts[] = {
> .size = SZ_512K,
> .sector_size = SZ_512K,
> .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
> + }, {
> + .id = SNOR_ID(0x6b, 0xbb, 0x13),
> + .name = "em004lxb",
> + .size = SZ_512K,
> + .sector_size = SZ_512K,
> + .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR | SPI_NOR_HAS_LOCK |

Will it also work without SPI_NOR_NO_ERASE? Also, the flash supports
fast read, so drop NO_FR. Also, please have a look at [1] for the
testing requirements.

Thanks.
-michael

> + SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6,
> + .no_sfdp_flags = SPI_NOR_SKIP_SFDP,
> }
> };
>

[1] https://docs.kernel.org/driver-api/mtd/spi-nor.html


Attachments:
signature.asc (305.00 B)

2024-04-09 12:08:42

by FLAVIO SULIGOI

[permalink] [raw]
Subject: RE: EXTERNAL: Re: [PATCH 1/1] mtd: spi-nor: everspin: add em004lxb entry

Hi Michael,

...

> Hi Flavio,
>
> On Fri Apr 5, 2024 at 12:01 PM CEST, Flavio Suligoi wrote:
> > Add the Everspin EM0004LXB 4Mb (512KB) Industrial STT-MRAM Persistent
> > Memory.
> > This device is JEDEC compatible (JESD251 and JESD251-1), but it is not
> > able to provide SFDP information.
>
> Did you try the at25 driver if it will fit your usecase? Judging from
> your last response, it sounds like it will do.

Yes, you are right, it works with at25 driver!
Thanks!

At the moment I have to use a page size of 256 bytes, using "atmel,at25".
Since the Everspin EM0004LXB MRAM doesn't have problem with any page size
(theoretically I could use a single page size of 512KB), can I update the
at25.c driver with a support for the EM0004LXB MRAM, as already done for
the Cypress fm25 F-RAM?

>
> >
> > Link: https://www.everspin.com/file/158244/download
> >
> > Signed-off-by: Flavio Suligoi <[email protected]>
> > ---
> > drivers/mtd/spi-nor/everspin.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/mtd/spi-nor/everspin.c
> > b/drivers/mtd/spi-nor/everspin.c index 5f321e24ae7d..4741930ce9a8
> > 100644
> > --- a/drivers/mtd/spi-nor/everspin.c
> > +++ b/drivers/mtd/spi-nor/everspin.c
> > @@ -31,6 +31,14 @@ static const struct flash_info everspin_nor_parts[]
> = {
> > .size = SZ_512K,
> > .sector_size = SZ_512K,
> > .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
> > + }, {
> > + .id = SNOR_ID(0x6b, 0xbb, 0x13),
> > + .name = "em004lxb",
> > + .size = SZ_512K,
> > + .sector_size = SZ_512K,
> > + .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR | SPI_NOR_HAS_LOCK
> |
>
> Will it also work without SPI_NOR_NO_ERASE? Also, the flash supports
> fast read, so drop NO_FR. Also, please have a look at [1] for the
> testing requirements.
>
> Thanks.
> -michael
>
> > + SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6,
> > + .no_sfdp_flags = SPI_NOR_SKIP_SFDP,
> > }
> > };
> >
>
> [1] https://docs.kernel.org/driver-api/mtd/spi-nor.html

Thanks and best regards,
Flavio

2024-04-09 12:27:49

by FLAVIO SULIGOI

[permalink] [raw]
Subject: RE: EXTERNAL: Re: [PATCH 1/1] mtd: spi-nor: everspin: add em004lxb entry

Hi Francesco,
..

> Hello Flavio, thanks for your patch.
>
> On Fri, Apr 05, 2024 at 12:01:04PM +0200, Flavio Suligoi wrote:
> > Add the Everspin EM0004LXB 4Mb (512KB) Industrial STT-MRAM Persistent
> > Memory.
> > This device is JEDEC compatible (JESD251 and JESD251-1), but it is not
> > able to provide SFDP information.
> >
> > Link:
> > https://urldefense.com/v3/__https://www.everspin.com/file/158244/downl
> > oad__;!!JhrIYaSK6lFZ!tWeIxTcqY-RFxb9oTGXkVDvdN3bGApINZBts9sSPv-AIlH7r2
> > xf0to_QuyONQPwOICeq6hrz5Ia-1e6vT1VfaA$
> >
> No empty lines in-between tags

Thanks for your observation, right!

>
> > Signed-off-by: Flavio Suligoi <[email protected]>
>
> Francesco

Flavio

2024-04-09 13:23:15

by Michael Walle

[permalink] [raw]
Subject: Re: EXTERNAL: Re: [PATCH 1/1] mtd: spi-nor: everspin: add em004lxb entry

Hi,

On Tue Apr 9, 2024 at 2:07 PM CEST, FLAVIO SULIGOI wrote:
> > On Fri Apr 5, 2024 at 12:01 PM CEST, Flavio Suligoi wrote:
> > > Add the Everspin EM0004LXB 4Mb (512KB) Industrial STT-MRAM Persistent
> > > Memory.
> > > This device is JEDEC compatible (JESD251 and JESD251-1), but it is not
> > > able to provide SFDP information.
> >
> > Did you try the at25 driver if it will fit your usecase? Judging from
> > your last response, it sounds like it will do.
>
> Yes, you are right, it works with at25 driver!
> Thanks!

Good news :)

> At the moment I have to use a page size of 256 bytes, using "atmel,at25".
> Since the Everspin EM0004LXB MRAM doesn't have problem with any page size
> (theoretically I could use a single page size of 512KB), can I update the
> at25.c driver with a support for the EM0004LXB MRAM, as already done for
> the Cypress fm25 F-RAM?

Feel free to propose a patch. Keep in mind that it is another ML and
maintainer. Just use get_maintainer.pl. Keep me on CC if you like.

-michael

> >
> > >
> > > Link: https://www.everspin.com/file/158244/download
> > >
> > > Signed-off-by: Flavio Suligoi <[email protected]>
> > > ---
> > > drivers/mtd/spi-nor/everspin.c | 8 ++++++++
> > > 1 file changed, 8 insertions(+)
> > >
> > > diff --git a/drivers/mtd/spi-nor/everspin.c
> > > b/drivers/mtd/spi-nor/everspin.c index 5f321e24ae7d..4741930ce9a8
> > > 100644
> > > --- a/drivers/mtd/spi-nor/everspin.c
> > > +++ b/drivers/mtd/spi-nor/everspin.c
> > > @@ -31,6 +31,14 @@ static const struct flash_info everspin_nor_parts[]
> > = {
> > > .size = SZ_512K,
> > > .sector_size = SZ_512K,
> > > .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
> > > + }, {
> > > + .id = SNOR_ID(0x6b, 0xbb, 0x13),
> > > + .name = "em004lxb",
> > > + .size = SZ_512K,
> > > + .sector_size = SZ_512K,
> > > + .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR | SPI_NOR_HAS_LOCK
> > |
> >
> > Will it also work without SPI_NOR_NO_ERASE? Also, the flash supports
> > fast read, so drop NO_FR. Also, please have a look at [1] for the
> > testing requirements.
> >
> > Thanks.
> > -michael
> >
> > > + SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6,
> > > + .no_sfdp_flags = SPI_NOR_SKIP_SFDP,
> > > }
> > > };
> > >
> >
> > [1] https://docs.kernel.org/driver-api/mtd/spi-nor.html
>
> Thanks and best regards,
> Flavio


Attachments:
signature.asc (305.00 B)

2024-04-09 13:55:44

by FLAVIO SULIGOI

[permalink] [raw]
Subject: RE: EXTERNAL: Re: [PATCH 1/1] mtd: spi-nor: everspin: add em004lxb entry

Hi Michael,

...
> On Tue Apr 9, 2024 at 2:07 PM CEST, FLAVIO SULIGOI wrote:
> > > On Fri Apr 5, 2024 at 12:01 PM CEST, Flavio Suligoi wrote:
> > > > Add the Everspin EM0004LXB 4Mb (512KB) Industrial STT-MRAM
> > > > Persistent Memory.
> > > > This device is JEDEC compatible (JESD251 and JESD251-1), but it is
> > > > not able to provide SFDP information.
> > >
> > > Did you try the at25 driver if it will fit your usecase? Judging
> > > from your last response, it sounds like it will do.
> >
> > Yes, you are right, it works with at25 driver!
> > Thanks!
>
> Good news :)
>
> > At the moment I have to use a page size of 256 bytes, using
> "atmel,at25".
> > Since the Everspin EM0004LXB MRAM doesn't have problem with any page
> > size (theoretically I could use a single page size of 512KB), can I
> > update the at25.c driver with a support for the EM0004LXB MRAM, as
> > already done for the Cypress fm25 F-RAM?
>
> Feel free to propose a patch. Keep in mind that it is another ML and
> maintainer. Just use get_maintainer.pl. Keep me on CC if you like.

Thanks for the suggestions!

...

Best regards,
Flavio