[PATCH 2/4] mtd: spi-nor: macronix: Clear the RDCR opcode on MX25L3255E

Miquel Raynal miquel.raynal at bootlin.com
Wed Nov 25 10:01:35 PST 2026


The MX25L3255E BFPT table is incorrect which leads to the RDCR opcode to
be reset. Make sure the configuration for this chip remains correct.

Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
 drivers/mtd/spi-nor/macronix.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c
index 2c6f507a2dde..0331f9f3f853 100644
--- a/drivers/mtd/spi-nor/macronix.c
+++ b/drivers/mtd/spi-nor/macronix.c
@@ -64,13 +64,14 @@ mx25l3255e_late_init_fixups(struct spi_nor *nor)
 	struct spi_nor_flash_parameter *params = nor->params;
 
 	/*
-	 * SFDP of MX25L3255E is JESD216, which does not include the Quad
-	 * Enable bit Requirement in BFPT. As a result, during BFPT parsing
-	 * the quad_enable mask is reset. Therefore, it is necessary to
-	 * correct this setting by late_init.
+	 * SFDP of MX25L3255E does not include the Quad Enable bit
+	 * Requirement in BFPT. As a result, during BFPT parsing the
+	 * quad_enable mask and RDCR opcode are reset. Ensure these
+	 * values remain valid.
 	 */
 	params->qe_mask[0] = BIT(6);
 	params->qe_mask[1] = 0;
+	params->opcodes.read_sr2 = 0;
 
 	/*
 	 * In addition, MX25L3255E also supports 1-4-4 page program in 3-byte

-- 
2.56.0




More information about the linux-mtd mailing list