Hi @trongthinh,
Thank you for contacting NXP Support.
/* Totally 6GB DDR */
#define CONFIG_SYS_SDRAM_BASE 0x40000000 //This refers to the base where the memory starts.
#define PHYS_SDRAM 0x40000000 //This refers to the starting point too.
#define PHYS_SDRAM_SIZE 0xC0000000 /* 3 GB */ //This value is the size that you will need for your first die on your memory. In this case 3GB.
#define PHYS_SDRAM_2 0x100000000 //This refers to the starting point too.
#ifdef CONFIG_TARGET_IMX8MP_DDR4_EVK
#define PHYS_SDRAM_2_SIZE 0x40000000 /* 1 GB */ //This is a configuration for 1GB size
#else
#define PHYS_SDRAM_2_SIZE 0xC0000000 /* 3 GB */ //This is a configuration for 3GB size
#endif
You will need to configure this code based on your memory datasheet.
I hope this information will be helpful.
Have a great day!