2 * Copyright (C) 2009 Renesas Solutions Corp.
3 * Copyright (C) 2009 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
5 * board/espt/lowlevel_init.S
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #include <asm/processor.h>
26 #include <asm/macro.h>
35 write32 WDTCSR_A, WDTCSR_D
37 write32 WDTST_A, WDTST_D
39 write32 WDTBST_A, WDTBST_D
41 write32 CCR_A, CCR_CACHE_ICI_D
43 write32 MMUCR_A, MMU_CONTROL_TI_D
45 write32 MSTPCR0_A, MSTPCR0_D
47 write32 MSTPCR1_A, MSTPCR1_D
49 write32 RAMCR_A, RAMCR_D
52 * Setting infomation from
53 * original ESPT-GIGA bootloader register
55 write32 MMSEL_A, MMSEL_D
64 write32 CS0BCR_A, CS0BCR_D
66 write32 CS0WCR_A, CS0WCR_D
72 /* set DDR-SDRAM dummy read */
73 write32 MMSEL_A, MMSEL_D
85 /* set DDR-SDRAM bus/endian etc */
86 write32 MIM_U_A, MIM_U_D
88 write32 MIM_L_A, MIM_L_D0
90 write32 SDR_L_A, SDR_L_A_D0
92 write32 STR_L_A, STR_L_A_D0
94 /* DDR-SDRAM access control */
95 write32 MIM_L_A, MIM_L_D1
97 write32 SCR_L_A, SCR_L_A_D0
99 write32 SCR_L_A, SCR_L_A_D1
101 write32 EMRS_A, EMRS_D
103 write32 MRS1_A, MRS1_D
105 write32 MIM_U_A, MIM_U_D
107 write32 MIM_L_A, MIM_L_A_D2
109 write32 SCR_L_A, SCR_L_A_D2
111 write32 SCR_L_A, SCR_L_A_D2
113 write32 MRS2_A, MRS2_D
119 write16 PSEL0_A, PSEL0_D
121 write16 PSEL1_A, PSEL1_D
123 write16 PSEL2_A, PSEL2_D
125 write16 PSEL3_A, PSEL3_D
127 write16 PSEL4_A, PSEL4_D
129 write8 PADR_A, PADR_D
131 write16 PACR_A, PACR_D
133 write8 PBDR_A, PBDR_D
135 write16 PBCR_A, PBCR_D
137 write8 PCDR_A, PCDR_D
139 write16 PCCR_A, PCCR_D
141 write8 PDDR_A, PDDR_D
143 write16 PDCR_A, PDCR_D
145 write16 PECR_A, PECR_D
147 write16 PFCR_A, PFCR_D
149 write16 PGCR_A, PGCR_D
151 write16 PHCR_A, PHCR_D
153 write16 PICR_A, PICR_D
155 write8 PJDR_A, PJDR_D
157 write16 PJCR_A, PJCR_D
162 write8 PKDR_A, PKDR_D
164 write16 PKCR_A, PKCR_D
166 write16 PLCR_A, PLCR_D
168 write16 PMCR_A, PMCR_D
170 write16 PNCR_A, PNCR_D
172 write16 POCR_A, POCR_D
176 write32 ICR0_A, ICR0_D
178 write32 ICR1_A, ICR1_D
181 write32 USB_USBHSC_A, USB_USBHSC_D
183 write32 CCR_A, CCR_CACHE_D_2
190 /* GPIO Crontrol Register */
191 PACR_A: .long 0xFFEF0000
192 PBCR_A: .long 0xFFEF0002
193 PCCR_A: .long 0xFFEF0004
194 PDCR_A: .long 0xFFEF0006
195 PECR_A: .long 0xFFEF0008
196 PFCR_A: .long 0xFFEF000A
197 PGCR_A: .long 0xFFEF000C
198 PHCR_A: .long 0xFFEF000E
199 PICR_A: .long 0xFFEF0010
200 PJCR_A: .long 0xFFEF0012
201 PKCR_A: .long 0xFFEF0014
202 PLCR_A: .long 0xFFEF0016
203 PMCR_A: .long 0xFFEF0018
204 PNCR_A: .long 0xFFEF001A
205 POCR_A: .long 0xFFEF001C
207 /* GPIO Data Register */
208 PADR_A: .long 0xFFEF0020
209 PBDR_A: .long 0xFFEF0022
210 PCDR_A: .long 0xFFEF0024
211 PDDR_A: .long 0xFFEF0026
212 PJDR_A: .long 0xFFEF0032
213 PKDR_A: .long 0xFFEF0034
216 PADR_D: .long 0x00000000
217 PACR_D: .long 0x00001400
218 PBDR_D: .long 0x00000000
219 PBCR_D: .long 0x0000555A
220 PCDR_D: .long 0x00000000
221 PCCR_D: .long 0x00005555
222 PDDR_D: .long 0x00000000
223 PDCR_D: .long 0x00000155
224 PECR_D: .long 0x00000000
225 PFCR_D: .long 0x00000000
226 PGCR_D: .long 0x00000000
227 PHCR_D: .long 0x00000000
228 PICR_D: .long 0x00000800
229 PJDR_D: .long 0x00000006
230 PJCR_D: .long 0x00005A57
231 PKDR_D: .long 0x00000000
232 PKCR_D: .long 0x0000FFF9
233 PLCR_D: .long 0x0000C330
234 PMCR_D: .long 0x0000FFFF
235 PNCR_D: .long 0x00000242
236 POCR_D: .long 0x00000000
239 PSEL0_A: .long 0xFFEF0070
240 PSEL1_A: .long 0xFFEF0072
241 PSEL2_A: .long 0xFFEF0074
242 PSEL3_A: .long 0xFFEF0076
243 PSEL4_A: .long 0xFFEF0078
244 PSEL0_D: .long 0x0001
245 PSEL1_D: .long 0x2400
246 PSEL2_D: .long 0x0000
247 PSEL3_D: .long 0x2421
248 PSEL4_D: .long 0x0000
250 MMSEL_A: .long 0xFE600020
251 BCR_A: .long 0xFF801000
252 CS0BCR_A: .long 0xFF802000
253 CS0WCR_A: .long 0xFF802008
254 ICR0_A: .long 0xFFD00000
255 ICR1_A: .long 0xFFD0001C
257 MMSEL_D: .long 0xA5A50000
258 BCR_D: .long 0x05000000
259 CS0BCR_D: .long 0x232306F0
260 CS0WCR_D: .long 0x00011104
261 ICR0_D: .long 0x80C00000
262 ICR1_D: .long 0x00020000
265 WDTST_A: .long 0xFFCC0000
266 WDTCSR_A: .long 0xFFCC0004
267 WDTBST_A: .long 0xFFCC0008
269 WDTST_D: .long 0x5A000FFF
270 WDTCSR_D: .long 0xA5000000
271 WDTBST_D: .long 0x55000000
274 CCR_A: .long 0xFF00001C
275 MMUCR_A: .long 0xFF000010
276 RAMCR_A: .long 0xFF000074
279 CCR_CACHE_ICI_D:.long 0x00000800
280 CCR_CACHE_D_2: .long 0x00000103
281 MMU_CONTROL_TI_D:.long 0x00000004
282 RAMCR_D: .long 0x00000200
284 /* Low power mode control Address */
285 MSTPCR0_A: .long 0xFFC80030
286 MSTPCR1_A: .long 0xFFC80038
287 /* Low power mode control Data */
288 MSTPCR0_D: .long 0x00000000
289 MSTPCR1_D: .long 0x00000000
291 REPEAT0_R3: .long 0x00002000
292 REPEAT_R3: .long 0x00000200
293 CS0_A: .long 0xA8000000
295 MIM_U_A: .long 0xFE800008
296 MIM_L_A: .long 0xFE80000C
297 SCR_U_A: .long 0xFE800010
298 SCR_L_A: .long 0xFE800014
299 STR_U_A: .long 0xFE800018
300 STR_L_A: .long 0xFE80001C
301 SDR_U_A: .long 0xFE800030
302 SDR_L_A: .long 0xFE800034
303 EMRS_A: .long 0xFE902000
304 MRS1_A: .long 0xFE900B08
305 MRS2_A: .long 0xFE900308
307 MIM_U_D: .long 0x00000000
308 MIM_L_D0: .long 0x04100008
309 MIM_L_D1: .long 0x02EE0009
310 MIM_L_D2: .long 0x02EE0209
312 SDR_L_A_D0: .long 0x00000300
313 STR_L_A_D0: .long 0x00010040
314 MIM_L_A_D1: .long 0x04100009
315 SCR_L_A_D0: .long 0x00000003
316 SCR_L_A_D1: .long 0x00000002
317 MIM_L_A_D2: .long 0x04100209
318 SCR_L_A_D2: .long 0x00000004
320 SCR_L_NORMAL: .long 0x00000000
321 SCR_L_NOP: .long 0x00000001
322 SCR_L_PALL: .long 0x00000002
323 SCR_L_CKE_EN: .long 0x00000003
324 SCR_L_CBR: .long 0x00000004
326 STR_L_D: .long 0x000F3980
327 SDR_L_D: .long 0x00000400
328 EMRS_D: .long 0x00000000
329 MRS1_D: .long 0x00000000
330 MRS2_D: .long 0x00000000
333 USB_USBHSC_A: .long 0xFFEC80F0
334 USB_USBHSC_D: .long 0x00000000