AM625: u-boot failed to initialize 8Gb of DDR4 with sysconfig configuration

Part Number: AM625
Other Parts Discussed in Thread: SYSCONFIG,

Tool/software:

Hello,

I got the last version of our custom design base on AM265 with 2x32Gbits DDR4 chip (Micron MT40A4G8NEA-062E:F) connected to CS0 and CS1.

I use the DDR sysconfig tools to generate the configuration, the file is joined: 

Data Bus Width (per device) 8
Density (per device) (Gb) 32
Chip Selects / Ranks 2

The default memory mapping device tree configuration is:

k3-am625-sk.dts
        memory@80000000 {
                device_type = "memory";
               /* 4G RAM */
               reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
                       <0x00000008 0x80000000 0x00000000 0x80000000>;

        };

k3-am62x-sk-common.dtsi
        memory@80000000 {
                bootph-pre-ram;
                device_type = "memory";
               /* 4G RAM */
               reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
                       <0x00000008 0x80000000 0x00000000 0x80000000>;
        };


The 8GB memory mapping device tree configuration is:

k3-am625-sk.dts
        memory@80000000 {
                device_type = "memory";
               /* 8G RAM */
               reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
                       <0x00000008 0x80000000 0x00000001 0x80000000>;

        };

k3-am62x-sk-common.dtsi
        memory@80000000 {
                bootph-pre-ram;
                device_type = "memory";
               /* 8G RAM */
               reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
                       <0x00000008 0x80000000 0x00000001 0x80000000>;
        };

The bank 0 size is 2GBytes, and the bank 1 size is 6GBytes.

I don't know 

This configuration is correctly handle by the u-boot command bdinfo.

=> bdinfo
boot_params = 0x0000000000000000
DRAM bank = 0x0000000000000000
-> start = 0x0000000080000000
-> size = 0x0000000080000000
DRAM bank = 0x0000000000000001
-> start = 0x0000000880000000
-> size = 0x0000000180000000
flashstart = 0x0000000000000000
flashsize = 0x0000000000000000
flashoffset = 0x0000000000000000
baudrate = 115200 bps
relocaddr = 0x00000000fff03000
reloc off = 0x000000007f703000
Build = 64-bit
current eth = ethernet@8000000port@1
ethaddr = 28:b5:e8:d4:64:6b
IP addr = 10.0.0.5
fdt_blob = 0x00000000fded0670
new_fdt = 0x00000000fded0670
fdt_size = 0x0000000000013700
multi_dtb_fit= 0x0000000000000000
lmb_dump_all:
memory.cnt = 0x2 / max = 0x10
memory[0] [0x80000000-0xffffffff], 0x80000000 bytes flags: 0
memory[1] [0x880000000-0x9ffffffff], 0x180000000 bytes flags: 0
reserved.cnt = 0x6 / max = 0x10
reserved[0] [0x9c700000-0x9c7fffff], 0x00100000 bytes flags: 0
reserved[1] [0x9c800000-0x9d9fffff], 0x01200000 bytes flags: 4
reserved[2] [0x9db00000-0x9e6fffff], 0x00c00000 bytes flags: 4
reserved[3] [0x9e780000-0x9fffffff], 0x01880000 bytes flags: 4
reserved[4] [0xfcec3000-0xffffffff], 0x0313d000 bytes flags: 0
reserved[5] [0x880000000-0x9ffffffff], 0x180000000 bytes flags: 0
devicetree = separate
serial addr = 0x0000000002800000
width = 0x0000000000000000
shift = 0x0000000000000002
offset = 0x0000000000000000
clock = 0x0000000002dc6c00
stack ptr = 0x00000000fdecf9f8
ram_top ptr = 0x0000000100000000
malloc base = 0x00000000fdee4000
arch_number = 0x0000000000000000
TLB addr = 0x00000000ffff0000
irq_sp = 0x00000000fdecfff0
sp start = 0x00000000fdecfff0
Early malloc usage: 3bc0 / 8000

But the command meminfo doesn't indicates the correct value : 

=> meminfo
DRAM:  2 GiB

The memory access failed over the 2GBytes in bank1: 

