Configure RAM capacity in u-boot for iMX8MP

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Configure RAM capacity in u-boot for iMX8MP

跳至解决方案
1,233 次查看
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!

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
1,189 次查看
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 项奖励
回复
1 回复
1,190 次查看
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 项奖励
回复