Configure RAM capacity in u-boot for iMX8MP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configure RAM capacity in u-boot for iMX8MP

Jump to solution
658 Views
trongthinh
Contributor IV

In the file: https://github.com/nxp-imx/uboot-imx/blob/7376547b9e424b2d0f42dfe96394168c781ca297/include/configs/i...

has the following code:

/* Totally 6GB DDR */
#define CONFIG_SYS_SDRAM_BASE		0x40000000
#define PHYS_SDRAM			0x40000000
#define PHYS_SDRAM_SIZE			0xC0000000	/* 3 GB */
#define PHYS_SDRAM_2			0x100000000
#ifdef CONFIG_TARGET_IMX8MP_DDR4_EVK
#define PHYS_SDRAM_2_SIZE		0x40000000	/* 1 GB */
#else
#define PHYS_SDRAM_2_SIZE		0xC0000000	/* 3 GB */
#endif

Because I changed the RAM capacity from 6GB (according to Kit iMX8MP-evk) to 4GB. so I need to understand the meaning of this code to change it. Please explain to me. Thank you!

Labels (1)
0 Kudos
Reply
1 Solution
614 Views
brian14
NXP TechSupport
NXP TechSupport

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!

View solution in original post

0 Kudos
Reply
1 Reply
615 Views
brian14
NXP TechSupport
NXP TechSupport

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!

0 Kudos
Reply