mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information
@ 2026-11-08 19:25 Archit More
  0 siblings, 0 replies; only message in thread
From: Archit More @ 2026-11-08 19:25 UTC (permalink / raw)
  To: Pratyush Yadav, Michael Walle; +Cc: linux-mtd, linux-kernel, Archit More

The W25Q512NW chips support standard Block Protection (BP0-BP3),
Top/Bottom selection (TB in Status Register 1 bit 6), and Complement
protection (CMP in Status Register 2 bit 6), matching the layout of
other NW-family parts (such as W25Q01NW and W25H512NW).

Add the missing flags so that software write protection and complement
features are properly enabled.

Signed-off-by: Archit More <architmore303@gmail.com>
---
 drivers/mtd/spi-nor/winbond.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 51f6bcd3f8e5..6ba1a137a549 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -406,6 +406,8 @@ static const struct flash_info winbond_nor_parts[] = {
 		/* W25Q512NW-Q/N */
 		.id = SNOR_ID(0xef, 0x60, 0x20),
 		.name = "w25q512nwq",
+		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 |
+			 SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP,
 		.otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
 	}, {
 		/* W25Q01NW-Q/N */
@@ -500,6 +502,8 @@ static const struct flash_info winbond_nor_parts[] = {
 		/* W25Q512NW-M */
 		.id = SNOR_ID(0xef, 0x80, 0x20),
 		.name = "w25q512nwm",
+		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6 |
+			 SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP,
 		.otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
 	}, {
 		/* W25Q01NW-M */
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-08 19:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 19:25 [PATCH] mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information Archit More

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

all inboxes | Powered by JetHome®