public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mtd: spi-nor: Fix SST AAI write mode
@ 2026-02-20  9:42 Sanjaikumar V S
  2026-02-20  9:42 ` [PATCH v2 1/2] mtd: spi-nor: sst: Fix write enable before AAI sequence Sanjaikumar V S
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sanjaikumar V S @ 2026-02-20  9:42 UTC (permalink / raw)
  To: linux-mtd
  Cc: tudor.ambarus, pratyush, mwalle, miquel.raynal, richard, vigneshr,
	linux-kernel, Sanjaikumar V S

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

This series fixes SST flash AAI (Auto Address Increment) write mode,
which was broken due to two issues:

1. When writing starts at an odd address, a single byte is programmed
   first using the byte program (BP) command. The flash hardware clears
   the Write Enable Latch (WEL) after this operation, but the driver
   did not re-enable writes before starting the AAI sequence.

2. When the SPI controller does not support direct mapping (nodirmap=true),
   the write path falls back to using an operation template created at
   probe time. This template has the standard page program opcode, not
   the AAI opcode, causing AAI writes to fail.

Tested on SST25VF016B with i.MX8X running linux-imx 5.15.71.
The conditional write enable (only when AAI follows) is based on
code analysis and not runtime tested.

v2: Resend with corrected maintainer email addresses

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  | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-03-13 13:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20  9:42 [PATCH v2 0/2] mtd: spi-nor: Fix SST AAI write mode Sanjaikumar V S
2026-02-20  9:42 ` [PATCH v2 1/2] mtd: spi-nor: sst: Fix write enable before AAI sequence Sanjaikumar V S
2026-02-23  8:18   ` Michael Walle
2026-02-23  9:17     ` Sanjaikumar V S
2026-02-23  9:29       ` Michael Walle
2026-03-06 22:36         ` Hendrik Donner
2026-03-13 11:46           ` Pratyush Yadav
2026-03-13 12:50             ` Hendrik Donner
2026-03-13 13:39               ` Pratyush Yadav
2026-02-20  9:42 ` [PATCH v2 2/2] mtd: spi-nor: core: Fix AAI mode when dirmap is not available Sanjaikumar V S
2026-02-23 10:17 ` [PATCH v3 0/2] mtd: spi-nor: Fix SST AAI write mode Sanjaikumar V S
2026-02-23 10:17   ` [PATCH v3 1/2] mtd: spi-nor: sst: Fix write enable before AAI sequence Sanjaikumar V S
2026-02-23 10:17   ` [PATCH v3 2/2] mtd: spi-nor: core: Fix AAI mode when dirmap is not available Sanjaikumar V S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox