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.

AM57x EMIF tool output usage

Hello,

Among other things, the EMIF tool generates the two structs below.  Where exactly do they go?  Is emif_cfg really needed since the structs are already referenced in the comments below?

-------------------------------

const struct dpll_params AM572x_DDR3L_532MHz_XXX_pll_params = {
.m = 266,
.n = 4,
.m2 = 2,
.m4_h11 = 8
};

struct emif_cfg AM572x_DDR3L_532MHz_XXX = {
.platform = "AM572x_DDR3L_532MHz_XXX",
.EMIF2_DEFINED = 1,
.pll_regs = &AM572x_DDR3L_532MHz_XXX_pll_params,                             <<<      ???
.ctrl_regs = &AM572x_DDR3L_532MHz_XXX_ctrl_ioregs,                              <<<     (File: arch\arm\cpu\armv7\omap5\hw_data.c,  Function: get_ioregs)   
.dmm_regs = &AM572x_DDR3L_532MHz_XXX_dmm_regs,                          <<<     (File: board\ti\am57xx\board.c, Function: emif_get_dmm_regs)
.regs = &AM572x_DDR3L_532MHz_XXX_emif_regs,                                       <<<     (File: board\ti\am57xx\board.c, Function: emif_get_reg_dump)
.phy_regs1 = AM572x_DDR3L_532MHz_XXX_emif1_ext_phy_regs,           <<<     (File: board\ti\am57xx\board.c, Function: emif_get_ext_phy_ctrl_const_regs)
.phy_regs2 = AM572x_DDR3L_532MHz_XXX_emif2_ext_phy_regs,           <<<     (File: board\ti\am57xx\board.c, Function: emif_get_ext_phy_ctrl_const_regs)  
};

-------------------------------

Thanks.

Wilson

  • I will ask the software team to comment. They will respond here.
  • Hi Wilson,

    First of all, this output cannot be used AS IS in the u-boot.  

    The values from the first structure:

      const struct dpll_params AM572x_DDR3L_532MHz_XXX_pll_params  

    should be used in arch/arm/cpu/armv7/hw_data.c: 
        static const struct dpll_params ddr_dpll_params_2664mhz[NUM_SYS_CLKS]

    or

       static const struct dpll_params ddr_dpll_params_2128mhz[NUM_SYS_CLKS]

    depending on your specific use case. To see which value corresponds to m, n, m2 or m4_h11, you should refer to arch/arm/include/asm/omap_common.h: 

       struct dpll_params

    Best Regards, 
    Yordan

  • Yordan,

    We are using u-boot-2015.07 and hw_data.c found in arch\arm\cpu\armv7\omap5\hw_data.c.

    The following is reported by the EMIF tool:

    1A) System application details:
    TI SOC Part Number: AM572x
    SYS_CLK1 Frequency: 20 MHz
    Required EMIF Interfaces: 2
    DDR Memory Type: DDR3/L
    DDR Memory Frequency: 532 MHz
    DDR Data Bus Width Per EMIF: 32 Bits
    Required Chip Select Lines: 1
    Leveling Technique: "S/W" or "H/W": H/W
    Enable ECC (May not apply to all EMIFs): No

    1B) DDR memory specifications:
    Speed Bin: Data Rate: 1066 MHz
    Density: 8 Gb
    Width: 16 Bits
    Speed Bin: CAS Latency @ 1066 MHz data rate: 7 ntCK

    It is not clear to me whether dpll_params ddr_dpll_params_2664mhz or dpll_params ddr_dpll_params_2128mhz would be applicable. Any thoughts?

    Also, for the AM572x_DDR3L_532MHz_XXX_pll_params struct the tool only generates values for m, n, m2, m4_h11. Should the values for m3, m5_h12, m6_h13, m7_h14, h21, h22, h23, h24 be set to -1?

    I see that the existing ddr_dpll_params_2128mhz (20 MHz) in hw_data.c contains values similar to those generated by the EMIF tool, with the exception that it has m3 = 1, m5_h12 = -1, m6_h13 = -1, m7_h14 = -1, h21 = -1, h22 = -1, h23 = -1, h24 = -1:

    static const struct dpll_params ddr_dpll_params_2128mhz[NUM_SYS_CLKS] = {

    /* m, n, m2, m3, m4_h11, m5_h12, m6_h13, m7_h14, h21, h22, h23, h24 */
    {266, 2, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 12 MHz */
    {266, 4, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 20 MHz */ <<-----------------------------
    {190, 2, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 16.8 MHz */
    {665, 11, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 19.2 MHz */
    {532, 12, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 26 MHz */
    {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 27 MHz */
    {665, 23, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 38.4 MHz */
    };
    Should m3 (forth value) be set to -1?

    Thanks.

    Wilson
  • Hi Wilson,

    I think you should use the 2128Mhz structure. Also I'd recommend to try leaving m3 as 1 and set the rest of the values (except those taken from the emif tool) to -1.

    Best Regards,
    Yordan