mtd: spinand: esmt: Extend IDs to 5 bytes
authorEzra Buehler <ezra.buehler@husqvarnagroup.com>
Thu, 25 Jan 2024 20:01:08 +0000 (22:01 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 5 Feb 2024 13:23:53 +0000 (14:23 +0100)
commit4bd14b2fd8a83a2f5220ba4ef323f741e11bfdfd
tree919a708bede985a5b7a56f0523766b349876cb18
parent34a956739d295de6010cdaafeed698ccbba87ea4
mtd: spinand: esmt: Extend IDs to 5 bytes

According to the datasheets, the ESMT chips in question will return a 5
byte long identification code where the last 3 bytes are the JEDEC
continuation codes (7Fh). Although, I would have expected 4 continuation
codes as Powerchip Semiconductor (C8h, corresponding to the parameter
page data) is located in bank 5 of the JEDEC database.

By matching the full 5 bytes we can avoid clashes with GigaDevice NAND
flashes.

This fix allows the MT7688-based GARDENA smart Gateway to boot again.

Fixes: aa08bf187f32 ("mtd: spinand: esmt: add support for F50D2G41KA")
Signed-off-by: Ezra Buehler <ezra.buehler@husqvarnagroup.com>
Reviewed-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Tested-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240125200108.24374-3-ezra@easyb.ch
drivers/mtd/nand/spi/esmt.c