u-boot stuck after porting LPDDR2 base on IMX7ULP

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

u-boot stuck after porting LPDDR2 base on IMX7ULP

1,879 Views
sam_liu
Contributor II

Hello Everyone,

  In my project is base on I.MX7ULP and porting SDRAM LPDDR2 on my project EVB and BSP :imx-4.9.51-8mq_ga.

  (Original  BSP SDRAM setting in is for LPDDR3)

Now I already porting the setting of DCD table in imximage.cfg file.But when I power on my EVB the u-boot will stuck at "DRAM:" line and then no log anymore  .

log show as below: 

---------------------------------------------------------------------------------------------------------------------------------

U-Boot 2017.03-imx_v2017.03_4.9.51_imx8m_ga+g2537522 (Jul 04 2018 - 14:27:51 +0800)

CPU: Freescale i.MX7ULP rev2.0 at 500 MHz
Reset cause: POR
Boot mode: Dual boot
Model: NXP i.MX7ULP EVK
DRAM:

----------------------------------------------------------------------------------------------------------------------------------

And then I trace the u-boot source code ,u-boot will stuck at the command : "size += gd->bd->bi_dram[i].size;"

 in "static int show_dram_config(void)"  function   of the "board_f.c" file .

u-boot source code  show as below:

==========================================================================

static int show_dram_config(void)
{
unsigned long long size;

#ifdef CONFIG_NR_DRAM_BANKS
int i;

debug("\nRAM Configuration:\n");
for (i = size = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
size += gd->bd->bi_dram[i].size;
debug("Bank #%d: %llx ", i,
(unsigned long long)(gd->bd->bi_dram[i].start));
#ifdef DEBUG
print_size(gd->bd->bi_dram[i].size, "\n");
#endif
}
debug("\nDRAM: ");
#else
size = gd->ram_size;
#endif

print_size(size, "");
board_add_ram_info(0);
putc('\n');

return 0;
}

==========================================================================

It's seem like that execute "gd->bd->bi_dram[i].size;" operation will cause the error. 

Does anyone can help me whether I porting the imximage.cfg (for change SDRAM to LPDDR2  on my EVB )incorrect ?

Or other reason cause this error ?

Thanks~

Labels (1)
Tags (1)
5 Replies

1,399 Views
sam_liu
Contributor II

Hi Rakesh Patel,

This case has passed for quite a while, but I remember that in the file: /u-boot-imx/.../mx7ulp_evk.c, there is a gpio default setting that conflicts with our EVB pin. You can try to find Whether there is a conflict.

0 Kudos

1,399 Views
rakesh_patel
Senior Contributor I

SamLiu98115‌:

How you solve this ? I am also facing same.

0 Kudos

1,398 Views
igorpadykov
NXP Employee
NXP Employee

Hi Sam

one can check #define PHYS_SDRAM_SIZE  in uboot/include/configs/mx7ulp_evk.h

mx7ulp_evk.h\configs\include - uboot-imx - i.MX U-Boot 

Note, only Linux 4.9.88_2.0.0 BSP should be used for i.MX7ULP, as only this release

currently supports this processor, as stated in Release Notes included in documentation:

https://www.nxp.com/webapp/Download?colCode=L4.9.88_2.0.0_LINUX_DOCS&Parent_nodeId=13376994810717061... 


Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,398 Views
sam_liu
Contributor II

Hi igorpadykov,

  Thanks for your help ,according to your advise  the u-boot on my customer board can correctly working.

(the SDRAM size in my customer board is 1Gibits=128MiB)

Actually I'm not only  modify "#define PHYS_SDRAM_SIZE  SZ_128M " but also modify the parameter as below:

//== [mx7ulp_evk.h] =================================

from:

"#define CONFIG_SYS_MALLOC_LEN (8*SZ_1M)" 

to:

"#define CONFIG_SYS_MALLOC_LEN (4*SZ_1M)"

//===============================================

But now my customer board just can boot up till "Starting kernel ..." message ,and then it's halt .

I also trace the u-boot source code ,it's seem to stuck at "kernel_entry(0, machid, r2);" in bootm.c file.

Whether change the parameter "#define CONFIG_SYS_MALLOC_LEN (4*SZ_1M)" affect the Linux kernel?

Or there are other reasons cause this bug?

Could you give me some hits of this issue.

Thanks.

1,398 Views
igorpadykov
NXP Employee
NXP Employee

Hi Sam

had you run ddr test for that part as for example for i.MX6Q (i.MX6/7 DDR Stress Test Tool V2.90 )

i.MX7ULP Register Programming Aids 

As i.MX7ULP is still in preproduction stage this tool is not publicly available yet, you will have to wait its

public release

i.MX 7ULP Applications Processor | Single Arm® Cortex®-A7 + Cortex-M4 with ultra low power |NXP 

Best regards
igor

0 Kudos