[PATCH v2] mtd: spi-nor: macronix: add support for mx77l51250f

Michael Walle michael at walle.cc
Mon Jan 9 06:20:23 PST 2023


Am 2023-01-09 15:09, schrieb Usyskin, Alexander:
>> > --- a/drivers/mtd/spi-nor/macronix.c
>> > +++ b/drivers/mtd/spi-nor/macronix.c
>> > @@ -100,6 +100,8 @@ static const struct flash_info macronix_nor_parts[]
>> > = {
>> >  	{ "mx66u2g45g",	 INFO(0xc2253c, 0, 64 * 1024, 4096)
>> >  		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>> SPI_NOR_QUAD_READ)
>> >  		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
>> > +	{ "mx77l51250f", INFO(0xc2751a, 0, 64 * 1024, 4096)
>> > +		PARSE_SFDP },
>> 
>> With the newest generic spi nor driver [1] this patch shouldn't
>> be needed at all anymore. Could you verify, that your flash will work
>> without it?
>> 
>> -michael
>> 
>> [1]
>> https://elixir.bootlin.com/linux/v6.2-rc3/source/drivers/mtd/spi-
>> nor/core.c#L1637
> 
> Tested now, the v6.2-rc3 recognizes the chip.
> Does this mean that all SFDP-supporting chips will be recognized 
> automatically?

As long as you just want to use the standard features described by SFDP,
yes. There might be lacking support for some SFDP features, though. 
These
should then be added to the SFDP parser.

But, there are also features, which aren't supported by SFDP, i.e. 
locking
or OTP. If you want to use these, you still need a flash table entry.

-michael

> Tomas, we can abandon upstreaming effort, I'll save the patch if it
> will needed by older kernel versions.




More information about the linux-mtd mailing list