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/AM5726: EMIF configuration questions

Part Number: AM5726

Tool/software: Linux

Hi,

We have a custom board based on AM572x GP EVM rev A3a. We have different DDR3 SDRAM which use 2x8Gb rather than 4x4Gb. We use EMIF1 only, the rest are similar. I'm using http://www.ti.com/lit/an/sprac36b/sprac36b.pdf to recalculate the register values.

The settings in "DRA75x_DDR3L_532MHz_TI_EVM_revH_emif_regs" reflected in "beagle_x15_emif1_ddr3_532mhz_emif_regs" I can follow. But "DRA75x_DDR3L_532MHz_TI_EVM_revH_dmm_regs" below I don't follow.

[generated by emif tool]
const struct dmm_lisa_map_regs DRA75x_DDR3L_532MHz_TI_EVM_revH_dmm_regs = {    
    .dmm_lisa_map_0 = 0x00000000,    
    .dmm_lisa_map_1 = 0x00000000,    
    .dmm_lisa_map_2 = 0x80700100,    
    .dmm_lisa_map_3 = 0xFF020100,    
    .is_ma_present = 0x1    
};

"beagle_x15_lisa_regs" in u-boot only sets _lisa_map_3, lisa_map_0 to 2 are all 0. Why does the generated code use map_2 and map_3? Please explain.

[u-boot code]

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

Thanks for your help!
Jan

  • Hi Jan,

    In u-boot code they use only lisa_map3, because they want to mapp all available DDR3 memory on one DMM Section. They use particularly LISA_MAP_3, because this section is with highest priority after the register address space section. See section 15.2.3.5.1.2 Address Mapping in the AM572x TRM, it is all explained there.

    The values generated by the EMIF tool should work correctly on your board, the only difference is that it sets your memory on 2 sections (Lisa_map_2 and Lisa_map_3) using only EMIF1 non interleaved mode.

    Best Regards,
    Yordan
  • Thanks Yordan for the reply! But if I'd like to keep minimum delta from the EVM code, would it work if I only change _lisa_map_3 and leave _lisa_map_2 as 0:

    static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {

    .dmm_lisa_map_3 = 0x80700100,

    .is_ma_present = 0x1

    };

  • Yes, it should work. Just make sure you configure the LISA_MAP_3 correctly: EMIF1 only NO interleaving, which DIFFERS from the value .dmm_lisa_map_3 = 0x80740300 used in u-boot.

    Best Regards,
    Yordan
  • Thank you Yordan! Yes I've changed .dmm_lisa_map_3 to 0x80700100, no interleave and EMIF1 only. I will try that as soon as the new hardware is available.

    Thanks!

    Jan

  • Yordan, I also need clarification on register CTRL_WKUP_EMIF1_SDRAM_CONFIG_EXT, the output from the emif tool has:
    .ctrl_emif_sdram_config_ext = 0x0002C123

    [ u-boot code]
    ioregs_dra7xx_es1 = {
    ....
    .ctrl_emif_sdram_config_ext = 0x0001C1A7,
    .ctrl_emif_sdram_config_ext_final = 0x0001C1A7,
    ....
    }
    I understand I should turn on EMIF1_NARROW_MODE_ONLY.
    Why current u-boot code has EMIF1_EN_ECC = 1 (I see ECC pins not connected on EVM), EMIF1_SDRAM_DISABLE_RESET = 1 and EMIF1_EN_SLICE_2 = 1 that are different from tool output? Am I better off following the tools output 0x0002C123, or keeping minimum delta from the u-boot code as 0x0003C1A7?

    Thanks,
    Jan
  • Hi Jan,

    Sorry for the delay. Not sure why u-boot uses this. I'd advise you to follow the tool in this particular case.

    Best Regards,
    Yordan