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

From: Cheng Ming Lin

Date: Thu Nov 26 2026 - 00:25:56 EST


Hi Miquel,

On Wed, Nov 25, 2026 at 07:01:35PM +0100, Miquel Raynal wrote:
> The MX25L3255E BFPT table is incorrect which leads to the RDCR opcode to
> be reset. Make sure the configuration for this chip remains correct.

I think this patch is not needed.

The MX25L3255E BFPT is JESD216 rev 0, its parameter table length is
0x09 DWORDs (see Table 9, offset 0Bh, on page 64 of the datasheet [1]).
spi_nor_parse_bfpt() returns before touching the SR opcodes and the
QE mask in this case:

/* Stop here if not JESD216 rev A or later. */
if (bfpt_header->length == BFPT_DWORD_MAX_JESD216)
return spi_nor_post_bfpt_fixups(nor, bfpt_header, &bfpt);

Since macronix_nor_default_init() now always runs before
spi_nor_parse_sfdp(), the read_sr2 = 0 set in patch 1 is kept for
this part. So the BFPT is not incorrect, it just predates the QER
field.

> params->qe_mask[0] = BIT(6);
> params->qe_mask[1] = 0;
> + params->opcodes.read_sr2 = 0;

The same is true for the qe_mask lines above. They were only needed
because the old spi_nor_init_params() did not call the manufacturer
default_init() when SFDP was required. With the reworked init flow
they can be dropped too, and only the 1-4-4 PP part needs to stay.

[1] https://media.digikey.com/pdf/data%20sheets/macronix/mx25l3255e.pdf

Thanks,
Cheng Ming Lin