[PATCH] mtd: spi-nor: micron-st: Add support for mt25qu01g

Michael Walle michael at walle.cc
Tue Oct 24 02:26:21 PDT 2023


[+ Takahiro]

> Add support for the MT25QU01G 128MB Micron Serial NOR Flash Memory
> model.
> 
> Datasheet:
> https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-b/mt25q_qlkt_u_01g_bbb_0.pdf

As a "Link:" tag please.

Please also include a SFDP dump, see [1].

> Tested on a i.MX8MP based board:
> 
>  # dmesg | grep spi-nor
> [    1.854474] spi-nor spi0.0: mt25qu01g (131072 Kbytes)
> 
>  # cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 08000000 00001000 "30bb0000.spi"
> 
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
>  drivers/mtd/spi-nor/micron-st.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/micron-st.c 
> b/drivers/mtd/spi-nor/micron-st.c
> index 8920547c12bf..da2f8992bbc0 100644
> --- a/drivers/mtd/spi-nor/micron-st.c
> +++ b/drivers/mtd/spi-nor/micron-st.c
> @@ -429,6 +429,13 @@ static const struct flash_info st_nor_parts[] = {
>  			 SPI_NOR_BP3_SR_BIT6,
>  		.no_sfdp_flags = SECT_4K | SPI_NOR_QUAD_READ,
>  		.mfr_flags = USE_FSR,
> +	}, {
> +		.id = SNOR_ID(0x20, 0xbb, 0x21, 0x10, 0x44, 0x00),
> +		.name = "mt25qu01g",
> +		.size = SZ_128M,

Not needed, parsed by SFDP.

> +		.flags = NO_CHIP_ERASE,

Is it fair to assume that this is the usual case for multi die chips?
See also,
https://lore.kernel.org/linux-mtd/cover.1680849425.git.Takahiro.Kuwano@infineon.com/

So "if n_dice > 1" will implicitly be NO_CHIP_ERASE. n_dice should be
parsed from SFDP.

> +		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,

.no_sfdp_flags are legacy and shouldn't be used with new flashes.

> +		.mfr_flags = USE_FSR,
>  	}, {
>  		.id = SNOR_ID(0x20, 0xbb, 0x21),
>  		.name = "n25q00a",

-michael

[1] 
https://lore.kernel.org/all/4304e19f3399a0a6e856119d01ccabe0@walle.cc/



More information about the linux-mtd mailing list