Dear Karunakaran Radhakrishnan,
We are using 32GB nand device part number MT29F256G08CMCBBH2 in customized t2080 card.
We are using IFC_CS1, IFC_CS2, IFC_CS3 and IFC_CS4 to connect nand LUN0, LUN1, LUN2 and LUN3 respectively.
RB and WP signals are mapped in 32bit mode from processor to nand flash .
Our NAND Organization is.
– Page size x8: 8936 bytes (8192 + 744 bytes)
– Block size: 256 pages (2048K + 186K bytes)
– Plane size: 2 planes x 2048 blocks per plane
– Device size: 64Gb: 4096 blocks;
128Gb: 8192 blocks;
256Gb: 16,384 blocks
We have configured uboot:
#define CONFIG_NAND_FSL_IFC
#define CONFIG_SYS_NAND_BASE 0xff800000
#define CONFIG_SYS_NAND_BASE_PHYS (0xf00000000ull | CONFIG_SYS_NAND_BASE)
#define CONFIG_SYS_NAND_CSPR_EXT (0xf)
#define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
| CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
| CSPR_MSEL_NAND /* MSEL = NAND */ \
| CSPR_V)
/*#define CONFIG_SYS_NAND_AMASK IFC_AMASK(64*1024) */
#define CONFIG_SYS_NAND_AMASK IFC_AMASK(8192*1024*1024)
#define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
| CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
| CSOR_NAND_ECC_MODE_8 /* 4-bit ECC */ \
| CSOR_NAND_RAL_3 /* RAL = 2Byes */ \
| CSOR_NAND_PGS_8K /* Page Size = 2K */\
| CSOR_NAND_SPRZ_CSOR_EXT /* Spare size = 64 */\
| CSOR_NAND_PB(256)) /*Pages Per Block = 64*/
#define CONFIG_SYS_NAND_ONFI_DETECTION
/* ONFI NAND Flash mode0 Timing Params */
#define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x07) | \
FTIM0_NAND_TWP(0x18) | \
FTIM0_NAND_TWCHT(0x07) | \
FTIM0_NAND_TWH(0x0a))
#define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
FTIM1_NAND_TWBE(0x39) | \
FTIM1_NAND_TRR(0x0e) | \
FTIM1_NAND_TRP(0x18))
#define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0x0f) | \
FTIM2_NAND_TREH(0x0a) | \
FTIM2_NAND_TWHRE(0x1e))
#define CONFIG_SYS_NAND_FTIM3 0x0
#define CONFIG_SYS_NAND_DDR_LAW 11
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_CMD_NAND
#define CONFIG_SYS_NAND_BLOCK_SIZE (256 * 8192)
Also changed value of #define CSOR_NAND_ECC_MODE_8 0x30000000 in include/fsl_ifc.h as it is 40bit ECC.
Below is the u-boot log:
U-Boot 2016.01 (Jun 26 2017 - 09:25:07 +0530)
CPU0: T2080E, Version: 1.1, (0x85380011)
Core: e6500, Version: 2.0, (0x80400120)
Clock Configuration:
CPU0:899.910 MHz, CPU1:899.910 MHz, CPU2:899.910 MHz, CPU3:899.910 MHz,
CCB:666.600 MHz,
DDR:799.980 MHz (1599.960 MT/s data rate) (Asynchronous), IFC:166.650 MHz
FMAN1: 599.940 MHz
QMAN: 333.300 MHz
PME: 666.600 MHz
L1: D-cache 32 KiB enabled
I-cache 32 KiB enabled
Reset Configuration Word (RCW):
00000000: 1406001b 08000000 00000000 10000000
00000010: 6d2d0002 7010ac00 fc027000 61000000
00000020: 00200000 00000000 00000000 0002b3fc
00000030: 00000100 0080000d 00000000 00000004
I2C: ready
Board: T2080RDB, NOR vBank1
SERDES Reference Clocks:
SD1_CLK1=156.25MHZ, SD1_CLK2=125.00MHz
SD2_CLK1=125.00MHz, SD2_CLK2=125.00MHz
SPI: ready
DRAM: Initializing....Configuring DDR for 1599.960 MT/s data rate
2 GiB left unmapped
4 GiB (DDR3 CC, 32-bit CC_test, CL=14, ECC on CCC)
VID: Could not find voltage regulator on I2C.
Warning: Adjusting core voltage failed.
Flash: 256 MiB
L2: 2 MiB enabled
Corenet Platform Cache: 512 KiB enabled
Using SERDES1 Protocol: 109 (0x6d)
Using SERDES2 Protocol: 45 (0x2d)
SRIO1: enabled
SRIO2: enabled
SEC0: RNG instantiated
NAND: fsl_ifc_cmdfunc: error, unsupported command 0x5.
fsl_ifc_read_buf beyond end of buffer (48 requested, 0 available)
8192 MiB
MMC: FSL_SDHC: 0
EEPROM: Invalid ID (aa 55 aa 55)
PCIe1: disabled
PCIe2: disabled
PCIe3: disabled
PCIe4: Endpoint, undetermined, regs @ 0xfe270000
PCIe4: Bus 00 - 00
In: serial
Out: serial
Err: serial
Net: Fman1: Uploading microcode version 106.4.17
PHY reset timed out
PHY reset timed out
FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@TGEC1, FM1@TGEC2
Hit any key to stop autoboot: 0
Nand info also shows correct page size and oob size.
Please find data sheet of NAND flash and design in attachment.
Thanks,
Vidya