Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mtd: nand: spi: fmsh: add FM25S01 support
@ 2026-12-01 17:51 Florian Fainelli
  2026-12-02  9:39 ` Jie Feng
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2026-12-01 17:51 UTC (permalink / raw)
  To: linux-mtd
  Cc: bcm-kernel-feedback-list, David Regan, Florian Fainelli,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, open list

From: David Regan <david.regan@broadcom.com>

Add support for the FM25S01, identified by device ID 0xa1. It has the
same manufacturer ID, read/write/update cache variants, 1 Gbit array
organization and 1 bit/512 bytes ECC requirement as the already
supported FM25S01A, but has a 128 byte OOB area per page instead of 64
bytes.

Unlike FM25S01A it exposes an ECC OOB region (64/64 split with the ECC
bytes in the upper half). This is the same layout as FM25G01B, so reuse
fm25g01b_ooblayout.

Signed-off-by: David Regan <david.regan@broadcom.com>
[florian: commit message]
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
Changes in v2:

- re-use fm25g01b_ooblayout rather than create a new one
- update commit message description to be more specific about the
  device's geometry

 drivers/mtd/nand/spi/fmsh.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mtd/nand/spi/fmsh.c b/drivers/mtd/nand/spi/fmsh.c
index 6352e9c9e502..a2bdf3a44503 100644
--- a/drivers/mtd/nand/spi/fmsh.c
+++ b/drivers/mtd/nand/spi/fmsh.c
@@ -216,6 +216,15 @@ static const struct spinand_info fmsh_spinand_table[] = {
 		     SPINAND_HAS_QE_BIT,
 		     SPINAND_ECCINFO(&fm25g01b_ooblayout,
 				     fm25g01b_ecc_get_status)),
+	SPINAND_INFO("FM25S01",
+		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xa1),
+		     NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),
+		     NAND_ECCREQ(1, 512),
+		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+					      &write_cache_variants,
+					      &update_cache_variants),
+		     0,
+		     SPINAND_ECCINFO(&fm25g01b_ooblayout, NULL)),
 	SPINAND_INFO("FM25S01A",
 		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE4),
 		     NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
-- 
2.34.1


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

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

* Re: [PATCH v2] mtd: nand: spi: fmsh: add FM25S01 support
  2026-12-01 17:51 [PATCH v2] mtd: nand: spi: fmsh: add FM25S01 support Florian Fainelli
@ 2026-12-02  9:39 ` Jie Feng
  2026-12-04 21:32   ` Miquel Raynal
  0 siblings, 1 reply; 4+ messages in thread
From: Jie Feng @ 2026-12-02  9:39 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-mtd, bcm-kernel-feedback-list, David Regan, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, open list

On Wed, 2 Dec 2026 at 17:33, Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> From: David Regan <david.regan@broadcom.com>
>
> Add support for the FM25S01, identified by device ID 0xa1. It has the
> same manufacturer ID, read/write/update cache variants, 1 Gbit array
> organization and 1 bit/512 bytes ECC requirement as the already
> supported FM25S01A, but has a 128 byte OOB area per page instead of 64
> bytes.
>
> Unlike FM25S01A it exposes an ECC OOB region (64/64 split with the ECC
> bytes in the upper half). This is the same layout as FM25G01B, so reuse
> fm25g01b_ooblayout.
>
> Signed-off-by: David Regan <david.regan@broadcom.com>
> [florian: commit message]
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
> Changes in v2:
>
> - re-use fm25g01b_ooblayout rather than create a new one
> - update commit message description to be more specific about the
>   device's geometry
>
>  drivers/mtd/nand/spi/fmsh.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/mtd/nand/spi/fmsh.c b/drivers/mtd/nand/spi/fmsh.c
> index 6352e9c9e502..a2bdf3a44503 100644
> --- a/drivers/mtd/nand/spi/fmsh.c
> +++ b/drivers/mtd/nand/spi/fmsh.c
> @@ -216,6 +216,15 @@ static const struct spinand_info fmsh_spinand_table[] = {
>                      SPINAND_HAS_QE_BIT,
>                      SPINAND_ECCINFO(&fm25g01b_ooblayout,
>                                      fm25g01b_ecc_get_status)),
> +       SPINAND_INFO("FM25S01",
> +                    SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xa1),
> +                    NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),
> +                    NAND_ECCREQ(1, 512),
> +                    SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> +                                             &write_cache_variants,
> +                                             &update_cache_variants),
> +                    0,
> +                    SPINAND_ECCINFO(&fm25g01b_ooblayout, NULL)),
>         SPINAND_INFO("FM25S01A",
>                      SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE4),
>                      NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
> --
> 2.34.1
Interesting, I have the same patch, byte for byte at:
https://lore.kernel.org/linux-mtd/20261123165702.641230-1-hjf3108@gmail.com/

Reviewed-by: Ho Jie Feng <hjf3108@gmail.com>
Tested-by: Ho Jie Feng <hjf3108@gmail.com>


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

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

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

* Re: [PATCH v2] mtd: nand: spi: fmsh: add FM25S01 support
  2026-12-02  9:39 ` Jie Feng
@ 2026-12-04 21:32   ` Miquel Raynal
  2026-12-04 21:34     ` Florian Fainelli
  0 siblings, 1 reply; 4+ messages in thread
From: Miquel Raynal @ 2026-12-04 21:32 UTC (permalink / raw)
  To: Jie Feng
  Cc: Florian Fainelli, linux-mtd, bcm-kernel-feedback-list,
	David Regan, Richard Weinberger, Vignesh Raghavendra, open list


> Interesting, I have the same patch, byte for byte at:
> https://lore.kernel.org/linux-mtd/20261123165702.641230-1-hjf3108@gmail.com/

Since I was happy with the patch from Jie Feng that was earlier in my
list (in order), I took his, but thanks a lot for the contribution!

Cheers,
Miquèl

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

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

* Re: [PATCH v2] mtd: nand: spi: fmsh: add FM25S01 support
  2026-12-04 21:32   ` Miquel Raynal
@ 2026-12-04 21:34     ` Florian Fainelli
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2026-12-04 21:34 UTC (permalink / raw)
  To: Miquel Raynal, Jie Feng
  Cc: linux-mtd, bcm-kernel-feedback-list, David Regan,
	Richard Weinberger, Vignesh Raghavendra, open list

On 12/4/26 13:32, Miquel Raynal wrote:
> 
>> Interesting, I have the same patch, byte for byte at:
>> https://lore.kernel.org/linux-mtd/20261123165702.641230-1-hjf3108@gmail.com/
> 
> Since I was happy with the patch from Jie Feng that was earlier in my
> list (in order), I took his, but thanks a lot for the contribution!

Yes all good, I had not found Jie's patch before. Thank you both!
-- 
Florian

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

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

end of thread, other threads:[~2026-12-04 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 17:51 [PATCH v2] mtd: nand: spi: fmsh: add FM25S01 support Florian Fainelli
2026-12-02  9:39 ` Jie Feng
2026-12-04 21:32   ` Miquel Raynal
2026-12-04 21:34     ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox