How to change uboot source for lpddr 4GB on i.MX 8M Plus-EVK board

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

How to change uboot source for lpddr 4GB on i.MX 8M Plus-EVK board

292 Views
ryan_81
Contributor II

I have an i.MX 8M Plus-EVK  board with lpddr 6GB size.

I am trying to change ddr size 6GB to 4GB.

But I don't understand how to change uboot source.

 

1. include/configs/imx8mp_evk.h

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

I checked define CONFIG_TARGET_IMX8MP_DDR4_EVK=y. This setup should work for a total of 4GB. why ddr size is 6GB?

2. dtb in uboot

memory@40000000 {
device_type = "memory";
reg = <0x0 0x40000000 0 0xc0000000>, /* 3GB */
<0x1 0x00000000 0 0xc0000000>; /* 3GB */
};

I checked memory map in 2.2 Cortex-A53 Memory map of i.MX 8M Plus Application Processor Reference Manual.

----------------------------------------------------------------------------------------------------------------------------------

1_0000_0000 |  2_3FFF_FFFF  |  DDR Address  |  5120MB DDR | Memory (All modules except M7)
4000_0000     |  FFFF_FFFF      |  DDR  Address |  3072MB DDR | Memory (All modules)

----------------------------------------------------------------------------------------------------------------------------------

I do not understand  line "<0x1 0x00000000 0 0xc0000000>; /* 3GB */".

Does it have something to do with PHYS_SDRAM_2_SIZE and <0x1 0x00000000 0 0xc0000000> ?

please let me know how to work it. 

 

Finally I am trying to set up it follows.

reg = <0x0 0x40000000 0 0xc0000000>, /* 3GB */
<0x1 0x00000000 0 0x10000000>; /* 1GB */

 

Is it correct?

0 Kudos
2 Replies

270 Views
Rita_Wang
NXP TechSupport
NXP TechSupport
0 Kudos

262 Views
ryan_81
Contributor II

Yes, I am currently working on what you mentioned. The board booted with 4GB. However, I do not understand the modifications to imx8mp_evk.h and dtb mentioned above.
And when I run the free command on the actual system, it shows 3.5GB. Do you know why?

0 Kudos