[PATCH] mtd: spi-nor: macronix: enable dual and quad read for MX25U25635F

Tudor Ambarus tudor.ambarus at linaro.org
Tue Oct 29 00:33:01 PDT 2024



On 10/24/24 12:40 PM, Parth Pancholi wrote:
> From: Parth Pancholi <parth.pancholi at toradex.com>
> 
> The MX25U25635F supports dual and quad read operations. Set the
> corresponding flags to enable these features in accordance with
> the hardware capabilities. This change also enables dual and quad
> read operations on the MX25U25645G, which shares the same ID and
> has a superset of the functionality provided by the MX25U25635F.
> 
> Link: https://www.macronix.com/Lists/Datasheet/Attachments/8663/MX25U25635F,%201.8V,%20256Mb,%20v1.5.pdf

Looks like the flash defines SFDP tables "Table 13. Parameter Table (0):
JEDEC Flash Parameter Tables".

We have some minimum testing requirements, please see them on
https://docs.kernel.org/driver-api/mtd/spi-nor.html

> Signed-off-by: Parth Pancholi <parth.pancholi at toradex.com>
> ---
>  drivers/mtd/spi-nor/macronix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c
> index ea6be95e75a5..be55558c8ad0 100644
> --- a/drivers/mtd/spi-nor/macronix.c
> +++ b/drivers/mtd/spi-nor/macronix.c
> @@ -129,7 +129,7 @@ static const struct flash_info macronix_nor_parts[] = {
>  		.id = SNOR_ID(0xc2, 0x25, 0x39),
>  		.name = "mx25u25635f",
>  		.size = SZ_32M,

if we want to switch to SFDP initialized params then we can remove the size

> -		.no_sfdp_flags = SECT_4K,
> +		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,

and this line as well.

>  		.fixup_flags = SPI_NOR_4B_OPCODES,

If the flash defines the 4bait table (I don't see it in datasheet
though), then this line as well. We may remove the entire entry and rely
solely on the generic flash driver.

>  	}, {
>  		.id = SNOR_ID(0xc2, 0x25, 0x3a),



More information about the linux-mtd mailing list