public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Sanjaikumar V S <sanjaikumarvs@gmail.com>
To: tudor.ambarus@linaro.org, pratyush@kernel.org, michael.walle@kernel.org
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	Sanjaikumar V S <sanjaikumar.vs@dicortech.com>
Subject: [PATCH 0/2] mtd: spi-nor: Fix SST AAI write mode
Date: Sun,  1 Feb 2026 16:58:15 +0000	[thread overview]
Message-ID: <20260201165817.53-1-sanjaikumar.vs@dicortech.com> (raw)

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.

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


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

             reply	other threads:[~2026-02-01 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-01 16:58 Sanjaikumar V S [this message]
2026-02-01 16:58 ` [PATCH 1/2] mtd: spi-nor: sst: Fix write enable before AAI sequence Sanjaikumar V S
2026-02-01 16:58 ` [PATCH 2/2] mtd: spi-nor: core: Fix AAI mode when dirmap is not available Sanjaikumar V S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260201165817.53-1-sanjaikumar.vs@dicortech.com \
    --to=sanjaikumarvs@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael.walle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=sanjaikumar.vs@dicortech.com \
    --cc=tudor.ambarus@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox