AnsweredAssumed Answered

Nand Flash, ubi On Custom t1040 board and U-BOOT

Question asked by Valeriy Urmanov on Jul 24, 2020
Latest reply on Aug 5, 2020 by ufedor

I use SDK 2.0 to compile u-boot for my custom T1040 board.

The board has MX30UF4G18AB-TI  connected to IFC_CS0

On boot it say NAND: 0 MiB, so NAND is not accesble.

1) In RCW i have ifc_MODE 0b100010000 - 8-bit NAND Flash, 4-Kbyte page, 128 pages/block, Bad Block Indicator in page 0/1, ECC disabled

2) In codewarior ini i have

##################################################################################
# IFC Controller Setup
global ECC_EN
set ECC_ENC_EN 0x[format %x [expr $ECC_EN << 31]]
set ECC_DEC_EN 0x[format %x [expr $ECC_EN << 26]]

# set NOR_CS 0
# set NAND_CS 1
set NAND_CS 0
# set CPLD_CS 2

# CPLD, addr 0xFFDF0000, 128K size, 8-bit, GPCM, Valid
# CSPR_EXT
# mem [CCSR_ADDR [expr {0x12400C + $CPLD_CS * 0x0C}]] = 0x00000000
# CSPR
# mem [CCSR_ADDR [expr {0x124010 + $CPLD_CS * 0x0C}]] = 0xFFDF0085
# AMASK
# mem [CCSR_ADDR [expr {0x1240A0 + $CPLD_CS * 0x0C}]] = 0xFFFE0000
# CSOR
# mem [CCSR_ADDR [expr {0x124130 + $CPLD_CS * 0x0C}]] = 0x00000000

# IFC_FTIM0
# mem [CCSR_ADDR [expr {0x1241C0 + $CPLD_CS * 0x30}]] = 0xE00E000E
# IFC_FTIM1
# mem [CCSR_ADDR [expr {0x1241C4 + $CPLD_CS * 0x30}]] = 0x0E001F00
# IFC_FTIM2
# mem [CCSR_ADDR [expr {0x1241C8 + $CPLD_CS * 0x30}]] = 0x0E00001F
# IFC_FTIM3
# mem [CCSR_ADDR [expr {0x1241CC + $CPLD_CS * 0x30}]] = 0x00000000

 


# NAND Flash, addr 0xFF800000, 64K size, 8-bit NAND
# CSPR_EXT
mem [CCSR_ADDR [expr {0x12400C + $NAND_CS * 0x0C}]] = 0x00000000
# CSPR
mem [CCSR_ADDR [expr {0x124010 + $NAND_CS * 0x0C}]] = 0xFF800083
# AMASK
mem [CCSR_ADDR [expr {0x1240A0 + $NAND_CS * 0x0C}]] = 0xFFFF0000
# CSOR
mem [CCSR_ADDR [expr {0x124130 + $NAND_CS * 0x0C}]] = 0x[format %x [expr 0x0110A100 | $ECC_ENC_EN | $ECC_DEC_EN]]

# IFC_FTIM0
mem [CCSR_ADDR [expr {0x1241C0 + $NAND_CS * 0x30}]] = 0x0E18070A
# IFC_FTIM1
mem [CCSR_ADDR [expr {0x1241C4 + $NAND_CS * 0x30}]] = 0x32390E18
# IFC_FTIM2
mem [CCSR_ADDR [expr {0x1241C8 + $NAND_CS * 0x30}]] = 0x01E0501E
# IFC_FTIM3
mem [CCSR_ADDR [expr {0x1241CC + $NAND_CS * 0x30}]] = 0x00000000

3) in T1040D4RDB_SDCARD_defconfig  i have :

CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_T104XRDB=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040D4RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD,T104XD4RDB,SYS_FSL_DDR3"
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
CONFIG_FSL_ESPI=y
CONFIG_MTD=y
CONFIG_MTD_BLOCK2MTD=y
CONFIG_MTD_UBI=y
CONFIG_UBIFS_FS=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_BOOTDELAY=29

4) uboot =>ubi  comand does not work.

 

 

what and where should i configure to compile to ramboot and  make NAND and UBI  work on my board?

Outcomes