From 5c04369dab66571ed686fdb301d9b2a19bb60680 Mon Sep 17 00:00:00 2001 From: Yonghui Yu Date: Mon, 14 Aug 2017 16:24:16 +0800 Subject: [PATCH] nand: add toshiba 512M(TC58NVG2S0HTA00) PD#149262: mtd:nand : add toshiba 512M(TC58NVG2S0HTA00) Change-Id: Ib4e5abca5b1b99542df1e9a6dc3ed347474ecfa2 Signed-off-by: Yonghui Yu --- drivers/amlogic/mtd/m3_nand.c | 4 +++- drivers/amlogic/mtd/nand_flash.c | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/mtd/m3_nand.c b/drivers/amlogic/mtd/m3_nand.c index 4a928a0..128cf97 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 cef2c97..302a694 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, -- 2.7.4