[PATCH v4 0/2] mtd: spi-nor: Fix SST AAI write mode

Sanjaikumar V S
2026-03-11T10:31:21Z

From: Sanjaikumar V S <sanjaikumar.vs@dicortech.com>

This patch series addresses two distinct problems affecting SST flash
Auto Address Increment write functionality:

1. When writes begin at odd addresses, a single byte is programmed first
using byte program command, which clears the Write Enable Latch. The
driver fails to re-enable writes before the AAI sequence.

2. When the SPI controller lacks direct mapping support, the fallback
path uses a probe-time operation template with standard page program
opcodes instead of AAI opcodes.

Changes in v4:
- Resent as new thread (v3 was incorrectly sent as reply to v2)
- Patch 2/2: Added Fixes tag

Changes in v3:
- Patch 1/2: Use local boolean 'needs_write_enable' for clarity as
suggested by Michael Walle
- Patch 1/2: Improved comment explaining the fix
- Patch 1/2: Added Fixes tag

Changes in v2:
- Split fixes into separate patches
- Added detailed commit messages

Sanjaikumar V S (2):
mtd: spi-nor: sst: Fix write enable before AAI sequence
mtd: spi-nor: core: Fix AAI mode when dirmap is not available

drivers/mtd/spi-nor/core.c | 2 +-
drivers/mtd/spi-nor/sst.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)

--
2.43.0