From a1055343510896346e26e835019f65454be2ddb7 Mon Sep 17 00:00:00 2001 From: Jon Lin Date: Thu, 27 Apr 2023 21:54:35 +0800 Subject: [PATCH] mtd: spinand: hyf: Support new devices HYF2GQ4IAACAE, HYF1GQ4IDACAE Change-Id: Ie01fcab9be9c5e1982cfc4ab2e63aac2e95c8557 Signed-off-by: Jon Lin --- drivers/mtd/nand/spi/hyf.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/spi/hyf.c b/drivers/mtd/nand/spi/hyf.c index bb3acf736ebe..92bdb5331d8a 100644 --- a/drivers/mtd/nand/spi/hyf.c +++ b/drivers/mtd/nand/spi/hyf.c @@ -104,7 +104,7 @@ static int hyf2gq4uaacae_ooblayout_free(struct mtd_info *mtd, int section, if (section > 3) return -ERANGE; - region->offset = 16 * section; + region->offset = 32 * section; region->length = 8; return 0; @@ -197,6 +197,26 @@ static const struct spinand_info hyf_spinand_table[] = { SPINAND_HAS_QE_BIT, SPINAND_ECCINFO(&hyf2gq4uaacae_ooblayout, hyf1gq4udacae_ecc_get_status)), + SPINAND_INFO("HYF2GQ4IAACAE", + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x82), + NAND_MEMORG(1, 2048, 128, 64, 2048, 20, 1, 1, 1), + NAND_ECCREQ(14, 512), + SPINAND_INFO_OP_VARIANTS(&read_cache_variants, + &write_cache_variants, + &update_cache_variants), + SPINAND_HAS_QE_BIT, + SPINAND_ECCINFO(&hyf2gq4uaacae_ooblayout, + hyf1gq4udacae_ecc_get_status)), + SPINAND_INFO("HYF1GQ4IDACAE", + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x81), + NAND_MEMORG(1, 2048, 64, 64, 1024, 10, 1, 1, 1), + NAND_ECCREQ(4, 512), + SPINAND_INFO_OP_VARIANTS(&read_cache_variants, + &write_cache_variants, + &update_cache_variants), + SPINAND_HAS_QE_BIT, + SPINAND_ECCINFO(&hyf1gq4udacae_ooblayout, + hyf1gq4udacae_ecc_get_status)), }; static const struct spinand_manufacturer_ops hyf_spinand_manuf_ops = {