From: Pratyush Yadav <pratyush@kernel.org>
To: Haoyu Lu <hechushiguitu666@gmail.com>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>,
Pratyush Yadav <pratyush@kernel.org>,
Michael Walle <mwalle@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: micron-st: Enable die erase support for MT35XU02GCBA
Date: Mon, 30 Mar 2026 14:57:15 +0000 [thread overview]
Message-ID: <2vxz4ilxjrg4.fsf@kernel.org> (raw)
In-Reply-To: <20260323114636.2020-1-hechushiguitu666@gmail.com> (Haoyu Lu's message of "Mon, 23 Mar 2026 19:46:35 +0800")
On Mon, Mar 23 2026, Haoyu Lu wrote:
> From: "haoyu.lu" <hechushiguitu666@gmail.com>
>
> The MT35XU02GCBA flash device does not support chip erase according
> to its datasheet, but supports die erase. The existing code had a TODO
> comment noting that the SPI_NOR_IO_MODE_EN_VOLATILE flag probably needs
> to be enabled and the driver implementation needs to be converted to
> use die erase.
>
> This patch enables the SPI_NOR_IO_MODE_EN_VOLATILE flag and adds the
> mt35xu01gbba_fixups to the MT35XU02GCBA entry, which includes the
> micron_st_nor_two_die_late_init() function that sets up die erase
> support.
>
> With these changes, the flash device can properly use die erase
> operations instead of chip erase.
>
> Signed-off-by: haoyu.lu <hechushiguitu666@gmail.com>
> ---
> drivers/mtd/spi-nor/micron-st.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
> index 88033384a71e..4e8c6ef14697 100644
> --- a/drivers/mtd/spi-nor/micron-st.c
> +++ b/drivers/mtd/spi-nor/micron-st.c
> @@ -220,7 +220,8 @@ static const struct flash_info micron_nor_parts[] = {
> .size = SZ_256M,
> .no_sfdp_flags = SECT_4K | SPI_NOR_OCTAL_READ,
> .mfr_flags = USE_FSR,
Since the TODO comment is now resolved with this patch, please remove
it.
> - .fixup_flags = SPI_NOR_4B_OPCODES,
> + .fixup_flags = SPI_NOR_4B_OPCODES | SPI_NOR_IO_MODE_EN_VOLATILE,
> + .fixups = &mt35xu01gbba_fixups,
Also, rename mt35xu01gbba_fixups to something like "mt35_two_die_fixups"
so the naming isn't confusing.
With that,
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
> },
> };
--
Regards,
Pratyush Yadav
prev parent reply other threads:[~2026-03-30 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 11:46 [PATCH] mtd: spi-nor: micron-st: Enable die erase support for MT35XU02GCBA Haoyu Lu
2026-03-30 14:57 ` Pratyush Yadav [this message]
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=2vxz4ilxjrg4.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=hechushiguitu666@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@kernel.org \
--cc=richard@nod.at \
--cc=tudor.ambarus@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox