mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information
Subsystems (2)
PATCH 1/1 mtd: spi-nor: winbond: W25Q512NW-Q/N/M: Fill locking information
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.
--- drivers/mtd/spi-nor/winbond.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/winbond.c +4 -0
@@ -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 */
Signature · 1 line
2.34.1
Michael Walle
maintainerHi,
Quoted 7 lines · 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.
Did you test this? We have a requirement for that, see [1].
-michael