[PATCH v2 0/3] mtd: spi-nor: winbond: Fix protection handling

Eliav Farber farbere at amazon.com
Wed Feb 18 06:35:20 PST 2026


This series fixes block protection handling for the following Winbond
SPI-NOR devices:
 - w25q256jwm
 - w25q256jw
 - w25q64jvm

The devices do not correctly describe their Status Register layout and
protection capabilities (locking flags, TB bit, BP bit configuration).
As a result, the spi-nor core rejects protection requests and locking
operations fail with -EINVAL, e.g.:

  flash_lock -l /dev/mtd29
  flash_lock: error!: could not lock device: /dev/mtd29
  error 22 (Invalid argument)

Update the device flags to match the actual hardware behavior so that
locking and unlocking regions work correctly.

All changes were validated using flash_lock on the affected devices.

Changes in v2:
- Remove last patch in series that added dual/quad read for w25q64jvm
- Added Minimum testing requirements for w25q256jwm and w25q64jvm

Eliav Farber (3):
  mtd: spi-nor: winbond: Fix locking support for w25q256jwm
  mtd: spi-nor: winbond: Fix locking support for w25q256jw
  mtd: spi-nor: winbond: Fix locking support for w25q64jvm

 drivers/mtd/spi-nor/winbond.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.47.3




More information about the linux-mtd mailing list