1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 #ifndef __REG_PSRAM_MC_V2_H__
5 #define __REG_PSRAM_MC_V2_H__
6 
7 #include "plat_types.h"
8 
9 struct PSRAM_MC_T {
10     __IO uint32_t REG_000;
11     __IO uint32_t REG_004;
12     __IO uint32_t REG_008;
13     __IO uint32_t REG_00C;
14     __IO uint32_t REG_010;
15     __IO uint32_t REG_014;
16     __IO uint32_t REG_018;
17     __IO uint32_t REG_01C;
18     __IO uint32_t REG_020;
19     __IO uint32_t REG_024;
20     __IO uint32_t REG_028;
21     __IO uint32_t REG_02C;
22     __IO uint32_t REG_030;
23     __IO uint32_t REG_034;
24     __IO uint32_t REG_038;
25     __IO uint32_t REG_03C;
26     __IO uint32_t REG_040;
27     __IO uint32_t REG_044;
28     __IO uint32_t REG_048;
29     __IO uint32_t REG_04C;
30     __IO uint32_t REG_050;
31     __IO uint32_t REG_054;
32     __IO uint32_t REG_058;
33     __IO uint32_t REG_05C;
34     __IO uint32_t REG_060;
35     __IO uint32_t REG_064;
36     __IO uint32_t REG_068;
37     __IO uint32_t REG_06C;
38     __IO uint32_t REG_070;
39     __IO uint32_t REG_074;
40     __IO uint32_t REG_078;
41     __IO uint32_t REG_07C;
42     __IO uint32_t REG_080;
43     __IO uint32_t REG_084;
44     __IO uint32_t REG_088;
45     __IO uint32_t REG_08C;
46     __IO uint32_t REG_090;
47     __IO uint32_t REG_094;
48     __IO uint32_t REG_098;
49     __IO uint32_t REG_09C;
50     __IO uint32_t REG_0A0;
51     __IO uint32_t REG_0A4;
52     __IO uint32_t REG_0A8;
53     __IO uint32_t REG_0AC;
54     __IO uint32_t REG_0B0;
55     __IO uint32_t REG_0B4;
56     __IO uint32_t REG_0B8;
57     __IO uint32_t REG_0BC;
58     __IO uint32_t REG_RESERVED_0C0[0x20];
59     __IO uint32_t REG_140;
60     __IO uint32_t REG_144;
61     __IO uint32_t REG_148;
62     __IO uint32_t REG_14C;
63     __IO uint32_t REG_150;
64     __IO uint32_t REG_154;
65     __IO uint32_t REG_158;
66     __IO uint32_t REG_15C;
67     __IO uint32_t REG_160;
68     __IO uint32_t REG_RESERVED_164[7];
69     __IO uint32_t REG_180;
70     __IO uint32_t REG_184;
71     __IO uint32_t REG_188;
72     __IO uint32_t REG_18C;
73     __IO uint32_t REG_190;
74     __IO uint32_t REG_194;
75     __IO uint32_t REG_RESERVED_198[0x1A];
76     __IO uint32_t REG_200;
77     __IO uint32_t REG_RESERVED_204[0x7F];
78     __IO uint32_t REG_400;
79     __IO uint32_t REG_404;
80     __IO uint32_t REG_RESERVED_408[0xE];
81     __IO uint32_t REG_440;
82     __IO uint32_t REG_444;
83     __IO uint32_t REG_448;
84     __IO uint32_t REG_44C;
85     __IO uint32_t REG_450;
86     __IO uint32_t REG_454;
87     __IO uint32_t REG_458;
88     __IO uint32_t REG_45C;
89     __IO uint32_t REG_460;
90     __IO uint32_t REG_464;
91     __IO uint32_t REG_468;
92     __IO uint32_t REG_46C;
93 };
94 
95 // reg_00
96 #define PSRAM_ULP_MC_CHIP_BIT                    (1 << 0)
97 #define PSRAM_ULP_MC_CHIP_TYPE                   (1 << 1)
98 #define PSRAM_ULP_MC_RES_3_2_REG00               (1 << 2)
99 #define PSRAM_ULP_MC_CHIP_CA_PATTERN(n)          (((n) & 0x7) << 3)
100 #define PSRAM_ULP_MC_CHIP_CA_PATTERN_MASK        (0x7 << 3)
101 #define PSRAM_ULP_MC_CHIP_CA_PATTERN_SHIFT       (3)
102 
103 // reg_04
104 #define PSRAM_ULP_MC_MGR_CMD(n)                  (((n) & 0xFF) << 0)
105 #define PSRAM_ULP_MC_MGR_CMD_MASK                (0xFF << 0)
106 #define PSRAM_ULP_MC_MGR_CMD_SHIFT               (0)
107 
108 // reg_08
109 #define PSRAM_ULP_MC_MGR_ADDR(n)                 (((n) & 0xFFFFFFFF) << 0)
110 #define PSRAM_ULP_MC_MGR_ADDR_MASK               (0xFFFFFFFF << 0)
111 #define PSRAM_ULP_MC_MGR_ADDR_SHIFT              (0)
112 
113 // reg_0c
114 #define PSRAM_ULP_MC_MGR_LEN(n)                  (((n) & 0xFF) << 0)
115 #define PSRAM_ULP_MC_MGR_LEN_MASK                (0xFF << 0)
116 #define PSRAM_ULP_MC_MGR_LEN_SHIFT               (0)
117 
118 // reg_10
119 #define PSRAM_ULP_MC_MGR_WSTRB(n)                (((n) & 0xFF) << 0)
120 #define PSRAM_ULP_MC_MGR_WSTRB_MASK              (0xFF << 0)
121 #define PSRAM_ULP_MC_MGR_WSTRB_SHIFT             (0)
122 
123 // reg_14
124 #define PSRAM_ULP_MC_MGR_TX_FIFO(n)              (((n) & 0xFFFFFFFF) << 0)
125 #define PSRAM_ULP_MC_MGR_TX_FIFO_MASK            (0xFFFFFFFF << 0)
126 #define PSRAM_ULP_MC_MGR_TX_FIFO_SHIFT           (0)
127 
128 // reg_18
129 #define PSRAM_ULP_MC_MGR_RX_FIFO(n)              (((n) & 0xFFFFFFFF) << 0)
130 #define PSRAM_ULP_MC_MGR_RX_FIFO_MASK            (0xFFFFFFFF << 0)
131 #define PSRAM_ULP_MC_MGR_RX_FIFO_SHIFT           (0)
132 
133 // reg_1c
134 #define PSRAM_ULP_MC_MGR_TX_FIFO_CLR             (1 << 0)
135 #define PSRAM_ULP_MC_MGR_RX_FIFO_CLR             (1 << 1)
136 
137 // reg_20
138 #define PSRAM_ULP_MC_REFRESH_MODE                (1 << 0)
139 #define PSRAM_ULP_MC_BURST_REFRESH_EN            (1 << 1)
140 
141 // reg_24
142 #define PSRAM_ULP_MC_ENTRY_SLEEP_IDLE            (1 << 0)
143 #define PSRAM_ULP_MC_ENTRY_SELF_REFRESH_IDLE     (1 << 1)
144 #define PSRAM_ULP_MC_STOP_CLK_IDLE               (1 << 2)
145 #define PSRAM_ULP_MC_AUTOWAKEUP_EN               (1 << 3)
146 #define PSRAM_ULP_MC_RES_7_4_REG24(n)            (((n) & 0xF) << 4)
147 #define PSRAM_ULP_MC_RES_7_4_REG24_MASK          (0xF << 4)
148 #define PSRAM_ULP_MC_RES_7_4_REG24_SHIFT         (4)
149 #define PSRAM_ULP_MC_PD_MR(n)                    (((n) & 0xFF) << 8)
150 #define PSRAM_ULP_MC_PD_MR_MASK                  (0xFF << 8)
151 #define PSRAM_ULP_MC_PD_MR_SHIFT                 (8)
152 #define PSRAM_ULP_MC_PD_CMD(n)                   (((n) & 0xFF) << 16)
153 #define PSRAM_ULP_MC_PD_CMD_MASK                 (0xFF << 16)
154 #define PSRAM_ULP_MC_PD_CMD_SHIFT                (16)
155 
156 // reg_28
157 #define PSRAM_ULP_MC_WRITE_LATENCY(n)            (((n) & 0xFF) << 0)
158 #define PSRAM_ULP_MC_WRITE_LATENCY_MASK          (0xFF << 0)
159 #define PSRAM_ULP_MC_WRITE_LATENCY_SHIFT         (0)
160 
161 // reg_2c
162 #define PSRAM_ULP_MC_READ_LATENCY(n)             (((n) & 0xFF) << 0)
163 #define PSRAM_ULP_MC_READ_LATENCY_MASK           (0xFF << 0)
164 #define PSRAM_ULP_MC_READ_LATENCY_SHIFT          (0)
165 
166 // reg_30
167 #define PSRAM_ULP_MC_MEMORY_WIDTH(n)             (((n) & 0x3) << 0)
168 #define PSRAM_ULP_MC_MEMORY_WIDTH_MASK           (0x3 << 0)
169 #define PSRAM_ULP_MC_MEMORY_WIDTH_SHIFT          (0)
170 
171 // reg_34
172 #define PSRAM_ULP_MC_BURST_LENGTH(n)             (((n) & 0x7) << 0)
173 #define PSRAM_ULP_MC_BURST_LENGTH_MASK           (0x7 << 0)
174 #define PSRAM_ULP_MC_BURST_LENGTH_SHIFT          (0)
175 #define PSRAM_ULP_MC_RES_3_3_REG34               (1 << 3)
176 #define PSRAM_ULP_MC_PAGE_BOUNDARY(n)            (((n) & 0x3) << 4)
177 #define PSRAM_ULP_MC_PAGE_BOUNDARY_MASK          (0x3 << 4)
178 #define PSRAM_ULP_MC_PAGE_BOUNDARY_SHIFT         (4)
179 
180 // reg_38
181 #define PSRAM_ULP_MC_BUS_WIDTH                   (1 << 0)
182 
183 // reg_3c
184 #define PSRAM_ULP_MC_HIGH_PRI_LEVEL(n)           (((n) & 0x1F) << 0)
185 #define PSRAM_ULP_MC_HIGH_PRI_LEVEL_MASK         (0x1F << 0)
186 #define PSRAM_ULP_MC_HIGH_PRI_LEVEL_SHIFT        (0)
187 
188 // reg_40
189 #define PSRAM_ULP_MC_CP_WRAP_EN                  (1 << 0)
190 #define PSRAM_ULP_MC_AUTO_PRECHARGE              (1 << 1)
191 #define PSRAM_ULP_MC_WRAP_CRT_RET_EN             (1 << 2)
192 
193 // reg_44
194 #define PSRAM_ULP_MC_WB_DRAIN                    (1 << 0)
195 #define PSRAM_ULP_MC_WB_INVALID                  (1 << 1)
196 #define PSRAM_ULP_MC_RB_INVALID                  (1 << 2)
197 #define PSRAM_ULP_MC_SNP_DISABLE                 (1 << 3)
198 #define PSRAM_ULP_MC_BUFFERABLE_WB_EN            (1 << 4)
199 
200 // reg_48
201 #define PSRAM_ULP_MC_FRE_RATIO(n)                (((n) & 0x3) << 0)
202 #define PSRAM_ULP_MC_FRE_RATIO_MASK              (0x3 << 0)
203 #define PSRAM_ULP_MC_FRE_RATIO_SHIFT             (0)
204 
205 // reg_4c
206 #define PSRAM_ULP_MC_T_REFI(n)                   (((n) & 0xFFFF) << 0)
207 #define PSRAM_ULP_MC_T_REFI_MASK                 (0xFFFF << 0)
208 #define PSRAM_ULP_MC_T_REFI_SHIFT                (0)
209 #define PSRAM_ULP_MC_NUM_OF_BURST_RFS(n)         (((n) & 0xFFFF) << 16)
210 #define PSRAM_ULP_MC_NUM_OF_BURST_RFS_MASK       (0xFFFF << 16)
211 #define PSRAM_ULP_MC_NUM_OF_BURST_RFS_SHIFT      (16)
212 
213 // reg_50
214 #define PSRAM_ULP_MC_T_RC(n)                     (((n) & 0xFF) << 0)
215 #define PSRAM_ULP_MC_T_RC_MASK                   (0xFF << 0)
216 #define PSRAM_ULP_MC_T_RC_SHIFT                  (0)
217 
218 // reg_54
219 #define PSRAM_ULP_MC_T_RFC(n)                    (((n) & 0xFF) << 0)
220 #define PSRAM_ULP_MC_T_RFC_MASK                  (0xFF << 0)
221 #define PSRAM_ULP_MC_T_RFC_SHIFT                 (0)
222 
223 // reg_58
224 #define PSRAM_ULP_MC_T_CPHR(n)                   (((n) & 0x3F) << 0)
225 #define PSRAM_ULP_MC_T_CPHR_MASK                 (0x3F << 0)
226 #define PSRAM_ULP_MC_T_CPHR_SHIFT                (0)
227 
228 // reg_5c
229 #define PSRAM_ULP_MC_T_CPHR_AP(n)                (((n) & 0x3F) << 0)
230 #define PSRAM_ULP_MC_T_CPHR_AP_MASK              (0x3F << 0)
231 #define PSRAM_ULP_MC_T_CPHR_AP_SHIFT             (0)
232 
233 // reg_60
234 #define PSRAM_ULP_MC_T_CPHW(n)                   (((n) & 0x3F) << 0)
235 #define PSRAM_ULP_MC_T_CPHW_MASK                 (0x3F << 0)
236 #define PSRAM_ULP_MC_T_CPHW_SHIFT                (0)
237 
238 // reg_64
239 #define PSRAM_ULP_MC_T_CPHW_AP(n)                (((n) & 0x3F) << 0)
240 #define PSRAM_ULP_MC_T_CPHW_AP_MASK              (0x3F << 0)
241 #define PSRAM_ULP_MC_T_CPHW_AP_SHIFT             (0)
242 
243 // reg_68
244 #define PSRAM_ULP_MC_T_MRR(n)                    (((n) & 0x3F) << 0)
245 #define PSRAM_ULP_MC_T_MRR_MASK                  (0x3F << 0)
246 #define PSRAM_ULP_MC_T_MRR_SHIFT                 (0)
247 
248 // reg_6c
249 #define PSRAM_ULP_MC_T_MRS(n)                    (((n) & 0x3F) << 0)
250 #define PSRAM_ULP_MC_T_MRS_MASK                  (0x3F << 0)
251 #define PSRAM_ULP_MC_T_MRS_SHIFT                 (0)
252 
253 // reg_70
254 #define PSRAM_ULP_MC_T_CEM(n)                    (((n) & 0xFFFF) << 0)
255 #define PSRAM_ULP_MC_T_CEM_MASK                  (0xFFFF << 0)
256 #define PSRAM_ULP_MC_T_CEM_SHIFT                 (0)
257 
258 // reg_74
259 #define PSRAM_ULP_MC_T_RST(n)                    (((n) & 0xFFFF) << 0)
260 #define PSRAM_ULP_MC_T_RST_MASK                  (0xFFFF << 0)
261 #define PSRAM_ULP_MC_T_RST_SHIFT                 (0)
262 
263 // reg_78
264 #define PSRAM_ULP_MC_T_SRF(n)                    (((n) & 0xFF) << 0)
265 #define PSRAM_ULP_MC_T_SRF_MASK                  (0xFF << 0)
266 #define PSRAM_ULP_MC_T_SRF_SHIFT                 (0)
267 
268 // reg_7c
269 #define PSRAM_ULP_MC_T_XSR(n)                    (((n) & 0xFF) << 0)
270 #define PSRAM_ULP_MC_T_XSR_MASK                  (0xFF << 0)
271 #define PSRAM_ULP_MC_T_XSR_SHIFT                 (0)
272 
273 // reg_80
274 #define PSRAM_ULP_MC_T_HS(n)                     (((n) & 0xFFFF) << 0)
275 #define PSRAM_ULP_MC_T_HS_MASK                   (0xFFFF << 0)
276 #define PSRAM_ULP_MC_T_HS_SHIFT                  (0)
277 
278 // reg_84
279 #define PSRAM_ULP_MC_T_XPHS(n)                   (((n) & 0xFF) << 0)
280 #define PSRAM_ULP_MC_T_XPHS_MASK                 (0xFF << 0)
281 #define PSRAM_ULP_MC_T_XPHS_SHIFT                (0)
282 
283 // reg_88
284 #define PSRAM_ULP_MC_T_XHS(n)                    (((n) & 0xFFFFF) << 0)
285 #define PSRAM_ULP_MC_T_XHS_MASK                  (0xFFFFF << 0)
286 #define PSRAM_ULP_MC_T_XHS_SHIFT                 (0)
287 
288 // reg_8c
289 #define PSRAM_ULP_MC_T_ZQCAL(n)                  (((n) & 0xFFFFF) << 0)
290 #define PSRAM_ULP_MC_T_ZQCAL_MASK                (0xFFFFF << 0)
291 #define PSRAM_ULP_MC_T_ZQCAL_SHIFT               (0)
292 
293 // reg_90
294 #define PSRAM_ULP_MC_T_ZQCRST(n)                 (((n) & 0xFFFFF) << 0)
295 #define PSRAM_ULP_MC_T_ZQCRST_MASK               (0xFFFFF << 0)
296 #define PSRAM_ULP_MC_T_ZQCRST_SHIFT              (0)
297 
298 // reg_94
299 #define PSRAM_ULP_MC_T_XCKD(n)                   (((n) & 0x3F) << 0)
300 #define PSRAM_ULP_MC_T_XCKD_MASK                 (0x3F << 0)
301 #define PSRAM_ULP_MC_T_XCKD_SHIFT                (0)
302 
303 // reg_98
304 #define PSRAM_ULP_MC_T_ECKD(n)                   (((n) & 0x3F) << 0)
305 #define PSRAM_ULP_MC_T_ECKD_MASK                 (0x3F << 0)
306 #define PSRAM_ULP_MC_T_ECKD_SHIFT                (0)
307 
308 // reg_9c
309 #define PSRAM_ULP_MC_WR_DMY_CYC(n)               (((n) & 0xFF) << 0)
310 #define PSRAM_ULP_MC_WR_DMY_CYC_MASK             (0xFF << 0)
311 #define PSRAM_ULP_MC_WR_DMY_CYC_SHIFT            (0)
312 
313 // reg_a0
314 #define PSRAM_ULP_MC_STOP_CLK_IN_NOP             (1 << 0)
315 #define PSRAM_ULP_MC_NOP_DMY_CYC(n)              (((n) & 0xFF) << 1)
316 #define PSRAM_ULP_MC_NOP_DMY_CYC_MASK            (0xFF << 1)
317 #define PSRAM_ULP_MC_NOP_DMY_CYC_SHIFT           (1)
318 
319 // reg_a4
320 #define PSRAM_ULP_MC_QUEUE_IDLE_CYCLE(n)         (((n) & 0xFFFFFFFF) << 0)
321 #define PSRAM_ULP_MC_QUEUE_IDLE_CYCLE_MASK       (0xFFFFFFFF << 0)
322 #define PSRAM_ULP_MC_QUEUE_IDLE_CYCLE_SHIFT      (0)
323 
324 // reg_a8
325 #define PSRAM_ULP_MC_T_EXPANDRD(n)               (((n) & 0x3F) << 0)
326 #define PSRAM_ULP_MC_T_EXPANDRD_MASK             (0x3F << 0)
327 #define PSRAM_ULP_MC_T_EXPANDRD_SHIFT            (0)
328 
329 // reg_ac
330 #define PSRAM_ULP_MC_RX_SYNC_BYPASS              (1 << 0)
331 
332 // reg_b4
333 #define PSRAM_ULP_MC_T_ZQCAS(n)                  (((n) & 0xFFFFF) << 0)
334 #define PSRAM_ULP_MC_T_ZQCAS_MASK                (0xFFFFF << 0)
335 #define PSRAM_ULP_MC_T_ZQCAS_SHIFT               (0)
336 
337 // reg_b8
338 #define PSRAM_ULP_MC_T_NEW_HOLD(n)               (((n) & 0xFFFFFFFF) << 0)
339 #define PSRAM_ULP_MC_T_NEW_HOLD_MASK             (0xFFFFFFFF << 0)
340 #define PSRAM_ULP_MC_T_NEW_HOLD_SHIFT            (0)
341 
342 // reg_bc
343 #define PSRAM_ULP_MC_NEW_CMD_OP(n)               (((n) & 0x7) << 0)
344 #define PSRAM_ULP_MC_NEW_CMD_OP_MASK             (0x7 << 0)
345 #define PSRAM_ULP_MC_NEW_CMD_OP_SHIFT            (0)
346 
347 // reg_140
348 #define PSRAM_ULP_MC_CMD_TABLE_ARRAY_RD(n)       (((n) & 0xFF) << 0)
349 #define PSRAM_ULP_MC_CMD_TABLE_ARRAY_RD_MASK     (0xFF << 0)
350 #define PSRAM_ULP_MC_CMD_TABLE_ARRAY_RD_SHIFT    (0)
351 
352 // reg_144
353 #define PSRAM_ULP_MC_CMD_TABLE_ARRAY_WR(n)       (((n) & 0xFF) << 0)
354 #define PSRAM_ULP_MC_CMD_TABLE_ARRAY_WR_MASK     (0xFF << 0)
355 #define PSRAM_ULP_MC_CMD_TABLE_ARRAY_WR_SHIFT    (0)
356 
357 // reg_148
358 #define PSRAM_ULP_MC_CMD_TABLE_REG_RD(n)         (((n) & 0xFF) << 0)
359 #define PSRAM_ULP_MC_CMD_TABLE_REG_RD_MASK       (0xFF << 0)
360 #define PSRAM_ULP_MC_CMD_TABLE_REG_RD_SHIFT      (0)
361 
362 // reg_14c
363 #define PSRAM_ULP_MC_CMD_TABLE_REG_WR(n)         (((n) & 0xFF) << 0)
364 #define PSRAM_ULP_MC_CMD_TABLE_REG_WR_MASK       (0xFF << 0)
365 #define PSRAM_ULP_MC_CMD_TABLE_REG_WR_SHIFT      (0)
366 
367 // reg_150
368 #define PSRAM_ULP_MC_CMD_TABLE_AUTO_REFR(n)      (((n) & 0xFF) << 0)
369 #define PSRAM_ULP_MC_CMD_TABLE_AUTO_REFR_MASK    (0xFF << 0)
370 #define PSRAM_ULP_MC_CMD_TABLE_AUTO_REFR_SHIFT   (0)
371 
372 // reg_154
373 #define PSRAM_ULP_MC_CMD_TABLE_SELF_REFR(n)      (((n) & 0xFF) << 0)
374 #define PSRAM_ULP_MC_CMD_TABLE_SELF_REFR_MASK    (0xFF << 0)
375 #define PSRAM_ULP_MC_CMD_TABLE_SELF_REFR_SHIFT   (0)
376 
377 // reg_158
378 #define PSRAM_ULP_MC_CMD_TABLE_HSLP_ENTRY(n)     (((n) & 0xFF) << 0)
379 #define PSRAM_ULP_MC_CMD_TABLE_HSLP_ENTRY_MASK   (0xFF << 0)
380 #define PSRAM_ULP_MC_CMD_TABLE_HSLP_ENTRY_SHIFT  (0)
381 
382 // reg_15c
383 #define PSRAM_ULP_MC_CMD_TABLE_GLBRST(n)         (((n) & 0xFF) << 0)
384 #define PSRAM_ULP_MC_CMD_TABLE_GLBRST_MASK       (0xFF << 0)
385 #define PSRAM_ULP_MC_CMD_TABLE_GLBRST_SHIFT      (0)
386 
387 // reg_160
388 #define PSRAM_ULP_MC_CMD_TABLE_NOP(n)            (((n) & 0xFF) << 0)
389 #define PSRAM_ULP_MC_CMD_TABLE_NOP_MASK          (0xFF << 0)
390 #define PSRAM_ULP_MC_CMD_TABLE_NOP_SHIFT         (0)
391 
392 // reg_180
393 #define PSRAM_ULP_MC_CA_MAP_BIT0(n)              (((n) & 0x1F) << 0)
394 #define PSRAM_ULP_MC_CA_MAP_BIT0_MASK            (0x1F << 0)
395 #define PSRAM_ULP_MC_CA_MAP_BIT0_SHIFT           (0)
396 #define PSRAM_ULP_MC_CA_MAP_BIT1(n)              (((n) & 0x1F) << 5)
397 #define PSRAM_ULP_MC_CA_MAP_BIT1_MASK            (0x1F << 5)
398 #define PSRAM_ULP_MC_CA_MAP_BIT1_SHIFT           (5)
399 #define PSRAM_ULP_MC_CA_MAP_BIT2(n)              (((n) & 0x1F) << 10)
400 #define PSRAM_ULP_MC_CA_MAP_BIT2_MASK            (0x1F << 10)
401 #define PSRAM_ULP_MC_CA_MAP_BIT2_SHIFT           (10)
402 #define PSRAM_ULP_MC_CA_MAP_BIT3(n)              (((n) & 0x1F) << 15)
403 #define PSRAM_ULP_MC_CA_MAP_BIT3_MASK            (0x1F << 15)
404 #define PSRAM_ULP_MC_CA_MAP_BIT3_SHIFT           (15)
405 #define PSRAM_ULP_MC_CA_MAP_BIT4(n)              (((n) & 0x1F) << 20)
406 #define PSRAM_ULP_MC_CA_MAP_BIT4_MASK            (0x1F << 20)
407 #define PSRAM_ULP_MC_CA_MAP_BIT4_SHIFT           (20)
408 #define PSRAM_ULP_MC_CA_MAP_BIT5(n)              (((n) & 0x1F) << 25)
409 #define PSRAM_ULP_MC_CA_MAP_BIT5_MASK            (0x1F << 25)
410 #define PSRAM_ULP_MC_CA_MAP_BIT5_SHIFT           (25)
411 
412 // reg_184
413 #define PSRAM_ULP_MC_CA_MAP_BIT6(n)              (((n) & 0x1F) << 0)
414 #define PSRAM_ULP_MC_CA_MAP_BIT6_MASK            (0x1F << 0)
415 #define PSRAM_ULP_MC_CA_MAP_BIT6_SHIFT           (0)
416 #define PSRAM_ULP_MC_CA_MAP_BIT7(n)              (((n) & 0x1F) << 5)
417 #define PSRAM_ULP_MC_CA_MAP_BIT7_MASK            (0x1F << 5)
418 #define PSRAM_ULP_MC_CA_MAP_BIT7_SHIFT           (5)
419 #define PSRAM_ULP_MC_CA_MAP_BIT8(n)              (((n) & 0x1F) << 10)
420 #define PSRAM_ULP_MC_CA_MAP_BIT8_MASK            (0x1F << 10)
421 #define PSRAM_ULP_MC_CA_MAP_BIT8_SHIFT           (10)
422 #define PSRAM_ULP_MC_CA_MAP_BIT9(n)              (((n) & 0x1F) << 15)
423 #define PSRAM_ULP_MC_CA_MAP_BIT9_MASK            (0x1F << 15)
424 #define PSRAM_ULP_MC_CA_MAP_BIT9_SHIFT           (15)
425 #define PSRAM_ULP_MC_CA_MAP_BIT10(n)             (((n) & 0x1F) << 20)
426 #define PSRAM_ULP_MC_CA_MAP_BIT10_MASK           (0x1F << 20)
427 #define PSRAM_ULP_MC_CA_MAP_BIT10_SHIFT          (20)
428 #define PSRAM_ULP_MC_CA_MAP_BIT11(n)             (((n) & 0x1F) << 25)
429 #define PSRAM_ULP_MC_CA_MAP_BIT11_MASK           (0x1F << 25)
430 #define PSRAM_ULP_MC_CA_MAP_BIT11_SHIFT          (25)
431 
432 // reg_188
433 #define PSRAM_ULP_MC_CA_MAP_BIT12(n)             (((n) & 0x1F) << 0)
434 #define PSRAM_ULP_MC_CA_MAP_BIT12_MASK           (0x1F << 0)
435 #define PSRAM_ULP_MC_CA_MAP_BIT12_SHIFT          (0)
436 #define PSRAM_ULP_MC_CA_MAP_BIT13(n)             (((n) & 0x1F) << 5)
437 #define PSRAM_ULP_MC_CA_MAP_BIT13_MASK           (0x1F << 5)
438 #define PSRAM_ULP_MC_CA_MAP_BIT13_SHIFT          (5)
439 #define PSRAM_ULP_MC_CA_MAP_BIT14(n)             (((n) & 0x1F) << 10)
440 #define PSRAM_ULP_MC_CA_MAP_BIT14_MASK           (0x1F << 10)
441 #define PSRAM_ULP_MC_CA_MAP_BIT14_SHIFT          (10)
442 #define PSRAM_ULP_MC_CA_MAP_BIT15(n)             (((n) & 0x1F) << 15)
443 #define PSRAM_ULP_MC_CA_MAP_BIT15_MASK           (0x1F << 15)
444 #define PSRAM_ULP_MC_CA_MAP_BIT15_SHIFT          (15)
445 #define PSRAM_ULP_MC_CA_MAP_BIT16(n)             (((n) & 0x1F) << 20)
446 #define PSRAM_ULP_MC_CA_MAP_BIT16_MASK           (0x1F << 20)
447 #define PSRAM_ULP_MC_CA_MAP_BIT16_SHIFT          (20)
448 #define PSRAM_ULP_MC_CA_MAP_BIT17(n)             (((n) & 0x1F) << 25)
449 #define PSRAM_ULP_MC_CA_MAP_BIT17_MASK           (0x1F << 25)
450 #define PSRAM_ULP_MC_CA_MAP_BIT17_SHIFT          (25)
451 
452 // reg_18c
453 #define PSRAM_ULP_MC_CA_MAP_BIT18(n)             (((n) & 0x1F) << 0)
454 #define PSRAM_ULP_MC_CA_MAP_BIT18_MASK           (0x1F << 0)
455 #define PSRAM_ULP_MC_CA_MAP_BIT18_SHIFT          (0)
456 #define PSRAM_ULP_MC_CA_MAP_BIT19(n)             (((n) & 0x1F) << 5)
457 #define PSRAM_ULP_MC_CA_MAP_BIT19_MASK           (0x1F << 5)
458 #define PSRAM_ULP_MC_CA_MAP_BIT19_SHIFT          (5)
459 #define PSRAM_ULP_MC_CA_MAP_BIT20(n)             (((n) & 0x1F) << 10)
460 #define PSRAM_ULP_MC_CA_MAP_BIT20_MASK           (0x1F << 10)
461 #define PSRAM_ULP_MC_CA_MAP_BIT20_SHIFT          (10)
462 #define PSRAM_ULP_MC_CA_MAP_BIT21(n)             (((n) & 0x1F) << 15)
463 #define PSRAM_ULP_MC_CA_MAP_BIT21_MASK           (0x1F << 15)
464 #define PSRAM_ULP_MC_CA_MAP_BIT21_SHIFT          (15)
465 #define PSRAM_ULP_MC_CA_MAP_BIT22(n)             (((n) & 0x1F) << 20)
466 #define PSRAM_ULP_MC_CA_MAP_BIT22_MASK           (0x1F << 20)
467 #define PSRAM_ULP_MC_CA_MAP_BIT22_SHIFT          (20)
468 #define PSRAM_ULP_MC_CA_MAP_BIT23(n)             (((n) & 0x1F) << 25)
469 #define PSRAM_ULP_MC_CA_MAP_BIT23_MASK           (0x1F << 25)
470 #define PSRAM_ULP_MC_CA_MAP_BIT23_SHIFT          (25)
471 
472 // reg_190
473 #define PSRAM_ULP_MC_CA_MAP_BIT24(n)             (((n) & 0x1F) << 0)
474 #define PSRAM_ULP_MC_CA_MAP_BIT24_MASK           (0x1F << 0)
475 #define PSRAM_ULP_MC_CA_MAP_BIT24_SHIFT          (0)
476 #define PSRAM_ULP_MC_CA_MAP_BIT25(n)             (((n) & 0x1F) << 5)
477 #define PSRAM_ULP_MC_CA_MAP_BIT25_MASK           (0x1F << 5)
478 #define PSRAM_ULP_MC_CA_MAP_BIT25_SHIFT          (5)
479 #define PSRAM_ULP_MC_CA_MAP_BIT26(n)             (((n) & 0x1F) << 10)
480 #define PSRAM_ULP_MC_CA_MAP_BIT26_MASK           (0x1F << 10)
481 #define PSRAM_ULP_MC_CA_MAP_BIT26_SHIFT          (10)
482 #define PSRAM_ULP_MC_CA_MAP_BIT27(n)             (((n) & 0x1F) << 15)
483 #define PSRAM_ULP_MC_CA_MAP_BIT27_MASK           (0x1F << 15)
484 #define PSRAM_ULP_MC_CA_MAP_BIT27_SHIFT          (15)
485 #define PSRAM_ULP_MC_CA_MAP_BIT28(n)             (((n) & 0x1F) << 20)
486 #define PSRAM_ULP_MC_CA_MAP_BIT28_MASK           (0x1F << 20)
487 #define PSRAM_ULP_MC_CA_MAP_BIT28_SHIFT          (20)
488 #define PSRAM_ULP_MC_CA_MAP_BIT29(n)             (((n) & 0x1F) << 25)
489 #define PSRAM_ULP_MC_CA_MAP_BIT29_MASK           (0x1F << 25)
490 #define PSRAM_ULP_MC_CA_MAP_BIT29_SHIFT          (25)
491 
492 // reg_194
493 #define PSRAM_ULP_MC_CA_MAP_BIT30(n)             (((n) & 0x1F) << 0)
494 #define PSRAM_ULP_MC_CA_MAP_BIT30_MASK           (0x1F << 0)
495 #define PSRAM_ULP_MC_CA_MAP_BIT30_SHIFT          (0)
496 #define PSRAM_ULP_MC_CA_MAP_BIT31(n)             (((n) & 0x1F) << 5)
497 #define PSRAM_ULP_MC_CA_MAP_BIT31_MASK           (0x1F << 5)
498 #define PSRAM_ULP_MC_CA_MAP_BIT31_SHIFT          (5)
499 #define PSRAM_ULP_MC_CA_MAP_BIT32(n)             (((n) & 0x1F) << 10)
500 #define PSRAM_ULP_MC_CA_MAP_BIT32_MASK           (0x1F << 10)
501 #define PSRAM_ULP_MC_CA_MAP_BIT32_SHIFT          (10)
502 
503 // reg_190
504 
505 // reg_200
506 #define PSRAM_ULP_MC_RESERVED_0(n)               (((n) & 0xFF) << 0)
507 #define PSRAM_ULP_MC_RESERVED_0_MASK             (0xFF << 0)
508 #define PSRAM_ULP_MC_RESERVED_0_SHIFT            (0)
509 
510 // reg_400
511 #define PSRAM_ULP_MC_INIT_COMPLETE               (1 << 0)
512 
513 // reg_404
514 #define PSRAM_ULP_MC_BUSY                        (1 << 0)
515 #define PSRAM_ULP_MC_MGR_RXFIFO_R_EMPTY          (1 << 1)
516 #define PSRAM_ULP_MC_MGR_RXFIFO_FULL_CNT(n)      (((n) & 0xF) << 2)
517 #define PSRAM_ULP_MC_MGR_RXFIFO_FULL_CNT_MASK    (0xF << 2)
518 #define PSRAM_ULP_MC_MGR_RXFIFO_FULL_CNT_SHIFT   (2)
519 #define PSRAM_ULP_MC_MGR_TXFIFO_W_FULL           (1 << 6)
520 #define PSRAM_ULP_MC_MGR_TXFIFO_EMPTY_CNT(n)     (((n) & 0xF) << 7)
521 #define PSRAM_ULP_MC_MGR_TXFIFO_EMPTY_CNT_MASK   (0xF << 7)
522 #define PSRAM_ULP_MC_MGR_TXFIFO_EMPTY_CNT_SHIFT  (7)
523 #define PSRAM_ULP_MC_WB_FILL_LEVEL(n)            (((n) & 0x1F) << 11)
524 #define PSRAM_ULP_MC_WB_FILL_LEVEL_MASK          (0x1F << 11)
525 #define PSRAM_ULP_MC_WB_FILL_LEVEL_SHIFT         (11)
526 #define PSRAM_ULP_MC_CP_FSM_STATE(n)             (((n) & 0xF) << 16)
527 #define PSRAM_ULP_MC_CP_FSM_STATE_MASK           (0xF << 16)
528 #define PSRAM_ULP_MC_CP_FSM_STATE_SHIFT          (16)
529 #define PSRAM_ULP_MC_RD_FSM(n)                   (((n) & 0x3) << 20)
530 #define PSRAM_ULP_MC_RD_FSM_MASK                 (0x3 << 20)
531 #define PSRAM_ULP_MC_RD_FSM_SHIFT                (20)
532 
533 // reg_440
534 #define PSRAM_ULP_MC_PMU_MONITOR_START           (1 << 0)
535 #define PSRAM_ULP_MC_PMU_MONITOR_END             (1 << 1)
536 
537 // reg_444
538 #define PSRAM_ULP_MC_PMU_TOL_MON_CLK_CYCLE0(n)   (((n) & 0xFFFFFFFF) << 0)
539 #define PSRAM_ULP_MC_PMU_TOL_MON_CLK_CYCLE0_MASK (0xFFFFFFFF << 0)
540 #define PSRAM_ULP_MC_PMU_TOL_MON_CLK_CYCLE0_SHIFT (0)
541 
542 // reg_448
543 #define PSRAM_ULP_MC_PMU_TOL_MON_CLK_CYCLE1(n)   (((n) & 0xFFFFFFFF) << 0)
544 #define PSRAM_ULP_MC_PMU_TOL_MON_CLK_CYCLE1_MASK (0xFFFFFFFF << 0)
545 #define PSRAM_ULP_MC_PMU_TOL_MON_CLK_CYCLE1_SHIFT (0)
546 
547 // reg_44c
548 #define PSRAM_ULP_MC_PMU_TOL_WR_DATA_BYTES0(n)   (((n) & 0xFFFFFFFF) << 0)
549 #define PSRAM_ULP_MC_PMU_TOL_WR_DATA_BYTES0_MASK (0xFFFFFFFF << 0)
550 #define PSRAM_ULP_MC_PMU_TOL_WR_DATA_BYTES0_SHIFT (0)
551 
552 // reg_450
553 #define PSRAM_ULP_MC_PMU_TOL_WR_DATA_BYTES1(n)   (((n) & 0xFFFFFFFF) << 0)
554 #define PSRAM_ULP_MC_PMU_TOL_WR_DATA_BYTES1_MASK (0xFFFFFFFF << 0)
555 #define PSRAM_ULP_MC_PMU_TOL_WR_DATA_BYTES1_SHIFT (0)
556 
557 // reg_454
558 #define PSRAM_ULP_MC_PMU_TOL_RD_DATA_BYTES0(n)   (((n) & 0xFFFFFFFF) << 0)
559 #define PSRAM_ULP_MC_PMU_TOL_RD_DATA_BYTES0_MASK (0xFFFFFFFF << 0)
560 #define PSRAM_ULP_MC_PMU_TOL_RD_DATA_BYTES0_SHIFT (0)
561 
562 // reg_458
563 #define PSRAM_ULP_MC_PMU_TOL_RD_DATA_BYTES1(n)   (((n) & 0xFFFFFFFF) << 0)
564 #define PSRAM_ULP_MC_PMU_TOL_RD_DATA_BYTES1_MASK (0xFFFFFFFF << 0)
565 #define PSRAM_ULP_MC_PMU_TOL_RD_DATA_BYTES1_SHIFT (0)
566 
567 // reg_45c
568 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_LATENCY0(n)  (((n) & 0xFFFFFFFF) << 0)
569 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_LATENCY0_MASK (0xFFFFFFFF << 0)
570 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_LATENCY0_SHIFT (0)
571 
572 // reg_460
573 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_LATENCY1(n)  (((n) & 0xFFFFFFFF) << 0)
574 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_LATENCY1_MASK (0xFFFFFFFF << 0)
575 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_LATENCY1_SHIFT (0)
576 
577 // reg_464
578 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_NUM0(n)      (((n) & 0xFFFFFFFF) << 0)
579 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_NUM0_MASK    (0xFFFFFFFF << 0)
580 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_NUM0_SHIFT   (0)
581 
582 // reg_468
583 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_NUM1(n)      (((n) & 0xFFFFFFFF) << 0)
584 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_NUM1_MASK    (0xFFFFFFFF << 0)
585 #define PSRAM_ULP_MC_PMU_TOL_RD_ACC_NUM1_SHIFT   (0)
586 
587 // reg_46c
588 #define PSRAM_ULP_MC_PMU_MAX_RD_ACC_LATENCY(n)   (((n) & 0xFFFF) << 0)
589 #define PSRAM_ULP_MC_PMU_MAX_RD_ACC_LATENCY_MASK (0xFFFF << 0)
590 #define PSRAM_ULP_MC_PMU_MAX_RD_ACC_LATENCY_SHIFT (0)
591 
592 #endif
593