xref: /rk3399_ARM-atf/drivers/renesas/rza/pfc/pfc_regs.h (revision 66a0bb47058db8a4f74ccc1543a146094829e110)
1 /*
2  * Copyright (c) 2020-2026, Renesas Electronics Corporation. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef __PFC_REGS_H__
8 #define __PFC_REGS_H__
9 
10 #include <platform_def.h>
11 
12 /* PFC base address */
13 #define	PFC_BASE		PLAT_PFC_BASE
14 
15 #define PFC_P05			(PFC_BASE + 0x0005)
16 #define PFC_P10			(PFC_BASE + 0x0010)
17 #define PFC_P11			(PFC_BASE + 0x0011)
18 #define PFC_P12			(PFC_BASE + 0x0012)
19 #define PFC_P13			(PFC_BASE + 0x0013)
20 #define PFC_P14			(PFC_BASE + 0x0014)
21 #define PFC_P15			(PFC_BASE + 0x0015)
22 #define PFC_P16			(PFC_BASE + 0x0016)
23 #define PFC_P17			(PFC_BASE + 0x0017)
24 #define PFC_P18			(PFC_BASE + 0x0018)
25 #define PFC_P19			(PFC_BASE + 0x0019)
26 #define PFC_P1A			(PFC_BASE + 0x001A)
27 #define PFC_P1B			(PFC_BASE + 0x001B)
28 #define PFC_P1C			(PFC_BASE + 0x001C)
29 #define PFC_P1D			(PFC_BASE + 0x001D)
30 #define PFC_P1E			(PFC_BASE + 0x001E)
31 #define PFC_P1F			(PFC_BASE + 0x001F)
32 #define PFC_P20			(PFC_BASE + 0x0020)
33 #define PFC_P21			(PFC_BASE + 0x0021)
34 #define PFC_P22			(PFC_BASE + 0x0022)
35 #define PFC_P23			(PFC_BASE + 0x0023)
36 #define PFC_P24			(PFC_BASE + 0x0024)
37 #define PFC_P25			(PFC_BASE + 0x0025)
38 #define PFC_P26			(PFC_BASE + 0x0026)
39 #define PFC_P27			(PFC_BASE + 0x0027)
40 #define PFC_P28			(PFC_BASE + 0x0028)
41 #define PFC_P29			(PFC_BASE + 0x0029)
42 #define PFC_P2A			(PFC_BASE + 0x002A)
43 #define PFC_P2B			(PFC_BASE + 0x002B)
44 #define PFC_P2C			(PFC_BASE + 0x002C)
45 #define PFC_P2D			(PFC_BASE + 0x002D)
46 #define PFC_P2E			(PFC_BASE + 0x002E)
47 #define PFC_P2F			(PFC_BASE + 0x002F)
48 #define PFC_P30			(PFC_BASE + 0x0030)
49 #define PFC_P31			(PFC_BASE + 0x0031)
50 #define PFC_P32			(PFC_BASE + 0x0032)
51 #define PFC_P33			(PFC_BASE + 0x0033)
52 #define PFC_P34			(PFC_BASE + 0x0034)
53 #define PFC_P35			(PFC_BASE + 0x0035)
54 #define PFC_P36			(PFC_BASE + 0x0036)
55 #define PFC_P37			(PFC_BASE + 0x0037)
56 #define PFC_P38			(PFC_BASE + 0x0038)
57 #define PFC_P39			(PFC_BASE + 0x0039)
58 #define PFC_P3A			(PFC_BASE + 0x003A)
59 #define PFC_P3B			(PFC_BASE + 0x003B)
60 #define PFC_P3C			(PFC_BASE + 0x003C)
61 #define PFC_P3D			(PFC_BASE + 0x003D)
62 #define PFC_P3E			(PFC_BASE + 0x003E)
63 #define PFC_P3F			(PFC_BASE + 0x003F)
64 #define PFC_P40			(PFC_BASE + 0x0040)
65 #define PFC_PM10		(PFC_BASE + 0x0120)
66 #define PFC_PM11		(PFC_BASE + 0x0122)
67 #define PFC_PM12		(PFC_BASE + 0x0124)
68 #define PFC_PM13		(PFC_BASE + 0x0126)
69 #define PFC_PM14		(PFC_BASE + 0x0128)
70 #define PFC_PM15		(PFC_BASE + 0x012A)
71 #define PFC_PM16		(PFC_BASE + 0x012C)
72 #define PFC_PM17		(PFC_BASE + 0x012E)
73 #define PFC_PM18		(PFC_BASE + 0x0130)
74 #define PFC_PM19		(PFC_BASE + 0x0132)
75 #define PFC_PM1A		(PFC_BASE + 0x0134)
76 #define PFC_PM1B		(PFC_BASE + 0x0136)
77 #define PFC_PM1C		(PFC_BASE + 0x0138)
78 #define PFC_PM1D		(PFC_BASE + 0x013A)
79 #define PFC_PM1E		(PFC_BASE + 0x013C)
80 #define PFC_PM1F		(PFC_BASE + 0x013E)
81 #define PFC_PM20		(PFC_BASE + 0x0140)
82 #define PFC_PM21		(PFC_BASE + 0x0142)
83 #define PFC_PM22		(PFC_BASE + 0x0144)
84 #define PFC_PM23		(PFC_BASE + 0x0146)
85 #define PFC_PM24		(PFC_BASE + 0x0148)
86 #define PFC_PM25		(PFC_BASE + 0x014A)
87 #define PFC_PM26		(PFC_BASE + 0x014C)
88 #define PFC_PM27		(PFC_BASE + 0x014E)
89 #define PFC_PM28		(PFC_BASE + 0x0150)
90 #define PFC_PM29		(PFC_BASE + 0x0152)
91 #define PFC_PM2A		(PFC_BASE + 0x0154)
92 #define PFC_PM2B		(PFC_BASE + 0x0156)
93 #define PFC_PM2C		(PFC_BASE + 0x0158)
94 #define PFC_PM2D		(PFC_BASE + 0x015A)
95 #define PFC_PM2E		(PFC_BASE + 0x015C)
96 #define PFC_PM2F		(PFC_BASE + 0x015E)
97 #define PFC_PM30		(PFC_BASE + 0x0160)
98 #define PFC_PM31		(PFC_BASE + 0x0162)
99 #define PFC_PM32		(PFC_BASE + 0x0164)
100 #define PFC_PM33		(PFC_BASE + 0x0166)
101 #define PFC_PM34		(PFC_BASE + 0x0168)
102 #define PFC_PM35		(PFC_BASE + 0x016A)
103 #define PFC_PM36		(PFC_BASE + 0x016C)
104 #define PFC_PM37		(PFC_BASE + 0x016E)
105 #define PFC_PM38		(PFC_BASE + 0x0170)
106 #define PFC_PM39		(PFC_BASE + 0x0172)
107 #define PFC_PM3A		(PFC_BASE + 0x0174)
108 #define PFC_PM3B		(PFC_BASE + 0x0176)
109 #define PFC_PM3C		(PFC_BASE + 0x0178)
110 #define PFC_PM3D		(PFC_BASE + 0x017A)
111 #define PFC_PM3E		(PFC_BASE + 0x017C)
112 #define PFC_PM3F		(PFC_BASE + 0x017E)
113 #define PFC_PM40		(PFC_BASE + 0x0180)
114 #define PFC_PMC04		(PFC_BASE + 0x0204)
115 #define PFC_PMC05		(PFC_BASE + 0x0205)
116 #define PFC_PMC10		(PFC_BASE + 0x0210)
117 #define PFC_PMC11		(PFC_BASE + 0x0211)
118 #define PFC_PMC12		(PFC_BASE + 0x0212)
119 #define PFC_PMC13		(PFC_BASE + 0x0213)
120 #define PFC_PMC14		(PFC_BASE + 0x0214)
121 #define PFC_PMC15		(PFC_BASE + 0x0215)
122 #define PFC_PMC16		(PFC_BASE + 0x0216)
123 #define PFC_PMC17		(PFC_BASE + 0x0217)
124 #define PFC_PMC18		(PFC_BASE + 0x0218)
125 #define PFC_PMC19		(PFC_BASE + 0x0219)
126 #define PFC_PMC1A		(PFC_BASE + 0x021A)
127 #define PFC_PMC1B		(PFC_BASE + 0x021B)
128 #define PFC_PMC1C		(PFC_BASE + 0x021C)
129 #define PFC_PMC1D		(PFC_BASE + 0x021D)
130 #define PFC_PMC1E		(PFC_BASE + 0x021E)
131 #define PFC_PMC1F		(PFC_BASE + 0x021F)
132 #define PFC_PMC20		(PFC_BASE + 0x0220)
133 #define PFC_PMC21		(PFC_BASE + 0x0221)
134 #define PFC_PMC22		(PFC_BASE + 0x0222)
135 #define PFC_PMC23		(PFC_BASE + 0x0223)
136 #define PFC_PMC24		(PFC_BASE + 0x0224)
137 #define PFC_PMC25		(PFC_BASE + 0x0225)
138 #define PFC_PMC26		(PFC_BASE + 0x0226)
139 #define PFC_PMC27		(PFC_BASE + 0x0227)
140 #define PFC_PMC28		(PFC_BASE + 0x0228)
141 #define PFC_PMC29		(PFC_BASE + 0x0229)
142 #define PFC_PMC2A		(PFC_BASE + 0x022A)
143 #define PFC_PMC2B		(PFC_BASE + 0x022B)
144 #define PFC_PMC2C		(PFC_BASE + 0x022C)
145 #define PFC_PMC2D		(PFC_BASE + 0x022D)
146 #define PFC_PMC2E		(PFC_BASE + 0x022E)
147 #define PFC_PMC2F		(PFC_BASE + 0x022F)
148 #define PFC_PMC30		(PFC_BASE + 0x0230)
149 #define PFC_PMC31		(PFC_BASE + 0x0231)
150 #define PFC_PMC32		(PFC_BASE + 0x0232)
151 #define PFC_PMC33		(PFC_BASE + 0x0233)
152 #define PFC_PMC34		(PFC_BASE + 0x0234)
153 #define PFC_PMC35		(PFC_BASE + 0x0235)
154 #define PFC_PMC36		(PFC_BASE + 0x0236)
155 #define PFC_PMC37		(PFC_BASE + 0x0237)
156 #define PFC_PMC38		(PFC_BASE + 0x0238)
157 #define PFC_PMC39		(PFC_BASE + 0x0239)
158 #define PFC_PMC3A		(PFC_BASE + 0x023A)
159 #define PFC_PMC3B		(PFC_BASE + 0x023B)
160 #define PFC_PMC3C		(PFC_BASE + 0x023C)
161 #define PFC_PMC3D		(PFC_BASE + 0x023D)
162 #define PFC_PMC3E		(PFC_BASE + 0x023E)
163 #define PFC_PMC3F		(PFC_BASE + 0x023F)
164 #define PFC_PMC40		(PFC_BASE + 0x0240)
165 #define PFC_PFC04		(PFC_BASE + 0x0410)
166 #define PFC_PFC05		(PFC_BASE + 0x0414)
167 #define PFC_PFC10		(PFC_BASE + 0x0440)
168 #define PFC_PFC11		(PFC_BASE + 0x0444)
169 #define PFC_PFC12		(PFC_BASE + 0x0448)
170 #define PFC_PFC13		(PFC_BASE + 0x044C)
171 #define PFC_PFC14		(PFC_BASE + 0x0450)
172 #define PFC_PFC15		(PFC_BASE + 0x0454)
173 #define PFC_PFC16		(PFC_BASE + 0x0458)
174 #define PFC_PFC17		(PFC_BASE + 0x045C)
175 #define PFC_PFC18		(PFC_BASE + 0x0460)
176 #define PFC_PFC19		(PFC_BASE + 0x0464)
177 #define PFC_PFC1A		(PFC_BASE + 0x0468)
178 #define PFC_PFC1B		(PFC_BASE + 0x046C)
179 #define PFC_PFC1C		(PFC_BASE + 0x0470)
180 #define PFC_PFC1D		(PFC_BASE + 0x0474)
181 #define PFC_PFC1E		(PFC_BASE + 0x0478)
182 #define PFC_PFC1F		(PFC_BASE + 0x047C)
183 #define PFC_PFC20		(PFC_BASE + 0x0480)
184 #define PFC_PFC21		(PFC_BASE + 0x0484)
185 #define PFC_PFC22		(PFC_BASE + 0x0488)
186 #define PFC_PFC23		(PFC_BASE + 0x048C)
187 #define PFC_PFC24		(PFC_BASE + 0x0490)
188 #define PFC_PFC25		(PFC_BASE + 0x0494)
189 #define PFC_PFC26		(PFC_BASE + 0x0498)
190 #define PFC_PFC27		(PFC_BASE + 0x049C)
191 #define PFC_PFC28		(PFC_BASE + 0x04A0)
192 #define PFC_PFC29		(PFC_BASE + 0x04A4)
193 #define PFC_PFC2A		(PFC_BASE + 0x04A8)
194 #define PFC_PFC2B		(PFC_BASE + 0x04AC)
195 #define PFC_PFC2C		(PFC_BASE + 0x04B0)
196 #define PFC_PFC2D		(PFC_BASE + 0x04B4)
197 #define PFC_PFC2E		(PFC_BASE + 0x04B8)
198 #define PFC_PFC2F		(PFC_BASE + 0x04BC)
199 #define PFC_PFC30		(PFC_BASE + 0x04C0)
200 #define PFC_PFC31		(PFC_BASE + 0x04C4)
201 #define PFC_PFC32		(PFC_BASE + 0x04C8)
202 #define PFC_PFC33		(PFC_BASE + 0x04CC)
203 #define PFC_PFC34		(PFC_BASE + 0x04D0)
204 #define PFC_PFC35		(PFC_BASE + 0x04D4)
205 #define PFC_PFC36		(PFC_BASE + 0x04D8)
206 #define PFC_PFC37		(PFC_BASE + 0x04DC)
207 #define PFC_PFC38		(PFC_BASE + 0x04E0)
208 #define PFC_PFC39		(PFC_BASE + 0x04E4)
209 #define PFC_PFC3A		(PFC_BASE + 0x04E8)
210 #define PFC_PFC3B		(PFC_BASE + 0x04EC)
211 #define PFC_PFC3C		(PFC_BASE + 0x04F0)
212 #define PFC_PFC3D		(PFC_BASE + 0x04F4)
213 #define PFC_PFC3E		(PFC_BASE + 0x04F8)
214 #define PFC_PFC3F		(PFC_BASE + 0x04FC)
215 #define PFC_PFC40		(PFC_BASE + 0x0500)
216 #define PFC_IOLH02		(PFC_BASE + 0x1010)
217 #define PFC_IOLH03		(PFC_BASE + 0x1018)
218 #define PFC_IOLH04		(PFC_BASE + 0x1020)
219 #define PFC_IOLH05		(PFC_BASE + 0x1028)
220 #define PFC_IOLH06		(PFC_BASE + 0x1030)
221 #define PFC_IOLH07		(PFC_BASE + 0x1038)
222 #define PFC_IOLH08		(PFC_BASE + 0x1040)
223 #define PFC_IOLH09		(PFC_BASE + 0x1048)
224 #define PFC_IOLH0A		(PFC_BASE + 0x1050)
225 #define PFC_IOLH0B		(PFC_BASE + 0x1058)
226 #define PFC_IOLH0C		(PFC_BASE + 0x1060)
227 #define PFC_IOLH0D		(PFC_BASE + 0x1068)
228 #define PFC_IOLH10		(PFC_BASE + 0x1080)
229 #define PFC_IOLH11		(PFC_BASE + 0x1088)
230 #define PFC_IOLH12		(PFC_BASE + 0x1090)
231 #define PFC_IOLH13		(PFC_BASE + 0x1098)
232 #define PFC_IOLH14		(PFC_BASE + 0x10A0)
233 #define PFC_IOLH15		(PFC_BASE + 0x10A8)
234 #define PFC_IOLH16		(PFC_BASE + 0x10B0)
235 #define PFC_IOLH17		(PFC_BASE + 0x10B8)
236 #define PFC_IOLH18		(PFC_BASE + 0x10C0)
237 #define PFC_IOLH19		(PFC_BASE + 0x10C8)
238 #define PFC_IOLH1A		(PFC_BASE + 0x10D0)
239 #define PFC_IOLH1B		(PFC_BASE + 0x10D8)
240 #define PFC_IOLH1C		(PFC_BASE + 0x10E0)
241 #define PFC_IOLH1D		(PFC_BASE + 0x10E8)
242 #define PFC_IOLH1E		(PFC_BASE + 0x10F0)
243 #define PFC_IOLH1F		(PFC_BASE + 0x10F8)
244 #define PFC_IOLH20		(PFC_BASE + 0x1100)
245 #define PFC_IOLH21		(PFC_BASE + 0x1108)
246 #define PFC_IOLH22		(PFC_BASE + 0x1120)
247 #define PFC_IOLH23		(PFC_BASE + 0x1128)
248 #define PFC_IOLH36		(PFC_BASE + 0x11B0)
249 #define PFC_IOLH37		(PFC_BASE + 0x11B8)
250 #define PFC_IOLH38		(PFC_BASE + 0x11C0)
251 #define PFC_IOLH39		(PFC_BASE + 0x11C8)
252 #define PFC_IOLH3A		(PFC_BASE + 0x11D0)
253 #define PFC_IOLH3B		(PFC_BASE + 0x11D8)
254 #define PFC_IOLH3C		(PFC_BASE + 0x11E0)
255 #define PFC_IOLH3D		(PFC_BASE + 0x11E8)
256 #define PFC_IOLH3E		(PFC_BASE + 0x11F0)
257 #define PFC_IOLH3F		(PFC_BASE + 0x11F8)
258 #define PFC_IOLH40		(PFC_BASE + 0x1200)
259 #define PFC_SR04		(PFC_BASE + 0x1420)
260 #define PFC_SR05		(PFC_BASE + 0x1428)
261 #define PFC_SR06		(PFC_BASE + 0x1430)
262 #define PFC_SR07		(PFC_BASE + 0x1438)
263 #define PFC_SR08		(PFC_BASE + 0x1440)
264 #define PFC_SR09		(PFC_BASE + 0x1448)
265 #define PFC_SR0A		(PFC_BASE + 0x1450)
266 #define PFC_SR0B		(PFC_BASE + 0x1458)
267 #define PFC_SR0C		(PFC_BASE + 0x1460)
268 #define PFC_SR10		(PFC_BASE + 0x1480)
269 #define PFC_SR15		(PFC_BASE + 0x14A8)
270 #define PFC_SR16		(PFC_BASE + 0x14B0)
271 #define PFC_SR1A		(PFC_BASE + 0x14D0)
272 #define PFC_SR1B		(PFC_BASE + 0x14D8)
273 #define PFC_SR1C		(PFC_BASE + 0x14E0)
274 #define PFC_SR1D		(PFC_BASE + 0x14E8)
275 #define PFC_SR1E		(PFC_BASE + 0x14F0)
276 #define PFC_SR1F		(PFC_BASE + 0x14F8)
277 #define PFC_SR20		(PFC_BASE + 0x1500)
278 #define PFC_SR21		(PFC_BASE + 0x1508)
279 #define PFC_SR22		(PFC_BASE + 0x1510)
280 #define PFC_SR23		(PFC_BASE + 0x1518)
281 #define PFC_SR36		(PFC_BASE + 0x15B0)
282 #define PFC_SR37		(PFC_BASE + 0x15B8)
283 #define PFC_IEN06		(PFC_BASE + 0x1830)
284 #define PFC_IEN07		(PFC_BASE + 0x1838)
285 #define PFC_IEN08		(PFC_BASE + 0x1840)
286 #define PFC_IEN09		(PFC_BASE + 0x1848)
287 #define PFC_PUPD04		(PFC_BASE + 0x1C20)
288 #define PFC_PUPD05		(PFC_BASE + 0x1C28)
289 #define PFC_PUPD06		(PFC_BASE + 0x1C30)
290 #define PFC_PUPD07		(PFC_BASE + 0x1C38)
291 #define PFC_PUPD08		(PFC_BASE + 0x1C40)
292 #define PFC_PUPD09		(PFC_BASE + 0x1C48)
293 #define PFC_PUPD0A		(PFC_BASE + 0x1C50)
294 #define PFC_PUPD0B		(PFC_BASE + 0x1C58)
295 #define PFC_PUPD0C		(PFC_BASE + 0x1C60)
296 #define PFC_PUPD10		(PFC_BASE + 0x1C80)
297 #define PFC_PUPD15		(PFC_BASE + 0x1CA8)
298 #define PFC_PUPD16		(PFC_BASE + 0x1CB0)
299 #define PFC_PUPD1A		(PFC_BASE + 0x1CD0)
300 #define PFC_PUPD1B		(PFC_BASE + 0x1CD8)
301 #define PFC_PUPD1C		(PFC_BASE + 0x1CE0)
302 #define PFC_PUPD1D		(PFC_BASE + 0x1CE8)
303 #define PFC_PUPD1E		(PFC_BASE + 0x1CF0)
304 #define PFC_PUPD1F		(PFC_BASE + 0x1CF8)
305 #define PFC_PUPD20		(PFC_BASE + 0x1D00)
306 #define PFC_PUPD21		(PFC_BASE + 0x1D08)
307 #define PFC_PUPD22		(PFC_BASE + 0x1D10)
308 #define PFC_PUPD23		(PFC_BASE + 0x1D18)
309 #define PFC_PUPD36		(PFC_BASE + 0x1DB0)
310 #define PFC_PUPD37		(PFC_BASE + 0x1DB8)
311 #define PFC_SD_ch0		(PFC_BASE + 0x3000)
312 #define PFC_SD_ch1		(PFC_BASE + 0x3004)
313 #define PFC_QSPI		(PFC_BASE + 0x3008)
314 #define PFC_ETH_ch0		(PFC_BASE + 0x300C)
315 #define PFC_ETH_ch1		(PFC_BASE + 0x3010)
316 #define PFC_PWPR		(PFC_BASE + 0x3014)
317 #define PFC_FILONOFF01		(PFC_BASE + 0x2008)
318 #define PFC_FILONOFF10		(PFC_BASE + 0x2080)
319 #define PFC_FILONOFF11		(PFC_BASE + 0x2088)
320 #define PFC_FILONOFF12		(PFC_BASE + 0x2090)
321 #define PFC_FILONOFF13		(PFC_BASE + 0x2098)
322 #define PFC_FILONOFF14		(PFC_BASE + 0x20A0)
323 #define PFC_FILONOFF15		(PFC_BASE + 0x20A8)
324 #define PFC_FILONOFF16		(PFC_BASE + 0x20B0)
325 #define PFC_FILONOFF17		(PFC_BASE + 0x20B8)
326 #define PFC_FILONOFF18		(PFC_BASE + 0x20C0)
327 #define PFC_FILONOFF19		(PFC_BASE + 0x20C8)
328 #define PFC_FILONOFF1A		(PFC_BASE + 0x20D0)
329 #define PFC_FILONOFF1B		(PFC_BASE + 0x20D8)
330 #define PFC_FILONOFF1C		(PFC_BASE + 0x20E0)
331 #define PFC_FILONOFF1D		(PFC_BASE + 0x20E8)
332 #define PFC_FILONOFF1E		(PFC_BASE + 0x20F0)
333 #define PFC_FILONOFF1F		(PFC_BASE + 0x20F8)
334 #define PFC_FILONOFF20		(PFC_BASE + 0x2100)
335 #define PFC_FILONOFF21		(PFC_BASE + 0x2108)
336 #define PFC_FILONOFF22		(PFC_BASE + 0x2110)
337 #define PFC_FILONOFF23		(PFC_BASE + 0x2118)
338 #define PFC_FILONOFF24		(PFC_BASE + 0x2120)
339 #define PFC_FILONOFF25		(PFC_BASE + 0x2128)
340 #define PFC_FILONOFF26		(PFC_BASE + 0x2130)
341 #define PFC_FILONOFF27		(PFC_BASE + 0x2138)
342 #define PFC_FILONOFF28		(PFC_BASE + 0x2140)
343 #define PFC_FILONOFF29		(PFC_BASE + 0x2148)
344 #define PFC_FILONOFF2A		(PFC_BASE + 0x2150)
345 #define PFC_FILONOFF2B		(PFC_BASE + 0x2158)
346 #define PFC_FILONOFF2C		(PFC_BASE + 0x2160)
347 #define PFC_FILONOFF2D		(PFC_BASE + 0x2168)
348 #define PFC_FILONOFF2E		(PFC_BASE + 0x2170)
349 #define PFC_FILONOFF2F		(PFC_BASE + 0x2178)
350 #define PFC_FILONOFF30		(PFC_BASE + 0x2180)
351 #define PFC_FILONOFF31		(PFC_BASE + 0x2188)
352 #define PFC_FILONOFF32		(PFC_BASE + 0x2190)
353 #define PFC_FILONOFF33		(PFC_BASE + 0x2198)
354 #define PFC_FILONOFF34		(PFC_BASE + 0x21A0)
355 #define PFC_FILONOFF35		(PFC_BASE + 0x21A8)
356 #define PFC_FILONOFF36		(PFC_BASE + 0x21B0)
357 #define PFC_FILONOFF37		(PFC_BASE + 0x21B8)
358 #define PFC_FILONOFF38		(PFC_BASE + 0x21C0)
359 #define PFC_FILONOFF39		(PFC_BASE + 0x21C8)
360 #define PFC_FILONOFF3A		(PFC_BASE + 0x21D0)
361 #define PFC_FILONOFF3B		(PFC_BASE + 0x21D8)
362 #define PFC_FILONOFF3C		(PFC_BASE + 0x21E0)
363 #define PFC_FILONOFF3D		(PFC_BASE + 0x21E8)
364 #define PFC_FILONOFF3E		(PFC_BASE + 0x21F0)
365 #define PFC_FILONOFF3F		(PFC_BASE + 0x21F8)
366 #define PFC_FILONOFF40		(PFC_BASE + 0x2200)
367 #define PFC_FILNUM01		(PFC_BASE + 0x2408)
368 #define PFC_FILNUM10		(PFC_BASE + 0x2480)
369 #define PFC_FILNUM11		(PFC_BASE + 0x2488)
370 #define PFC_FILNUM12		(PFC_BASE + 0x2490)
371 #define PFC_FILNUM13		(PFC_BASE + 0x2498)
372 #define PFC_FILNUM14		(PFC_BASE + 0x24A0)
373 #define PFC_FILNUM15		(PFC_BASE + 0x24A8)
374 #define PFC_FILNUM16		(PFC_BASE + 0x24B0)
375 #define PFC_FILNUM17		(PFC_BASE + 0x24B8)
376 #define PFC_FILNUM18		(PFC_BASE + 0x24C0)
377 #define PFC_FILNUM19		(PFC_BASE + 0x24C8)
378 #define PFC_FILNUM1A		(PFC_BASE + 0x24D0)
379 #define PFC_FILNUM1B		(PFC_BASE + 0x24D8)
380 #define PFC_FILNUM1C		(PFC_BASE + 0x24E0)
381 #define PFC_FILNUM1D		(PFC_BASE + 0x24E8)
382 #define PFC_FILNUM1E		(PFC_BASE + 0x24F0)
383 #define PFC_FILNUM1F		(PFC_BASE + 0x24F8)
384 #define PFC_FILNUM20		(PFC_BASE + 0x2500)
385 #define PFC_FILNUM21		(PFC_BASE + 0x2508)
386 #define PFC_FILNUM22		(PFC_BASE + 0x2510)
387 #define PFC_FILNUM23		(PFC_BASE + 0x2518)
388 #define PFC_FILNUM24		(PFC_BASE + 0x2520)
389 #define PFC_FILNUM25		(PFC_BASE + 0x2528)
390 #define PFC_FILNUM26		(PFC_BASE + 0x2530)
391 #define PFC_FILNUM27		(PFC_BASE + 0x2538)
392 #define PFC_FILNUM28		(PFC_BASE + 0x2540)
393 #define PFC_FILNUM29		(PFC_BASE + 0x2548)
394 #define PFC_FILNUM2A		(PFC_BASE + 0x2550)
395 #define PFC_FILNUM2B		(PFC_BASE + 0x2558)
396 #define PFC_FILNUM2C		(PFC_BASE + 0x2560)
397 #define PFC_FILNUM2D		(PFC_BASE + 0x2568)
398 #define PFC_FILNUM2E		(PFC_BASE + 0x2570)
399 #define PFC_FILNUM2F		(PFC_BASE + 0x2578)
400 #define PFC_FILNUM30		(PFC_BASE + 0x2580)
401 #define PFC_FILNUM31		(PFC_BASE + 0x2588)
402 #define PFC_FILNUM32		(PFC_BASE + 0x2590)
403 #define PFC_FILNUM33		(PFC_BASE + 0x2598)
404 #define PFC_FILNUM34		(PFC_BASE + 0x25A0)
405 #define PFC_FILNUM35		(PFC_BASE + 0x25A8)
406 #define PFC_FILNUM36		(PFC_BASE + 0x25B0)
407 #define PFC_FILNUM37		(PFC_BASE + 0x25B8)
408 #define PFC_FILNUM38		(PFC_BASE + 0x25C0)
409 #define PFC_FILNUM39		(PFC_BASE + 0x25C8)
410 #define PFC_FILNUM3A		(PFC_BASE + 0x25D0)
411 #define PFC_FILNUM3B		(PFC_BASE + 0x25D8)
412 #define PFC_FILNUM3C		(PFC_BASE + 0x25E0)
413 #define PFC_FILNUM3D		(PFC_BASE + 0x25E8)
414 #define PFC_FILNUM3E		(PFC_BASE + 0x25F0)
415 #define PFC_FILNUM3F		(PFC_BASE + 0x25F8)
416 #define PFC_FILNUM40		(PFC_BASE + 0x2600)
417 #define PFC_FILCLKSEL01		(PFC_BASE + 0x2808)
418 #define PFC_FILCLKSEL10		(PFC_BASE + 0x2880)
419 #define PFC_FILCLKSEL11		(PFC_BASE + 0x2888)
420 #define PFC_FILCLKSEL12		(PFC_BASE + 0x2890)
421 #define PFC_FILCLKSEL13		(PFC_BASE + 0x2898)
422 #define PFC_FILCLKSEL14		(PFC_BASE + 0x28A0)
423 #define PFC_FILCLKSEL15		(PFC_BASE + 0x28A8)
424 #define PFC_FILCLKSEL16		(PFC_BASE + 0x28B0)
425 #define PFC_FILCLKSEL17		(PFC_BASE + 0x28B8)
426 #define PFC_FILCLKSEL18		(PFC_BASE + 0x28C0)
427 #define PFC_FILCLKSEL19		(PFC_BASE + 0x28C8)
428 #define PFC_FILCLKSEL1A		(PFC_BASE + 0x28D0)
429 #define PFC_FILCLKSEL1B		(PFC_BASE + 0x28D8)
430 #define PFC_FILCLKSEL1C		(PFC_BASE + 0x28E0)
431 #define PFC_FILCLKSEL1D		(PFC_BASE + 0x28E8)
432 #define PFC_FILCLKSEL1E		(PFC_BASE + 0x28F0)
433 #define PFC_FILCLKSEL1F		(PFC_BASE + 0x28F8)
434 #define PFC_FILCLKSEL20		(PFC_BASE + 0x2900)
435 #define PFC_FILCLKSEL21		(PFC_BASE + 0x2908)
436 #define PFC_FILCLKSEL22		(PFC_BASE + 0x2910)
437 #define PFC_FILCLKSEL23		(PFC_BASE + 0x2918)
438 #define PFC_FILCLKSEL24		(PFC_BASE + 0x2920)
439 #define PFC_FILCLKSEL25		(PFC_BASE + 0x2928)
440 #define PFC_FILCLKSEL26		(PFC_BASE + 0x2930)
441 #define PFC_FILCLKSEL27		(PFC_BASE + 0x2938)
442 #define PFC_FILCLKSEL28		(PFC_BASE + 0x2940)
443 #define PFC_FILCLKSEL29		(PFC_BASE + 0x2948)
444 #define PFC_FILCLKSEL2A		(PFC_BASE + 0x2950)
445 #define PFC_FILCLKSEL2B		(PFC_BASE + 0x2958)
446 #define PFC_FILCLKSEL2C		(PFC_BASE + 0x2960)
447 #define PFC_FILCLKSEL2D		(PFC_BASE + 0x2968)
448 #define PFC_FILCLKSEL2E		(PFC_BASE + 0x2970)
449 #define PFC_FILCLKSEL2F		(PFC_BASE + 0x2978)
450 #define PFC_FILCLKSEL30		(PFC_BASE + 0x2980)
451 #define PFC_FILCLKSEL31		(PFC_BASE + 0x2988)
452 #define PFC_FILCLKSEL32		(PFC_BASE + 0x2990)
453 #define PFC_FILCLKSEL33		(PFC_BASE + 0x2998)
454 #define PFC_FILCLKSEL34		(PFC_BASE + 0x29A0)
455 #define PFC_FILCLKSEL35		(PFC_BASE + 0x29A8)
456 #define PFC_FILCLKSEL36		(PFC_BASE + 0x29B0)
457 #define PFC_FILCLKSEL37		(PFC_BASE + 0x29B8)
458 #define PFC_FILCLKSEL38		(PFC_BASE + 0x29C0)
459 #define PFC_FILCLKSEL39		(PFC_BASE + 0x29C8)
460 #define PFC_FILCLKSEL3A		(PFC_BASE + 0x29D0)
461 #define PFC_FILCLKSEL3B		(PFC_BASE + 0x29D8)
462 #define PFC_FILCLKSEL3C		(PFC_BASE + 0x29E0)
463 #define PFC_FILCLKSEL3D		(PFC_BASE + 0x29E8)
464 #define PFC_FILCLKSEL3E		(PFC_BASE + 0x29F0)
465 #define PFC_FILCLKSEL3F		(PFC_BASE + 0x29F8)
466 #define PFC_FILCLKSEL40		(PFC_BASE + 0x2A00)
467 #define PFC_ETH_MII		(PFC_BASE + 0x3018)
468 
469 /* Combined terminal setting */
470 /* Definition for port register */
471 #define P_P0			BIT(0)
472 #define P_P1			BIT(1)
473 #define P_P2			BIT(2)
474 #define P_P3			BIT(3)
475 #define P_P4			BIT(4)
476 #define P_P5			BIT(5)
477 #define P_P6			BIT(6)
478 #define P_P7			BIT(7)
479 /* Definition for port mode register */
480 #define PM0_HIZ			(0 << 0)
481 #define PM0_IN			(1 << 0)
482 #define PM0_OUT_DIS		(2 << 0)
483 #define PM0_OUT_EN		(3 << 0)
484 #define PM1_HIZ			(0 << 2)
485 #define PM1_IN			(1 << 2)
486 #define PM1_OUT_DIS		(2 << 2)
487 #define PM1_OUT_EN		(3 << 2)
488 #define PM2_HIZ			(0 << 4)
489 #define PM2_IN			(1 << 4)
490 #define PM2_OUT_DIS		(2 << 4)
491 #define PM2_OUT_EN		(3 << 4)
492 #define PM3_HIZ			(0 << 6)
493 #define PM3_IN			(1 << 6)
494 #define PM3_OUT_DIS		(2 << 6)
495 #define PM3_OUT_EN		(3 << 6)
496 #define PM4_HIZ			(0 << 8)
497 #define PM4_IN			(1 << 8)
498 #define PM4_OUT_DIS		(2 << 8)
499 #define PM4_OUT_EN		(3 << 8)
500 /* Definition for port mode control register */
501 #define PMC_PMC0		BIT(0)
502 #define PMC_PMC1		BIT(1)
503 #define PMC_PMC2		BIT(2)
504 #define PMC_PMC3		BIT(3)
505 #define PMC_PMC4		BIT(4)
506 #define PMC_PMC5		BIT(5)
507 #define PMC_PMC6		BIT(6)
508 #define PMC_PMC7		BIT(7)
509 /* Definition for port function control register */
510 #define PFC0_MODE0		(0 << 0)
511 #define PFC0_MODE1		(1 << 0)
512 #define PFC0_MODE2		(2 << 0)
513 #define PFC0_MODE3		(3 << 0)
514 #define PFC0_MODE4		(4 << 0)
515 #define PFC0_MODE5		(5 << 0)
516 #define PFC1_MODE0		(0 << 4)
517 #define PFC1_MODE1		(1 << 4)
518 #define PFC1_MODE2		(2 << 4)
519 #define PFC1_MODE3		(3 << 4)
520 #define PFC1_MODE4		(4 << 4)
521 #define PFC1_MODE5		(5 << 4)
522 #define PFC2_MODE0		(0 << 8)
523 #define PFC2_MODE1		(1 << 8)
524 #define PFC2_MODE2		(2 << 8)
525 #define PFC2_MODE3		(3 << 8)
526 #define PFC2_MODE4		(4 << 8)
527 #define PFC2_MODE5		(5 << 8)
528 #define PFC3_MODE0		(0 << 12)
529 #define PFC3_MODE1		(1 << 12)
530 #define PFC3_MODE2		(2 << 12)
531 #define PFC3_MODE3		(3 << 12)
532 #define PFC3_MODE4		(4 << 12)
533 #define PFC3_MODE5		(5 << 12)
534 #define PFC4_MODE0		(0 << 16)
535 #define PFC4_MODE1		(1 << 16)
536 #define PFC4_MODE2		(2 << 16)
537 #define PFC4_MODE3		(3 << 16)
538 #define PFC4_MODE4		(4 << 16)
539 #define PFC4_MODE5		(5 << 16)
540 /* Definition for IOLH switch register */
541 #define IOLH0_2MA		(0 << 0)
542 #define IOLH0_4MA		(1 << 0)
543 #define IOLH0_8MA		(2 << 0)
544 #define IOLH0_12MA		(3 << 0)
545 #define IOLH1_2MA		(0 << 8)
546 #define IOLH1_4MA		(1 << 8)
547 #define IOLH1_8MA		(2 << 8)
548 #define IOLH1_12MA		(3 << 8)
549 #define IOLH2_2MA		(0 << 16)
550 #define IOLH2_4MA		(1 << 16)
551 #define IOLH2_8MA		(2 << 16)
552 #define IOLH2_12MA		(3 << 16)
553 #define IOLH3_2MA		(0 << 24)
554 #define IOLH3_4MA		(1 << 24)
555 #define IOLH3_8MA		(2 << 24)
556 #define IOLH3_12MA		(3 << 24)
557 #define IOLH4_2MA		(0 << 32)
558 #define IOLH4_4MA		(1 << 32)
559 #define IOLH4_8MA		(2 << 32)
560 #define IOLH4_12MA		(3 << 32)
561 #define IOLH5_2MA		(0 << 40)
562 #define IOLH5_4MA		(1 << 40)
563 #define IOLH5_8MA		(2 << 40)
564 #define IOLH5_12MA		(3 << 40)
565 #define IOLH6_2MA		(0 << 48)
566 #define IOLH6_4MA		(1 << 48)
567 #define IOLH6_8MA		(2 << 48)
568 #define IOLH6_12MA		(3 << 48)
569 #define IOLH7_2MA		(0 << 56)
570 #define IOLH7_4MA		(1 << 56)
571 #define IOLH7_8MA		(2 << 56)
572 #define IOLH7_12MA		(3 << 56)
573 /* Definition for Slew-Rate switch register */
574 #define SR0_FAST		BIT(0)
575 #define SR1_FAST		BIT(8)
576 #define SR2_FAST		BIT(16)
577 #define SR3_FAST		BIT(24)
578 #define SR4_FAST		BIT(32)
579 #define SR5_FAST		BIT(40)
580 #define SR6_FAST		BIT(48)
581 #define SR7_FAST		BIT(56)
582 /* Definition for IEN switching register */
583 #define IEN0_ENABLE		BIT(0)
584 #define IEN1_ENABLE		BIT(8)
585 #define IEN2_ENABLE		BIT(16)
586 #define IEN3_ENABLE		BIT(24)
587 #define IEN4_ENABLE		BIT(32)
588 #define IEN5_ENABLE		BIT(40)
589 #define IEN6_ENABLE		BIT(48)
590 #define IEN7_ENABLE		BIT(56)
591 /* Definition for PUPD switching register */
592 #define PUPD0_NO		(0 << 0)
593 #define PUPD0_UP		(1 << 0)
594 #define PUPD0_DOWN		(2 << 0)
595 #define PUPD1_NO		(0 << 8)
596 #define PUPD1_UP		(1 << 8)
597 #define PUPD1_DOWN		(2 << 8)
598 #define PUPD2_NO		(0 << 16)
599 #define PUPD2_UP		(1 << 16)
600 #define PUPD2_DOWN		(2 << 16)
601 #define PUPD3_NO		(0 << 24)
602 #define PUPD3_UP		(1 << 24)
603 #define PUPD3_DOWN		(2 << 24)
604 #define PUPD4_NO		(0 << 32)
605 #define PUPD4_UP		(1 << 32)
606 #define PUPD4_DOWN		(2 << 32)
607 #define PUPD5_NO		(0 << 40)
608 #define PUPD5_UP		(1 << 40)
609 #define PUPD5_DOWN		(2 << 40)
610 #define PUPD6_NO		(0 << 48)
611 #define PUPD6_UP		(1 << 48)
612 #define PUPD6_DOWN		(2 << 48)
613 #define PUPD7_NO		(0 << 56)
614 #define PUPD7_UP		(1 << 56)
615 #define PUPD7_DOWN		(2 << 56)
616 /* SD ch0 IO Definition for voltage control register */
617 #define SD0_PVDD		BIT(0)
618 /* SD ch1 IO Definition for voltage control register */
619 #define SD1_PVDD		BIT(0)
620 /* Definition for QSPI IO voltage control register */
621 #define QSPI_PVDD		BIT(0)
622 /* ETH ch0 voltage control register */
623 #define ETH_ch0_3_3		(0 << 0)
624 #define ETH_ch0_1_8		(1 << 0)
625 #define ETH_ch0_2_5		(2 << 0)
626 /* ETH ch1 voltage control register */
627 #define ETH_ch1_3_3		(0 << 0)
628 #define ETH_ch1_1_8		(1 << 0)
629 #define ETH_ch1_2_5		(2 << 0)
630 /* Write protection definition */
631 #define PWPR_B0Wl		BIT(7)
632 #define PWPR_PFCWE		BIT(6)
633 /* Digital noise filter (FILONOFF) register */
634 #define FILONOFF_FILON0		BIT(0)
635 #define FILONOFF_FILON1		BIT(8)
636 #define FILONOFF_FILON2		BIT(16)
637 #define FILONOFF_FILON3		BIT(24)
638 #define FILONOFF_FILON4		BIT(32)
639 #define FILONOFF_FILON5		BIT(40)
640 #define FILONOFF_FILON6		BIT(48)
641 #define FILONOFF_FILON7		BIT(56)
642 /* Digital noise filter (FILNUM) register */
643 #define FILNUM_FILNUM0_4	(0 << 0)
644 #define FILNUM_FILNUM0_8	(1 << 0)
645 #define FILNUM_FILNUM0_12	(2 << 0)
646 #define FILNUM_FILNUM0_16	(3 << 0)
647 #define FILNUM_FILNUM1_4	(0 << 8)
648 #define FILNUM_FILNUM1_8	(1 << 8)
649 #define FILNUM_FILNUM1_12	(2 << 8)
650 #define FILNUM_FILNUM1_16	(3 << 8)
651 #define FILNUM_FILNUM2_4	(0 << 16)
652 #define FILNUM_FILNUM2_8	(1 << 16)
653 #define FILNUM_FILNUM2_12	(2 << 16)
654 #define FILNUM_FILNUM2_16	(3 << 16)
655 #define FILNUM_FILNUM3_4	(0 << 24)
656 #define FILNUM_FILNUM3_8	(1 << 24)
657 #define FILNUM_FILNUM3_12	(2 << 24)
658 #define FILNUM_FILNUM3_16	(3 << 24)
659 #define FILNUM_FILNUM4_4	(0 << 32)
660 #define FILNUM_FILNUM4_8	(1 << 32)
661 #define FILNUM_FILNUM4_12	(2 << 32)
662 #define FILNUM_FILNUM4_16	(3 << 32)
663 #define FILNUM_FILNUM5_4	(0 << 40)
664 #define FILNUM_FILNUM5_8	(1 << 40)
665 #define FILNUM_FILNUM5_12	(2 << 40)
666 #define FILNUM_FILNUM5_16	(3 << 40)
667 #define FILNUM_FILNUM6_4	(0 << 48)
668 #define FILNUM_FILNUM6_8	(1 << 48)
669 #define FILNUM_FILNUM6_12	(2 << 48)
670 #define FILNUM_FILNUM6_16	(3 << 48)
671 #define FILNUM_FILNUM7_4	(0 << 56)
672 #define FILNUM_FILNUM7_8	(1 << 56)
673 #define FILNUM_FILNUM7_12	(2 << 56)
674 #define FILNUM_FILNUM7_16	(3 << 56)
675 /* Digital noise filter (FILCLKSEL) register */
676 #define FILCLKSEL_FILCLK0_0	(0 << 0)
677 #define FILCLKSEL_FILCLK0_1	(1 << 0)
678 #define FILCLKSEL_FILCLK0_2	(2 << 0)
679 #define FILCLKSEL_FILCLK0_3	(3 << 0)
680 #define FILCLKSEL_FILCLK1_0	(0 << 8)
681 #define FILCLKSEL_FILCLK1_1	(1 << 8)
682 #define FILCLKSEL_FILCLK1_2	(2 << 8)
683 #define FILCLKSEL_FILCLK1_3	(3 << 8)
684 #define FILCLKSEL_FILCLK2_0	(0 << 16)
685 #define FILCLKSEL_FILCLK2_1	(1 << 16)
686 #define FILCLKSEL_FILCLK2_2	(2 << 16)
687 #define FILCLKSEL_FILCLK2_3	(3 << 16)
688 #define FILCLKSEL_FILCLK3_0	(0 << 24)
689 #define FILCLKSEL_FILCLK3_1	(1 << 24)
690 #define FILCLKSEL_FILCLK3_2	(2 << 24)
691 #define FILCLKSEL_FILCLK3_3	(3 << 24)
692 #define FILCLKSEL_FILCLK4_0	(0 << 32)
693 #define FILCLKSEL_FILCLK4_1	(1 << 32)
694 #define FILCLKSEL_FILCLK4_2	(2 << 32)
695 #define FILCLKSEL_FILCLK4_3	(3 << 32)
696 #define FILCLKSEL_FILCLK5_0	(0 << 40)
697 #define FILCLKSEL_FILCLK5_1	(1 << 40)
698 #define FILCLKSEL_FILCLK5_2	(2 << 40)
699 #define FILCLKSEL_FILCLK5_3	(3 << 40)
700 #define FILCLKSEL_FILCLK6_0	(0 << 48)
701 #define FILCLKSEL_FILCLK6_1	(1 << 48)
702 #define FILCLKSEL_FILCLK6_2	(2 << 48)
703 #define FILCLKSEL_FILCLK6_3	(3 << 48)
704 #define FILCLKSEL_FILCLK7_0	(0 << 56)
705 #define FILCLKSEL_FILCLK7_1	(1 << 56)
706 #define FILCLKSEL_FILCLK7_2	(2 << 56)
707 #define FILCLKSEL_FILCLK7_3	(3 << 56)
708 /* Register for setting the mode of ETH MII / RGMII */
709 #define ETH_MII_0_MII		BIT(0)
710 #define ETH_MII_1_MII		BIT(1)
711 
712 #define	PFC_SET_TBL_NUM		11
713 #define	PFC_OFF			0
714 #define PFC_ON			1
715 
716 #define PFC_MUX_TBL_NUM		4
717 #define PFC_QSPI_TBL_NUM	3
718 #define PFC_SD_TBL_NUM		4
719 
720 typedef struct {
721 	int		flg;
722 	uintptr_t	reg;
723 	uint8_t		val;
724 } PFC_REG_UINT8;
725 
726 typedef struct {
727 	int		flg;
728 	uintptr_t	reg;
729 	uint32_t	val;
730 } PFC_REG_UINT32;
731 
732 typedef struct {
733 	int		flg;
734 	uintptr_t	reg;
735 	uint64_t	val;
736 } PFC_REG_UINT64;
737 
738 
739 typedef struct {
740 	PFC_REG_UINT8	pmc;
741 	PFC_REG_UINT32	pfc;
742 	PFC_REG_UINT64	iolh;
743 	PFC_REG_UINT64	pupd;
744 	PFC_REG_UINT64	sr;
745 	PFC_REG_UINT64	ien;
746 } PFC_REGS;
747 
748 
749 #endif	/* __PFC_REGS_H__ */
750