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/TMS320DM8147: DDR3 configuration

Part Number: TMS320DM8147

Tool/software: Linux

Hi,

I am using 4 chips of MT41K256M16TW each of them is 512MB. I am using a DM8147 processor.

2 chips of 512MB each uses memory controller 0. chipselect 0. So 1GByte is connected to memory controller 0 with chipselect 0.

2 chips of 512MB each uses memory controller 1 chipselect 1. So 1G Byte is connected to memory controller 1 with chipselect 1.

I wanted to check what registers need to be configured to support the above 2 GByte configuration. From the forums, I understand that LISA registers need to be programmed.

I wanted to find what are the correct values for SDRC_ADDR and SYS_ADDR bits. There are 4 LISA registers. Do i need to update all of them because i have 4 x 512MByte chips.

Could anyone share tested LISA register configurations for the above use-case.

Is it enough to update u-boot or do i also need to update kernel for this.

Thanks for your help.

 

  • Hi,

    I don't have register configurations directly available. However, I would suggest to have a look at DM812x/DM38X IPNCRDK 3.9 source code for similar configurations. (They are not identical, but It will help to understand)
  • hI ravikiran,

    I have made the following modifications based on RDK.

    #define PG2_1_DMM_LISA_MAP__0 0x0
    #define PG2_1_DMM_LISA_MAP__1 0x0
    #define PG2_1_DMM_LISA_MAP__2 0x80640300
    #define PG2_1_DMM_LISA_MAP__3 0xC0640320

    #define CONFIG_NR_DRAM_BANKS 2 /* we have 2 banks of DRAM */
    #define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */
    #define PHYS_DRAM_1_SIZE 0x40000000 /* 1024 MB */
    #define PHYS_DRAM_2 0xC0000000 /* DRAM Bank #2 */
    #define PHYS_DRAM_2_SIZE 0x40000000 /* 1024 MB */

    The interleaving is 128. Does this mean that after each chipselect there is a 128 bytes hole?

    After making the changes in Linux. When i try to boot linux with mem=1024M or mem=2048M i get a crash in the kernel . I am using 2.6.37 DVR Kernel.

    When i boot the kernel either giving mem=1024M or mem=2048M. The kernel crashes as follows memblok_alloc function. I have a minimal file system and my intention is to run memtester in linux to verify if my memory timings are proper.

    Crash:

    [ 0.000000] ti81xx_reserve: ### Reserved DDR region @f1f00000
    [ 0.000000] reserved size = 52428800 at 0x0
    [ 0.000000] FB: Reserving 52428800 bytes SDRAM for VRAM
    [ 0.000000] Memory policy: ECC disabled, Data cache writeback
    [ 0.000000] Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 bytes below 0x0.
    [ 0.000000]
    [ 0.000000] Backtrace:
    [ 0.000000] [<c07b9fc4>] (dump_backtrace+0x0/0x110) from [<c0b55268>] (dump_stack+0x18/0x1c)
    [ 0.000000] r6:c079a6c8 r5:00000000 r4:c0d0f958 r3:60000193
    [ 0.000000] [<c0b55250>] (dump_stack+0x0/0x1c) from [<c0b552c8>] (panic+0x5c/0x178)
    [ 0.000000] [<c0b5526c>] (panic+0x0/0x178) from [<c0019120>] (memblock_alloc_base+0x38/0x44)
    [ 0.000000] r3:00000000 r2:00001000 r1:b0000000 r0:c0c3eb20
    [ 0.000000] r7:c0d0ef34
    [ 0.000000] [<c00190e8>] (memblock_alloc_base+0x0/0x44) from [<c0019140>] (memblock_alloc+0x14/0x18)
    [ 0.000000] r5:c0d3627c r4:c0d362a0
    [ 0.000000] [<c001912c>] (memblock_alloc+0x0/0x18) from [<c000d4e4>] (early_alloc.clone.2+0x18/0x30)

    Please advice.

    Thanks,
    Sriram
  • First you can configure your registers from MLO & then check if the complete RAM is accessble from u-boot.

    You can use "md" commands to check if your complete RAM is mapped.