sdram_param.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * (C) Copyright 2010, 2011
  3. * NVIDIA Corporation <www.nvidia.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef _SDRAM_PARAM_H_
  24. #define _SDRAM_PARAM_H_
  25. /*
  26. * Defines the number of 32-bit words provided in each set of SDRAM parameters
  27. * for arbitration configuration data.
  28. */
  29. #define BCT_SDRAM_ARB_CONFIG_WORDS 27
  30. enum memory_type {
  31. MEMORY_TYPE_NONE = 0,
  32. MEMORY_TYPE_DDR,
  33. MEMORY_TYPE_LPDDR,
  34. MEMORY_TYPE_DDR2,
  35. MEMORY_TYPE_LPDDR2,
  36. MEMORY_TYPE_NUM,
  37. MEMORY_TYPE_FORCE32 = 0x7FFFFFFF
  38. };
  39. /* Defines the SDRAM parameter structure */
  40. struct sdram_params {
  41. enum memory_type memory_type;
  42. u32 pllm_charge_pump_setup_control;
  43. u32 pllm_loop_filter_setup_control;
  44. u32 pllm_input_divider;
  45. u32 pllm_feedback_divider;
  46. u32 pllm_post_divider;
  47. u32 pllm_stable_time;
  48. u32 emc_clock_divider;
  49. u32 emc_auto_cal_interval;
  50. u32 emc_auto_cal_config;
  51. u32 emc_auto_cal_wait;
  52. u32 emc_pin_program_wait;
  53. u32 emc_rc;
  54. u32 emc_rfc;
  55. u32 emc_ras;
  56. u32 emc_rp;
  57. u32 emc_r2w;
  58. u32 emc_w2r;
  59. u32 emc_r2p;
  60. u32 emc_w2p;
  61. u32 emc_rd_rcd;
  62. u32 emc_wr_rcd;
  63. u32 emc_rrd;
  64. u32 emc_rext;
  65. u32 emc_wdv;
  66. u32 emc_quse;
  67. u32 emc_qrst;
  68. u32 emc_qsafe;
  69. u32 emc_rdv;
  70. u32 emc_refresh;
  71. u32 emc_burst_refresh_num;
  72. u32 emc_pdex2wr;
  73. u32 emc_pdex2rd;
  74. u32 emc_pchg2pden;
  75. u32 emc_act2pden;
  76. u32 emc_ar2pden;
  77. u32 emc_rw2pden;
  78. u32 emc_txsr;
  79. u32 emc_tcke;
  80. u32 emc_tfaw;
  81. u32 emc_trpab;
  82. u32 emc_tclkstable;
  83. u32 emc_tclkstop;
  84. u32 emc_trefbw;
  85. u32 emc_quseextra;
  86. u32 emc_fbioc_fg1;
  87. u32 emc_fbio_dqsib_dly;
  88. u32 emc_fbio_dqsib_dly_msb;
  89. u32 emc_fbio_quse_dly;
  90. u32 emc_fbio_quse_dly_msb;
  91. u32 emc_fbio_cfg5;
  92. u32 emc_fbio_cfg6;
  93. u32 emc_fbio_spare;
  94. u32 emc_mrs;
  95. u32 emc_emrs;
  96. u32 emc_mrw1;
  97. u32 emc_mrw2;
  98. u32 emc_mrw3;
  99. u32 emc_mrw_reset_command;
  100. u32 emc_mrw_reset_init_wait;
  101. u32 emc_adr_cfg;
  102. u32 emc_adr_cfg1;
  103. u32 emc_emem_cfg;
  104. u32 emc_low_latency_config;
  105. u32 emc_cfg;
  106. u32 emc_cfg2;
  107. u32 emc_dbg;
  108. u32 ahb_arbitration_xbar_ctrl;
  109. u32 emc_cfg_dig_dll;
  110. u32 emc_dll_xform_dqs;
  111. u32 emc_dll_xform_quse;
  112. u32 warm_boot_wait;
  113. u32 emc_ctt_term_ctrl;
  114. u32 emc_odt_write;
  115. u32 emc_odt_read;
  116. u32 emc_zcal_ref_cnt;
  117. u32 emc_zcal_wait_cnt;
  118. u32 emc_zcal_mrw_cmd;
  119. u32 emc_mrs_reset_dll;
  120. u32 emc_mrw_zq_init_dev0;
  121. u32 emc_mrw_zq_init_dev1;
  122. u32 emc_mrw_zq_init_wait;
  123. u32 emc_mrs_reset_dll_wait;
  124. u32 emc_emrs_emr2;
  125. u32 emc_emrs_emr3;
  126. u32 emc_emrs_ddr2_dll_enable;
  127. u32 emc_mrs_ddr2_dll_reset;
  128. u32 emc_emrs_ddr2_ocd_calib;
  129. u32 emc_edr2_wait;
  130. u32 emc_cfg_clktrim0;
  131. u32 emc_cfg_clktrim1;
  132. u32 emc_cfg_clktrim2;
  133. u32 pmc_ddr_pwr;
  134. u32 apb_misc_gp_xm2cfga_padctrl;
  135. u32 apb_misc_gp_xm2cfgc_padctrl;
  136. u32 apb_misc_gp_xm2cfgc_padctrl2;
  137. u32 apb_misc_gp_xm2cfgd_padctrl;
  138. u32 apb_misc_gp_xm2cfgd_padctrl2;
  139. u32 apb_misc_gp_xm2clkcfg_padctrl;
  140. u32 apb_misc_gp_xm2comp_padctrl;
  141. u32 apb_misc_gp_xm2vttgen_padctrl;
  142. u32 arbitration_config[BCT_SDRAM_ARB_CONFIG_WORDS];
  143. };
  144. #endif