All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliav Farber <farbere@amazon.com>
To: <tudor.ambarus@linaro.org>, <pratyush@kernel.org>,
	<mwalle@kernel.org>, <miquel.raynal@bootlin.com>,
	<richard@nod.at>, <vigneshr@ti.com>,
	<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Cc: <farbere@amazon.com>
Subject: [PATCH v2 2/3] mtd: spi-nor: winbond: Fix locking support for w25q256jw
Date: Wed, 18 Feb 2026 14:35:22 +0000	[thread overview]
Message-ID: <20260218143523.17467-3-farbere@amazon.com> (raw)
In-Reply-To: <20260218143523.17467-1-farbere@amazon.com>

The Winbond w25q256jw device:
 - Supports lock/unlock via SR.
 - Has Top/Bottom (TB) protect bit.
 - Uses Status Register bit 6 as the Top/Bottom (TB) protect bit.
 - Supports four Block Protect (BP) bits.

Update the flash parameters by enabling SPI_NOR_HAS_LOCK, SPI_NOR_HAS_TB,
SPI_NOR_TB_SR_BIT6 and SPI_NOR_4BIT_BP. Without these flags, the locking
configuration is incorrect.

Reference:
https://www.winbond.com/hq/support/documentation/levelOne.jsp?__locale=en&DocNo=DA00-W25Q256JW.1

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/mtd/spi-nor/winbond.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 55f1209936d5..6d325da121b4 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -274,6 +274,7 @@ static const struct flash_info winbond_nor_parts[] = {
 		.id = SNOR_ID(0xef, 0x60, 0x19),
 		.name = "w25q256jw",
 		.size = SZ_32M,
+		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 | SPI_NOR_4BIT_BP,
 		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
 	}, {
 		.id = SNOR_ID(0xef, 0x60, 0x20),
-- 
2.47.3


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

  parent reply	other threads:[~2026-02-18 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 14:35 [PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling Eliav Farber
2026-02-18 14:35 ` [PATCH v2 1/3] mtd: spi-nor: winbond: Fix locking support for w25q256jwm Eliav Farber
2026-02-18 14:35 ` Eliav Farber [this message]
2026-02-18 14:35 ` [PATCH v2 3/3] mtd: spi-nor: winbond: Fix locking support for w25q64jvm Eliav Farber
2026-02-19  7:51 ` [PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling Michael Walle
2026-02-19  8:59   ` Farber, Eliav
2026-02-19  9:05     ` Michael Walle
2026-03-30 14:10 ` Pratyush Yadav
2026-03-30 14:22   ` Miquel Raynal
2026-03-30 14:59     ` Pratyush Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260218143523.17467-3-farbere@amazon.com \
    --to=farbere@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.