-2

I currently use a custom board based on SAMa5D31:

  1. Emmc is currently used for boot
  2. The Uboot fails to be started

Stuck in SD/MMC: Done to load image without any reaction

image

liu zj
  • 25
  • 5
  • 1
    *"I currently use a custom board"* -- AT91Bootstrap executes from the (internal) SRAM. U-Boot is loaded into and executes from the *external* DRAM. What have you done to verify the functionality of the *external* DRAM? – sawdust Feb 24 '22 at 05:27
  • @sawdust Thank you for your reminding, I have found the problem, we use DDR2 MT47H32M16, is 4BANK, can work normally after modification – liu zj Feb 24 '22 at 12:10

1 Answers1

0

Modify the following

diff --git a/board/sama5d3xek/sama5d3xek.c b/board/sama5d3xek/sama5d3xek.c
index 57093b58..153749ce 100644
--- a/board/sama5d3xek/sama5d3xek.c
+++ b/board/sama5d3xek/sama5d3xek.c
@@ -75,12 +75,12 @@ static void ddramc_reg_config(struct ddramc_register *ddramc_config)
                | AT91C_DDRC2_MD_DDR2_SDRAM);
 
    ddramc_config->cr = (AT91C_DDRC2_NC_DDR10_SDR9
-               | AT91C_DDRC2_NR_14
+               | AT91C_DDRC2_NR_13
                | AT91C_DDRC2_CAS_3
                | AT91C_DDRC2_DISABLE_RESET_DLL
                | AT91C_DDRC2_ENABLE_DLL
                | AT91C_DDRC2_ENRDM_ENABLE       /* Phase error correction is enabled */
-               | AT91C_DDRC2_NB_BANKS_8
+               | AT91C_DDRC2_NB_BANKS_4
                | AT91C_DDRC2_NDQS_DISABLED      /* NDQS disabled (check on schematics) */
                | AT91C_DDRC2_DECOD_INTERLEAVED  /* Interleaved decoding */
                | AT91C_DDRC2_UNAL_SUPPORTED);   /* Unaligned access is supported */
liu zj
  • 25
  • 5