SAMA5D27C-LD2G u-boot relocation freeze

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

cerffg
Posts: 2
Joined: Thu Sep 26, 2019 2:27 pm

SAMA5D27C-LD2G u-boot relocation freeze

Mon Oct 07, 2019 10:51 am

Hi

I have a custom board built around the SAMA5D27C-LD2G. I modified the wlsom1ek files to suit our board.
AT91Bootstrap is correctly loading u-boot into DRAM and executing the first part perfectly as shown below. As soon as 'board_init_r' is branched to the console disappears and the processor seems to reset.

Any pointers on how to get around this problem?

RomBOOT
Starting


AT91Bootstrap 3.9.0-rc2-00004-g7d8b3d6-dirty (Thu Oct 3 16:49:16 SAST 2019)

All interrupts redirected to AIC
SD/MMC: Image: Read file u-boot.bin to 0x26f00000
MMC: ADMA supported
mmc_verify_operating_condition
SDHC: Timeout waiting for command complete
SD: Card Capacity: High or Extended
sd card identified with CID = 0x3534453 0x53303847 0x80f40982 0xf1011aff
sdcard_identification success
SD: Specification Version 3.0X
SD/MMC: Done to load image
<debug_uart - GC>

U-Boot 2019.04-linux4sam_6.1-00033-g7f9b16d4e2-dirty (Oct 07 2019 - 10:32:51 +0200)

display_text_infoU-Boot code: 26F00000 -> 26F639AC BSS: -> 26F7956C
CPU: SAMA5D27 2G bits LPDDR2 SDRAM
Crystal frequency: 24 MHz
CPU clock : 492 MHz
Master clock : 164 MHz
DRAM: Monitor len: 0007956C
Ram size: 10000000
Ram top: 30000000
TLB table from 2fff0000 to 2fff4000
Reserving 485k for U-Boot at: 2ff76000
Reserving 4096k for malloc() at: 2fb76000
Reserving 104 Bytes for Board Info at: 2fb75f98
Reserving 256 Bytes for Global Data at: 2fb75e98
Reserving 18112 Bytes for FDT at: 2fb717d8

RAM Configuration:
Bank #0: 20000000 Bank #1: 0 Bank #2: 0 Bank #3: 0
DRAM: 256 MiB
New Stack Pointer is: 2fb717b0
Relocation Offset is: 09076000
Relocating to 2ff76000, new gd at 2fb75e98, sp at 2fb717b0
blue_z
Location: USA
Posts: 2005
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D27C-LD2G u-boot relocation freeze

Wed Oct 09, 2019 12:37 am

cerffg wrote: RAM Configuration:
Bank #0: 20000000 Bank #1: 0 Bank #2: 0 Bank #3: 0
DRAM: 256 MiB
Looks like you do not have the RAM properly configured or defined (in U-Boot).
Besides the zero/undefined start addresses (and sizes) for banks #1 through #3, the SiP datasheet indicates there are actually eight (8) banks of LPDDR2-SDRAM.
Note that the standard SOM1-EK configuration defines just one DRAM bank, apparently because all DRAM is contiguous.

Consider adding a memory tester to AT91Bootstrap to verify that the DRAM controller has been properly initialized and all DRAM is accessible.

Regards
cerffg
Posts: 2
Joined: Thu Sep 26, 2019 2:27 pm

Re: SAMA5D27C-LD2G u-boot relocation freeze

Wed Oct 09, 2019 8:26 am

Thanks for the reply!

I failed to mention that I have done a simplistic memory test from at91bootstrap with a 32bit counter across the whole memory and then verification once it is complete. I also verified the implementation by exceeding the DRAM size - it then fails predictably.

The DRAM has 8 banks, but that is set up in AT91Bootstrap. Thereafter it is one contiguous 256MB block Starting at 0x20000000?
As far as I can gather the number of memory bank is a parameter set in the u-boot configuration. I have set it to 1 bank with the same results.

Kind regards
blue_z
Location: USA
Posts: 2005
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D27C-LD2G u-boot relocation freeze

Wed Oct 09, 2019 11:30 pm

cerffg wrote:
Wed Oct 09, 2019 8:26 am
I failed to mention that I have done a simplistic memory test from at91bootstrap with a 32bit counter across the whole memory and then verification once it is complete. I also verified the implementation by exceeding the DRAM size - it then fails predictably.
The only information I learned from that brief description is that you don't have a DDR_VREF issue.
Is that simplistic test sufficient to determine that every address is accessible and unique? IOW there are bad algorithms that generate unreliable results.
There must be no lingering doubt that physical RAM could be the issue.

cerffg wrote:
Wed Oct 09, 2019 8:26 am
As far as I can gather the number of memory bank is a parameter set in the u-boot configuration. I have set it to 1 bank with the same results.
If you're going to absolve the hardware, then that leaves the software.
How did you end up with a configuration of 4 memory banks?
Perhaps you need to review the entire configuration?

What toolchain are you using?
Maybe you need to resort to a JTAG debuger. (The relocation routine is written in assembly language, so that's convenient.)

FWIW I can run U-Boot 2019.04, Linux4SAM 6.1 release, on a SAMA5D27C board.

Regards

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest