u-boot fails to boot with 4GB RAM on i.MX8mq

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

u-boot fails to boot with 4GB RAM on i.MX8mq

6,786 Views
PKZ
Contributor III

Hi,

We have a custom board based on i.mx8mq with DD4 4GB, and it fails to boot with 4GB configuration in u-boot.

The code updated is:

in header file:

from #define PHYS_SDRAM_SIZE 0xC0000000 to #define PHYS_SDRAM_SIZE 0x100000000

in dtsi file:

memory@40000000 {
    device_type = "memory";
    reg = <0x00000000 0x40000000 0 0x100000000>;
};

Note: it boots up successfully with 3GB setting.

The bootlog is below

check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
Training PASS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
Normal Boot
Trying to boot from MMC1


U-Boot 2017.03 (May 25 2018 - 16:53:01 +0800)

CPU: Freescale i.MX8MQ rev2.0 1500 MHz (running at 1000 MHz)
CPU: Commercial temperature grade (0C to 95C) at 43C
Reset cause: POR
Model: LF COM i.MX8MQ
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits

Any idea? Anywhere else to update?

With 3GB configuration in u-boot and 4GB configuration in kernel dtsi file, the kernel still shows 3GB.

Thanks.

Regards

PK

Labels (1)
Tags (2)
10 Replies

4,441 Views
andrewbaghdasar
Contributor I

Hello,

Are you planning to fix this ? We are seeing the same issue when u-boot is configured with 4GB with the latest BSP release, see logs below, I can also confirm that with 3GB configuration it works !

U-Boot 2018.03-svn190497 (Apr 15 2020 - 10:34:38 +0400)

CPU: Freescale i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 52C
Reset cause: WDOG
Model: FSL i.MX8MM EVK board
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
*** Warning - bad CRC, using default environment

Failed (-5)
No panel detected: default to MIPI2HDMI
Display: MIPI2HDMI (1920x1080)
Video: 1920x1080x24
In: serial
Out: serial
Err: serial

BuildInfo:
- ATF 1cb68fa
- U-Boot 2018.03-svn190497

Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits
switch to partitions #0, OK
mmc0 is current device
Detect USB boot. Will enter fastboot mode!
Net: "Synchronous Abort" handler, esr 0x96000210
elr: 000000004021af3c lr : 000000004023156c (reloc)
elr: 000000013ff2cf3c lr : 000000013ff4356c
x0 : 000000003f103340 x1 : 0000000000002383
x2 : 000000013ff914a0 x3 : 0000000000000ba0
x4 : 000000013f11c300 x5 : 000000013f11c460
x6 : 0000000000000001 x7 : 000000013ff914a0
x8 : 000000013f11c460 x9 : 0000000000000008
x10: 00000000ffffffd8 x11: 000000013e90a500
x12: 000000000000512e x13: 0000000000005118
x14: 000000013e90a2ac x15: 00000000ffffffff
x16: 0000000000001080 x17: 0000000000000000
x18: 000000013e911da0 x19: 0000000000000008
x20: 000000013e915950 x21: 0000000000000000
x22: 000000013e9146b0 x23: 000000013f11bd00
x24: 000000013e914770 x25: 00000000000001f8
x26: 0000000080000000 x27: 0000000000000000
x28: 0000000000000000 x29: 000000013e90a360

Resetting CPU ...

resetting ...

Regards,

Andrew.

0 Kudos
Reply

4,441 Views
bryant_hayes
Contributor I

Is there any new update for this issue. We have tried to utilize the entire 4GB on the latest Sumo builds (4.14.78), and we get the same issue.

...
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Error found for upper 32 bits
Error found for upper 32 bits
Error found for upper 32 bits

...

Could someone from NXP please give input on this issue. It seems like there are claims that 4GB should work in 4.14.78, but we don't seem to be getting any support here.

0 Kudos
Reply

4,441 Views
nirmalluhana
Contributor IV

Hello all,

I have been facing the same problem.

Have you had any progress with getting 4GB to work on IMX8MQ?

Best,

Nirmal

0 Kudos
Reply

4,441 Views
PKZ
Contributor III

Hi,

As per local FAE, the issue is fixed in the latest BSP release https://www.nxp.com/webapp/Download?colCode=L4.14.78_1.0.0_MX8MQ&appType=license.

I have not tried/verified though.

Regards,

PK

4,441 Views
bryant_hayes
Contributor I

We have been struggling with the same problem. It appears that because u-boot is 32-bit, when u-boot relocates to the end of DRAM, the crash would occur. When we use 3GB, it works fine. I think I saw that the iMX6 uses RAM blocks to make it work?

Have you had any progress with getting 4GB to work on your IMX8MQ?

Best,

Bryant

0 Kudos
Reply

4,441 Views
shwetha_nayak
Contributor I

Hello all,

Any update on this

0 Kudos
Reply

4,440 Views
igorpadykov
NXP Employee
NXP Employee

Hi PK

according to sect.2.1.2 Cortex-A53 Memory Map i.MX8MDQ Reference Manual

max. ddr size is 3GB for "DDR Memory (All modules)"

https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

4,440 Views
PKZ
Contributor III

Hi igor,

Thanks for your reply. I have cheked that. But, it is also mentioned that for A-53Q, there is additional 1GB address space.

Doesn't it mean that max DDR for A-53Q is 4GB? 

But there is no details/not documented in the BSP docs where and how we can specify this in code/device tree such that only A-53 uses the addition 1GB memory and all other modules access only the 3GB.

pastedImage_1.png

Regards,

PK

0 Kudos
Reply

4,441 Views
igorpadykov
NXP Employee
NXP Employee

Hi PK

recommended to recheck memory configuration, new initialization script for DDR Tool

new .c files for U-boot SPL need to be generated:

i.MX 8M DDR Tool Release 

(More detailed description can be found in DDR Tool User Guide)

Best regards
igor

0 Kudos
Reply

4,441 Views
PKZ
Contributor III

Hi igor,

Thanks again for the reply.

I am using the new init script based on new script ( MX8M_LPDDR4_register_programming_aid_EVK_preliminiary_v15.xlsx)

Updated with density for 32Gb as below:

Density per channel (Gb)1:16
Number of Channels 2
Number of Chip Selects used22
Total DRAM density (Gb)32
Number of ROW Addresses216
Number of COLUMN Addresses210
Number of BANK addresses23
Number of BANKS28
Bus Width 32
Clock Cycle Freq (MHz)31600
Clock Cycle Time (ns)0.625
FREQ1 setpoint Clock Cycle Freq (MHz)334
FREQ1 Clock Cycle Time (ns)2.994011976
FREQ2 setpoint Clock Cycle Freq (MHz)50
FREQ2 Clock Cycle Time (ns)20

However, the auto-updated value for ADDRMAP6  is 0x07070707.

If I understand correctly, I should not be modifying this value manually, it should be update based on the parameters above.

Any suggestions?

Regards,

Paramod

0 Kudos
Reply