Hi,TI guys:
I am working on the KeyStone_SRIO example in both 6670EVM and 6678EVM. Digital loopback worked just OK on both of the EVM. But when I check the DDR_Init function for Shannon and for Nyquist, I got confused that there are such a big difference between them. But both EVM has the same four samsung DDR, where did those difference come from?
The difference, I quote:
In 6678, the row size is configured as 13bit
(DDR_ROW_SIZE_13_BIT<<CSL_EMIF4F_SDRAM_CONFIG_REG_ROWSIZE_SHIFT)
In 6670, the row size is configured as 14bit
DR_ROW_SIZE_14_BIT<<CSL_EMIF4F_SDRAM_CONFIG_REG_ROWSIZE_SHIFT)
also,the leveling init code is quite different:
in 6670;
//initial vale for leveling
/*WRLVL_INIT_RATIO*/
boot_cfg_regs->DDR3_CONFIG_REG[2] = 0x0F;
boot_cfg_regs->DDR3_CONFIG_REG[3] = 0x0F;
boot_cfg_regs->DDR3_CONFIG_REG[4] = 0x20;
boot_cfg_regs->DDR3_CONFIG_REG[5] = 0x24;
boot_cfg_regs->DDR3_CONFIG_REG[6] = 0x33;
boot_cfg_regs->DDR3_CONFIG_REG[7] = 0x38;
boot_cfg_regs->DDR3_CONFIG_REG[8] = 0x21;
boot_cfg_regs->DDR3_CONFIG_REG[9] = 0x29;
boot_cfg_regs->DDR3_CONFIG_REG[10] = 0x0 ;
/*GTLVL_INIT_RATIO*/
boot_cfg_regs->DDR3_CONFIG_REG[14] = 0x7B;
boot_cfg_regs->DDR3_CONFIG_REG[15] = 0x7B;
boot_cfg_regs->DDR3_CONFIG_REG[16] = 0x8D;
boot_cfg_regs->DDR3_CONFIG_REG[17] = 0x89;
boot_cfg_regs->DDR3_CONFIG_REG[18] = 0xC0;
boot_cfg_regs->DDR3_CONFIG_REG[19] = 0xBC;
boot_cfg_regs->DDR3_CONFIG_REG[20] = 0xC3;
boot_cfg_regs->DDR3_CONFIG_REG[21] = 0xBB;
boot_cfg_regs->DDR3_CONFIG_REG[22] = 0x0 ;
and in 6678
/initial vale for leveling
/*GTLVL_INIT_RATIO*/
boot_cfg_regs->DDR3_CONFIG_REG[14] = 0xA1;
boot_cfg_regs->DDR3_CONFIG_REG[15] = 0x9E;
boot_cfg_regs->DDR3_CONFIG_REG[16] = 0xA7;
boot_cfg_regs->DDR3_CONFIG_REG[17] = 0xA9;
boot_cfg_regs->DDR3_CONFIG_REG[18] = 0xCA;
boot_cfg_regs->DDR3_CONFIG_REG[19] = 0xBE;
boot_cfg_regs->DDR3_CONFIG_REG[20] = 0xDD;
boot_cfg_regs->DDR3_CONFIG_REG[21] = 0xDD;
boot_cfg_regs->DDR3_CONFIG_REG[22] = 0xBA;
/*WRLVL_INIT_RATIO*/
boot_cfg_regs->DDR3_CONFIG_REG[2] = 0x20;
boot_cfg_regs->DDR3_CONFIG_REG[3] = 0x24;
boot_cfg_regs->DDR3_CONFIG_REG[4] = 0x3A;
boot_cfg_regs->DDR3_CONFIG_REG[5] = 0x38;
boot_cfg_regs->DDR3_CONFIG_REG[6] = 0x51;
boot_cfg_regs->DDR3_CONFIG_REG[7] = 0x5E;
boot_cfg_regs->DDR3_CONFIG_REG[8] = 0x5E;
boot_cfg_regs->DDR3_CONFIG_REG[9] = 0x5E;
boot_cfg_regs->DDR3_CONFIG_REG[10] = 0x44;
and in 6670 there are some extra code
/*the PHY_RESET is pulsed (0 -> 1 -> 0) to latch these
leveling configuration values into the PHY logic.*/
DDR_Regs->DDR_PHY_CTRL_1 &= ~(0x00008000);
DDR_Regs->DDR_PHY_CTRL_1 |= (0x00008000);
DDR_Regs->DDR_PHY_CTRL_1 &= ~(0x00008000);
there is leveling in c6678, too. Why is the difference?
The reason why looked in to the DDR_init code is that I tried the KeyStone_SRIO example on a board(not the EVM) , with 2 6670DSP ,each of them has 2DDRs(same samsung DDR).The DDR_init always failed , with the values of STATUS_REG_RDLVLGATE, TATUS_REG_RDLVLT, and STATUS_REG_WRLVL in DDR_Regs->STATUS all 1,which indicated time out error.
My question is where does the big difference of DDR_Init of 6670&6678 come from? And if I had a 6670 DSP with 2, not 4, same DDR, how shall alter the code, Given that I already now the DDR clock requency on board.
Thanks ~