AnsweredAssumed Answered

T4240 memory controller stuck when configure as 64bit

Question asked by dhana sekaran on Oct 14, 2017
Latest reply on Oct 23, 2017 by Bulat Karymov

Hi everyone!

 

In out custom board we use T4240 with 6GB of Discrete dram which connected with DDR controllers as 4GB(DDRC1) and 2GB(DDRC2). By using SPD values I init Dram as 64bit DDRC1 and 32 bit for DDRC2. I get stuck in Uboot but when I changed it to 32bit for both DDRC it work so only 4GB of memory only detected out of 6GB. 

My configuration for 800mhz   ddr clock

 

# DDR1 Controller Setup
# DDR1_DDR_SDRAM_CFG
mem [CCSR_ADDR 0x8110] = 0x67040000
# DDR1_CS0_BNDS
mem [CCSR_ADDR 0x8000] = 0x0000007f
# DDR1_CS1_BNDS
mem [CCSR_ADDR 0x8008] = 0x00000000
# DDR1_CS2_CONFIG
# mem [CCSR_ADDR 0x8088] = 0xffffffff
# DDR1_CS3_BNDS
# mem [CCSR_ADDR 0x808C] = 0xffffffff
# DDR1_CS0_CONFIG
mem [CCSR_ADDR 0x8080] = 0x80044402
# DDR1_CS1_CONFIG
mem [CCSR_ADDR 0x8084] = 0x00000000
# DDR1_CS0_CONFIG_2
mem [CCSR_ADDR 0x80C0] = 0x00000000
# DDR1_TIMING_CFG_0
mem [CCSR_ADDR 0x8104] = 0x5011010C
# DDR1_TIMING_CFG_1
mem [CCSR_ADDR 0x8108] = 0xBCB40C66
# DDR1_TIMING_CFG_2
mem [CCSR_ADDR 0x810C] = 0x0040C160
# DDR1_TIMING_CFG_3
mem [CCSR_ADDR 0x8100] = 0x01111000
# DDR1_DDR_SDRAM_CFG_2
mem [CCSR_ADDR 0x8114] = 0x24401110
# DDR1_DDR_SDRAM_MODE
mem [CCSR_ADDR 0x8118] = 0x00441C70
# DDR1_DDR_SDRAM_MODE_2
mem [CCSR_ADDR 0x811C] = 0x00980000
# DDR1_DDR_SDRAM_INTERVAL
mem [CCSR_ADDR 0x8124] = 0x0C30030C
# DDR1_DDR_DATA_INIT
mem [CCSR_ADDR 0x8128] = 0xDEADBEEF
# DDR1_DDR_SDRAM_CLK_CNTL
mem [CCSR_ADDR 0x8130] = 0x02800000
# DDR1_DDR_INIT_ADDR
mem [CCSR_ADDR 0x8148] = 0x00000000
# DDR1_DDR_INIT_EXT_ADDRESS
mem [CCSR_ADDR 0x814C] = 0x00000000
# DDR1_TIMING_CFG_4
mem [CCSR_ADDR 0x8160] = 0x00000001
# DDR1_TIMING_CFG_5
mem [CCSR_ADDR 0x8164] = 0x04401400
# DDR1_DDR_ZQ_CNTL
mem [CCSR_ADDR 0x8170] = 0x89080600
# DDR1_DDR_WRLVL_CNTL
mem [CCSR_ADDR 0x8174] = 0x8675F608
# DDR1_DDR_WRLVL_CNTL_2
mem [CCSR_ADDR 0x8190] = 0x080A0A0C
# DDR1_DDR_WRLVL_CNTL_3
mem [CCSR_ADDR 0x8194] = 0x0C0D0E0A
# DDR1_DDR_SDRAM_MODE_3
mem [CCSR_ADDR 0x8200] = 0x00000000
# DDR1_DDR_SDRAM_MODE_4
mem [CCSR_ADDR 0x8204] = 0x00000000
# DDR1_DDR_SDRAM_MODE_5
mem [CCSR_ADDR 0x8208] = 0x00000000
# DDR1_DDR_SDRAM_MODE_6
mem [CCSR_ADDR 0x820C] = 0x00000000
# DDR1_DDR_SDRAM_MODE_7
mem [CCSR_ADDR 0x8210] = 0x00000000
# DDR1_DDR_SDRAM_MODE_8
mem [CCSR_ADDR 0x8214] = 0x00000000
# DDR1_DDRDSR_1
mem [CCSR_ADDR 0x8B20] = 0x00008080
# DDR1_DDRDSR_2
mem [CCSR_ADDR 0x8B24] = 0x80000000
# DDR1_DDRCDR_1
mem [CCSR_ADDR 0x8B28] = 0x80040000
# DDR1_DDRCDR_2
mem [CCSR_ADDR 0x8B2C] = 0x00000001
# DDR1_ERR_DISABLE - DISABLE
mem [CCSR_ADDR 0x8E44] = 0x00000000
# DDR1_ERR_SBE
mem [CCSR_ADDR 0x8E58] = 0x00000000

