mtd: nand: spi: Support GigaDevice GD5F1GQ5UExxG
authorReto Schneider <reto.schneider@husqvarnagroup.com>
Thu, 11 Feb 2021 12:05:48 +0000 (13:05 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 26 Feb 2021 10:31:37 +0000 (16:01 +0530)
commit783a15b35131abc599ec6deca55cf841d2e7c208
treebc730b9cab239ea0fdefc14f96d6e22c9d13331c
parent12926f46fdf443144451416939074c688b2c43a4
mtd: nand: spi: Support GigaDevice 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 form 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: Stefan Roese <sr@denx.de>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/nand/spi/gigadevice.c