]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: spi-nor: winbond: Fix locking support for w25q256jw
authorEliav Farber <farbere@amazon.com>
Wed, 18 Feb 2026 14:35:22 +0000 (14:35 +0000)
committerPratyush Yadav (Google) <pratyush@kernel.org>
Mon, 30 Mar 2026 15:00:34 +0000 (15:00 +0000)
commit760e8c382c2de149b84e69fb60cccc32f6725a3f
treeb56eeceba5d645f4afb164e44d77d7434757cc94
parenta0f64241d3566a49c0a9b33ba7ae458ae22003a9
mtd: spi-nor: winbond: Fix locking support for w25q256jw

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>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
drivers/mtd/spi-nor/winbond.c