imx8mp boards with different RAM size

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

imx8mp boards with different RAM size

227 Views
arno_0
Contributor III

We have board polulated with different RAM size, 2 and 4 GB. As far as I can see the RAM size needs to be set up in bootloader by a (as for instance EVK board in /include/configs ...):

/* Totally 6GB DDR */
#define CFG_SYS_SDRAM_BASE 0x40000000
#define PHYS_SDRAM 0x40000000
#define PHYS_SDRAM_SIZE 0xC0000000 /* 3 GB */
#define PHYS_SDRAM_2 0x100000000
#define PHYS_SDRAM_2_SIZE 0xC0000000 /* 3 GB */

Is there any way to have a single Bootloader (so one for both boards) recognise and support different RAM sizes?

Or is it possible to start with smallest subset and "declare" a bigger RAM while booting the kernel?

0 Kudos
4 Replies

151 Views
arno_0
Contributor III

Well - but what options do I have to either select 2 or 4GB setting?

Can I read environment in SPL? I guess not. Also I can't use GPIOs.

Is there any other kind of "probing"?

0 Kudos

126 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You can use simple i2c eeprom to store board info, and read it at the beginning of SPL as the SPL has enabled the i2c function at this time, just like pmic_reg_write function.

0 Kudos

112 Views
arno_0
Contributor III

Yeah, that is what happens in PCs, to have some storage node for this data. But the board is already produced, just the DDR memory is replaced with no other change in design. That is why I can't check GPIOs or some tiny I2C flash.

So the environment is my best (only) option (if this is possible at all). Otherwise I have to deal with two different hard coded uboots, which is a pain in handling too.

Was really surprised to see that neither devicetree in uboot (which wouldn't help here) nor that one in kernel is really used.

0 Kudos

174 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @arno_0 

Need modify SPL logic and modify PHYS_SDRAM_2_SIZE/PHYS_SDRAM_SIZE and timings  before SPL initialize the DDR.

 

0 Kudos