[PATCH v4 26/28] mtd: spi-nor: winbond: W25QxxJV-Q/N/M: Fill locking information
Miquel Raynal <[email protected]> Tue, 04 Aug 2026 16:04:48 +0200
| Newsgroups | gmane.linux.kernel,gmane.linux.drivers.mtd |
|---|---|
| Message-ID | <20260804-winbond-v7-1-spi-nor-jv-cleanup-v4-26-ee3445066e4e@bootlin.com> |
I do not have any W25Q256JV-Q/N/M nor any W25Q16JV-M chips in hand, but all the other chips from this family have the same locking pattern, so we can reasonably expect that these chips follow the exact same rules. The CMP capability was historically not supported by non-SFDP chips, so a Winbond wide late hook already makes sure the bit remains disabled for them, for backward compatibility reasons. Signed-off-by: Miquel Raynal <[email protected]> --- drivers/mtd/spi-nor/winbond.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c index 5ab7f4860295..6b21fed74f4e 100644 --- a/drivers/mtd/spi-nor/winbond.c +++ b/drivers/mtd/spi-nor/winbond.c @@ -226,7 +226,8 @@ static const struct flash_info winbond_nor_parts[] = { .name = "w25q256", .size = SZ_32M, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, - .flags = SPI_NOR_QUAD_PP, + .flags = SPI_NOR_QUAD_PP | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | + SPI_NOR_TB_SR_BIT6 | SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP, .fixups = &w25q256_fixups, }, { /* W25Q512JV-Q/N */ @@ -306,7 +307,7 @@ static const struct flash_info winbond_nor_parts[] = { .name = "w25q16jv-im/jm", .size = SZ_2M, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, - .flags = SPI_NOR_QUAD_PP | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, + .flags = SPI_NOR_QUAD_PP | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_HAS_CMP, }, { /* W25Q32JV-M */ .id = SNOR_ID(0xef, 0x70, 0x16), @@ -332,7 +333,8 @@ static const struct flash_info winbond_nor_parts[] = { /* W25Q256JV-M */ .id = SNOR_ID(0xef, 0x70, 0x19), .name = "w25q256jvm", - .flags = SPI_NOR_QUAD_PP, + .flags = SPI_NOR_QUAD_PP | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | + SPI_NOR_TB_SR_BIT6 | SPI_NOR_4BIT_BP | SPI_NOR_HAS_CMP, }, { /* W25Q02JV-M */ .id = SNOR_ID(0xef, 0x70, 0x22), -- 2.54.0