LS1028A: Preboot fails in get_ddrc_version() for FlexSpi NOR boot but not for SD boot

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

LS1028A: Preboot fails in get_ddrc_version() for FlexSpi NOR boot but not for SD boot

Jump to solution
690 Views
rpk
Contributor II

Hi,

We are struggling with a very strange problem related to accessing the DDR controller. The very first time this happens is in bl2_el3_early_platform_setup() when get_ddrc_version() is called by dram_init() - which is again called by _init_ddr(). This works fine when booting from SD card but incredibly it fails when booting from NOR flash. It is the following instruction that causes execution to stop:

ver = (ddr_in32(&ddr->ip_rev1& 0xFFFF<< 8

The value of ip_rev1 is exactly the same for NOR boot as with SD boot. I have been unable to find any differences between booting from NOR flash and SD card that could cause this.

Any ideas anyone?

Labels (1)
0 Kudos
1 Solution
625 Views
rpk
Contributor II

Found out why! The reason was a difference in RCW DDR_REFCLK_SEL field between SD boot and NOR Flash versions.

If DDR_REFCLK_SEL == 0, then any access to DDR controller will freeze.

It needs to be value 2 !

View solution in original post

0 Kudos
1 Reply
626 Views
rpk
Contributor II

Found out why! The reason was a difference in RCW DDR_REFCLK_SEL field between SD boot and NOR Flash versions.

If DDR_REFCLK_SEL == 0, then any access to DDR controller will freeze.

It needs to be value 2 !

0 Kudos