diff --git a/drivers/amlogic/mtd/m3_nand.c b/drivers/amlogic/mtd/m3_nand.c index 4a928a076dda..128cf9790ee6 100644 --- a/drivers/amlogic/mtd/m3_nand.c +++ b/drivers/amlogic/mtd/m3_nand.c @@ -409,7 +409,9 @@ static int m3_nand_options_confirm(struct aml_nand_chip *aml_chip) chip->write_buf = aml_nand_dma_write_buf; chip->read_buf = aml_nand_dma_read_buf; - if (mtd->writesize <= 2048) + /* axg only suport bch8/512 & bch8/1k */ + if ((mtd->writesize <= 2048) + || (get_cpu_type() == MESON_CPU_MAJOR_ID_AXG)) options_support = NAND_ECC_BCH8_MODE; switch (options_support) { diff --git a/drivers/amlogic/mtd/nand_flash.c b/drivers/amlogic/mtd/nand_flash.c index cef2c9784856..302a694af990 100644 --- a/drivers/amlogic/mtd/nand_flash.c +++ b/drivers/amlogic/mtd/nand_flash.c @@ -360,6 +360,18 @@ struct aml_nand_flash_dev aml_nand_flash_ids[] = { 0, 0, (NAND_TIMING_MODE5 | NAND_ECC_BCH8_MODE)}, + {"A revision NAND 4Gib TC58NVG2S0HTA00 ", + {NAND_MFR_TOSHIBA, 0xdc, 0x90, 0x26, 0x76}, + 4096, + 512, + 0x40000, + 256, + 1, + 20, + 25, + 0, + 0, + (NAND_TIMING_MODE5 | NAND_ECC_BCH8_MODE)}, {"Slc NAND 1Gib MX30LF1G18AC ", {NAND_MFR_MACRONIX, 0xf1, 0x80, 0x95, 0x02}, 2048,