ddr3_k2l.c 589 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Keystone2: DDR3 initialization
  3. *
  4. * (C) Copyright 2014
  5. * Texas Instruments Incorporated, <www.ti.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <common.h>
  10. #include "ddr3_cfg.h"
  11. #include <asm/arch/ddr3.h>
  12. static struct pll_init_data ddr3_400 = DDR3_PLL_400;
  13. u32 ddr3_init(void)
  14. {
  15. init_pll(&ddr3_400);
  16. /* No SO-DIMM, 2GB discreet DDR */
  17. printf("DRAM: 2 GiB\n");
  18. /* Reset DDR3 PHY after PLL enabled */
  19. ddr3_reset_ddrphy();
  20. ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC, &ddr3phy_1600_2g);
  21. ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE, &ddr3_1600_2g);
  22. return 2;
  23. }