Hello.
I have custom board with dm8168 rev 2.1 and 2 ddr3 chips mt41j64m16 128 MB connected to emif0 without interleaving.
I use u-boot from EZSDK 5_05_02_00. DDR3 is successfully initialized and I can see memory and read/write. Checked with CCS studio memory browser and mw.b cmd in u-boot.
I want to map these 256 MB as one continious memory area, BUT I noticed that every 16 MB first 4 KB are mirroring the contents of next 4 KB.
0x80000000 - ddr3 start addr
0x80000000 - 0x80000fff - data 1
0x80001000 - 0x80001fff - data 2
...
0x81000000 - 0x81000fff - data 3
0x81001000 - 0x81001fff - data 4
...
data 1 and data 2 are mirroring each other: if I change memory value at 0x8000 0004 the value at 0x80001004 will be same as at 0x8000 0004 and vice versa.
Same situation for 0x8100 0000 area and 0x8200000 etc. data3 reflects data4. Could you people tell me why is this happening?
I disabled emif1 in u-boot code and edited LISA registers. Here's the code I have in evm.c sdram init function:
__raw_writel(0x2, CM_DEFAULT_DMM_CLKCTRL);
while((__raw_readl(CM_DEFAULT_DMM_CLKCTRL)) != 0x2); /*Poll for Module is functional*/
#ifdef CONFIG_MINIMAL
/* Program the DMM for non-interleave setting */
__raw_writel(0x80400100, DMM_LISA_MAP__0);
__raw_writel(0x0, DMM_LISA_MAP__1);
__raw_writel(0x0, DMM_LISA_MAP__2);
__raw_writel(0x0, DMM_LISA_MAP__3);
#else
/*Enable Tiled Access*/
__raw_writel(0x80000000, DMM_PAT_BASE_ADDR);
emif4p_init(EMIF_TIM1, EMIF_TIM2, EMIF_TIM3, EMIF_SDREF & 0xFFFFFFF, EMIF_SDCFG, EMIF_PHYCFG);
I use minimal config with several modifications: enabled ethernet.
These 4 LISA registers confused me a bit. Is it correct that 0 and 1 LISA MAP are emif0 CS[0] and CS[1] related and 2/3 are emif1 CS[0] CS[1] ?
My assumption is that I have to tune DMM and PAT. But TRM says that PAT uses direct access mode by default. I plan to load linux into DDR later, but I need to transfer big chunk of data through DDR using u-boot before loading OS. That's why I need one continious area. Could anyone tell me what I am doing wrong and give me some clue?