# DDR2 Controller Setup
# DDR2_DDR_SDRAM_CFG
mem [CCSR_ADDR 0x9110] = 0x67040000
# DDR1_CS0_BNDS
mem [CCSR_ADDR 0x9000] = 0x008000FF
# DDR1_CS1_BNDS
mem [CCSR_ADDR 0x9008] = 0x00000000
# DDR1_CS2_CONFIG
# mem [CCSR_ADDR 0x9088] = 0xffffffff
# DDR1_CS3_BNDS
# mem [CCSR_ADDR 0x908C] = 0xffffffff
# DDR1_CS0_CONFIG
mem [CCSR_ADDR 0x9080] = 0x80044402
# DDR1_CS1_CONFIG
mem [CCSR_ADDR 0x9084] = 0x00000000
# DDR1_CS0_CONFIG_2
mem [CCSR_ADDR 0x90C0] = 0x00000000
# DDR1_TIMING_CFG_0
mem [CCSR_ADDR 0x9104] = 0x5011010C
# DDR1_TIMING_CFG_1
mem [CCSR_ADDR 0x9108] = 0xBCB40C66
# DDR1_TIMING_CFG_2
mem [CCSR_ADDR 0x910C] = 0x0040C160
# DDR1_TIMING_CFG_3
mem [CCSR_ADDR 0x9100] = 0x01111000
# DDR1_DDR_SDRAM_CFG_2
mem [CCSR_ADDR 0x9114] = 0x24401110
# DDR1_DDR_SDRAM_MODE
mem [CCSR_ADDR 0x9118] = 0x00441C70
# DDR1_DDR_SDRAM_MODE_2
mem [CCSR_ADDR 0x911C] = 0x00980000
# DDR1_DDR_SDRAM_INTERVAL
mem [CCSR_ADDR 0x9124] = 0x0C30030C
# DDR1_DDR_DATA_INIT
mem [CCSR_ADDR 0x9128] = 0xDEADBEEF
# DDR1_DDR_SDRAM_CLK_CNTL
mem [CCSR_ADDR 0x9130] = 0x02800000
# DDR1_DDR_INIT_ADDR
mem [CCSR_ADDR 0x9148] = 0x00000000
# DDR1_DDR_INIT_EXT_ADDRESS
mem [CCSR_ADDR 0x914C] = 0x00000000
# DDR1_TIMING_CFG_4
mem [CCSR_ADDR 0x9160] = 0x00000001
# DDR1_TIMING_CFG_5
mem [CCSR_ADDR 0x9164] = 0x04401400
# DDR1_DDR_ZQ_CNTL
mem [CCSR_ADDR 0x9170] = 0x89080600
# DDR1_DDR_WRLVL_CNTL
mem [CCSR_ADDR 0x9174] = 0x8675F608
# DDR1_DDR_WRLVL_CNTL_2
mem [CCSR_ADDR 0x9190] = 0x080A0A0C
# DDR1_DDR_WRLVL_CNTL_3
mem [CCSR_ADDR 0x9194] = 0x0C0D0E0A
# DDR1_DDR_SDRAM_MODE_3
mem [CCSR_ADDR 0x9200] = 0x00000000
# DDR1_DDR_SDRAM_MODE_4
mem [CCSR_ADDR 0x9204] = 0x00000000
# DDR1_DDR_SDRAM_MODE_5
mem [CCSR_ADDR 0x9208] = 0x00000000
# DDR1_DDR_SDRAM_MODE_6
mem [CCSR_ADDR 0x920C] = 0x00000000
# DDR1_DDR_SDRAM_MODE_7
mem [CCSR_ADDR 0x9210] = 0x00000000
# DDR1_DDR_SDRAM_MODE_8
mem [CCSR_ADDR 0x9214] = 0x00000000
# DDR1_DDRDSR_1
mem [CCSR_ADDR 0x9B20] = 0x00008080
# DDR1_DDRDSR_2
mem [CCSR_ADDR 0x9B24] = 0x80000000
# DDR1_DDRCDR_1
mem [CCSR_ADDR 0x9B28] = 0x80040000
# DDR1_DDRCDR_2
mem [CCSR_ADDR 0x9B2C] = 0x00000001
# DDR1_ERR_DISABLE - DISABLE
mem [CCSR_ADDR 0x9E44] = 0x00000000
# DDR1_ERR_SBE
mem [CCSR_ADDR 0x9E58] = 0x00000000

