xref: /openbmc/u-boot/board/ms7720se/lowlevel_init.S (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini/* SPDX-License-Identifier: GPL-2.0+ */
2b2b5e2bbSYoshihiro Shimoda/*
3b2b5e2bbSYoshihiro Shimoda * (C) Copyright 2007
4b2b5e2bbSYoshihiro Shimoda * Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
5b2b5e2bbSYoshihiro Shimoda */
6b2b5e2bbSYoshihiro Shimoda
73e3eec39SNobuhiro Iwamatsu#include <asm/macro.h>
83e3eec39SNobuhiro Iwamatsu
9b2b5e2bbSYoshihiro Shimoda	.global	lowlevel_init
10b2b5e2bbSYoshihiro Shimoda
11b2b5e2bbSYoshihiro Shimoda	.text
12b2b5e2bbSYoshihiro Shimoda	.align	2
13b2b5e2bbSYoshihiro Shimoda
14b2b5e2bbSYoshihiro Shimodalowlevel_init:
15b2b5e2bbSYoshihiro Shimoda
163e3eec39SNobuhiro Iwamatsu	write16	WTCSR_A, WTCSR_D
17b2b5e2bbSYoshihiro Shimoda
183e3eec39SNobuhiro Iwamatsu	write16	WTCNT_A, WTCNT_D
19b2b5e2bbSYoshihiro Shimoda
203e3eec39SNobuhiro Iwamatsu	write16	FRQCR_A, FRQCR_D
21b2b5e2bbSYoshihiro Shimoda
223e3eec39SNobuhiro Iwamatsu	write16	UCLKCR_A, UCLKCR_D
23b2b5e2bbSYoshihiro Shimoda
243e3eec39SNobuhiro Iwamatsu	write32	CMNCR_A, CMNCR_D
25b2b5e2bbSYoshihiro Shimoda
263e3eec39SNobuhiro Iwamatsu	write32	CMNCR_A, CMNCR_D
27b2b5e2bbSYoshihiro Shimoda
283e3eec39SNobuhiro Iwamatsu	write32	CS0BCR_A, CS0BCR_D
29b2b5e2bbSYoshihiro Shimoda
303e3eec39SNobuhiro Iwamatsu	write32	CS2BCR_A, CS2BCR_D
31b2b5e2bbSYoshihiro Shimoda
323e3eec39SNobuhiro Iwamatsu	write32	CS3BCR_A, CS3BCR_D
33b2b5e2bbSYoshihiro Shimoda
343e3eec39SNobuhiro Iwamatsu	write32	CS4BCR_A, CS4BCR_D
35b2b5e2bbSYoshihiro Shimoda
363e3eec39SNobuhiro Iwamatsu	write32	CS5ABCR_A, CS5ABCR_D
37b2b5e2bbSYoshihiro Shimoda
383e3eec39SNobuhiro Iwamatsu	write32	CS5BBCR_A, CS5BBCR_D
39b2b5e2bbSYoshihiro Shimoda
403e3eec39SNobuhiro Iwamatsu	write32	CS6ABCR_A, CS6ABCR_D
41b2b5e2bbSYoshihiro Shimoda
423e3eec39SNobuhiro Iwamatsu	write32	CS6BBCR_A, CS6BBCR_D
43b2b5e2bbSYoshihiro Shimoda
443e3eec39SNobuhiro Iwamatsu	write32	CS0WCR_A, CS0WCR_D
45b2b5e2bbSYoshihiro Shimoda
463e3eec39SNobuhiro Iwamatsu	write32	CS2WCR_A, CS2WCR_D
47b2b5e2bbSYoshihiro Shimoda
483e3eec39SNobuhiro Iwamatsu	write32	CS3WCR_A, CS3WCR_D
49b2b5e2bbSYoshihiro Shimoda
503e3eec39SNobuhiro Iwamatsu	write32	CS4WCR_A, CS4WCR_D
51b2b5e2bbSYoshihiro Shimoda
523e3eec39SNobuhiro Iwamatsu	write32	CS5AWCR_A, CS5AWCR_D
53b2b5e2bbSYoshihiro Shimoda
543e3eec39SNobuhiro Iwamatsu	write32	CS5BWCR_A, CS5BWCR_D
55b2b5e2bbSYoshihiro Shimoda
563e3eec39SNobuhiro Iwamatsu	write32	CS6AWCR_A, CS6AWCR_D
57b2b5e2bbSYoshihiro Shimoda
583e3eec39SNobuhiro Iwamatsu	write32	CS6BWCR_A, CS6BWCR_D
59b2b5e2bbSYoshihiro Shimoda
603e3eec39SNobuhiro Iwamatsu	write32	SDCR_A, SDCR_D1
61b2b5e2bbSYoshihiro Shimoda
623e3eec39SNobuhiro Iwamatsu	write32	RTCSR_A, RTCSR_D
63b2b5e2bbSYoshihiro Shimoda
643e3eec39SNobuhiro Iwamatsu	write32	RTCNT_A RTCNT_D
65b2b5e2bbSYoshihiro Shimoda
663e3eec39SNobuhiro Iwamatsu	write32	RTCOR_A, RTCOR_D
67b2b5e2bbSYoshihiro Shimoda
683e3eec39SNobuhiro Iwamatsu	write32	SDCR_A, SDCR_D2
69b2b5e2bbSYoshihiro Shimoda
703e3eec39SNobuhiro Iwamatsu	write16	SDMR3_A, SDMR3_D
71b2b5e2bbSYoshihiro Shimoda
723e3eec39SNobuhiro Iwamatsu	write16	PCCR_A, PCCR_D
73b2b5e2bbSYoshihiro Shimoda
743e3eec39SNobuhiro Iwamatsu	write16	PDCR_A, PDCR_D
75b2b5e2bbSYoshihiro Shimoda
763e3eec39SNobuhiro Iwamatsu	write16	PECR_A, PECR_D
77b2b5e2bbSYoshihiro Shimoda
783e3eec39SNobuhiro Iwamatsu	write16	PGCR_A, PGCR_D
79b2b5e2bbSYoshihiro Shimoda
803e3eec39SNobuhiro Iwamatsu	write16	PHCR_A, PHCR_D
81b2b5e2bbSYoshihiro Shimoda
823e3eec39SNobuhiro Iwamatsu	write16	PPCR_A, PPCR_D
83b2b5e2bbSYoshihiro Shimoda
843e3eec39SNobuhiro Iwamatsu	write16	PTCR_A, PTCR_D
85b2b5e2bbSYoshihiro Shimoda
863e3eec39SNobuhiro Iwamatsu	write16	PVCR_A, PVCR_D
87b2b5e2bbSYoshihiro Shimoda
883e3eec39SNobuhiro Iwamatsu	write16	PSELA_A, PSELA_D
89b2b5e2bbSYoshihiro Shimoda
903e3eec39SNobuhiro Iwamatsu	write32	CCR_A, CCR_D
913e3eec39SNobuhiro Iwamatsu
923e3eec39SNobuhiro Iwamatsu	write8	LED_A, LED_D
93b2b5e2bbSYoshihiro Shimoda
94b2b5e2bbSYoshihiro Shimoda	rts
95b2b5e2bbSYoshihiro Shimoda	 nop
96b2b5e2bbSYoshihiro Shimoda
97b2b5e2bbSYoshihiro Shimoda	.align 4
98b2b5e2bbSYoshihiro Shimoda
99b2b5e2bbSYoshihiro ShimodaFRQCR_A:	.long	0xA415FF80	/* FRQCR Address */
100b2b5e2bbSYoshihiro ShimodaWTCNT_A:	.long	0xA415FF84
101b2b5e2bbSYoshihiro ShimodaWTCSR_A:	.long	0xA415FF86
102b2b5e2bbSYoshihiro ShimodaUCLKCR_A:	.long	0xA40A0008
103fc0db132SNobuhiro IwamatsuFRQCR_D:	.word	0x1103		/* I:B:P=8:4:2 */
104fc0db132SNobuhiro IwamatsuWTCNT_D:	.word	0x5A00
105fc0db132SNobuhiro IwamatsuWTCSR_D:	.word	0xA506
106fc0db132SNobuhiro IwamatsuUCLKCR_D:	.word	0xA5C0
107b2b5e2bbSYoshihiro Shimoda
108b2b5e2bbSYoshihiro Shimoda#define BSC_BASE	0xA4FD0000
109b2b5e2bbSYoshihiro ShimodaCMNCR_A:	.long	BSC_BASE
110b2b5e2bbSYoshihiro ShimodaCS0BCR_A:	.long	BSC_BASE + 0x04
111b2b5e2bbSYoshihiro ShimodaCS2BCR_A:	.long	BSC_BASE + 0x08
112b2b5e2bbSYoshihiro ShimodaCS3BCR_A:	.long	BSC_BASE + 0x0C
113b2b5e2bbSYoshihiro ShimodaCS4BCR_A:	.long	BSC_BASE + 0x10
114b2b5e2bbSYoshihiro ShimodaCS5ABCR_A:	.long	BSC_BASE + 0x14
115b2b5e2bbSYoshihiro ShimodaCS5BBCR_A:	.long	BSC_BASE + 0x18
116b2b5e2bbSYoshihiro ShimodaCS6ABCR_A:	.long	BSC_BASE + 0x1C
117b2b5e2bbSYoshihiro ShimodaCS6BBCR_A:	.long	BSC_BASE + 0x20
118b2b5e2bbSYoshihiro ShimodaCS0WCR_A:	.long	BSC_BASE + 0x24
119b2b5e2bbSYoshihiro ShimodaCS2WCR_A:	.long	BSC_BASE + 0x28
120b2b5e2bbSYoshihiro ShimodaCS3WCR_A:	.long	BSC_BASE + 0x2C
121b2b5e2bbSYoshihiro ShimodaCS4WCR_A:	.long	BSC_BASE + 0x30
122b2b5e2bbSYoshihiro ShimodaCS5AWCR_A:	.long	BSC_BASE + 0x34
123b2b5e2bbSYoshihiro ShimodaCS5BWCR_A:	.long	BSC_BASE + 0x38
124b2b5e2bbSYoshihiro ShimodaCS6AWCR_A:	.long	BSC_BASE + 0x3C
125b2b5e2bbSYoshihiro ShimodaCS6BWCR_A:	.long	BSC_BASE + 0x40
126b2b5e2bbSYoshihiro ShimodaSDCR_A:		.long	BSC_BASE + 0x44
127b2b5e2bbSYoshihiro ShimodaRTCSR_A:	.long	BSC_BASE + 0x48
128b2b5e2bbSYoshihiro ShimodaRTCNT_A:	.long	BSC_BASE + 0x4C
129b2b5e2bbSYoshihiro ShimodaRTCOR_A:	.long	BSC_BASE + 0x50
130b2b5e2bbSYoshihiro ShimodaSDMR3_A:	.long	BSC_BASE + 0x58C0
131b2b5e2bbSYoshihiro Shimoda
132b2b5e2bbSYoshihiro ShimodaCMNCR_D:	.long	0x00000010
133b2b5e2bbSYoshihiro ShimodaCS0BCR_D:	.long	0x36DB0400
134b2b5e2bbSYoshihiro ShimodaCS2BCR_D:	.long	0x36DB0400
135b2b5e2bbSYoshihiro ShimodaCS3BCR_D:	.long	0x36DB4600
136b2b5e2bbSYoshihiro ShimodaCS4BCR_D:	.long	0x36DB0400
137b2b5e2bbSYoshihiro ShimodaCS5ABCR_D:	.long	0x36DB0400
138b2b5e2bbSYoshihiro ShimodaCS5BBCR_D:	.long	0x36DB0200
139b2b5e2bbSYoshihiro ShimodaCS6ABCR_D:	.long	0x36DB0400
140b2b5e2bbSYoshihiro ShimodaCS6BBCR_D:	.long	0x36DB0400
141b2b5e2bbSYoshihiro ShimodaCS0WCR_D:	.long	0x00000B01
142b2b5e2bbSYoshihiro ShimodaCS2WCR_D:	.long	0x00000500
143b2b5e2bbSYoshihiro ShimodaCS3WCR_D:	.long	0x00006D1B
144b2b5e2bbSYoshihiro ShimodaCS4WCR_D:	.long	0x00000500
145b2b5e2bbSYoshihiro ShimodaCS5AWCR_D:	.long	0x00000500
146b2b5e2bbSYoshihiro ShimodaCS5BWCR_D:	.long	0x00000500
147b2b5e2bbSYoshihiro ShimodaCS6AWCR_D:	.long	0x00000500
148b2b5e2bbSYoshihiro ShimodaCS6BWCR_D:	.long	0x00000500
149b2b5e2bbSYoshihiro ShimodaSDCR_D1:	.long	0x00000011
150b2b5e2bbSYoshihiro ShimodaRTCSR_D:	.long	0xA55A0010
151b2b5e2bbSYoshihiro ShimodaRTCNT_D:	.long	0xA55A001F
152b2b5e2bbSYoshihiro ShimodaRTCOR_D:	.long	0xA55A001F
153fc0db132SNobuhiro IwamatsuSDMR3_D:	.word	0x0000
154fc0db132SNobuhiro Iwamatsu.align 2
155b2b5e2bbSYoshihiro ShimodaSDCR_D2:	.long	0x00000811
156b2b5e2bbSYoshihiro Shimoda
157b2b5e2bbSYoshihiro Shimoda#define PFC_BASE	0xA4050100
158b2b5e2bbSYoshihiro ShimodaPCCR_A:		.long	PFC_BASE + 0x04
159b2b5e2bbSYoshihiro ShimodaPDCR_A:		.long	PFC_BASE + 0x06
160b2b5e2bbSYoshihiro ShimodaPECR_A:		.long	PFC_BASE + 0x08
161b2b5e2bbSYoshihiro ShimodaPGCR_A:		.long	PFC_BASE + 0x0C
162b2b5e2bbSYoshihiro ShimodaPHCR_A:		.long	PFC_BASE + 0x0E
163b2b5e2bbSYoshihiro ShimodaPPCR_A:		.long	PFC_BASE + 0x18
164b2b5e2bbSYoshihiro ShimodaPTCR_A:		.long	PFC_BASE + 0x1E
165b2b5e2bbSYoshihiro ShimodaPVCR_A:		.long	PFC_BASE + 0x22
166b2b5e2bbSYoshihiro ShimodaPSELA_A:	.long	PFC_BASE + 0x24
167b2b5e2bbSYoshihiro Shimoda
168fc0db132SNobuhiro IwamatsuPCCR_D:		.word	0x0000
169fc0db132SNobuhiro IwamatsuPDCR_D:		.word	0x0000
170fc0db132SNobuhiro IwamatsuPECR_D:		.word	0x0000
171fc0db132SNobuhiro IwamatsuPGCR_D:		.word	0x0000
172fc0db132SNobuhiro IwamatsuPHCR_D:		.word	0x0000
173fc0db132SNobuhiro IwamatsuPPCR_D:		.word	0x00AA
174fc0db132SNobuhiro IwamatsuPTCR_D:		.word	0x0280
175fc0db132SNobuhiro IwamatsuPVCR_D:		.word	0x0000
176fc0db132SNobuhiro IwamatsuPSELA_D:	.word	0x0000
177fc0db132SNobuhiro Iwamatsu.align 2
178b2b5e2bbSYoshihiro Shimoda
179b2b5e2bbSYoshihiro ShimodaCCR_A:		.long	0xFFFFFFEC
180b2b5e2bbSYoshihiro Shimoda!CCR_D:		.long	0x0000000D
181b2b5e2bbSYoshihiro ShimodaCCR_D:		.long	0x0000000B
182b2b5e2bbSYoshihiro Shimoda
183b2b5e2bbSYoshihiro ShimodaLED_A:		.long	0xB6800000
184b2b5e2bbSYoshihiro ShimodaLED_D:		.long	0xFF
185