Commit 6fbf38602e7515abc90089f6d78d3b43088ec4ac

Authored by Steve Kipisz
Committed by Lokesh Vutla
1 parent b79c87e6f7

board: ti: am571x: Add 666MHz support for AM571x IDK

AM571x supports DDR running at 666MHz. Right now it is
clocked at 532MHz which is lower than what is supported.
In order to have maximum performance on AM571-IDK,
switch DDR to 666MHz.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Showing 2 changed files with 34 additions and 2 deletions Side-by-side Diff

arch/arm/include/asm/omap_common.h
... ... @@ -592,6 +592,7 @@
592 592 extern struct prcm_regs const dra7xx_prcm;
593 593 extern struct dplls const **dplls_data;
594 594 extern struct dplls dra7xx_dplls;
  595 +extern struct dplls dra72x_dplls;
595 596 extern struct vcores_data const **omap_vcores;
596 597 extern const u32 sys_clk_array[8];
597 598 extern struct omap_sys_ctrl_regs const **ctrl;
board/ti/am57xx/board.c
... ... @@ -221,11 +221,39 @@
221 221 0x0
222 222 };
223 223  
  224 +static const struct emif_regs am571x_emif1_ddr3_666mhz_emif_regs = {
  225 + .sdram_config_init = 0x61863332,
  226 + .sdram_config = 0x61863332,
  227 + .sdram_config2 = 0x08000000,
  228 + .ref_ctrl = 0x0000514d,
  229 + .ref_ctrl_final = 0x0000144a,
  230 + .sdram_tim1 = 0xd333887c,
  231 + .sdram_tim2 = 0x40b37fe3,
  232 + .sdram_tim3 = 0x409f8ada,
  233 + .read_idle_ctrl = 0x00050000,
  234 + .zq_config = 0x5007190b,
  235 + .temp_alert_config = 0x00000000,
  236 + .emif_ddr_phy_ctlr_1_init = 0x0024400f,
  237 + .emif_ddr_phy_ctlr_1 = 0x0e24400f,
  238 + .emif_ddr_ext_phy_ctrl_1 = 0x10040100,
  239 + .emif_ddr_ext_phy_ctrl_2 = 0x00910091,
  240 + .emif_ddr_ext_phy_ctrl_3 = 0x00950095,
  241 + .emif_ddr_ext_phy_ctrl_4 = 0x009b009b,
  242 + .emif_ddr_ext_phy_ctrl_5 = 0x009e009e,
  243 + .emif_rd_wr_lvl_rmp_win = 0x00000000,
  244 + .emif_rd_wr_lvl_rmp_ctl = 0x80000000,
  245 + .emif_rd_wr_lvl_ctl = 0x00000000,
  246 + .emif_rd_wr_exec_thresh = 0x00000305
  247 +};
  248 +
224 249 void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
225 250 {
226 251 switch (emif_nr) {
227 252 case 1:
228   - *regs = &beagle_x15_emif1_ddr3_532mhz_emif_regs;
  253 + if (board_is_am571x_idk())
  254 + *regs = &am571x_emif1_ddr3_666mhz_emif_regs;
  255 + else
  256 + *regs = &beagle_x15_emif1_ddr3_532mhz_emif_regs;
229 257 break;
230 258 case 2:
231 259 *regs = &beagle_x15_emif2_ddr3_532mhz_emif_regs;
... ... @@ -509,7 +537,10 @@
509 537 void hw_data_init(void)
510 538 {
511 539 *prcm = &dra7xx_prcm;
512   - *dplls_data = &dra7xx_dplls;
  540 + if (is_dra72x())
  541 + *dplls_data = &dra72x_dplls;
  542 + else
  543 + *dplls_data = &dra7xx_dplls;
513 544 *ctrl = &dra7xx_ctrl;
514 545 }
515 546