This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Use nandwrite command, but dump wrong data on K9F1G08U0E with jffs2 filesystem.

Hi all,

My code base is IPNC_RDK_DM36x_Release_3.1.0 and filesystem type is squashfs.

After system boot up, I use flash_eraseall command to erase mtdx to jffs2. (ex: flash_eraseall -j /dev/mtd9)

Then I use nandwrite command to write data on mtdx(jffs2), but wrong data has dumped.

The original data:

27 05 19 56 3C EB B3 C0     53 8E E3 E0 00 32 BC 88

80 00 80 00 80 00 80 00     31 83 8B 21 05 02 02 00

4C 69 6E 75 78 2D 32 2E     36 2E 31 38 5F 70 72 6F

35 30 30 2D 64 61 76 69     6E 63 69 5F 49 50 4E 43

The nand dump data:

ff   ff  ff   ff   ff   ff  ff   ff           ff    ff   e3 e0  ff   ff  ff ff

80 00 80 00 80 00  ff   ff           ff    ff   8b 21  ff   ff  ff  ff

4c 69 6e 75  ff  ff   ff   ff           ff    ff   31 38  ff   ff  72 6f

ff  ff  30  2d  ff  ff   ff   ff           df   ff   ff   ff   49 50 4e 43

There is wrong data dumped on K9F1G08U0E, but it doesn't have wrong data on K9F1G08U0D.

The difference between K9F1G08U0D and K9F1G08U0E is NOP.

K9F1G08U0D: NOP = 4

K9F1G08U0E: NOP = 1

Could anyone please give me some hints to resolve this problem?

Thanks.

  • Hi

    Please see if the following post and links in it helps

    Regards

    Mukul

  • 1) Can you please try the following patch ?

    Looks like the same issue reported in this link.
    patchwork.ozlabs.org/.../

    diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
    index 41167e9..e68e0c7 100644
    --- a/drivers/mtd/nand/nand_base.c
    +++ b/drivers/mtd/nand/nand_base.c
    @@ -3468,6 +3468,16 @@ static void nand_decode_ext_id(struct mtd_info *mtd, struct nand_chip *chip,
    mtd->oobsize = 32 * mtd->writesize >> 9;
    }

    + /*
    + * Samsung E-die SLC NAND doesn't support partial writes
    + * anymore. The only way to distinguish this die-revision
    + * is by checking bits 0 and 1 of id_data[4], which seem
    + * to indicate feature size (previous => 00, 21nm => 01).
    + */
    + if (id_data[0] == NAND_MFR_SAMSUNG && nand_is_slc(chip) &&
    + (id_data[4] & 0x03) /* 21nm or newer */) {
    + chip->options |= NAND_NO_SUBPAGE_WRITE;
    + }
    }
    }

    2) I have gone through both data sheets and found some writing time variations...
    Can you please try to modify the NAND driver code (appropriate, write part) for the write timings...

    K9F1G08U0E :
    Fast Write Cycle Time
    - Page Program time : 400μs(Typ.)
    - Block Erase Time : 4.5ms(Typ.)

    K9F1G08U0D:
    Fast Write Cycle Time
    - Page Program time : 250μs(Typ.)
    - Block Erase Time : 2ms(Typ.)