[PATCH 3/4] mtd: spi-nor: micron-st: add mt35xu01gbba support

Bough Chen haibo.chen at nxp.com
Mon Nov 10 23:54:34 PST 2025


> -----Original Message-----
> From: Tudor Ambarus <tudor.ambarus at linaro.org>
> Sent: 2025年11月10日 14:42
> To: Bough Chen <haibo.chen at nxp.com>; Pratyush Yadav
> <pratyush at kernel.org>; Michael Walle <mwalle at kernel.org>; Miquel Raynal
> <miquel.raynal at bootlin.com>; Richard Weinberger <richard at nod.at>; Vignesh
> Raghavendra <vigneshr at ti.com>
> Cc: linux-mtd at lists.infradead.org; linux-kernel at vger.kernel.org;
> imx at lists.linux.dev
> Subject: Re: [PATCH 3/4] mtd: spi-nor: micron-st: add mt35xu01gbba support
> 
> 
> 
> On 11/10/25 6:02 AM, Haibo Chen wrote:
> > mt35xu01gbba is similar with mt35xu512aba, but with two dies.
> > SFDP contain the wrong size, so define the size dierctly in the flash
> > info. And it also support 8D-8D-8D mode, but SFDP lack
> > SNOR_F_IO_MODE_EN_VOLATILE, so add this fixup flags here.
> >
> > Link:
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdata
> >
> sheet.octopart.com%2FMT35XU02GCBA1G12-0AAT-Micron-datasheet-138896
> 808.
> >
> pdf&data=05%7C02%7Chaibo.chen%40nxp.com%7Cca28ca59a1734e70621908
> de2024
> >
> 464e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C6389835373320
> 21937%7
> >
> CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAw
> MCIsIlA
> >
> iOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=6j
> nlg
> > lV4H5w%2BIb3Ua3aNOClElU0MfICnqWYvjWnRCEA%3D&reserved=0
> > Signed-off-by: Haibo Chen <haibo.chen at nxp.com>
> >
> > ---
> > 1) This mt35xu01gbba is populated on the imx95-19x19-evk board, was
> >    tested at 200MHz using nxp,imx95-fspi SPI controller.
> > 2) root at imx95evk:~# cat /sys/bus/spi/devices/spi1.0/spi-nor/partname
> >    mt35xu01gbba
> >    root at imx95evk:~# cat /sys/bus/spi/devices/spi1.0/spi-nor/jedec_id
> >    2c5b1b
> >    root at imx95evk:~# cat /sys/bus/spi/devices/spi1.0/spi-nor/manufacturer
> >    micron
> >    root at imx95evk:~# hexdump -Cv /sys/bus/spi/devices/spi1.0/spi-nor/sfdp
> >    00000000  53 46 44 50 0a 01 03 ff  00 08 01 17 30 00 00 ff
> |SFDP........0...|
> >    00000010  84 00 01 02 90 00 00 ff  05 01 01 06 a0 00 00 ff
> |................|
> >    00000020  0a 00 01 08 b0 00 00 ff  ff ff ff ff ff ff ff ff  |................|
> >    00000030  e5 20 8a ff ff ff ff 3f  00 00 00 00 00 00 00 00  |. .....?........|
> >    00000040  ee ff ff ff ff ff 00 00  ff ff 00 00 0c 20 11 d8  |............. ..|
> >    00000050  0f 52 00 00 39 61 99 00  87 8e 03 d3 ac a1 27 3d
> |.R..9a........'=|
> >    00000060  7a 75 7a 75 fb bd d5 5c  00 00 70 ff 81 50 f8 a1
> |zuzu...\..p..P..|
> >    00000070  2f cb 27 8b 00 00 04 01  00 06 01 00 ff ff ff 8e
> |/.'.............|
> >    00000080  00 00 00 00 00 00 00 00  00 00 00 00 ff ff ff ff
> |................|
> >    00000090  43 0e ff ff 21 dc 5c ff  ff ff ff ff ff ff ff ff  |C...!.\.........|
> >    000000a0  00 0b 80 9e b1 81 b5 85  00 f0 ff 9f 00 0a 00 00
> |................|
> >    000000b0  00 0a 1a 88 10 00 00 00  ff ff ff ff ff ff ff ff  |................|
> >    000000c0  00 00 06 01 00 00 00 00  14 01 81 03 00 00 00 00
> |................|
> >    000000d0
> 
> you have SFDP here
> 
> cut
> 
> > +	}, {
> > +		.id = SNOR_ID(0x2c, 0x5b, 0x1b),
> > +		.name = "mt35xu01gbba",
> 
> drop the name field and add it as a comment. See recent flash additions
> commits.> +		.sector_size = SZ_128K,
> > +		.size = SZ_128M,

I did consider to remove the size and other flags since SFDP can handle that, but if remove the .size here.
Micron spi-nor do not have a chance to execute

params->set_octal_dtr = micron_st_nor_set_octal_dtr;

because in micron-st, params->set_octal_dtr is defined in flash_info->fixups-> default_init.
And flash_info->fixups-> default_init can only be called in spi_nor_init_params_deprecated-> spi_nor_manufacturer_init_params
If no .size define in flash_info, spi_nor_needs_sfdp() will return true, no chance to call spi_nor_init_params_deprecated.

If need to remove the .size here, seems to move the params->set_octal_dtr to spi_nor_manufacturer-> fixups-> late_init or flash_info->fixups->late_init.

I notice macronix already did like that, I will add this change in the next version.

Regards
Haibo Chen
> 
> drop these, SFDP shall handle them.
> 
> > +		.no_sfdp_flags = SECT_4K | SPI_NOR_OCTAL_READ |
> > +				 SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP,
> 
> Drop this line, let SFDP handle it
> 
> > +		.mfr_flags = USE_FSR,
> > +		.fixup_flags = SPI_NOR_4B_OPCODES |
> SPI_NOR_IO_MODE_EN_VOLATILE,
> 
> can we drop SPI_NOR_4B_OPCODES?
> 
> > +		.fixups = &mt35xu01gbba_fixups,
> >  	}, {
> >  		.id = SNOR_ID(0x2c, 0x5b, 0x1c),
> >  		.name = "mt35xu02g",
> >



More information about the linux-mtd mailing list