mtd: spinand: gigadevice: Support GD5F1GQ5UExxG
authorReto Schneider <reto.schneider@husqvarnagroup.com>
Thu, 11 Feb 2021 11:36:19 +0000 (12:36 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 11 Mar 2021 08:37:29 +0000 (09:37 +0100)
commit469b992489852b500d39048aa0013639dfe9f2e6
tree299fa6595517e3b67b8d8270dd85de59da6c25fb
parent8ffbec7df4d64446cb0479261524c490a2c7529e
mtd: spinand: gigadevice: Support GD5F1GQ5UExxG

The relevant changes to the already existing GD5F1GQ4UExxG support has
been determined by consulting the GigaDevice product change notice
AN-0392-10, version 1.0 from November 30, 2020.

As the overlaps are huge, variable names have been generalized
accordingly.

Apart from the lowered ECC strength (4 instead of 8 bits per 512 bytes),
the new device ID, and the extra quad IO dummy byte, no changes had to
be taken into account.

New hardware features are not supported, namely:
 - Power on reset
 - Unique ID
 - Double transfer rate (DTR)
 - Parameter page
 - Random data quad IO

The inverted semantic of the "driver strength" register bits, defaulting
to 100% instead of 50% for the Q5 devices, got ignored as the driver has
never touched them anyway.

The no longer supported "read from cache during block erase"
functionality is not reflected as the current SPI NAND core does not
support it anyway.

Implementation has been tested on MediaTek MT7688 based GARDENA smart
Gateways using both, GigaDevice GD5F1GQ5UEYIG and GD5F1GQ4UBYIG.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210211113619.3502-1-code@reto-schneider.ch
drivers/mtd/nand/spi/gigadevice.c