how to use the ddr code generated from codewarrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to use the ddr code generated from codewarrior

Jump to solution
2,302 Views
Simon666
Contributor II

we use 10*MT40A1G16 to get 16GB memory, one ddr controller connect 8GB. three questions:

1)on codewarrior ddr config, we should select what dram type? NoDimm or Discrete?

2)how to use the two ddr_init1.c and ddr_init2.c and other ddr code.

3)in lsdk components\firmware\atf\plat\nxp\soc-lx2160a\lx2160ardb\ddr_init.c,

we should define CONFIG_STATIC_DDR or  CONFIG_DDR_NODIMM?

what's their difference.

thanks

 

 
1 Solution
2,293 Views
yipingwang
NXP TechSupport
NXP TechSupport

1. You could select "Discrete DRAM".

2. Please use ddr_init1.c to replace components\firmware\atf\plat\nxp\soc-lx2160a\lx2160ardb\ddr_init.c in LSDK.

3. When a board design uses fixed or discrete DDR, static timing can be used to configure DDR timing parameters. Define macro “CONFIG_STATIC_DDR” in plat/nxp///plafform_def.h to enable discrete DDR timings. Define board_static_ddr() function and structure ddr_cfg_regs in file ddr_init.c. It configures DDR controller configuration registers directly.

Define macro “CONFIG_DDR_NODIMM” in plat/nxp///platform_def.h to enable MOCK DIMM support. Hardcoded timing in place of reading SPD.

 

View solution in original post

0 Kudos
Reply
4 Replies
1,754 Views
saidivvela
Contributor II

Can we use CONFIG_DDR_NODIMM  for static DDR on board ??
Will it work this way ?

0 Kudos
Reply
1,748 Views
Simon666
Contributor II

CONFIG_DDR_NODIMM is working

2,294 Views
yipingwang
NXP TechSupport
NXP TechSupport

1. You could select "Discrete DRAM".

2. Please use ddr_init1.c to replace components\firmware\atf\plat\nxp\soc-lx2160a\lx2160ardb\ddr_init.c in LSDK.

3. When a board design uses fixed or discrete DDR, static timing can be used to configure DDR timing parameters. Define macro “CONFIG_STATIC_DDR” in plat/nxp///plafform_def.h to enable discrete DDR timings. Define board_static_ddr() function and structure ddr_cfg_regs in file ddr_init.c. It configures DDR controller configuration registers directly.

Define macro “CONFIG_DDR_NODIMM” in plat/nxp///platform_def.h to enable MOCK DIMM support. Hardcoded timing in place of reading SPD.

 

0 Kudos
Reply
2,278 Views
Simon666
Contributor II

can I use CONFIG_DDR_NODIMM too? I can get DDR parameters to NODIMM and it's more readable.

0 Kudos
Reply