All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: winbond: Drop octal PP support for W25Q256JW
@ 2026-12-02 14:51 Paul Cercueil
  2026-12-02 15:19 ` Nuno Sá
  2026-12-02 16:05 ` Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Cercueil @ 2026-12-02 14:51 UTC (permalink / raw)
  To: Pratyush Yadav, Michael Walle, Takahiro Kuwano, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra
  Cc: Nuno Sá, linux-mtd, Thomas Petazzoni, Paul Cercueil

The W25Q256JW reports support for octal page program in its SFDP but
does not actually support it, according to my own tests as well as the
datasheet.

Fixes: 68d7115d77a8 ("mtd: spi-nor: sfdp: get the 1-1-8 and 1-8-8 page programs from 4BAIT")
Signed-off-by: Paul Cercueil <paul.cercueil@bootlin.com>
---
 drivers/mtd/spi-nor/winbond.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 51f6bcd3f8e5..5ca88749eaaa 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -147,6 +147,20 @@ static const struct spi_nor_fixups w25q256_fixups = {
 	.post_bfpt = w25q256_post_bfpt_fixups,
 };
 
+static int w25q256jw_post_sfdp_fixups(struct spi_nor *nor)
+{
+	struct spi_nor_flash_parameter *p = nor->params;
+
+	/* W25Q256JW advertises octal page program but doesn't actually support it */
+	p->hwcaps.mask &= ~SNOR_HWCAPS_PP_OCTAL;
+
+	return 0;
+}
+
+static const struct spi_nor_fixups w25q256jw_fixups = {
+	.post_sfdp = w25q256jw_post_sfdp_fixups,
+};
+
 /**
  * winbond_nor_select_die() - Set active die.
  * @nor:	pointer to 'struct spi_nor'.
@@ -667,6 +681,7 @@ static const struct spi_nor_fixup winbond_fixups[] = {
 	{ .fixups = &winbond_nor_fixups },
 	{ .id = SNOR_ID(0xef, 0x40, 0x18), .fixups = &w25q128_fixups },
 	{ .id = SNOR_ID(0xef, 0x40, 0x19), .fixups = &w25q256_fixups },
+	{ .id = SNOR_ID(0xef, 0x60, 0x19), .fixups = &w25q256jw_fixups },
 	{ .id = SNOR_ID(0xef, 0x40), .match = winbond_rv_match,
 	  .fixups = &winbond_nor_partname_fixups },
 	{ .id = SNOR_ID(0xef, 0x40, 0x21), .match = winbond_jv_match,
-- 
2.47.3


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

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

end of thread, other threads:[~2026-12-02 16:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 14:51 [PATCH] mtd: spi-nor: winbond: Drop octal PP support for W25Q256JW Paul Cercueil
2026-12-02 15:19 ` Nuno Sá
2026-12-02 16:05 ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.