Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: arch/arm/include/asm/arch-tegra2/nvboot_sdram_param.h

Issue 4841001: Tegra2: implement Warmboot code and lp0_vec (Closed) Base URL: http://git.chromium.org/git/u-boot-next.git@chromeos-v2010.09
Patch Set: Add GPL headers & fix some 80-column issues Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * (C) Copyright 2010
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
24 /**
25 * Defines the SDRAM parameter structure.
26 *
27 * Note that PLLM is used by EMC.
28 */
29
30 #ifndef INCLUDED_NVBOOT_SDRAM_PARAM_H
31 #define INCLUDED_NVBOOT_SDRAM_PARAM_H
32
33 #include "nvboot_config.h"
34
35 #if defined(__cplusplus)
36 extern "C"
37 {
38 #endif
39
40 typedef enum
41 {
42 /// Specifies the memory type to be undefined
43 NvBootMemoryType_None = 0,
44
45 /// Specifies the memory type to be DDR SDRAM
46 NvBootMemoryType_Ddr,
47
48 /// Specifies the memory type to be LPDDR SDRAM
49 NvBootMemoryType_LpDdr,
50
51 /// Specifies the memory type to be DDR2 SDRAM
52 NvBootMemoryType_Ddr2,
53
54 /// Specifies the memory type to be LPDDR2 SDRAM
55 NvBootMemoryType_LpDdr2,
56
57 NvBootMemoryType_Num,
58 NvBootMemoryType_Force32 = 0x7FFFFFF
59 } NvBootMemoryType;
60
61
62 /**
63 * Defines the SDRAM parameter structure
64 */
65 typedef struct NvBootSdramParamsRec
66 {
67 /// Specifies the type of memory device
68 NvBootMemoryType MemoryType;
69
70 /// Specifies the CPCON value for PllM
71 NvU32 PllMChargePumpSetupControl;
72 /// Specifies the LPCON value for PllM
73 NvU32 PllMLoopFilterSetupControl;
74 /// Specifies the M value for PllM
75 NvU32 PllMInputDivider;
76 /// Specifies the N value for PllM
77 NvU32 PllMFeedbackDivider;
78 /// Specifies the P value for PllM
79 NvU32 PllMPostDivider;
80 /// Specifies the time to wait for PLLM to lock (in microseconds)
81 NvU32 PllMStableTime;
82
83 /// Specifies the divider for the EMC Clock Source
84 NvU32 EmcClockDivider;
85
86 ///
87 /// Auto-calibration of EMC pads
88 ///
89 /// Specifies the value for EMC_AUTO_CAL_INTERVAL
90 NvU32 EmcAutoCalInterval;
91 /// Specifies the value for EMC_AUTO_CAL_CONFIG
92 /// Note: Trigger bits are set by the SDRAM code.
93 NvU32 EmcAutoCalConfig;
94 /// Specifies the time for the calibration to stabilize (in microseconds)
95 NvU32 EmcAutoCalWait;
96
97 /// Specifies the time to wait after pin programming (in microseconds)
98 /// Dram vendors require at least 200us.
99 NvU32 EmcPinProgramWait;
100
101 ///
102 /// Timing parameters required for the SDRAM
103 ///
104 /// Specifies the value for EMC_RC
105 NvU32 EmcRc;
106 /// Specifies the value for EMC_RFC
107 NvU32 EmcRfc;
108 /// Specifies the value for EMC_RAS
109 NvU32 EmcRas;
110 /// Specifies the value for EMC_RP
111 NvU32 EmcRp;
112 /// Specifies the value for EMC_R2W
113 NvU32 EmcR2w;
114 /// Specifies the value for EMC_R2W
115 NvU32 EmcW2r;
116 /// Specifies the value for EMC_R2P
117 NvU32 EmcR2p;
118 /// Specifies the value for EMC_W2P
119 NvU32 EmcW2p;
120 /// Specifies the value for EMC_RD_RCD
121 NvU32 EmcRdRcd;
122 /// Specifies the value for EMC_WR_RCD
123 NvU32 EmcWrRcd;
124 /// Specifies the value for EMC_RRD
125 NvU32 EmcRrd;
126 /// Specifies the value for EMC_REXT
127 NvU32 EmcRext;
128 /// Specifies the value for EMC_WDV
129 NvU32 EmcWdv;
130 /// Specifies the value for EMC_QUSE
131 NvU32 EmcQUse;
132 /// Specifies the value for EMC_QRST
133 NvU32 EmcQRst;
134 /// Specifies the value for EMC_QSAFE
135 NvU32 EmcQSafe;
136 /// Specifies the value for EMC_RDV
137 NvU32 EmcRdv;
138 /// Specifies the value for EMC_REFRESH
139 NvU32 EmcRefresh;
140 /// Specifies the value for EMC_BURST_REFRESH_NUM
141 NvU32 EmcBurstRefreshNum;
142 /// Specifies the value for EMC_PDEX2WR
143 NvU32 EmcPdEx2Wr;
144 /// Specifies the value for EMC_PDEX2RD
145 NvU32 EmcPdEx2Rd;
146 /// Specifies the value for EMC_PCHG2PDEN
147 NvU32 EmcPChg2Pden;
148 /// Specifies the value for EMC_ACT2PDEN
149 NvU32 EmcAct2Pden;
150 /// Specifies the value for EMC_AR2PDEN
151 NvU32 EmcAr2Pden;
152 /// Specifies the value for EMC_RW2PDEN
153 NvU32 EmcRw2Pden;
154 /// Specifies the value for EMC_TXSR
155 NvU32 EmcTxsr;
156 /// Specifies the value for EMC_TCKE
157 NvU32 EmcTcke;
158 /// Specifies the value for EMC_TFAW
159 NvU32 EmcTfaw;
160 /// Specifies the value for EMC_TRPAB
161 NvU32 EmcTrpab;
162 /// Specifies the value for EMC_TCLKSTABLE
163 NvU32 EmcTClkStable;
164 /// Specifies the value for EMC_TCLKSTOP
165 NvU32 EmcTClkStop;
166 /// Specifies the value for EMC_TREFBW
167 NvU32 EmcTRefBw;
168 /// Specifies the value for EMC_QUSE_EXTRA
169 NvU32 EmcQUseExtra;
170
171 ///
172 /// FBIO configuration values
173 ///
174 /// Specifies the value for EMC_FBIO_CFG1
175 NvU32 EmcFbioCfg1;
176 /// Specifies the value for EMC_FBIO_DQSIB_DLY
177 NvU32 EmcFbioDqsibDly;
178 /// Specifies the value for EMC_FBIO_DQSIB_DLY_MSB
179 NvU32 EmcFbioDqsibDlyMsb;
180 /// Specifies the value for EMC_FBIO_QUSE_DLY
181 NvU32 EmcFbioQuseDly;
182 /// Specifies the value for EMC_FBIO_QUSE_DLY_MSB
183 NvU32 EmcFbioQuseDlyMsb;
184 /// Specifies the value for EMC_FBIO_CFG5
185 NvU32 EmcFbioCfg5;
186 /// Specifies the value for EMC_FBIO_CFG6
187 NvU32 EmcFbioCfg6;
188 /// Specifies the value for EMC_FBIO_SPARE
189 NvU32 EmcFbioSpare;
190
191 ///
192 /// MRS command values
193 ///
194 /// Specifies the value for EMC_MRS
195 NvU32 EmcMrs;
196 /// Specifies the value for EMC_EMRS
197 NvU32 EmcEmrs;
198 /// Specifies the first of a sequence of three values for EMC_MRW
199 NvU32 EmcMrw1;
200 /// Specifies the second of a sequence of three values for EMC_MRW
201 NvU32 EmcMrw2;
202 /// Specifies the third of a sequence of three values for EMC_MRW
203 NvU32 EmcMrw3;
204
205 /// Specifies the EMC_MRW reset command value
206 NvU32 EmcMrwResetCommand;
207 /// Specifies the EMC Reset wait time (in microseconds)
208 NvU32 EmcMrwResetNInitWait;
209
210 /// Specifies the value for EMC_ADR_CFG
211 /// The same value is also used for MC_EMC_ADR_CFG
212 NvU32 EmcAdrCfg;
213 /// Specifies the value for EMC_ADR_CFG_1
214 NvU32 EmcAdrCfg1;
215
216 /// Specifies the value for MC_EMEM_CFG which holds the external memory
217 /// size (in KBytes)
218 /// EMEM_SIZE_KB must be <= (Device size in KB * Number of Devices)
219 NvU32 McEmemCfg;
220
221 /// Specifies the value for MC_LOWLATENCY_CONFIG
222 /// Mainly for LL_DRAM_INTERLEAVE: Some DRAMs do not support interleave
223 /// mode. If so, turn off this bit to get the correct low-latency path
224 /// behavior. Reset is ENABLED.
225 NvU32 McLowLatencyConfig;
226 /// Specifies the value for EMC_CFG
227 NvU32 EmcCfg;
228 /// Specifies the value for EMC_CFG_2
229 NvU32 EmcCfg2;
230 /// Specifies the value for EMC_DBG
231 NvU32 EmcDbg;
232
233 /// Specifies the value for AHB_ARBITRATION_XBAR_CTRL.
234 /// This is used to set the Memory Inid done
235 NvU32 AhbArbitrationXbarCtrl;
236
237 /// Specifies the value for EMC_CFG_DIG_DLL
238 /// Note: Trigger bits are set by the SDRAM code.
239 NvU32 EmcCfgDigDll;
240 /// Specifies the value for EMC_DLL_XFORM_DQS
241 NvU32 EmcDllXformDqs;
242 /// Specifies the value for EMC_DLL_XFORM_QUSE
243 NvU32 EmcDllXformQUse;
244
245 /// Specifies the delay after prgramming the PIN/NOP register during a
246 /// WarmBoot0 sequence (in microseconds)
247 NvU32 WarmBootWait;
248
249 /// Specifies the value for EMC_CTT_TERM_CTRL
250 NvU32 EmcCttTermCtrl;
251
252 /// Specifies the value for EMC_ODT_WRITE
253 NvU32 EmcOdtWrite;
254 /// Specifies the value for EMC_ODT_WRITE
255 NvU32 EmcOdtRead;
256
257 /// Specifies the value for EMC_ZCAL_REF_CNT
258 /// Only meaningful for LPDDR2. Set to 0 for all other memory types.
259 NvU32 EmcZcalRefCnt;
260 /// Specifies the value for EMC_ZCAL_WAIT_CNT
261 /// Only meaningful for LPDDR2. Set to 0 for all other memory types.
262 NvU32 EmcZcalWaitCnt;
263 /// Specifies the value for EMC_ZCAL_MRW_CMD
264 /// Only meaningful for LPDDR2. Set to 0 for all other memory types.
265 NvU32 EmcZcalMrwCmd;
266
267 /// Specifies the MRS command value for initilizing the mode register.
268 NvU32 EmcMrsResetDll;
269 /// Specifies the MRW command for ZQ initialization of device 0
270 NvU32 EmcMrwZqInitDev0;
271 /// Specifies the MRW command for ZQ initialization of device 1
272 NvU32 EmcMrwZqInitDev1;
273 /// Specifies the wait time after programming a ZQ initialization command
274 /// (in microseconds)
275 NvU32 EmcMrwZqInitWait;
276 /// Specifies the wait time after sending an MRS DLL reset command
277 /// (in microseconds)
278 NvU32 EmcMrsResetDllWait;
279 /// Specifies the first of two EMRS commands to initialize mode registers
280 NvU32 EmcEmrsEmr2;
281 /// Specifies the second of two EMRS commands to initialize mode registers
282 NvU32 EmcEmrsEmr3;
283 /// Specifies the EMRS command to enable the DDR2 DLL
284 NvU32 EmcEmrsDdr2DllEnable;
285 /// Specifies the MRS command to reset the DDR2 DLL
286 NvU32 EmcMrsDdr2DllReset;
287 /// Specifies the EMRS command to set OCD calibration
288 NvU32 EmcEmrsDdr2OcdCalib;
289 /// Specifies the wait between initializing DDR and setting OCD
290 /// calibration (in microseconds)
291 NvU32 EmcDdr2Wait;
292
293 ///
294 /// Clock trimmers
295 ///
296 /// Specifies the value for EMC_CFG_CLKTRIM_0
297 NvU32 EmcCfgClktrim0;
298 /// Specifies the value for EMC_CFG_CLKTRIM_1
299 NvU32 EmcCfgClktrim1;
300 /// Specifies the value for EMC_CFG_CLKTRIM_2
301 NvU32 EmcCfgClktrim2;
302
303 ///
304 /// Pad controls
305 ///
306 /// Specifies the value for PMC_DDR_PWR
307 NvU32 PmcDdrPwr;
308 /// Specifies the value for APB_MISC_GP_XM2CFGAPADCTRL
309 NvU32 ApbMiscGpXm2CfgAPadCtrl;
310 /// Specifies the value for APB_MISC_GP_XM2CFGCPADCTRL
311 NvU32 ApbMiscGpXm2CfgCPadCtrl;
312 /// Specifies the value for APB_MISC_GP_XM2CFGCPADCTRL2
313 NvU32 ApbMiscGpXm2CfgCPadCtrl2;
314 /// Specifies the value for APB_MISC_GP_XM2CFGDPADCTRL
315 NvU32 ApbMiscGpXm2CfgDPadCtrl;
316 /// Specifies the value for APB_MISC_GP_XM2CFGDPADCTRL2
317 NvU32 ApbMiscGpXm2CfgDPadCtrl2;
318 /// Specifies the value for APB_MISC_GP_XM2CLKCFGPADCTRL
319 NvU32 ApbMiscGpXm2ClkCfgPadCtrl;
320 /// Specifies the value for APB_MISC_GP_XM2COMPPADCTRL
321 NvU32 ApbMiscGpXm2CompPadCtrl;
322 /// Specifies the value for APB_MISC_GP_XM2VTTGENPADCTRL
323 NvU32 ApbMiscGpXm2VttGenPadCtrl;
324
325 /// Specifies storage for arbitration configuration registers
326 /// Data passed through to the Bootloader but not used by the Boot ROM
327 NvU32 ArbitrationConfig[NVBOOT_BCT_SDRAM_ARB_CONFIG_WORDS];
328 } NvBootSdramParams;
329
330 #if defined(__cplusplus)
331 }
332 #endif
333
334 #endif /* #ifndef INCLUDED_NVBOOT_SDRAM_PARAM_H */
335
OLDNEW
« no previous file with comments | « arch/arm/include/asm/arch-tegra2/nv_drf_asm.h ('k') | arch/arm/include/asm/arch-tegra2/tegra2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698