=> mw.b 0x900000000 55
"Synchronous Abort" handler, esr 0x96000045, far 0x900000000
elr: 000000008081daa4 lr : 000000008081da24 (reloc)
elr: 00000000fff20aa4 lr : 00000000fff20a24
x0 : 0000000000000000 x1 : 0000000900000000
x2 : 0000000000000001 x3 : 00000000fdf03df2
x4 : 0000000000000100 x5 : 0000000000000000
x6 : 00000000fffb00ad x7 : 0000000000000044
x8 : 0000000000000010 x9 : 0000000000000005
x10: 0000000000000006 x11: 000000000001869f
x12: 00000000ffffffff x13: 0000000100000000
x14: 00000000ffffffff x15: 00000000fdecf848
x16: 00000000fff209bc x17: 0000000000000000
x18: 00000000fdee3d70 x19: 0000000900000000
x20: 0000000000000001 x21: 0000000000000055
x22: 00000000fdefc650 x23: 0000000000000003
x24: 00000000fffea840 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 00000000fdf03e10 x29: 00000000fdecfcf0

Code: 71000a9f 54000061 79000035 17fffff7 (39000035)
Resetting CPU ...

resetting ...

Could you help us to identify fix the issue.

 k3-am62x-ddr-config-8-32-2.txt

  • Alexis, let me double check with the software team on the device tree changes.

    In the meantime, can you try with:

    Data Bus Width (per device) 8
    Density (per device) (Gb) 16
    Chip Selects / Ranks 2

    Regards,

    James

  • Hello James,

    Here are the information return by u-boot with the configuration: 

    Data Bus Width (per device) 8
    Density (per device) (Gb) 16
    Chip Selects / Ranks 2

    => bdinfo
    boot_params = 0x0000000000000000
    DRAM bank   = 0x0000000000000000
    -> start    = 0x0000000080000000
    -> size     = 0x0000000080000000
    DRAM bank   = 0x0000000000000001
    -> start    = 0x0000000880000000
    -> size     = 0x0000000080000000
    flashstart  = 0x0000000000000000
    flashsize   = 0x0000000000000000
    flashoffset = 0x0000000000000000
    baudrate    = 115200 bps
    relocaddr   = 0x00000000fff03000
    reloc off   = 0x000000007f703000
    Build       = 64-bit
    current eth = ethernet@8000000port@1
    ethaddr     = 28:b5:e8:d4:64:6b
    IP addr     = 10.0.0.5
    fdt_blob    = 0x00000000fded0670
    new_fdt     = 0x00000000fded0670
    fdt_size    = 0x0000000000013700
    multi_dtb_fit= 0x0000000000000000
    lmb_dump_all:
     memory.cnt = 0x2 / max = 0x10
     memory[0]      [0x80000000-0xffffffff], 0x80000000 bytes flags: 0
     memory[1]      [0x880000000-0x8ffffffff], 0x80000000 bytes flags: 0
     reserved.cnt = 0x6 / max = 0x10
     reserved[0]    [0x9c700000-0x9c7fffff], 0x00100000 bytes flags: 0
     reserved[1]    [0x9c800000-0x9d9fffff], 0x01200000 bytes flags: 4
     reserved[2]    [0x9db00000-0x9e6fffff], 0x00c00000 bytes flags: 4
     reserved[3]    [0x9e780000-0x9fffffff], 0x01880000 bytes flags: 4
     reserved[4]    [0xfcec7000-0xffffffff], 0x03139000 bytes flags: 0
     reserved[5]    [0x880000000-0x8ffffffff], 0x80000000 bytes flags: 0
    devicetree  = separate
    serial addr = 0x0000000002800000
     width      = 0x0000000000000000
     shift      = 0x0000000000000002
     offset     = 0x0000000000000000
     clock      = 0x0000000002dc6c00
    stack ptr   = 0x00000000fdecf9f8
    ram_top ptr = 0x0000000100000000
    malloc base = 0x00000000fdee4000
    arch_number = 0x0000000000000000
    TLB addr    = 0x00000000ffff0000
    irq_sp      = 0x00000000fdecfff0
    sp start    = 0x00000000fdecfff0
    Early malloc usage: 3bc0 / 8000

    I use the device tree file generated by the tool DDR sysconfig for the AM625.

    There is no error accessing the no reserve memory in bank 0 and bank 1.

    Regards,

    Alexis.

  • Hi Alexis, so are you able to uniquely access the full 8GByte range?

    Regards,

    James