* [PATCH] mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information
@ 2026-11-08 19:25 ` Archit More
0 siblings, 0 replies; 4+ messages 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 related [flat|nested] 4+ messages in thread* [PATCH] mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information
@ 2026-11-08 19:25 ` Archit More
0 siblings, 0 replies; 4+ messages 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
______________________________________________________
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] mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information
2026-11-08 19:25 ` Archit More
@ 2026-11-20 13:01 ` Michael Walle
-1 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2026-11-20 13:01 UTC (permalink / raw)
To: Archit More, Pratyush Yadav; +Cc: linux-mtd, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 577 bytes --]
Hi,
On Sun Nov 8, 2026 at 8:25 PM CET, Archit More wrote:
> 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.
Did you test this? We have a requirement for that, see [1].
-michael
[1] https://docs.kernel.org/driver-api/mtd/spi-nor.html
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 144 bytes --]
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information
@ 2026-11-20 13:01 ` Michael Walle
0 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2026-11-20 13:01 UTC (permalink / raw)
To: Archit More, Pratyush Yadav; +Cc: linux-mtd, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
Hi,
On Sun Nov 8, 2026 at 8:25 PM CET, Archit More wrote:
> 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.
Did you test this? We have a requirement for that, see [1].
-michael
[1] https://docs.kernel.org/driver-api/mtd/spi-nor.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-20 13:01 UTC | newest]
Thread overview: 4+ messages (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
2026-11-08 19:25 ` Archit More
2026-11-20 13:01 ` Michael Walle
2026-11-20 13:01 ` Michael Walle
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.