AM5728: EMIF enable and disable

Part Number: AM5728

Tool/software:

Hi,
Currently I am using an AM57xx board which uses 2 EMIF of 2GB each , i followed the steps given below to enable the 4GB ram section,

Supporting 4GB Memory
To support a total of 4GB interleaved memory (2GB each on EMIF1 and EMIF2), the LISA map would be:
const struct dmm_lisa_map_regs Example_dmm_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
};
Add the following lines to your defconfig file (include/configs/am57xx_evm.h):
#define CONFIG_VERY_BIG_RAM
#define CONFIG_MAX_MEM_MAPPED 0x80000000
CONFIG_PHYS_64BIT=y
Also include the following function in board/ti/am57xx/board.c:
int dram_init_banksize(void)
{
u64 ram_size;
ram_size = board_ti_get_emif_size();
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;
}

This was given in https://www.ti.com/lit/an/sprac36e/sprac36e.pdf?ts=1728291424014&ref_url=https%253A%252F%252Fwww.google.com%252F this PDF
 ,to use only EMIF 1 and disable EMIF 2 i did the following changes


only added the below lines in board.c

.dmm_lisa_map_3 = 0x80740300,
.is_ma_present  = 0x1
and removed

int dram_init_banksize(void)
{
u64 ram_size;
ram_size = board_ti_get_emif_size();
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;
}
Also, removed these 3 lines from evm.h

#define CONFIG_VERY_BIG_RAM
#define CONFIG_MAX_MEM_MAPPED 0x80000000
#define CONFIG_PHYS_64BIT

please guide me on how to do the below two cases :

  1. Enable only EMIF 1 and disable EMIF 2 to use only 2GB( if my above method is not correct ).
  2. Disable EMIF 2 and use EMIF 1 to use only the second 2GB

i would like the resolve the above two issues at the earliest , looking forward to your reply.

Regards
Roshan Rajagopal