This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: DRA756 4 x MT41K256M16TW sdram support

Other Parts Discussed in Thread: DRA756, BEAGLEBOARD-X15, TEST2, DRA752, DRA742

Tool/software: Linux

Hello:

    I made my board DRA756 with 2GB sdram.

emif1: 2 x 41K256M16TW = 1GB 

emif2: 2 x 41K256M16TW = 1GB

test 1: ERROR for ./memsize 2048

const struct dmm_lisa_map_regs lisa_map_2G_x_2_x_2_2G_x_2_x_2 = {
.dmm_lisa_map_0 = 0x00000000,
.dmm_lisa_map_1 = 0xC0600220,
.dmm_lisa_map_2 = 0x80640300,
.dmm_lisa_map_3 = 0xFF020100,
.is_ma_present = 0x1

};

test 2: ERROR for ./memsize 2048

const struct dmm_lisa_map_regs lisa_map_2G_x_2_x_2_2G_x_2_x_2 = {
.dmm_lisa_map_0 = 0x00000000,
.dmm_lisa_map_1 = 0,
.dmm_lisa_map_2 = 0,
.dmm_lisa_map_3 = 0x80740300,
.is_ma_present = 0x1

};

test 3: OK[ERROR]  for ./memsize 2048 [A few times OK, not All times ok]

const struct dmm_lisa_map_regs lisa_map_2G_x_2_x_2_2G_x_2_x_2 = {
.dmm_lisa_map_0 = 0x00000000,
.dmm_lisa_map_1 = 0xC0600200,
.dmm_lisa_map_2 = 0x80600100,
.dmm_lisa_map_3 = 0xFF020100,
.is_ma_present = 0x1

};

But I need emif1 emif2 interleaved, how can I config this.

