mtd: rawnand: toshiba: Add a specific init for TC58TEG5DCLTA00

TC58TEG5DCLTA00 is an MLC NAND which requires scrambling and supports
SDR timings mode 5.

Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200503155341.16712-2-miquel.raynal@bootlin.com
This commit is contained in:
Boris Brezillon 2020-05-03 17:53:34 +02:00 committed by Miquel Raynal
parent 51b71ac092
commit 5338ef99c9

View File

@ -194,6 +194,14 @@ static void toshiba_nand_decode_id(struct nand_chip *chip)
}
}
static int tc58teg5dclta00_init(struct nand_chip *chip)
{
chip->onfi_timing_mode_default = 5;
chip->options |= NAND_NEED_SCRAMBLING;
return 0;
}
static int toshiba_nand_init(struct nand_chip *chip)
{
if (nand_is_slc(chip))
@ -204,6 +212,9 @@ static int toshiba_nand_init(struct nand_chip *chip)
chip->id.data[4] & TOSHIBA_NAND_ID4_IS_BENAND)
toshiba_nand_benand_init(chip);
if (!strcmp("TC58TEG5DCLTA00", chip->parameters.model))
tc58teg5dclta00_init(chip);
return 0;
}