1 /* 2 * (C) Copyright 2010, 2011 3 * NVIDIA Corporation <www.nvidia.com> 4 * 5 * SPDX-License-Identifier: GPL-2.0+ 6 */ 7 8 #ifndef _SDRAM_PARAM_H_ 9 #define _SDRAM_PARAM_H_ 10 11 /* 12 * Defines the number of 32-bit words provided in each set of SDRAM parameters 13 * for arbitration configuration data. 14 */ 15 #define BCT_SDRAM_ARB_CONFIG_WORDS 27 16 17 enum memory_type { 18 MEMORY_TYPE_NONE = 0, 19 MEMORY_TYPE_DDR, 20 MEMORY_TYPE_LPDDR, 21 MEMORY_TYPE_DDR2, 22 MEMORY_TYPE_LPDDR2, 23 MEMORY_TYPE_NUM, 24 MEMORY_TYPE_FORCE32 = 0x7FFFFFFF 25 }; 26 27 /* Defines the SDRAM parameter structure */ 28 struct sdram_params { 29 enum memory_type memory_type; 30 u32 pllm_charge_pump_setup_control; 31 u32 pllm_loop_filter_setup_control; 32 u32 pllm_input_divider; 33 u32 pllm_feedback_divider; 34 u32 pllm_post_divider; 35 u32 pllm_stable_time; 36 u32 emc_clock_divider; 37 u32 emc_auto_cal_interval; 38 u32 emc_auto_cal_config; 39 u32 emc_auto_cal_wait; 40 u32 emc_pin_program_wait; 41 u32 emc_rc; 42 u32 emc_rfc; 43 u32 emc_ras; 44 u32 emc_rp; 45 u32 emc_r2w; 46 u32 emc_w2r; 47 u32 emc_r2p; 48 u32 emc_w2p; 49 u32 emc_rd_rcd; 50 u32 emc_wr_rcd; 51 u32 emc_rrd; 52 u32 emc_rext; 53 u32 emc_wdv; 54 u32 emc_quse; 55 u32 emc_qrst; 56 u32 emc_qsafe; 57 u32 emc_rdv; 58 u32 emc_refresh; 59 u32 emc_burst_refresh_num; 60 u32 emc_pdex2wr; 61 u32 emc_pdex2rd; 62 u32 emc_pchg2pden; 63 u32 emc_act2pden; 64 u32 emc_ar2pden; 65 u32 emc_rw2pden; 66 u32 emc_txsr; 67 u32 emc_tcke; 68 u32 emc_tfaw; 69 u32 emc_trpab; 70 u32 emc_tclkstable; 71 u32 emc_tclkstop; 72 u32 emc_trefbw; 73 u32 emc_quseextra; 74 u32 emc_fbioc_fg1; 75 u32 emc_fbio_dqsib_dly; 76 u32 emc_fbio_dqsib_dly_msb; 77 u32 emc_fbio_quse_dly; 78 u32 emc_fbio_quse_dly_msb; 79 u32 emc_fbio_cfg5; 80 u32 emc_fbio_cfg6; 81 u32 emc_fbio_spare; 82 u32 emc_mrs; 83 u32 emc_emrs; 84 u32 emc_mrw1; 85 u32 emc_mrw2; 86 u32 emc_mrw3; 87 u32 emc_mrw_reset_command; 88 u32 emc_mrw_reset_init_wait; 89 u32 emc_adr_cfg; 90 u32 emc_adr_cfg1; 91 u32 emc_emem_cfg; 92 u32 emc_low_latency_config; 93 u32 emc_cfg; 94 u32 emc_cfg2; 95 u32 emc_dbg; 96 u32 ahb_arbitration_xbar_ctrl; 97 u32 emc_cfg_dig_dll; 98 u32 emc_dll_xform_dqs; 99 u32 emc_dll_xform_quse; 100 u32 warm_boot_wait; 101 u32 emc_ctt_term_ctrl; 102 u32 emc_odt_write; 103 u32 emc_odt_read; 104 u32 emc_zcal_ref_cnt; 105 u32 emc_zcal_wait_cnt; 106 u32 emc_zcal_mrw_cmd; 107 u32 emc_mrs_reset_dll; 108 u32 emc_mrw_zq_init_dev0; 109 u32 emc_mrw_zq_init_dev1; 110 u32 emc_mrw_zq_init_wait; 111 u32 emc_mrs_reset_dll_wait; 112 u32 emc_emrs_emr2; 113 u32 emc_emrs_emr3; 114 u32 emc_emrs_ddr2_dll_enable; 115 u32 emc_mrs_ddr2_dll_reset; 116 u32 emc_emrs_ddr2_ocd_calib; 117 u32 emc_edr2_wait; 118 u32 emc_cfg_clktrim0; 119 u32 emc_cfg_clktrim1; 120 u32 emc_cfg_clktrim2; 121 u32 pmc_ddr_pwr; 122 u32 apb_misc_gp_xm2cfga_padctrl; 123 u32 apb_misc_gp_xm2cfgc_padctrl; 124 u32 apb_misc_gp_xm2cfgc_padctrl2; 125 u32 apb_misc_gp_xm2cfgd_padctrl; 126 u32 apb_misc_gp_xm2cfgd_padctrl2; 127 u32 apb_misc_gp_xm2clkcfg_padctrl; 128 u32 apb_misc_gp_xm2comp_padctrl; 129 u32 apb_misc_gp_xm2vttgen_padctrl; 130 u32 arbitration_config[BCT_SDRAM_ARB_CONFIG_WORDS]; 131 }; 132 #endif 133