~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: d4e9b56292ead58c24af5bf9a76784a56afede78 (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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * (C) Copyright 2021 Rockchip Electronics Co., Ltd
 */

#ifndef __SOC_ROCKCHIP_RK3568_GRF_H__
#define __SOC_ROCKCHIP_RK3568_GRF_H__

struct rk3568_grf {
	unsigned int gpio1a_iomux_l;
	unsigned int gpio1a_iomux_h;
	unsigned int gpio1b_iomux_l;
	unsigned int gpio1b_iomux_h;
	unsigned int gpio1c_iomux_l;
	unsigned int gpio1c_iomux_h;
	unsigned int gpio1d_iomux_l;
	unsigned int gpio1d_iomux_h;
	unsigned int gpio2a_iomux_l;
	unsigned int gpio2a_iomux_h;
	unsigned int gpio2b_iomux_l;
	unsigned int gpio2b_iomux_h;
	unsigned int gpio2c_iomux_l;
	unsigned int gpio2c_iomux_h;
	unsigned int gpio2d_iomux_l;
	unsigned int gpio2d_iomux_h;
	unsigned int gpio3a_iomux_l;
	unsigned int gpio3a_iomux_h;
	unsigned int gpio3b_iomux_l;
	unsigned int gpio3b_iomux_h;
	unsigned int gpio3c_iomux_l;
	unsigned int gpio3c_iomux_h;
	unsigned int gpio3d_iomux_l;
	unsigned int gpio3d_iomux_h;
	unsigned int gpio4a_iomux_l;
	unsigned int gpio4a_iomux_h;
	unsigned int gpio4b_iomux_l;
	unsigned int gpio4b_iomux_h;
	unsigned int gpio4c_iomux_l;
	unsigned int gpio4c_iomux_h;
	unsigned int gpio4d_iomux_l;
	unsigned int reserved0[(0x0080 - 0x0078) / 4 - 1];
	unsigned int gpio1a_p;
	unsigned int gpio1b_p;
	unsigned int gpio1c_p;
	unsigned int gpio1d_p;
	unsigned int gpio2a_p;
	unsigned int gpio2b_p;
	unsigned int gpio2c_p;
	unsigned int gpio2d_p;
	unsigned int gpio3a_p;
	unsigned int gpio3b_p;
	unsigned int gpio3c_p;
	unsigned int gpio3d_p;
	unsigned int gpio4a_p;
	unsigned int gpio4b_p;
	unsigned int gpio4c_p;
	unsigned int gpio4d_p;
	unsigned int gpio1a_ie;
	unsigned int gpio1b_ie;
	unsigned int gpio1c_ie;
	unsigned int gpio1d_ie;
	unsigned int gpio2a_ie;
	unsigned int gpio2b_ie;
	unsigned int gpio2c_ie;
	unsigned int gpio2d_ie;
	unsigned int gpio3a_ie;
	unsigned int gpio3b_ie;
	unsigned int gpio3c_ie;
	unsigned int gpio3d_ie;
	unsigned int gpio4a_ie;
	unsigned int gpio4b_ie;
	unsigned int gpio4c_ie;
	unsigned int gpio4d_ie;
	unsigned int gpio1a_opd;
	unsigned int gpio1b_opd;
	unsigned int gpio1c_opd;
	unsigned int gpio1d_opd;
	unsigned int gpio2a_opd;
	unsigned int gpio2b_opd;
	unsigned int gpio2c_opd;
	unsigned int gpio2d_opd;
	unsigned int gpio3a_opd;
	unsigned int gpio3b_opd;
	unsigned int gpio3c_opd;
	unsigned int gpio3d_opd;
	unsigned int gpio4a_opd;
	unsigned int gpio4b_opd;
	unsigned int gpio4c_opd;
	unsigned int gpio4d_opd;
	unsigned int gpio1a_sus;
	unsigned int gpio1b_sus;
	unsigned int gpio1c_sus;
	unsigned int gpio1d_sus;
	unsigned int gpio2a_sus;
	unsigned int gpio2b_sus;
	unsigned int gpio2c_sus;
	unsigned int gpio2d_sus;
	unsigned int gpio3a_sus;
	unsigned int gpio3b_sus;
	unsigned int gpio3c_sus;
	unsigned int gpio3d_sus;
	unsigned int gpio4a_sus;
	unsigned int gpio4b_sus;
	unsigned int gpio4c_sus;
	unsigned int gpio4d_sus;
	unsigned int gpio1a_sl;
	unsigned int gpio1b_sl;
	unsigned int gpio1c_sl;
	unsigned int gpio1d_sl;
	unsigned int gpio2a_sl;
	unsigned int gpio2b_sl;
	unsigned int gpio2c_sl;
	unsigned int gpio2d_sl;
	unsigned int gpio3a_sl;
	unsigned int gpio3b_sl;
	unsigned int gpio3c_sl;
	unsigned int gpio3d_sl;
	unsigned int gpio4a_sl;
	unsigned int gpio4b_sl;
	unsigned int gpio4c_sl;
	unsigned int gpio4d_sl;
	unsigned int reserved1[(0x0200 - 0x01bc) / 4 - 1];
	unsigned int gpio1a_ds_0;
	unsigned int gpio1a_ds_1;
	unsigned int gpio1a_ds_2;
	unsigned int gpio1a_ds_3;
	unsigned int gpio1b_ds_0;
	unsigned int gpio1b_ds_1;
	unsigned int gpio1b_ds_2;
	unsigned int gpio1b_ds_3;
	unsigned int gpio1c_ds_0;
	unsigned int gpio1c_ds_1;
	unsigned int gpio1c_ds_2;
	unsigned int gpio1c_ds_3;
	unsigned int gpio1d_ds_0;
	unsigned int gpio1d_ds_1;
	unsigned int gpio1d_ds_2;
	unsigned int gpio1d_ds_3;
	unsigned int gpio2a_ds_0;
	unsigned int gpio2a_ds_1;
	unsigned int gpio2a_ds_2;
	unsigned int gpio2a_ds_3;
	unsigned int gpio2b_ds_0;
	unsigned int gpio2b_ds_1;
	unsigned int gpio2b_ds_2;
	unsigned int gpio2b_ds_3;
	unsigned int gpio2c_ds_0;
	unsigned int gpio2c_ds_1;
	unsigned int gpio2c_ds_2;
	unsigned int gpio2c_ds_3;
	unsigned int gpio2d_ds_0;
	unsigned int gpio2d_ds_1;
	unsigned int gpio2d_ds_2;
	unsigned int gpio2d_ds_3;
	unsigned int gpio3a_ds_0;
	unsigned int gpio3a_ds_1;
	unsigned int gpio3a_ds_2;
	unsigned int gpio3a_ds_3;
	unsigned int gpio3b_ds_0;
	unsigned int gpio3b_ds_1;
	unsigned int gpio3b_ds_2;
	unsigned int gpio3b_ds_3;
	unsigned int gpio3c_ds_0;
	unsigned int gpio3c_ds_1;
	unsigned int gpio3c_ds_2;
	unsigned int gpio3c_ds_3;
	unsigned int gpio3d_ds_0;
	unsigned int gpio3d_ds_1;
	unsigned int gpio3d_ds_2;
	unsigned int gpio3d_ds_3;
	unsigned int gpio4a_ds_0;
	unsigned int gpio4a_ds_1;
	unsigned int gpio4a_ds_2;
	unsigned int gpio4a_ds_3;
	unsigned int gpio4b_ds_0;
	unsigned int gpio4b_ds_1;
	unsigned int gpio4b_ds_2;
	unsigned int gpio4b_ds_3;
	unsigned int gpio4c_ds_0;
	unsigned int gpio4c_ds_1;
	unsigned int gpio4c_ds_2;
	unsigned int gpio4c_ds_3;
	unsigned int gpio4d_ds_0;
	unsigned int gpio4d_ds_1;
	unsigned int gpio4d_ds_2;
	unsigned int gpio4d_ds_3;
	unsigned int iofunc_sel0;
	unsigned int iofunc_sel1;
	unsigned int iofunc_sel2;
	unsigned int iofunc_sel3;
	unsigned int iofunc_sel4;
	unsigned int iofunc_sel5;
	unsigned int reserved2[(0x0340 - 0x0314) / 4 - 1];
	unsigned int vi_con0;
	unsigned int vi_con1;
	unsigned int vi_status0;
	unsigned int reserved3[(0x0360 - 0x0348) / 4 - 1];
	unsigned int vo_con0;
	unsigned int vo_con1;
	unsigned int vo_con2;
	unsigned int vo_con3;
	unsigned int reserved4[(0x0380 - 0x036c) / 4 - 1];
	unsigned int mac0_con0;
	unsigned int mac0_con1;
	unsigned int mac1_con0;
	unsigned int mac1_con1;
	unsigned int reserved5[(0x03a0 - 0x038c) / 4 - 1];
	unsigned int biu_con0;
	unsigned int biu_con1;
	unsigned int biu_con2;
	unsigned int reserved6[(0x03c0 - 0x03a8) / 4 - 1];
	unsigned int gic_con0;
	unsigned int gic_con1;
	unsigned int gic_con2;
	unsigned int reserved7[(0x03f0 - 0x03c8) / 4 - 1];
	unsigned int gpu_con0;
	unsigned int gpu_con1;
	unsigned int reserved8[(0x0400 - 0x03f4) / 4 - 1];
	unsigned int cpu_con0;
	unsigned int reserved9[(0x0420 - 0x0400) / 4 - 1];
	unsigned int cpu_status0;
	unsigned int reserved10[(0x0500 - 0x0420) / 4 - 1];
	unsigned int soc_con0;
	unsigned int soc_con1;
	unsigned int soc_con2;
	unsigned int soc_con3;
	unsigned int reserved11[(0x0514 - 0x050c) / 4 - 1];
	unsigned int soc_con5;
	unsigned int soc_con6;
	unsigned int reserved12[(0x0580 - 0x0518) / 4 - 1];
	unsigned int soc_status0;
	unsigned int reserved13[(0x05c0 - 0x0580) / 4 - 1];
	unsigned int ram_con;
	unsigned int core_ram_con;
	unsigned int reserved14[(0x0600 - 0x05c4) / 4 - 1];
	unsigned int tsadc_con;
	unsigned int reserved15[(0x0610 - 0x0600) / 4 - 1];
	unsigned int saradc_con;
	unsigned int reserved16[(0x0700 - 0x0610) / 4 - 1];
	unsigned int gpupvtpll_con0;
	unsigned int gpupvtpll_con1;
	unsigned int gpupvtpll_con2;
	unsigned int gpupvtpll_con3;
	unsigned int reserved17[(0x0740 - 0x070c) / 4 - 1];
	unsigned int npupvtpll_con0;
	unsigned int npupvtpll_con1;
	unsigned int npupvtpll_con2;
	unsigned int npupvtpll_con3;
	unsigned int reserved18[(0x0800 - 0x074c) / 4 - 1];
	unsigned int chip_id;
	unsigned int reserved19[(0x0840 - 0x0800) / 4 - 1];
	unsigned int gpio1c5_ds;
	unsigned int gpio2a2_ds;
	unsigned int gpio2b0_ds;
	unsigned int gpio3a0_ds;
	unsigned int gpio3a6_ds;
	unsigned int gpio4a0_ds;
	unsigned int reserved20[(0x0900 - 0x0854) / 4 - 1];
	unsigned int dmac0_con0;
	unsigned int dmac0_con1;
	unsigned int dmac0_con2;
	unsigned int dmac0_con3;
	unsigned int dmac0_con4;
	unsigned int dmac0_con5;
	unsigned int dmac0_con6;
	unsigned int dmac0_con7;
	unsigned int dmac0_con8;
	unsigned int dmac0_con9;
	unsigned int reserved21[(0x0940 - 0x0924) / 4 - 1];
	unsigned int dmac1_con0;
	unsigned int dmac1_con1;
	unsigned int dmac1_con2;
	unsigned int dmac1_con3;
	unsigned int dmac1_con4;
	unsigned int dmac1_con5;
	unsigned int dmac1_con6;
	unsigned int dmac1_con7;
	unsigned int dmac1_con8;
	unsigned int dmac1_con9;
};

check_member(rk3568_grf, dmac1_con9, 0x0964);

struct rk3568_pmugrf {
	unsigned int pmu_gpio0a_iomux_l;
	unsigned int pmu_gpio0a_iomux_h;
	unsigned int pmu_gpio0b_iomux_l;
	unsigned int pmu_gpio0b_iomux_h;
	unsigned int pmu_gpio0c_iomux_l;
	unsigned int pmu_gpio0c_iomux_h;
	unsigned int pmu_gpio0d_iomux_l;
	unsigned int reserved0[(0x0020 - 0x0018) / 4 - 1];
	unsigned int pmu_gpio0a_p;
	unsigned int pmu_gpio0b_p;
	unsigned int pmu_gpio0c_p;
	unsigned int pmu_gpio0d_p;
	unsigned int pmu_gpio0a_ie;
	unsigned int pmu_gpio0b_ie;
	unsigned int pmu_gpio0c_ie;
	unsigned int pmu_gpio0d_ie;
	unsigned int pmu_gpio0a_opd;
	unsigned int pmu_gpio0b_opd;
	unsigned int pmu_gpio0c_opd;
	unsigned int pmu_gpio0d_opd;
	unsigned int pmu_gpio0a_sus;
	unsigned int pmu_gpio0b_sus;
	unsigned int pmu_gpio0c_sus;
	unsigned int pmu_gpio0d_sus;
	unsigned int pmu_gpio0a_sl;
	unsigned int pmu_gpio0b_sl;
	unsigned int pmu_gpio0c_sl;
	unsigned int pmu_gpio0d_sl;
	unsigned int pmu_gpio0a_ds_0;
	unsigned int pmu_gpio0a_ds_1;
	unsigned int pmu_gpio0a_ds_2;
	unsigned int pmu_gpio0a_ds_3;
	unsigned int pmu_gpio0b_ds_0;
	unsigned int pmu_gpio0b_ds_1;
	unsigned int pmu_gpio0b_ds_2;
	unsigned int pmu_gpio0b_ds_3;
	unsigned int pmu_gpio0c_ds_0;
	unsigned int pmu_gpio0c_ds_1;
	unsigned int pmu_gpio0c_ds_2;
	unsigned int pmu_gpio0c_ds_3;
	unsigned int pmu_gpio0d_ds_0;
	unsigned int pmu_gpio0d_ds_1;
	unsigned int pmu_gpio0d_ds_2;
	unsigned int pmu_gpio0d_ds_3;
	unsigned int reserved1[(0x0100 - 0x00ac) / 4 - 1];
	unsigned int pmu_soc_con0;
	unsigned int pmu_soc_con1;
	unsigned int pmu_soc_con2;
	unsigned int pmu_soc_con3;
	unsigned int pmu_soc_con4;
	unsigned int pmu_soc_con5;
	unsigned int reserved2[(0x0124 - 0x0114) / 4 - 1];
	unsigned int pmu_io_vsel0;
	unsigned int pmu_io_vsel1;
	unsigned int pmu_io_vsel2;
	unsigned int reserved3[(0x0180 - 0x012c) / 4 - 1];
	unsigned int pmu_dll_con0;
	unsigned int reserved4[(0x0200 - 0x0180) / 4 - 1];
	unsigned int pmu_os_reg0;
	unsigned int pmu_os_reg1;
	unsigned int pmu_os_reg2;
	unsigned int pmu_os_reg3;
	unsigned int pmu_os_reg4;
	unsigned int pmu_os_reg5;
	unsigned int pmu_os_reg6;
	unsigned int pmu_os_reg7;
	unsigned int pmu_os_reg8;
	unsigned int pmu_os_reg9;
	unsigned int pmu_os_reg10;
	unsigned int pmu_os_reg11;
	unsigned int pmu_reset_function_status;
	unsigned int pmu_reset_function_clr;
	unsigned int reserved5[(0x0380 - 0x0234) / 4 - 1];
	unsigned int pmu_sig_detect_con;
	unsigned int reserved6[(0x0390 - 0x0380) / 4 - 1];
	unsigned int pmu_sig_detect_status;
	unsigned int reserved7[(0x03a0 - 0x0390) / 4 - 1];
	unsigned int pmu_sig_detect_status_clear;
	unsigned int reserved8[(0x03b0 - 0x03a0) / 4 - 1];
	unsigned int pmu_sdmmc_det_counter;
};

check_member(rk3568_pmugrf, pmu_sdmmc_det_counter, 0x03b0);

#endif