Tool/software: Linux
Hi,
I am using a custom board based on DM3730 processor. Currently, the Micron NAND with part number MT29F4G16ABBDA (4Gb, x16, 1.8V) is being used and it works fine.
But now, I have modified the bootloader to configure the 16 bit NAND as 8 bit NAND (i.e to access NAND only via 8 lines). Now reading/writing data in 8 bit mode appears to be 1 byte interleaved, i.e, one byte is skipped while reading/writing data from/to NAND for every byte read/written.
Is it possible to configure a X16 NAND to access data via only 8 lines? If so what am I missing?
The following changes are done in uboot code to configure the X16 NAND in 8bit mode.
1. Changed the device width in GPMC configuration register
- #define M_NAND_GPMC_CONFIG1 0x00001800
+ #define M_NAND_GPMC_CONFIG1 0x00000800
2. Changed the options as 8 bit options instead of 16 bit options in file drivers/mtd/nand/nand_ids.c
- {"NAND 512MiB 1,8V 16-bit", 0xBC, 0, 512, 0, LP_OPTIONS16},
+ {"NAND 512MiB 1,8V 16-bit", 0xBC, 0, 512, 0, LP_OPTIONS},
3. Changed the ECC layout for 8 bit NAND instead of 16 bit
- #define GPMC_NAND_ECC_LP_x16_LAYOUT
+ #define GPMC_NAND_ECC_LP_x8_LAYOUT
4. Commented the line that assigns buswidth from extended id.
- busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0;
+ // busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0;
Thanks in advance,
Ganesh Raja S K