is file 'description' to name the repository.
summaryrefslogtreecommitdiffstats
path: root/include/andestech/andes_pcu.h
blob: d24b82d18ef859f576e557884fba35a4a6264c01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * (C) Copyright 2011 Andes Technology Corp
 * Macpaul Lin <macpaul@andestech.com>
 */

/*
 * Andes Power Control Unit
 */
#ifndef __ANDES_PCU_H
#define __ANDES_PCU_H

#ifndef __ASSEMBLY__

struct pcs {
	unsigned int	cr;		/* PCSx Configuration (clock scaling) */
	unsigned int	parm;		/* PCSx Parameter*/
	unsigned int	stat1;		/* PCSx Status 1 */
	unsigned int	stat2;		/* PCSx Stusts 2 */
	unsigned int	pdd;		/* PCSx PDD */
};

struct andes_pcu {
	unsigned int	rev;		/* 0x00 - PCU Revision */
	unsigned int	spinfo;		/* 0x04 - Scratch Pad Info */
	unsigned int	rsvd1[2];	/* 0x08-0x0C: Reserved */
	unsigned int	soc_id;		/* 0x10 - SoC ID */
	unsigned int	soc_ahb;	/* 0x14 - SoC AHB configuration */
	unsigned int	soc_apb;	/* 0x18 - SoC APB configuration */
	unsigned int	rsvd2;		/* 0x1C */
	unsigned int	dcsrcr0;	/* 0x20 - Driving Capability
						and Slew Rate Control 0 */
	unsigned int	dcsrcr1;	/* 0x24 - Driving Capability
						and Slew Rate Control 1 */
	unsigned int	dcsrcr2;	/* 0x28 - Driving Capability
						and Slew Rate Control 2 */
	unsigned int	rsvd3;		/* 0x2C */
	unsigned int	mfpsr0;		/* 0x30 - Multi-Func Port Setting 0 */
	unsigned int	mfpsr1;		/* 0x34 - Multi-Func Port Setting 1 */
	unsigned int	dmaes;		/* 0x38 - DMA Engine Selection */
	unsigned int	rsvd4;		/* 0x3C */
	unsigned int	oscc;		/* 0x40 - OSC Control */
	unsigned int	pwmcd;		/* 0x44 - PWM Clock divider */
	unsigned int	socmisc;	/* 0x48 - SoC Misc. */
	unsigned int	rsvd5[13];	/* 0x4C-0x7C: Reserved */
	unsigned int	bsmcr;		/* 0x80 - BSM Controrl */
	unsigned int	bsmst;		/* 0x84 - BSM Status */
	unsigned int	wes;		/* 0x88 - Wakeup Event Sensitivity*/
	unsigned int	west;		/* 0x8C - Wakeup Event Status */
	unsigned int	rsttiming;	/* 0x90 - Reset Timing  */
	unsigned int	intr_st;	/* 0x94 - PCU Interrupt Status */
	unsigned int	rsvd6[2];	/* 0x98-0x9C: Reserved */
	struct pcs	pcs1;		/* 0xA0-0xB0: PCS1 (clock scaling) */
	unsigned int	pcsrsvd1[3];	/* 0xB4-0xBC: Reserved */
	struct pcs	pcs2;		/* 0xC0-0xD0: PCS2 (AHB clock gating) */
	unsigned int	pcsrsvd2[3];	/* 0xD4-0xDC: Reserved */
	struct pcs	pcs3;		/* 0xE0-0xF0: PCS3 (APB clock gating) */
	unsigned int	pcsrsvd3[3];	/* 0xF4-0xFC: Reserved */
	struct pcs	pcs4;		/* 0x100-0x110: PCS4 main PLL scaling */
	unsigned int	pcsrsvd4[3];	/* 0x114-0x11C: Reserved */
	struct pcs	pcs5;		/* 0x120-0x130: PCS5 PCI PLL scaling */
	unsigned int	pcsrsvd5[3];	/* 0x134-0x13C: Reserved */
	struct pcs	pcs6;		/* 0x140-0x150: PCS6 AC97 PLL scaling */
	unsigned int	pcsrsvd6[3];	/* 0x154-0x15C: Reserved */
	struct pcs	pcs7;		/* 0x160-0x170: PCS7 GMAC PLL scaling */
	unsigned int	pcsrsvd7[3];	/* 0x174-0x17C: Reserved */
	struct pcs	pcs8;		/* 0x180-0x190: PCS8 voltage scaling */
	unsigned int	pcsrsvd8[3];	/* 0x194-0x19C: Reserved */
	struct pcs	pcs9;		/* 0x1A0-0x1B0: PCS9 power control */
	unsigned int	pcsrsvd9[93];	/* 0x1B4-0x3FC: Reserved */
	unsigned int	pmspdm[40];	/* 0x400-0x4fC: Power Manager
							Scratch Pad Memory 0 */
};
#endif /* __ASSEMBLY__ */