thanks.

  • Hi Kevin,

    AM572x based BeagleBoard-X15 has the same DDR3 configuration as your custom board. It has 1Gbyte on EMIF1 and 1GByte on EMIF2, total 2GByte. And it is using the below configuration:

    u-boot/board/ti/am57xx/board.c

    static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
    .dmm_lisa_map_3 = 0x80740300,
    .is_ma_present = 0x1
    };

    *dmm_lisa_regs = &beagle_x15_lisa_regs;

    See also the below e2e thread:

    e2e.ti.com/.../554808

    Regards,
    Pavel
  • test 2: ERROR for ./memsize 2048

    I use the config test2, is the same as you regs.

    when i use memsize test the memory.

    ./memsize 2048

    1583MB OK
    1585MB OK
    1586MB OK
    [  223.446044] memsize invoked oom-killer: gfp_mask=0x2084d0, order=0, oom_score_adj=0
    [  223.453985] CPU: 1 PID: 1021 Comm: memsize Not tainted 3.14.57+ #1
    [  223.460202] Backtrace:

  • Kevin,

    Can you provide more info regarding this memsize test. Is it user space tool? Do you have it by default in the PSDKLA or it is your own tool?

    Regards,
    Pavel
  • the tool "memsize" is in the GLSDK: /home/yue/ti-glsdk_dra7xx-evm_7_03_00_03/filesystem/evm/usr/bin/memsize

    which is the default tools in rootfs (arago-glsdk-multimedia-image-dra7xx-evm.tar.gz).

    and I test on EVM(dra752) board(1.5G) and EVM(dra722) board(1G) , all ok.

  • Kevin,

    From what I see the memsize test works fine till 1.5GB then fail. You can refer to the DDR3 design of the latest DRA75x TI EVM (4GByte) and/or AM572x TI EVM (2GByte). You can also run the memsize test on these two EVMs if you have them.

    Can you also provide the u-boot log of your custom board? You can also test the DDR3 at u-boot level, see the below e2e posts for more info:

    e2e.ti.com/.../2029494

    e2e.ti.com/.../2030847

    e2e.ti.com/.../2031967

    e2e.ti.com/.../2032030


    Regards,
    Pavel
  • Hi Pavel:

          I havn't the boart DRA75x TI EVM (4GByte) and/or AM572x TI EVM (2GByte).

          I tested the config

        .dmm_lisa_map_3 = 0x80740300,     
        .is_ma_present = 0x1

         uboot msg:

    U-Boot 2014.07-svn1480 (Jan 07 2017 - 17:38:45)

    CPU  : DRA752-GP ES1.1
    Board: DRA7xx
    I2C:   ready
    DRAM:  2 GiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Using default environment

    SCSI:  Hit any key to stop autoboot:  0
    U-Boot# bdinfo
    arch_number = 0x00000000
    boot_params = 0x80000100
    DRAM bank   = 0x00000000
    -> start    = 0x80000000
    -> size     = 0x80000000
    baudrate    = 115200 bps
    TLB addr    = 0xFFFF0000
    relocaddr   = 0xFFF85000
    reloc off   = 0x7F785000
    irq_sp      = 0xFEF64DC0
    sp start    = 0xFEF64DB0
    U-Boot# md 0x4E000040 1
    4e000040: 00000000                               ....
    U-Boot# md 0x4E000044 1
    4e000044: 00000000                               ....
    U-Boot# md 0x4E000048 1
    4e000048: 00000000                               ....
    U-Boot# md 0x4E00004C 1
    4e00004c: 80740300                               ..t.

    bootup test, and I make a script

    - - - - - -

    test2g.sh

    cat test2g.sh

    memsize 2048
    memsize 2048
    memsize 2048
    memsize 2048
    memsize 2048
    memsize 2048

    - - - - - - - - -

    test MSG

    root@dra7xx-evm:~# ./test2g.sh
    1920MB OK 
    1920 ------------------------------------------------------------------>ok,sometimes OK,

    520MB OK
    572MB OK
    1019MB OK
    1361MB OK - ------------------------------------------------------------------------second, error
    [   63.915887] memsize invoked oom-killer: gfp_mask=0x2084d0, order=0, oom_score_adj=0
    [   63.923951] CPU: 0 PID: 1010 Comm: memsize Not tainted 3.14.57+ #1
    [   63.930165] Backtrace:

  • Kevin,

    Kevin.zd said:
    U-Boot# bdinfo
    arch_number = 0x00000000
    boot_params = 0x80000100
    DRAM bank   = 0x00000000
    -> start    = 0x80000000
    -> size     = 0x80000000

    Seems like your u-boot do not detect the second DRAM, like we have in AM572x:

    => bdinfo
    arch_number = 0x00000000
    boot_params = 0x80000100
    DRAM bank   = 0x00000000
    -> start    = 0x80000000
    -> size     = 0x80000000
    DRAM bank   = 0x00000001
    -> start    = 0x00000000
    -> size     = 0x00000000

    Can you try with the latest u-boot 2016.05 available at PSDKLA 3.01.00.03:

    Do you have the same there?

    Can you also try with the u-boot memsize test? What is the result?

    u-boot/doc/README.memory-test
    u-boot/common/memsize.c

    Regards,
    Pavel

  • psdk 3.01.00.03 uboot test:
    U-Boot 2016.05-dirty (Jan 11 2017 - 14:18:43 +0800)

    CPU : DRA752-GP ES1.1
    Model: TI DRA742
    Board: DRA74x EVM REV <NULL>
    DRAM: 2 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - bad CRC, using default environment


    Hit any key to stop autoboot: 0
    => bdinfo
    arch_number = 0x00000FE6
    boot_params = 0x80000100
    DRAM bank = 0x00000000
    -> start = 0x80000000
    -> size = 0x7F000000
    DRAM bank = 0x00000001
    -> start = 0x00000000
    -> size = 0x00000000
    baudrate = 115200 bps
    TLB addr = 0xFEFF0000
    relocaddr = 0xFEF44000
    reloc off = 0x7E744000
    irq_sp = 0xFDF0F300
    sp start = 0xFDF0F2F0
    =>
    => md 4e000040 4
    4e000040: 00000000 00000000 80740300 ff020100 ..........t.....


    root@dra7xx-evm:~# free
    total used free shared buffers
    Mem: 2054452 24904 2029548 0 932
    -/+ buffers: 23972 2030480
    Swap: 0 0 0

    root@dra7xx-evm:~# memsize 2048
    [ 30.407363] random: nonblocking pool is initialized
    379MB OK
    519MB OK
    769MB OK
    840MB OK
    956MB OK
    1118MB OK
    1135MB OK
    1158MB OK
    1187MB OK
    1194MB OK
    [ 43.651376] memsize invoked oom-killer: gfp_mask=0x2084d0, order=0, oom_score_adj=0
  • Kevin.zd said:
    CPU : DRA752-GP ES1.1

    Do you use DRA75x ES1.1 device?

    Kevin.zd said:
    => md 4e000040 4
    4e000040: 00000000 00000000 80740300 ff020100 ..........t.....

    These values are for 4GByte RAM. For 2GByte RAM update as below:

    dmm_lisa_map_0 (4e000040) = 0x0

    dmm_lisa_map_1 (4e000044) = 0x0

    dmm_lisa_map_2 (4e000048) = 0x0

    dmm_lisa_map_3 (4e00004C) = 0x80740300

    Kevin.zd said:
    root@dra7xx-evm:~# free
    total used free shared buffers
    Mem: 2054452 24904 2029548 0 932
    -/+ buffers: 23972 2030480
    Swap: 0 0 0

    root@dra7xx-evm:~# memsize 2048
    [ 30.407363] random: nonblocking pool is initialized
    379MB OK
    519MB OK
    769MB OK
    840MB OK
    956MB OK
    1118MB OK
    1135MB OK
    1158MB OK
    1187MB OK
    1194MB OK
    [ 43.651376] memsize invoked oom-killer: gfp_mask=0x2084d0, order=0, oom_score_adj=0

    This is not u-boot memory test. Please run u-boot memory test.

    u-boot/doc/README.memory-test
    u-boot/common/memsize.c

    Regards,
    Pavel

  • int dram_init(void)
    {
    u32 size_prog,size_detect;
    size_prog = omap_sdram_size();
    printf("------------get_ram_size enter!\n");
    size_detect = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, size_prog);
    printf("------------size_prog is 0x%x size_detect 0x%x\n",size_prog,size_detect);
    sdram_init();
    gd->ram_size = omap_sdram_size();
    size_prog = omap_sdram_size();
    printf("------------get_ram_size enter!\n");
    size_detect = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, size_prog);
    printf("------------size_prog is 0x%x size_detect 0x%x\n",size_prog,size_detect);

    return 0;
    }

    boot log:

    U-Boot 2016.05-dirty (Jan 12 2017 - 13:36:38 +0800)

    CPU : DRA752-GP ES1.1
    Model: TI DRA742
    Board: DRA74x EVM REV <NULL>
    DRAM: ------------get_ram_size enter!
    ------------size_prog is 0x7f000000 size_detect 0x8
    ------------get_ram_size enter!
    ------------size_prog is 0x7f000000 size_detect 0x8
    2 GiB

    .......

    => md 4e000040 4
    4e000040: 00000000 00000000 80740300 ff020100 ..........t.....

  • Kevin,

    I can suggest you the below things:

    - check your HW design. Use as reference DRA75x DM and AM572x TI EVM and/or AM572x IDK. These EVM and IDK are using the same DDR3 memory configuration (2GByte, 1GByte on EMIF1, 1GByte on EMIF2) and are using the same DDR3 chips MT41K256M16TW.

    - check the DDR3 software settings for AM572x EVM and/or IDK, compare with yours

    - dmm_lisa_map registers should have the value as in my previous post

    - test the DDR3 from u-boot, not from user space

    - check the EMIF tool, it might be in help:

    e2e.ti.com/.../528821

    Regards,
    Pavel
  • I change all init items to the same as am57xx DDR3_2GB.

    uboot log:

    U-Boot 2014.07-svn1480 (Jan 17 2017 - 16:58:38)

    CPU : DRA752-GP ES1.1
    Board: DRA7xx
    I2C: ready
    DRAM: ------------get_ram_size enter!
    ------------size_prog is 0x80000000 size_detect 0x80000000
    ------------get_ram_size enter!
    ------------size_prog is 0x80000000 size_detect 0x80000000
    2 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Using default environment

    SCSI: Hit any key to stop autoboot: 0
    U-Boot#
    U-Boot# bdinfo
    arch_number = 0x00000000
    boot_params = 0x80000100
    DRAM bank = 0x00000000
    -> start = 0x80000000
    -> size = 0x80000000
    baudrate = 115200 bps
    TLB addr = 0xFFFF0000
    relocaddr = 0xFFF85000
    reloc off = 0x7F785000
    irq_sp = 0xFEF64DC0
    sp start = 0xFEF64DB0
    U-Boot# md 4e000040 4
    4e000040: 00000000 00000000 00000000 80740300 ..............t.

    user space:

    script: 2048.sh

    cat 2048.sh

    memsize 2048

    memsize 2048

    memsize 2048

    ......

    ./2048.sh

    root@dra7xx-evm:~# ./2048.sh
    [ 14.201462] omap_hwmod: mmu1_dsp1: _wait_target_disable failed
    [ 14.214507] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    1792MB OK
    1792  {pass}
    857MB OK
    [ 59.913515] memsize invoked oom-killer: gfp_mask=0x2084d0, order=0, oom_score_adj=0
    [ 59.921450] CPU: 0 PID: 1149 Comm: memsize Tainted: G O 3.14.57+ #10
    [ 59.928716] Backtrace:

    only one times passed, and some times, there is no one passed .

  • test the DDR3 from u-boot, not from user space