All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Cheng Ming Lin <linchengming884@gmail.com>
Cc: Pratyush Yadav <pratyush@kernel.org>,
	 Michael Walle <mwalle@kernel.org>,
	 Takahiro Kuwano <takahiro.kuwano@infineon.com>,
	Richard Weinberger <richard@nod.at>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Alvin Zhou <alvinzhou@mxic.com.tw>,
	 linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mtd: spi-nor: macronix: Clear the RDCR opcode on MX25L3255E
Date: Thu, 26 Nov 2026 12:18:26 +0100	[thread overview]
Message-ID: <87qzg7x2m5.fsf@bootlin.com> (raw)
In-Reply-To: <20261126052524.1816136-1-chengminglin@mxic.com.tw> (Cheng Ming Lin's message of "Thu, 26 Nov 2026 13:25:24 +0800")

On 26/11/2026 at 13:25:24 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:

> 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.

Ah, great, I thought it was still the case, but that's good news.

I'll instead drop the QE mask then.

Thanks for the feedback!
Miquèl

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Cheng Ming Lin <linchengming884@gmail.com>
Cc: Pratyush Yadav <pratyush@kernel.org>,
	 Michael Walle <mwalle@kernel.org>,
	 Takahiro Kuwano <takahiro.kuwano@infineon.com>,
	Richard Weinberger <richard@nod.at>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Alvin Zhou <alvinzhou@mxic.com.tw>,
	 linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mtd: spi-nor: macronix: Clear the RDCR opcode on MX25L3255E
Date: Thu, 26 Nov 2026 12:18:26 +0100	[thread overview]
Message-ID: <87qzg7x2m5.fsf@bootlin.com> (raw)
In-Reply-To: <20261126052524.1816136-1-chengminglin@mxic.com.tw> (Cheng Ming Lin's message of "Thu, 26 Nov 2026 13:25:24 +0800")

On 26/11/2026 at 13:25:24 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:

> 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.

Ah, great, I thought it was still the case, but that's good news.

I'll instead drop the QE mask then.

Thanks for the feedback!
Miquèl

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

  reply	other threads:[~2026-11-26 11:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 18:01 [PATCH 0/4] mtd: spi-nor: macronix: Improve general support Miquel Raynal
2026-11-25 18:01 ` Miquel Raynal
2026-11-25 18:01 ` [PATCH 1/4] mtd: spi-nor: macronix: Clear the default RDCR opcode Miquel Raynal
2026-11-25 18:01   ` Miquel Raynal
2026-11-25 18:17   ` sashiko-bot
2026-11-26 11:40     ` Miquel Raynal
2026-11-25 18:01 ` [PATCH 2/4] mtd: spi-nor: macronix: Clear the RDCR opcode on MX25L3255E Miquel Raynal
2026-11-25 18:01   ` Miquel Raynal
2026-11-25 18:22   ` sashiko-bot
2026-11-26  5:25   ` Cheng Ming Lin
2026-11-26  5:25     ` Cheng Ming Lin
2026-11-26 11:18     ` Miquel Raynal [this message]
2026-11-26 11:18       ` Miquel Raynal
2026-11-25 18:01 ` [PATCH 3/4] mtd: spi-nor: macronix: Enable RDCR for the parts that support it Miquel Raynal
2026-11-25 18:01   ` Miquel Raynal
2026-11-25 18:01 ` [PATCH 4/4] mtd: spi-nor: macronix: Describe locking support for MX25L51245G Miquel Raynal
2026-11-25 18:01   ` Miquel Raynal
2026-11-25 18:25   ` sashiko-bot

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=87qzg7x2m5.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=alvinzhou@mxic.com.tw \
    --cc=linchengming884@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=takahiro.kuwano@infineon.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vigneshr@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.