This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Booting Issue with 4GIB EMIF

Part Number: AM5728

Tool/software:

Hi,

Previously i had compiled uboot in SDK 5.03 with 4GIB emif support using what was given in the EMIF Tool guide and had added the necessary changes to my board.c file and evm.h file which are

board.c-

const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
    .dmm_lisa_map_0 = 0x00000000,
    .dmm_lisa_map_1 = 0x00000000,
    .dmm_lisa_map_2 = 0x80740300,
    .dmm_lisa_map_3 = 0xFF020100,
    .is_ma_present = 0x1
};

int dram_init_banksize(void)
{
    u64 ram_size;
    ram_size = 0x100000000;
    gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
    gd->bd->bi_dram[0].size = get_effective_memsize();
    if (ram_size > CONFIG_MAX_MEM_MAPPED) {
    gd->bd->bi_dram[1].start = 0x200000000;
    gd->bd->bi_dram[1].size = ram_size - CONFIG_MAX_MEM_MAPPED;
    }
    return 0;
}

evm.h

#define CONFIG_VERY_BIG_RAM
#define CONFIG_MAX_MEM_MAPPED 0x80000000

#define CONFIG_PHYS_64BIT 

and with the above changes my board used to boot with SDK5.03 uboot , now i am trying to make the same happen in SDK 9.02 version and it doesn't work.


i noticed that CONFIG_PHYS_64BIT was added in the config so i had skipped it in evm.h and made the other changes but during compilation i had faced the below error

board/ti/am57xx/board.c: In function ‘dram_init_banksize’:
board/ti/am57xx/board.c:757:36: error: ‘CONFIG_SYS_SDRAM_BASE’ undeclared (first use in this function); did you mean ‘CONFIG_SYS_SRAM_BASE’?
  757 |         gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
      |                                    ^~~~~~~~~~~~~~~~~~~~~
      |                                    CONFIG_SYS_SRAM_BASE
board/ti/am57xx/board.c:757:36: note: each undeclared identifier is reported only once for each function it appears in
board/ti/am57xx/board.c:760:36: warning: unsigned conversion from ‘long long int’ to ‘phys_addr_t’ {aka ‘long unsigned int’} changes value from ‘8589934592’ to ‘0’ [-Woverflow]
  760 |         gd->bd->bi_dram[1].start = 0x200000000;
      |                                    ^~~~~~~~~~~
At top level:
board/ti/am57xx/board.c:1618:12: warning: ‘board_bootmode_has_emmc’ defined but not used [-Wunused-function]
 1618 | static int board_bootmode_has_emmc(void)
      |            ^~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:257: board/ti/am57xx/board.o] 

so if i comment out the int dram_init_banksize(void) section from board.c it compiles my u-boot.img and MLO but the board boots with only 2GIB section as shown below 


U-Boot SPL 2023.04-dirty (Jun 17 2025 - 19:24:32 +0530)                         
DRA752-GP ES2.0                                                                 
Trying to boot from MMC1                                                        
Loading Environment from FAT... *** Error - No Valid Environment Area found     
*** Warning - bad env area, using default environment                           
                                                                                
Loading Environment from MMC... *** Warning - bad CRC, using default environment
                                                                                
                                                                                
                                                                                
U-Boot 2023.04-dirty (Jun 17 2025 - 19:24:32 +0530)                             
                                                                                
CPU  : DRA752-GP ES2.0                                                          
Model: FA SBC5728                                                               
Board: FA SBC 5728                                                              
DRAM:  2 GiB                                                                    
Core:  65 devices, 21 uclasses, devicetree: separate                            
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1                                           
Loading Environment from FAT... *** Error - No Valid Environment Area found     
*** Warning - bad env area, using default environment                           
                                                                                
Loading Environment from MMC... *** Warning - bad CRC, using default environment
                                                                                
Net:   eth2: ethernet@48484000                                                  
Hit any key to stop autoboot:  0                                                
switch to partitions #0, OK                                                     
mmc0 is current device                                                          
SD/MMC found on device 0                                                        
4035072 bytes read in 200 ms (19.2 MiB/s)                                       
100159 bytes read in 29 ms (3.3 MiB/s)                                          
Working FDT set to 88000000                                                     
Kernel image @ 0x82000000 [ 0x000000 - 0x3d9200 ]                               
Working FDT set to 88000000                                                     
OK                                                                              
Working FDT set to 8fee4000                                                     
                                                                                
Starting kernel ...                                                             
                                                                                
[    0.000000] Booting Linux on physical CPU 0x0                                
[    0.000000] Linux version 4.14.79-ge669d52447 (rajatrao@rajatrao) (gcc versi1
[    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d  
[    0.000000] CPU: div instructions available: patching division code          
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache  
[    0.000000] OF: fdt: Machine model: FA SBC5728                               
[    0.000000] Memory policy: Data cache

so if i keep the int dram_init_banksize(void) section and add #define CONFIG_SYS_SDRAM_BASE 0x80000000 in the evm.h , it compiles but my board doesn't boot i get only the below 


U-Boot 2023.04-dirty (Jun 17 2025 - 19:32:19 +0530)                             
                                                                                
CPU  : DRA752-GP ES2.0                                                          
Model: FASBC5728                                                               
Board: FA SBC5728                                                              
DRAM:  2 GiB (effective 4GiB)                                                  


after this the board stops booting.
Could you help me boot the board with 4GIB emif configuration in SDK 9.03 uboot.

Regards,
Roshan Rajagopal