Re: [PATCH 1/2] mtd: spinand: Support serial NAND for reading two bytes ID

Miquel Raynal
2024-07-01T09:43:23Z

Hi,

linchengming884@gmail.com wrote on Fri, 28 Jun 2024 16:54:43 +0800:

> From: Cheng Ming Lin <chengminglin@mxic.com.tw>
>
> Adding the Device ID 2 on Macronix Serial Flash.
>
> When the number of flashes increases, we need to utilize
> Device ID 2 to distinguish between different flashes.
>
> These flashes have been validated on Xilinx zynq-picozed
> board which included Macronix SPI Host.
>
> Signed-off-by: Cheng Ming Lin <chengminglin@mxic.com.tw>
> ---

...

> SPINAND_INFO("MX35UF1GE4AD",
> - SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x96),
> + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x96, 0x03),
> NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),
> NAND_ECCREQ(8, 512),
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> @@ -289,7 +288,7 @@ static const struct spinand_info macronix_spinand_table[] = {
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
> mx35lf1ge4ab_ecc_get_status)),
> SPINAND_INFO("MX35UF1GE4AC",
> - SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x92),
> + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x92, 0x01),
> NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
> NAND_ECCREQ(4, 512),
> SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
> @@ -298,7 +297,6 @@ static const struct spinand_info macronix_spinand_table[] = {
> SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
> mx35lf1ge4ab_ecc_get_status)),
> -

This is style, and if you care should be in another patch.

> SPINAND_INFO("MX31LF2GE4BC",
> SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x2e),
> NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
> @@ -309,7 +307,7 @@ static const struct spinand_info macronix_spinand_table[] = {
> SPINAND_HAS_QE_BIT,
> SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
> mx35lf1ge4ab_ecc_get_status)),
> - SPINAND_INFO("MX3UF2GE4BC",
> + SPINAND_INFO("MX31UF2GE4BC",

This is a fix that should have the right tags (stable/fixes) and be in
another patch.

Also, maybe you want this patch content to be backported. If it's the
case, please add the necessary tags here as well.

> SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xae),
> NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
> NAND_ECCREQ(8, 512),

Thanks,
Miquèl