[PATCH v2 0/4] mtd: spi-nor: macronix: Improve general support
From: Miquel Raynal
Date: Thu Nov 26 2026 - 08:42:49 EST
There are multiple ongoing issues with the current state of the Macronix
vendor driver:
- wrong RDCR opcode in general
- erroneous QER handling
- issues with locking
This series aims at fixing all those open points. One reason they have
stayed for so long, is because there was no easy way to define a clean
per-vendor RDCR opcode nor to easily hook fixups to JEDEC IDs *and*
extra conditions. This is all possible now thanks to the recently merged
heavy QER handling rework, so let's use these capabilities.
Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
Changes in v2:
- Also prevent 2-byte wide SR writes in patch 1.
- Replace patch 2 (no longer relevant) and instead drop the redundant QE
setting (also redundant now).
- Clear the RDCR opcode and the 16-bit write that SFDP restores for
parts whose BFPT reports QER_NONE.
- Use a local buffer when reading SR2 (to avoid overlapping memcpy()'s,
see Sashiko complaint).
- Link to v1: https://lore.kernel.org/r/20261125-macronix-upstreaming-spi-nor-cleanup-v1-0-0d1ab783fd8b@xxxxxxxxxxx
---
Miquel Raynal (4):
mtd: spi-nor: macronix: Clear the default RDCR opcode
mtd: spi-nor: macronix: Drop redundant MX25L3255E QE settings
mtd: spi-nor: macronix: Enable RDCR for the parts that support it
mtd: spi-nor: macronix: Describe locking support for MX25L51245G
drivers/mtd/spi-nor/macronix.c | 120 +++++++++++++++++++++++++++++++++++------
1 file changed, 103 insertions(+), 17 deletions(-)
---
base-commit: 19d1b4de6d37bccecc3ad9144d279f1baa405eb1
change-id: 20261125-macronix-upstreaming-spi-nor-cleanup-a08351bbe71d
Best regards,
--
Miquel Raynal <miquel.raynal@xxxxxxxxxxx>