blob: 0e45426fbc996b6eab32d05b3c78c6c2c701145e [file] [log] [blame]
Sergey Kubushyne8f39122007-08-10 20:26:18 +02001/*
2 * Low-level board setup code for TI DaVinci SoC based boards.
3 *
4 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
5 *
6 * Partially based on TI sources, original copyrights follow:
7 */
8
9/*
10 * Board specific setup info
11 *
12 * (C) Copyright 2003
13 * Texas Instruments, <www.ti.com>
14 * Kshitij Gupta <Kshitij@ti.com>
15 *
16 * Modified for OMAP 1610 H2 board by Nishant Kamat, Jan 2004
17 *
18 * Modified for OMAP 5912 OSK board by Rishi Bhattacharya, Apr 2004
19 * See file CREDITS for list of people who contributed to this
20 * project.
21 *
22 * Modified for DV-EVM board by Rishi Bhattacharya, Apr 2005
23 * See file CREDITS for list of people who contributed to this
24 * project.
25 *
26 * Modified for DV-EVM board by Swaminathan S, Nov 2005
27 * See file CREDITS for list of people who contributed to this
28 * project.
29 *
30 * This program is free software; you can redistribute it and/or
31 * modify it under the terms of the GNU General Public License as
32 * published by the Free Software Foundation; either version 2 of
33 * the License, or (at your option) any later version.
34 *
35 * This program is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
39 *
40 * You should have received a copy of the GNU General Public License
41 * along with this program; if not, write to the Free Software
42 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
43 * MA 02111-1307 USA
44 */
45
46#include <config.h>
47
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +000048#define MDSTAT_STATE 0x3f
49
Sergey Kubushyne8f39122007-08-10 20:26:18 +020050.globl lowlevel_init
51lowlevel_init:
Christian Riesch750fdd02012-02-02 00:44:36 +000052#ifdef CONFIG_SOC_DM644X
Sergey Kubushyne8f39122007-08-10 20:26:18 +020053
54 /*-------------------------------------------------------*
55 * Mask all IRQs by setting all bits in the EINT default *
56 *-------------------------------------------------------*/
57 mov r1, $0
58 ldr r0, =EINT_ENABLE0
59 str r1, [r0]
60 ldr r0, =EINT_ENABLE1
61 str r1, [r0]
62
63 /*------------------------------------------------------*
64 * Put the GEM in reset *
65 *------------------------------------------------------*/
66
67 /* Put the GEM in reset */
68 ldr r8, PSC_GEM_FLAG_CLEAR
69 ldr r6, MDCTL_GEM
70 ldr r7, [r6]
71 and r7, r7, r8
72 str r7, [r6]
73
74 /* Enable the Power Domain Transition Command */
75 ldr r6, PTCMD
76 ldr r7, [r6]
77 orr r7, r7, $0x02
78 str r7, [r6]
79
80 /* Check for Transition Complete(PTSTAT) */
81checkStatClkStopGem:
82 ldr r6, PTSTAT
83 ldr r7, [r6]
84 ands r7, r7, $0x02
85 bne checkStatClkStopGem
86
87 /* Check for GEM Reset Completion */
88checkGemStatClkStop:
89 ldr r6, MDSTAT_GEM
90 ldr r7, [r6]
91 ands r7, r7, $0x100
92 bne checkGemStatClkStop
93
94 /* Do this for enabling a WDT initiated reset this is a workaround
95 for a chip bug. Not required under normal situations */
96 ldr r6, P1394
97 mov r10, $0
98 str r10, [r6]
99
100 /*------------------------------------------------------*
101 * Enable L1 & L2 Memories in Fast mode *
102 *------------------------------------------------------*/
103 ldr r6, DFT_ENABLE
104 mov r10, $0x01
105 str r10, [r6]
106
107 ldr r6, MMARG_BRF0
108 ldr r10, MMARG_BRF0_VAL
109 str r10, [r6]
110
111 ldr r6, DFT_ENABLE
112 mov r10, $0
113 str r10, [r6]
114
115 /*------------------------------------------------------*
Wolfgang Denka1be4762008-05-20 16:00:29 +0200116 * DDR2 PLL Initialization *
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200117 *------------------------------------------------------*/
118
119 /* Select the Clock Mode Depending on the Value written in the Boot Table by the run script */
120 mov r10, $0
121 ldr r6, PLL2_CTL
122 ldr r7, PLL_CLKSRC_MASK
123 ldr r8, [r6]
124 and r8, r8, r7
125 mov r9, r10, lsl $8
126 orr r8, r8, r9
127 str r8, [r6]
128
129 /* Select the PLLEN source */
130 ldr r7, PLL_ENSRC_MASK
131 and r8, r8, r7
132 str r8, [r6]
133
134 /* Bypass the PLL */
135 ldr r7, PLL_BYPASS_MASK
136 and r8, r8, r7
137 str r8, [r6]
138
139 /* Wait for few cycles to allow PLLEN Mux switch properly to bypass Clock */
140 mov r10, $0x20
141WaitPPL2Loop:
142 subs r10, r10, $1
143 bne WaitPPL2Loop
144
145 /* Reset the PLL */
146 ldr r7, PLL_RESET_MASK
147 and r8, r8, r7
148 str r8, [r6]
149
150 /* Power up the PLL */
151 ldr r7, PLL_PWRUP_MASK
152 and r8, r8, r7
153 str r8, [r6]
154
155 /* Enable the PLL from Disable Mode */
156 ldr r7, PLL_DISABLE_ENABLE_MASK
157 and r8, r8, r7
158 str r8, [r6]
159
160 /* Program the PLL Multiplier */
161 ldr r6, PLL2_PLLM
Wolfgang Denka48499f2008-04-11 15:11:26 +0200162 mov r2, $0x17 /* 162 MHz */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200163 str r2, [r6]
164
165 /* Program the PLL2 Divisor Value */
166 ldr r6, PLL2_DIV2
Wolfgang Denka48499f2008-04-11 15:11:26 +0200167 mov r3, $0x01
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200168 str r3, [r6]
169
170 /* Program the PLL2 Divisor Value */
171 ldr r6, PLL2_DIV1
Wolfgang Denka48499f2008-04-11 15:11:26 +0200172 mov r4, $0x0b /* 54 MHz */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200173 str r4, [r6]
174
175 /* PLL2 DIV2 MMR */
176 ldr r8, PLL2_DIV_MASK
177 ldr r6, PLL2_DIV2
178 ldr r9, [r6]
179 and r8, r8, r9
180 mov r9, $0x01
181 mov r9, r9, lsl $15
182 orr r8, r8, r9
183 str r8, [r6]
184
185 /* Program the GOSET bit to take new divider values */
186 ldr r6, PLL2_PLLCMD
187 ldr r7, [r6]
188 orr r7, r7, $0x01
189 str r7, [r6]
190
191 /* Wait for Done */
192 ldr r6, PLL2_PLLSTAT
193doneLoop_0:
194 ldr r7, [r6]
195 ands r7, r7, $0x01
196 bne doneLoop_0
197
198 /* PLL2 DIV1 MMR */
199 ldr r8, PLL2_DIV_MASK
200 ldr r6, PLL2_DIV1
201 ldr r9, [r6]
202 and r8, r8, r9
203 mov r9, $0x01
204 mov r9, r9, lsl $15
205 orr r8, r8, r9
206 str r8, [r6]
207
208 /* Program the GOSET bit to take new divider values */
209 ldr r6, PLL2_PLLCMD
210 ldr r7, [r6]
211 orr r7, r7, $0x01
212 str r7, [r6]
213
214 /* Wait for Done */
215 ldr r6, PLL2_PLLSTAT
216doneLoop:
217 ldr r7, [r6]
218 ands r7, r7, $0x01
219 bne doneLoop
220
221 /* Wait for PLL to Reset Properly */
222 mov r10, $0x218
223ResetPPL2Loop:
224 subs r10, r10, $1
225 bne ResetPPL2Loop
226
227 /* Bring PLL out of Reset */
228 ldr r6, PLL2_CTL
229 ldr r8, [r6]
230 orr r8, r8, $0x08
231 str r8, [r6]
232
233 /* Wait for PLL to Lock */
234 ldr r10, PLL_LOCK_COUNT
235PLL2Lock:
236 subs r10, r10, $1
237 bne PLL2Lock
238
239 /* Enable the PLL */
240 ldr r6, PLL2_CTL
241 ldr r8, [r6]
242 orr r8, r8, $0x01
243 str r8, [r6]
244
245 /*------------------------------------------------------*
246 * Issue Soft Reset to DDR Module *
247 *------------------------------------------------------*/
248
249 /* Shut down the DDR2 LPSC Module */
250 ldr r8, PSC_FLAG_CLEAR
251 ldr r6, MDCTL_DDR2
252 ldr r7, [r6]
253 and r7, r7, r8
254 orr r7, r7, $0x03
255 str r7, [r6]
256
257 /* Enable the Power Domain Transition Command */
258 ldr r6, PTCMD
259 ldr r7, [r6]
260 orr r7, r7, $0x01
261 str r7, [r6]
262
263 /* Check for Transition Complete(PTSTAT) */
264checkStatClkStop:
265 ldr r6, PTSTAT
266 ldr r7, [r6]
267 ands r7, r7, $0x01
268 bne checkStatClkStop
269
270 /* Check for DDR2 Controller Enable Completion */
271checkDDRStatClkStop:
272 ldr r6, MDSTAT_DDR2
273 ldr r7, [r6]
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +0000274 and r7, r7, $MDSTAT_STATE
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200275 cmp r7, $0x03
276 bne checkDDRStatClkStop
277
278 /*------------------------------------------------------*
Wolfgang Denka48499f2008-04-11 15:11:26 +0200279 * Program DDR2 MMRs for 162MHz Setting *
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200280 *------------------------------------------------------*/
281
282 /* Program PHY Control Register */
283 ldr r6, DDRCTL
284 ldr r7, DDRCTL_VAL
285 str r7, [r6]
286
287 /* Program SDRAM Bank Config Register */
288 ldr r6, SDCFG
289 ldr r7, SDCFG_VAL
290 str r7, [r6]
291
292 /* Program SDRAM TIM-0 Config Register */
293 ldr r6, SDTIM0
Wolfgang Denka48499f2008-04-11 15:11:26 +0200294 ldr r7, SDTIM0_VAL_162MHz
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200295 str r7, [r6]
296
297 /* Program SDRAM TIM-1 Config Register */
298 ldr r6, SDTIM1
Wolfgang Denka48499f2008-04-11 15:11:26 +0200299 ldr r7, SDTIM1_VAL_162MHz
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200300 str r7, [r6]
301
302 /* Program the SDRAM Bank Config Control Register */
303 ldr r10, MASK_VAL
304 ldr r8, SDCFG
305 ldr r9, SDCFG_VAL
306 and r9, r9, r10
307 str r9, [r8]
308
309 /* Program SDRAM SDREF Config Register */
310 ldr r6, SDREF
311 ldr r7, SDREF_VAL
312 str r7, [r6]
313
314 /*------------------------------------------------------*
315 * Issue Soft Reset to DDR Module *
316 *------------------------------------------------------*/
317
318 /* Issue a Dummy DDR2 read/write */
319 ldr r8, DDR2_START_ADDR
320 ldr r7, DUMMY_VAL
321 str r7, [r8]
322 ldr r7, [r8]
323
324 /* Shut down the DDR2 LPSC Module */
325 ldr r8, PSC_FLAG_CLEAR
326 ldr r6, MDCTL_DDR2
327 ldr r7, [r6]
328 and r7, r7, r8
329 orr r7, r7, $0x01
330 str r7, [r6]
331
332 /* Enable the Power Domain Transition Command */
333 ldr r6, PTCMD
334 ldr r7, [r6]
335 orr r7, r7, $0x01
336 str r7, [r6]
337
338 /* Check for Transition Complete(PTSTAT) */
339checkStatClkStop2:
340 ldr r6, PTSTAT
341 ldr r7, [r6]
342 ands r7, r7, $0x01
343 bne checkStatClkStop2
344
345 /* Check for DDR2 Controller Enable Completion */
346checkDDRStatClkStop2:
347 ldr r6, MDSTAT_DDR2
348 ldr r7, [r6]
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +0000349 and r7, r7, $MDSTAT_STATE
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200350 cmp r7, $0x01
351 bne checkDDRStatClkStop2
352
353 /*------------------------------------------------------*
354 * Turn DDR2 Controller Clocks On *
355 *------------------------------------------------------*/
356
357 /* Enable the DDR2 LPSC Module */
358 ldr r6, MDCTL_DDR2
359 ldr r7, [r6]
360 orr r7, r7, $0x03
361 str r7, [r6]
362
363 /* Enable the Power Domain Transition Command */
364 ldr r6, PTCMD
365 ldr r7, [r6]
366 orr r7, r7, $0x01
367 str r7, [r6]
368
369 /* Check for Transition Complete(PTSTAT) */
370checkStatClkEn2:
371 ldr r6, PTSTAT
372 ldr r7, [r6]
373 ands r7, r7, $0x01
374 bne checkStatClkEn2
375
376 /* Check for DDR2 Controller Enable Completion */
377checkDDRStatClkEn2:
378 ldr r6, MDSTAT_DDR2
379 ldr r7, [r6]
Sergei Shtylyov617ee0b2011-09-23 04:29:15 +0000380 and r7, r7, $MDSTAT_STATE
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200381 cmp r7, $0x03
382 bne checkDDRStatClkEn2
383
384 /* DDR Writes and Reads */
385 ldr r6, CFGTEST
386 mov r3, $0x01
387 str r3, [r6]
388
389 /*------------------------------------------------------*
390 * System PLL Initialization *
391 *------------------------------------------------------*/
392
393 /* Select the Clock Mode Depending on the Value written in the Boot Table by the run script */
394 mov r2, $0
395 ldr r6, PLL1_CTL
396 ldr r7, PLL_CLKSRC_MASK
397 ldr r8, [r6]
398 and r8, r8, r7
399 mov r9, r2, lsl $8
400 orr r8, r8, r9
401 str r8, [r6]
402
403 /* Select the PLLEN source */
404 ldr r7, PLL_ENSRC_MASK
405 and r8, r8, r7
406 str r8, [r6]
407
408 /* Bypass the PLL */
409 ldr r7, PLL_BYPASS_MASK
410 and r8, r8, r7
411 str r8, [r6]
412
413 /* Wait for few cycles to allow PLLEN Mux switch properly to bypass Clock */
414 mov r10, $0x20
415
416WaitLoop:
417 subs r10, r10, $1
418 bne WaitLoop
419
420 /* Reset the PLL */
421 ldr r7, PLL_RESET_MASK
422 and r8, r8, r7
423 str r8, [r6]
424
425 /* Disable the PLL */
426 orr r8, r8, $0x10
427 str r8, [r6]
428
429 /* Power up the PLL */
430 ldr r7, PLL_PWRUP_MASK
431 and r8, r8, r7
432 str r8, [r6]
433
434 /* Enable the PLL from Disable Mode */
435 ldr r7, PLL_DISABLE_ENABLE_MASK
436 and r8, r8, r7
437 str r8, [r6]
438
439 /* Program the PLL Multiplier */
440 ldr r6, PLL1_PLLM
Wolfgang Denka48499f2008-04-11 15:11:26 +0200441 mov r3, $0x15 /* For 594MHz */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200442 str r3, [r6]
443
444 /* Wait for PLL to Reset Properly */
445 mov r10, $0xff
446
447ResetLoop:
448 subs r10, r10, $1
449 bne ResetLoop
450
451 /* Bring PLL out of Reset */
452 ldr r6, PLL1_CTL
453 orr r8, r8, $0x08
454 str r8, [r6]
455
456 /* Wait for PLL to Lock */
457 ldr r10, PLL_LOCK_COUNT
458
459PLL1Lock:
460 subs r10, r10, $1
461 bne PLL1Lock
462
463 /* Enable the PLL */
464 orr r8, r8, $0x01
465 str r8, [r6]
466
467 nop
468 nop
469 nop
470 nop
471
472 /*------------------------------------------------------*
Wolfgang Denka48499f2008-04-11 15:11:26 +0200473 * AEMIF configuration for NOR Flash (double check) *
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200474 *------------------------------------------------------*/
475 ldr r0, _PINMUX0
476 ldr r1, _DEV_SETTING
477 str r1, [r0]
478
479 ldr r0, WAITCFG
480 ldr r1, WAITCFG_VAL
481 ldr r2, [r0]
482 orr r2, r2, r1
483 str r2, [r0]
484
485 ldr r0, ACFG3
486 ldr r1, ACFG3_VAL
487 ldr r2, [r0]
488 and r1, r2, r1
489 str r1, [r0]
490
491 ldr r0, ACFG4
492 ldr r1, ACFG4_VAL
493 ldr r2, [r0]
494 and r1, r2, r1
495 str r1, [r0]
496
497 ldr r0, ACFG5
498 ldr r1, ACFG5_VAL
499 ldr r2, [r0]
500 and r1, r2, r1
501 str r1, [r0]
502
503 /*--------------------------------------*
504 * VTP manual Calibration *
505 *--------------------------------------*/
506 ldr r0, VTPIOCR
507 ldr r1, VTP_MMR0
508 str r1, [r0]
509
510 ldr r0, VTPIOCR
511 ldr r1, VTP_MMR1
512 str r1, [r0]
513
514 /* Wait for 33 VTP CLK cycles. VRP operates at 27 MHz */
515 ldr r10, VTP_LOCK_COUNT
516VTPLock:
517 subs r10, r10, $1
518 bne VTPLock
519
520 ldr r6, DFT_ENABLE
521 mov r10, $0x01
522 str r10, [r6]
523
524 ldr r6, DDRVTPR
525 ldr r7, [r6]
Troy Kiskya3700a02012-05-18 13:21:59 +0000526 mov r8, r7, LSL #32-10
527 mov r8, r8, LSR #32-10 /* grab low 10 bits */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200528 ldr r7, VTP_RECAL
529 orr r8, r7, r8
530 ldr r7, VTP_EN
531 orr r8, r7, r8
532 str r8, [r0]
533
534
535 /* Wait for 33 VTP CLK cycles. VRP operates at 27 MHz */
536 ldr r10, VTP_LOCK_COUNT
537VTP1Lock:
538 subs r10, r10, $1
539 bne VTP1Lock
540
541 ldr r1, [r0]
542 ldr r2, VTP_MASK
543 and r2, r1, r2
544 str r2, [r0]
545
546 ldr r6, DFT_ENABLE
547 mov r10, $0
548 str r10, [r6]
549
Stefan Roese86ec9122007-08-10 20:34:58 +0200550 /*
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200551 * Call board-specific lowlevel init.
Wolfgang Denka1be4762008-05-20 16:00:29 +0200552 * That MUST be present and THAT returns
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200553 * back to arch calling code with "mov pc, lr."
554 */
555 b dv_board_init
556
557.ltorg
558
559_PINMUX0:
560 .word 0x01c40000 /* Device Configuration Registers */
561_PINMUX1:
562 .word 0x01c40004 /* Device Configuration Registers */
563
564_DEV_SETTING:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200565 .word 0x00000c1f
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200566
567WAITCFG:
568 .word 0x01e00004
569WAITCFG_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200570 .word 0
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200571ACFG3:
572 .word 0x01e00014
573ACFG3_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200574 .word 0x3ffffffd
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200575ACFG4:
576 .word 0x01e00018
577ACFG4_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200578 .word 0x3ffffffd
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200579ACFG5:
580 .word 0x01e0001c
581ACFG5_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200582 .word 0x3ffffffd
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200583
584MDCTL_DDR2:
585 .word 0x01c41a34
586MDSTAT_DDR2:
587 .word 0x01c41834
588
589PTCMD:
590 .word 0x01c41120
591PTSTAT:
592 .word 0x01c41128
593
594EINT_ENABLE0:
595 .word 0x01c48018
596EINT_ENABLE1:
597 .word 0x01c4801c
598
599PSC_FLAG_CLEAR:
600 .word 0xffffffe0
601PSC_GEM_FLAG_CLEAR:
602 .word 0xfffffeff
603
Wolfgang Denka48499f2008-04-11 15:11:26 +0200604/* DDR2 MMR & CONFIGURATION VALUES, 162 MHZ clock */
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200605DDRCTL:
606 .word 0x200000e4
607DDRCTL_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200608 .word 0x50006405
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200609SDREF:
610 .word 0x2000000c
611SDREF_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200612 .word 0x000005c3
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200613SDCFG:
614 .word 0x20000008
615SDCFG_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200616#ifdef DDR_4BANKS
617 .word 0x00178622
618#elif defined DDR_8BANKS
619 .word 0x00178632
620#else
621#error "Unknown DDR configuration!!!"
622#endif
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200623SDTIM0:
624 .word 0x20000010
Wolfgang Denka48499f2008-04-11 15:11:26 +0200625SDTIM0_VAL_162MHz:
626 .word 0x28923211
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200627SDTIM1:
628 .word 0x20000014
Wolfgang Denka48499f2008-04-11 15:11:26 +0200629SDTIM1_VAL_162MHz:
630 .word 0x0016c722
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200631VTPIOCR:
632 .word 0x200000f0 /* VTP IO Control register */
633DDRVTPR:
634 .word 0x01c42030 /* DDR VPTR MMR */
635VTP_MMR0:
636 .word 0x201f
637VTP_MMR1:
638 .word 0xa01f
639DFT_ENABLE:
640 .word 0x01c4004c
641VTP_LOCK_COUNT:
642 .word 0x5b0
643VTP_MASK:
644 .word 0xffffdfff
645VTP_RECAL:
Troy Kiskya3700a02012-05-18 13:21:59 +0000646 .word 0x08000
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200647VTP_EN:
648 .word 0x02000
649CFGTEST:
650 .word 0x80010000
651MASK_VAL:
652 .word 0x00000fff
653
654/* GEM Power Up & LPSC Control Register */
655MDCTL_GEM:
656 .word 0x01c41a9c
657MDSTAT_GEM:
658 .word 0x01c4189c
659
660/* For WDT reset chip bug */
661P1394:
662 .word 0x01c41a20
663
664PLL_CLKSRC_MASK:
665 .word 0xfffffeff /* Mask the Clock Mode bit */
666PLL_ENSRC_MASK:
667 .word 0xffffffdf /* Select the PLLEN source */
668PLL_BYPASS_MASK:
669 .word 0xfffffffe /* Put the PLL in BYPASS */
670PLL_RESET_MASK:
671 .word 0xfffffff7 /* Put the PLL in Reset Mode */
672PLL_PWRUP_MASK:
673 .word 0xfffffffd /* PLL Power up Mask Bit */
674PLL_DISABLE_ENABLE_MASK:
675 .word 0xffffffef /* Enable the PLL from Disable */
676PLL_LOCK_COUNT:
677 .word 0x2000
678
679/* PLL1-SYSTEM PLL MMRs */
680PLL1_CTL:
681 .word 0x01c40900
682PLL1_PLLM:
683 .word 0x01c40910
684
685/* PLL2-SYSTEM PLL MMRs */
686PLL2_CTL:
687 .word 0x01c40d00
688PLL2_PLLM:
689 .word 0x01c40d10
690PLL2_DIV1:
691 .word 0x01c40d18
692PLL2_DIV2:
693 .word 0x01c40d1c
694PLL2_PLLCMD:
695 .word 0x01c40d38
696PLL2_PLLSTAT:
697 .word 0x01c40d3c
698PLL2_DIV_MASK:
699 .word 0xffff7fff
700
701MMARG_BRF0:
702 .word 0x01c42010 /* BRF margin mode 0 (R/W)*/
703MMARG_BRF0_VAL:
Wolfgang Denka48499f2008-04-11 15:11:26 +0200704 .word 0x00444400
Sergey Kubushyne8f39122007-08-10 20:26:18 +0200705
706DDR2_START_ADDR:
707 .word 0x80000000
708DUMMY_VAL:
709 .word 0xa55aa55a
Christian Riesch750fdd02012-02-02 00:44:36 +0000710#else /* CONFIG_SOC_DM644X */
711 mov pc, lr
712#endif