# DDR3 Controller Setup
# DDR3_DDR_SDRAM_CFG
#mem [CCSR_ADDR 0xA110] = 0x67040000
# DDR3_CS0_BNDS
#mem [CCSR_ADDR 0xA000] = 0x0000017f
# DDR3_CS1_BNDS
#mem [CCSR_ADDR 0xA008] = 0x0000017f
# DDR3_CS2_CONFIG
# mem [CCSR_ADDR 0xA088] = 0xffffffff
# DDR3_CS3_BNDS
# mem [CCSR_ADDR 0xA08C] = 0xffffffff
# DDR3_CS0_CONFIG
#mem [CCSR_ADDR 0xA080] = 0x80044302
# DDR3_CS1_CONFIG
#mem [CCSR_ADDR 0xA084] = 0x80004302
# DDR3_CS0_CONFIG_2
mem [CCSR_ADDR 0xA0C0] = 0x00000000
# DDR3_TIMING_CFG_0
#mem [CCSR_ADDR 0xA104] = 0x90110004
# DDR3_TIMING_CFG_1
#mem [CCSR_ADDR 0xA108] = 0xdfd9ee57
# DDR3_TIMING_CFG_2
#mem [CCSR_ADDR 0xA10C] = 0x0048e8d8
# DDR3_TIMING_CFG_3
#mem [CCSR_ADDR 0xA100] = 0x01081000
# DDR3_DDR_SDRAM_CFG_2
#mem [CCSR_ADDR 0xA114] = 0x00401010
# DDR3_DDR_SDRAM_MODE
#mem [CCSR_ADDR 0xA118] = 0x40441014
# DDR3_DDR_SDRAM_MODE_2
#mem [CCSR_ADDR 0xA11C] = 0x00a00000
# DDR3_DDR_SDRAM_INTERVAL
#mem [CCSR_ADDR 0xA124] = 0x0e38038e
# DDR3_DDR_DATA_INIT
#mem [CCSR_ADDR 0xA128] = 0xDEADBEEF
# DDR3_DDR_SDRAM_CLK_CNTL
#mem [CCSR_ADDR 0xA130] = 0x02000000
# DDR3_DDR_INIT_ADDR
#mem [CCSR_ADDR 0xA148] = 0x00000000
# DDR3_DDR_INIT_EXT_ADDRESS
#mem [CCSR_ADDR 0xA14C] = 0x00000000
# DDR3_TIMING_CFG_4
#mem [CCSR_ADDR 0xA160] = 0x00000001
# DDR3_TIMING_CFG_5
#mem [CCSR_ADDR 0xA164] = 0x05401400
# DDR3_DDR_ZQ_CNTL
#mem [CCSR_ADDR 0xA170] = 0x89080600
# DDR3_DDR_WRLVL_CNTL
#mem [CCSR_ADDR 0xA174] = 0x8675f609
# DDR3_DDR_WRLVL_CNTL_2
#mem [CCSR_ADDR 0xA190] = 0x090a0b0e
# DDR3_DDR_WRLVL_CNTL_3
#mem [CCSR_ADDR 0xA194] = 0x0f11120c
# DDR3_DDR_SDRAM_MODE_3
#mem [CCSR_ADDR 0xA200] = 0x00001014
# DDR3_DDR_SDRAM_MODE_4
#mem [CCSR_ADDR 0xA204] = 0x00a00000
# DDR3_DDR_SDRAM_MODE_5
#mem [CCSR_ADDR 0xA208] = 0x00001014
# DDR3_DDR_SDRAM_MODE_6
#mem [CCSR_ADDR 0xA20C] = 0x00a00000
# DDR3_DDR_SDRAM_MODE_7
#mem [CCSR_ADDR 0xA210] = 0x00001014
# DDR3_DDR_SDRAM_MODE_8
#mem [CCSR_ADDR 0xA214] = 0x00a00000
# DDR3_DDRDSR_1
#mem [CCSR_ADDR 0xAB20] = 0x00008080
# DDR3_DDRDSR_2
#mem [CCSR_ADDR 0xAB24] = 0x80000000
# DDR3_DDRCDR_1
#mem [CCSR_ADDR 0xAB28] = 0x80040000
# DDR3_DDRCDR_2
#mem [CCSR_ADDR 0xAB2C] = 0x00000001
# DDR3_ERR_DISABLE - DISABLE
#mem [CCSR_ADDR 0xAE44] = 0x00000000
# DDR3_ERR_SBE
#mem [CCSR_ADDR 0xAE58] = 0x00000000

wait 100
# DDR1_DDR_SDRAM_CFG
mem [CCSR_ADDR 0x8110] = 0xC70C0000
# DDR2_DDR_SDRAM_CFG
mem [CCSR_ADDR 0x9110] = 0xC70C0000
# DDR3_DDR_SDRAM_CFG
#mem [CCSR_ADDR 0xa110] = 0x67040000
wait 1000
# DDR1_ERR_DISABLE - ENABLE
mem [CCSR_ADDR 0x8E44] = 0x00000000
# DDR2_ERR_DISABLE - ENABLE
mem [CCSR_ADDR 0x9E44] = 0x00000000
# DDR3_ERR_DISABLE - ENABLE
#mem [CCSR_ADDR 0xaE44] = 0x00000000

# CCF_MCINTLV3R - enable 3-way interleaving
# CCF_MCINTLV3R[27–31]: GRANULE_SIZE
# 01010 1 KB granule size
# 01100 4 KB granule size
# 01101 8 KB granule size
#mem [CCSR_ADDR 0x18004] = 0x800000[format %02x [format %.0f [expr 10 + [logToBaseTwo $GRANULE_SIZE]]]]
mem [CCSR_ADDR 0x18004] = 0xc

 

Regard,

dhanasekaran k

Outcomes