1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 #ifndef __REG_HS_PSRAM_MC_V2_H__
5 #define __REG_HS_PSRAM_MC_V2_H__
6 
7 #include "plat_types.h"
8 
9 struct PSRAMUHS_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     __IO uint32_t REG_RESERVED_470[0xF4];
94     __IO uint32_t REG_840;
95     __IO uint32_t REG_844;
96     __IO uint32_t REG_848;
97     __IO uint32_t REG_84C;
98 };
99 
100 // reg_00
101 #define PSRAM_UHS_MC_CHIP_BIT                    (1 << 0)
102 #define PSRAM_UHS_MC_CHIP_TYPE                   (1 << 1)
103 #define PSRAM_UHS_MC_CHIP_SWITCH                 (1 << 2)
104 #define PSRAM_UHS_MC_CHIP_IO_X16                 (1 << 3)
105 #define PSRAM_UHS_MC_CHIP_CA_PATTERN(n)          (((n) & 0x7) << 4)
106 #define PSRAM_UHS_MC_CHIP_CA_PATTERN_MASK        (0x7 << 4)
107 #define PSRAM_UHS_MC_CHIP_CA_PATTERN_SHIFT       (4)
108 #define PSRAM_UHS_MC_CHIP_MEM_SIZE(n)            (((n) & 0x3) << 7)
109 #define PSRAM_UHS_MC_CHIP_MEM_SIZE_MASK          (0x3 << 7)
110 #define PSRAM_UHS_MC_CHIP_MEM_SIZE_SHIFT         (7)
111 
112 // reg_04
113 #define PSRAM_UHS_MC_MGR_CMD(n)                  (((n) & 0xFF) << 0)
114 #define PSRAM_UHS_MC_MGR_CMD_MASK                (0xFF << 0)
115 #define PSRAM_UHS_MC_MGR_CMD_SHIFT               (0)
116 
117 // reg_08
118 #define PSRAM_UHS_MC_MGR_ADDR(n)                 (((n) & 0xFFFFFFFF) << 0)
119 #define PSRAM_UHS_MC_MGR_ADDR_MASK               (0xFFFFFFFF << 0)
120 #define PSRAM_UHS_MC_MGR_ADDR_SHIFT              (0)
121 
122 // reg_0c
123 #define PSRAM_UHS_MC_MGR_LEN(n)                  (((n) & 0xFF) << 0)
124 #define PSRAM_UHS_MC_MGR_LEN_MASK                (0xFF << 0)
125 #define PSRAM_UHS_MC_MGR_LEN_SHIFT               (0)
126 
127 // reg_10
128 #define PSRAM_UHS_MC_MGR_WSTRB(n)                (((n) & 0xFFFF) << 0)
129 #define PSRAM_UHS_MC_MGR_WSTRB_MASK              (0xFFFF << 0)
130 #define PSRAM_UHS_MC_MGR_WSTRB_SHIFT             (0)
131 
132 // reg_14
133 #define PSRAM_UHS_MC_MGR_TX_FIFO(n)              (((n) & 0xFFFFFFFF) << 0)
134 #define PSRAM_UHS_MC_MGR_TX_FIFO_MASK            (0xFFFFFFFF << 0)
135 #define PSRAM_UHS_MC_MGR_TX_FIFO_SHIFT           (0)
136 
137 // reg_18
138 #define PSRAM_UHS_MC_MGR_RX_FIFO(n)              (((n) & 0xFFFFFFFF) << 0)
139 #define PSRAM_UHS_MC_MGR_RX_FIFO_MASK            (0xFFFFFFFF << 0)
140 #define PSRAM_UHS_MC_MGR_RX_FIFO_SHIFT           (0)
141 
142 // reg_1c
143 #define PSRAM_UHS_MC_MGR_TX_FIFO_CLR             (1 << 0)
144 #define PSRAM_UHS_MC_MGR_RX_FIFO_CLR             (1 << 1)
145 
146 // reg_20
147 #define PSRAM_UHS_MC_REFRESH_MODE                (1 << 0)
148 #define PSRAM_UHS_MC_BURST_REFRESH_EN            (1 << 1)
149 
150 // reg_24
151 #define PSRAM_UHS_MC_ENTRY_SLEEP_IDLE            (1 << 0)
152 #define PSRAM_UHS_MC_ENTRY_SELF_REFRESH_IDLE     (1 << 1)
153 #define PSRAM_UHS_MC_STOP_CLK_IDLE               (1 << 2)
154 #define PSRAM_UHS_MC_AUTOWAKEUP_EN               (1 << 3)
155 #define PSRAM_UHS_MC_RES_7_4_REG24(n)            (((n) & 0xF) << 4)
156 #define PSRAM_UHS_MC_RES_7_4_REG24_MASK          (0xF << 4)
157 #define PSRAM_UHS_MC_RES_7_4_REG24_SHIFT         (4)
158 #define PSRAM_UHS_MC_PD_MR(n)                    (((n) & 0xFF) << 8)
159 #define PSRAM_UHS_MC_PD_MR_MASK                  (0xFF << 8)
160 #define PSRAM_UHS_MC_PD_MR_SHIFT                 (8)
161 
162 // reg_28
163 #define PSRAM_UHS_MC_WRITE_LATENCY(n)            (((n) & 0xFF) << 0)
164 #define PSRAM_UHS_MC_WRITE_LATENCY_MASK          (0xFF << 0)
165 #define PSRAM_UHS_MC_WRITE_LATENCY_SHIFT         (0)
166 
167 // reg_2c
168 #define PSRAM_UHS_MC_READ_LATENCY(n)             (((n) & 0xFF) << 0)
169 #define PSRAM_UHS_MC_READ_LATENCY_MASK           (0xFF << 0)
170 #define PSRAM_UHS_MC_READ_LATENCY_SHIFT          (0)
171 
172 // reg_30
173 #define PSRAM_UHS_MC_MEMORY_WIDTH(n)             (((n) & 0x3) << 0)
174 #define PSRAM_UHS_MC_MEMORY_WIDTH_MASK           (0x3 << 0)
175 #define PSRAM_UHS_MC_MEMORY_WIDTH_SHIFT          (0)
176 
177 // reg_34
178 #define PSRAM_UHS_MC_BURST_LENGTH(n)             (((n) & 0x7) << 0)
179 #define PSRAM_UHS_MC_BURST_LENGTH_MASK           (0x7 << 0)
180 #define PSRAM_UHS_MC_BURST_LENGTH_SHIFT          (0)
181 #define PSRAM_UHS_MC_RES_3_3_REG34               (1 << 3)
182 #define PSRAM_UHS_MC_PAGE_BOUNDARY(n)            (((n) & 0x3) << 4)
183 #define PSRAM_UHS_MC_PAGE_BOUNDARY_MASK          (0x3 << 4)
184 #define PSRAM_UHS_MC_PAGE_BOUNDARY_SHIFT         (4)
185 
186 // reg_38
187 #define PSRAM_UHS_MC_BUS_WIDTH                   (1 << 0)
188 
189 // reg_3c
190 #define PSRAM_UHS_MC_HIGH_PRI_LEVEL(n)           (((n) & 0x1F) << 0)
191 #define PSRAM_UHS_MC_HIGH_PRI_LEVEL_MASK         (0x1F << 0)
192 #define PSRAM_UHS_MC_HIGH_PRI_LEVEL_SHIFT        (0)
193 
194 // reg_40
195 #define PSRAM_UHS_MC_CP_WRAP_EN                  (1 << 0)
196 #define PSRAM_UHS_MC_AUTO_PRECHARGE              (1 << 1)
197 #define PSRAM_UHS_MC_PRA_ENABLE                  (1 << 2)
198 #define PSRAM_UHS_MC_PRA_MAX_CNT(n)              (((n) & 0xFFFF) << 3)
199 #define PSRAM_UHS_MC_PRA_MAX_CNT_MASK            (0xFFFF << 3)
200 #define PSRAM_UHS_MC_PRA_MAX_CNT_SHIFT           (3)
201 
202 // reg_44
203 #define PSRAM_UHS_MC_WB_DRAIN                    (1 << 0)
204 #define PSRAM_UHS_MC_WB_INVALID                  (1 << 1)
205 #define PSRAM_UHS_MC_RB_INVALID                  (1 << 2)
206 #define PSRAM_UHS_MC_SNP_DISABLE                 (1 << 3)
207 #define PSRAM_UHS_MC_BUFFERABLE_WB_EN            (1 << 4)
208 
209 // reg_48
210 #define PSRAM_UHS_MC_FRE_RATIO(n)                (((n) & 0x3) << 0)
211 #define PSRAM_UHS_MC_FRE_RATIO_MASK              (0x3 << 0)
212 #define PSRAM_UHS_MC_FRE_RATIO_SHIFT             (0)
213 
214 // reg_4c
215 #define PSRAM_UHS_MC_T_REFI(n)                   (((n) & 0xFFFF) << 0)
216 #define PSRAM_UHS_MC_T_REFI_MASK                 (0xFFFF << 0)
217 #define PSRAM_UHS_MC_T_REFI_SHIFT                (0)
218 #define PSRAM_UHS_MC_NUM_OF_BURST_RFS(n)         (((n) & 0xFFFF) << 16)
219 #define PSRAM_UHS_MC_NUM_OF_BURST_RFS_MASK       (0xFFFF << 16)
220 #define PSRAM_UHS_MC_NUM_OF_BURST_RFS_SHIFT      (16)
221 
222 // reg_50
223 #define PSRAM_UHS_MC_T_RC(n)                     (((n) & 0xFF) << 0)
224 #define PSRAM_UHS_MC_T_RC_MASK                   (0xFF << 0)
225 #define PSRAM_UHS_MC_T_RC_SHIFT                  (0)
226 
227 // reg_54
228 #define PSRAM_UHS_MC_T_RFC(n)                    (((n) & 0xFF) << 0)
229 #define PSRAM_UHS_MC_T_RFC_MASK                  (0xFF << 0)
230 #define PSRAM_UHS_MC_T_RFC_SHIFT                 (0)
231 
232 // reg_58
233 #define PSRAM_UHS_MC_T_CPHR(n)                   (((n) & 0x3F) << 0)
234 #define PSRAM_UHS_MC_T_CPHR_MASK                 (0x3F << 0)
235 #define PSRAM_UHS_MC_T_CPHR_SHIFT                (0)
236 
237 // reg_5c
238 #define PSRAM_UHS_MC_T_CPHR_AP(n)                (((n) & 0x3F) << 0)
239 #define PSRAM_UHS_MC_T_CPHR_AP_MASK              (0x3F << 0)
240 #define PSRAM_UHS_MC_T_CPHR_AP_SHIFT             (0)
241 
242 // reg_60
243 #define PSRAM_UHS_MC_T_CPHW(n)                   (((n) & 0x3F) << 0)
244 #define PSRAM_UHS_MC_T_CPHW_MASK                 (0x3F << 0)
245 #define PSRAM_UHS_MC_T_CPHW_SHIFT                (0)
246 
247 // reg_64
248 #define PSRAM_UHS_MC_T_CPHW_AP(n)                (((n) & 0x3F) << 0)
249 #define PSRAM_UHS_MC_T_CPHW_AP_MASK              (0x3F << 0)
250 #define PSRAM_UHS_MC_T_CPHW_AP_SHIFT             (0)
251 
252 // reg_68
253 #define PSRAM_UHS_MC_T_MRR(n)                    (((n) & 0x3F) << 0)
254 #define PSRAM_UHS_MC_T_MRR_MASK                  (0x3F << 0)
255 #define PSRAM_UHS_MC_T_MRR_SHIFT                 (0)
256 
257 // reg_6c
258 #define PSRAM_UHS_MC_T_MRS(n)                    (((n) & 0x3F) << 0)
259 #define PSRAM_UHS_MC_T_MRS_MASK                  (0x3F << 0)
260 #define PSRAM_UHS_MC_T_MRS_SHIFT                 (0)
261 
262 // reg_70
263 #define PSRAM_UHS_MC_T_CEM(n)                    (((n) & 0xFFFF) << 0)
264 #define PSRAM_UHS_MC_T_CEM_MASK                  (0xFFFF << 0)
265 #define PSRAM_UHS_MC_T_CEM_SHIFT                 (0)
266 
267 // reg_74
268 #define PSRAM_UHS_MC_T_RST(n)                    (((n) & 0xFFFF) << 0)
269 #define PSRAM_UHS_MC_T_RST_MASK                  (0xFFFF << 0)
270 #define PSRAM_UHS_MC_T_RST_SHIFT                 (0)
271 
272 // reg_78
273 #define PSRAM_UHS_MC_T_SRF(n)                    (((n) & 0xFF) << 0)
274 #define PSRAM_UHS_MC_T_SRF_MASK                  (0xFF << 0)
275 #define PSRAM_UHS_MC_T_SRF_SHIFT                 (0)
276 
277 // reg_7c
278 #define PSRAM_UHS_MC_T_XSR(n)                    (((n) & 0xFF) << 0)
279 #define PSRAM_UHS_MC_T_XSR_MASK                  (0xFF << 0)
280 #define PSRAM_UHS_MC_T_XSR_SHIFT                 (0)
281 
282 // reg_80
283 #define PSRAM_UHS_MC_T_HS(n)                     (((n) & 0xFFFF) << 0)
284 #define PSRAM_UHS_MC_T_HS_MASK                   (0xFFFF << 0)
285 #define PSRAM_UHS_MC_T_HS_SHIFT                  (0)
286 
287 // reg_84
288 #define PSRAM_UHS_MC_T_XPHS(n)                   (((n) & 0xFF) << 0)
289 #define PSRAM_UHS_MC_T_XPHS_MASK                 (0xFF << 0)
290 #define PSRAM_UHS_MC_T_XPHS_SHIFT                (0)
291 
292 // reg_88
293 #define PSRAM_UHS_MC_T_XHS(n)                    (((n) & 0xFFFFF) << 0)
294 #define PSRAM_UHS_MC_T_XHS_MASK                  (0xFFFFF << 0)
295 #define PSRAM_UHS_MC_T_XHS_SHIFT                 (0)
296 
297 // reg_8c
298 #define PSRAM_UHS_MC_T_ZQCAL(n)                  (((n) & 0xFFFFF) << 0)
299 #define PSRAM_UHS_MC_T_ZQCAL_MASK                (0xFFFFF << 0)
300 #define PSRAM_UHS_MC_T_ZQCAL_SHIFT               (0)
301 
302 // reg_90
303 #define PSRAM_UHS_MC_T_ZQCRST(n)                 (((n) & 0xFFFFF) << 0)
304 #define PSRAM_UHS_MC_T_ZQCRST_MASK               (0xFFFFF << 0)
305 #define PSRAM_UHS_MC_T_ZQCRST_SHIFT              (0)
306 
307 // reg_94
308 #define PSRAM_UHS_MC_T_XCKD(n)                   (((n) & 0x3F) << 0)
309 #define PSRAM_UHS_MC_T_XCKD_MASK                 (0x3F << 0)
310 #define PSRAM_UHS_MC_T_XCKD_SHIFT                (0)
311 
312 // reg_98
313 #define PSRAM_UHS_MC_T_ECKD(n)                   (((n) & 0x3F) << 0)
314 #define PSRAM_UHS_MC_T_ECKD_MASK                 (0x3F << 0)
315 #define PSRAM_UHS_MC_T_ECKD_SHIFT                (0)
316 
317 // reg_9c
318 #define PSRAM_UHS_MC_WR_DMY_CYC(n)               (((n) & 0xFF) << 0)
319 #define PSRAM_UHS_MC_WR_DMY_CYC_MASK             (0xFF << 0)
320 #define PSRAM_UHS_MC_WR_DMY_CYC_SHIFT            (0)
321 
322 // reg_a0
323 #define PSRAM_UHS_MC_STOP_CLK_IN_NOP             (1 << 0)
324 #define PSRAM_UHS_MC_NOP_DMY_CYC(n)              (((n) & 0xFF) << 1)
325 #define PSRAM_UHS_MC_NOP_DMY_CYC_MASK            (0xFF << 1)
326 #define PSRAM_UHS_MC_NOP_DMY_CYC_SHIFT           (1)
327 
328 // reg_a4
329 #define PSRAM_UHS_MC_QUEUE_IDLE_CYCLE(n)         (((n) & 0xFFFFFFFF) << 0)
330 #define PSRAM_UHS_MC_QUEUE_IDLE_CYCLE_MASK       (0xFFFFFFFF << 0)
331 #define PSRAM_UHS_MC_QUEUE_IDLE_CYCLE_SHIFT      (0)
332 
333 // reg_a8
334 #define PSRAM_UHS_MC_T_EXPANDRD(n)               (((n) & 0x3F) << 0)
335 #define PSRAM_UHS_MC_T_EXPANDRD_MASK             (0x3F << 0)
336 #define PSRAM_UHS_MC_T_EXPANDRD_SHIFT            (0)
337 
338 // reg_ac
339 #define PSRAM_UHS_MC_RX_SYNC_BYPASS              (1 << 0)
340 
341 // reg_b0
342 #define PSRAM_UHS_MC_MGR_FIFO_TEST_EN            (1 << 0)
343 
344 // reg_b4
345 #define PSRAM_UHS_MC_T_ZQCAS(n)                  (((n) & 0xFFFFF) << 0)
346 #define PSRAM_UHS_MC_T_ZQCAS_MASK                (0xFFFFF << 0)
347 #define PSRAM_UHS_MC_T_ZQCAS_SHIFT               (0)
348 
349 // reg_b8
350 #define PSRAM_UHS_MC_T_NEW_HOLD(n)               (((n) & 0xFFFFFFFF) << 0)
351 #define PSRAM_UHS_MC_T_NEW_HOLD_MASK             (0xFFFFFFFF << 0)
352 #define PSRAM_UHS_MC_T_NEW_HOLD_SHIFT            (0)
353 
354 // reg_bc
355 #define PSRAM_UHS_MC_NEW_CMD_OP(n)               (((n) & 0x7) << 0)
356 #define PSRAM_UHS_MC_NEW_CMD_OP_MASK             (0x7 << 0)
357 #define PSRAM_UHS_MC_NEW_CMD_OP_SHIFT            (0)
358 
359 // reg_140
360 #define PSRAM_UHS_MC_CMD_TABLE_ARRAY_RD(n)       (((n) & 0xFF) << 0)
361 #define PSRAM_UHS_MC_CMD_TABLE_ARRAY_RD_MASK     (0xFF << 0)
362 #define PSRAM_UHS_MC_CMD_TABLE_ARRAY_RD_SHIFT    (0)
363 
364 // reg_144
365 #define PSRAM_UHS_MC_CMD_TABLE_ARRAY_WR(n)       (((n) & 0xFF) << 0)
366 #define PSRAM_UHS_MC_CMD_TABLE_ARRAY_WR_MASK     (0xFF << 0)
367 #define PSRAM_UHS_MC_CMD_TABLE_ARRAY_WR_SHIFT    (0)
368 
369 // reg_148
370 #define PSRAM_UHS_MC_CMD_TABLE_REG_RD(n)         (((n) & 0xFF) << 0)
371 #define PSRAM_UHS_MC_CMD_TABLE_REG_RD_MASK       (0xFF << 0)
372 #define PSRAM_UHS_MC_CMD_TABLE_REG_RD_SHIFT      (0)
373 
374 // reg_14c
375 #define PSRAM_UHS_MC_CMD_TABLE_REG_WR(n)         (((n) & 0xFF) << 0)
376 #define PSRAM_UHS_MC_CMD_TABLE_REG_WR_MASK       (0xFF << 0)
377 #define PSRAM_UHS_MC_CMD_TABLE_REG_WR_SHIFT      (0)
378 
379 // reg_150
380 #define PSRAM_UHS_MC_CMD_TABLE_AUTO_REFR(n)      (((n) & 0xFF) << 0)
381 #define PSRAM_UHS_MC_CMD_TABLE_AUTO_REFR_MASK    (0xFF << 0)
382 #define PSRAM_UHS_MC_CMD_TABLE_AUTO_REFR_SHIFT   (0)
383 
384 // reg_154
385 #define PSRAM_UHS_MC_CMD_TABLE_SELF_REFR(n)      (((n) & 0xFF) << 0)
386 #define PSRAM_UHS_MC_CMD_TABLE_SELF_REFR_MASK    (0xFF << 0)
387 #define PSRAM_UHS_MC_CMD_TABLE_SELF_REFR_SHIFT   (0)
388 
389 // reg_158
390 #define PSRAM_UHS_MC_CMD_TABLE_HSLP_ENTRY(n)     (((n) & 0xFF) << 0)
391 #define PSRAM_UHS_MC_CMD_TABLE_HSLP_ENTRY_MASK   (0xFF << 0)
392 #define PSRAM_UHS_MC_CMD_TABLE_HSLP_ENTRY_SHIFT  (0)
393 
394 // reg_15c
395 #define PSRAM_UHS_MC_CMD_TABLE_GLBRST(n)         (((n) & 0xFF) << 0)
396 #define PSRAM_UHS_MC_CMD_TABLE_GLBRST_MASK       (0xFF << 0)
397 #define PSRAM_UHS_MC_CMD_TABLE_GLBRST_SHIFT      (0)
398 
399 // reg_160
400 #define PSRAM_UHS_MC_CMD_TABLE_NOP(n)            (((n) & 0xFF) << 0)
401 #define PSRAM_UHS_MC_CMD_TABLE_NOP_MASK          (0xFF << 0)
402 #define PSRAM_UHS_MC_CMD_TABLE_NOP_SHIFT         (0)
403 
404 // reg_180
405 #define PSRAM_UHS_MC_CA_MAP_BIT0(n)              (((n) & 0x1F) << 0)
406 #define PSRAM_UHS_MC_CA_MAP_BIT0_MASK            (0x1F << 0)
407 #define PSRAM_UHS_MC_CA_MAP_BIT0_SHIFT           (0)
408 #define PSRAM_UHS_MC_CA_MAP_BIT1(n)              (((n) & 0x1F) << 5)
409 #define PSRAM_UHS_MC_CA_MAP_BIT1_MASK            (0x1F << 5)
410 #define PSRAM_UHS_MC_CA_MAP_BIT1_SHIFT           (5)
411 #define PSRAM_UHS_MC_CA_MAP_BIT2(n)              (((n) & 0x1F) << 10)
412 #define PSRAM_UHS_MC_CA_MAP_BIT2_MASK            (0x1F << 10)
413 #define PSRAM_UHS_MC_CA_MAP_BIT2_SHIFT           (10)
414 #define PSRAM_UHS_MC_CA_MAP_BIT3(n)              (((n) & 0x1F) << 15)
415 #define PSRAM_UHS_MC_CA_MAP_BIT3_MASK            (0x1F << 15)
416 #define PSRAM_UHS_MC_CA_MAP_BIT3_SHIFT           (15)
417 #define PSRAM_UHS_MC_CA_MAP_BIT4(n)              (((n) & 0x1F) << 20)
418 #define PSRAM_UHS_MC_CA_MAP_BIT4_MASK            (0x1F << 20)
419 #define PSRAM_UHS_MC_CA_MAP_BIT4_SHIFT           (20)
420 #define PSRAM_UHS_MC_CA_MAP_BIT5(n)              (((n) & 0x1F) << 25)
421 #define PSRAM_UHS_MC_CA_MAP_BIT5_MASK            (0x1F << 25)
422 #define PSRAM_UHS_MC_CA_MAP_BIT5_SHIFT           (25)
423 
424 // reg_184
425 #define PSRAM_UHS_MC_CA_MAP_BIT6(n)              (((n) & 0x1F) << 0)
426 #define PSRAM_UHS_MC_CA_MAP_BIT6_MASK            (0x1F << 0)
427 #define PSRAM_UHS_MC_CA_MAP_BIT6_SHIFT           (0)
428 #define PSRAM_UHS_MC_CA_MAP_BIT7(n)              (((n) & 0x1F) << 5)
429 #define PSRAM_UHS_MC_CA_MAP_BIT7_MASK            (0x1F << 5)
430 #define PSRAM_UHS_MC_CA_MAP_BIT7_SHIFT           (5)
431 #define PSRAM_UHS_MC_CA_MAP_BIT8(n)              (((n) & 0x1F) << 10)
432 #define PSRAM_UHS_MC_CA_MAP_BIT8_MASK            (0x1F << 10)
433 #define PSRAM_UHS_MC_CA_MAP_BIT8_SHIFT           (10)
434 #define PSRAM_UHS_MC_CA_MAP_BIT9(n)              (((n) & 0x1F) << 15)
435 #define PSRAM_UHS_MC_CA_MAP_BIT9_MASK            (0x1F << 15)
436 #define PSRAM_UHS_MC_CA_MAP_BIT9_SHIFT           (15)
437 #define PSRAM_UHS_MC_CA_MAP_BIT10(n)             (((n) & 0x1F) << 20)
438 #define PSRAM_UHS_MC_CA_MAP_BIT10_MASK           (0x1F << 20)
439 #define PSRAM_UHS_MC_CA_MAP_BIT10_SHIFT          (20)
440 #define PSRAM_UHS_MC_CA_MAP_BIT11(n)             (((n) & 0x1F) << 25)
441 #define PSRAM_UHS_MC_CA_MAP_BIT11_MASK           (0x1F << 25)
442 #define PSRAM_UHS_MC_CA_MAP_BIT11_SHIFT          (25)
443 
444 // reg_188
445 #define PSRAM_UHS_MC_CA_MAP_BIT12(n)             (((n) & 0x1F) << 0)
446 #define PSRAM_UHS_MC_CA_MAP_BIT12_MASK           (0x1F << 0)
447 #define PSRAM_UHS_MC_CA_MAP_BIT12_SHIFT          (0)
448 #define PSRAM_UHS_MC_CA_MAP_BIT13(n)             (((n) & 0x1F) << 5)
449 #define PSRAM_UHS_MC_CA_MAP_BIT13_MASK           (0x1F << 5)
450 #define PSRAM_UHS_MC_CA_MAP_BIT13_SHIFT          (5)
451 #define PSRAM_UHS_MC_CA_MAP_BIT14(n)             (((n) & 0x1F) << 10)
452 #define PSRAM_UHS_MC_CA_MAP_BIT14_MASK           (0x1F << 10)
453 #define PSRAM_UHS_MC_CA_MAP_BIT14_SHIFT          (10)
454 #define PSRAM_UHS_MC_CA_MAP_BIT15(n)             (((n) & 0x1F) << 15)
455 #define PSRAM_UHS_MC_CA_MAP_BIT15_MASK           (0x1F << 15)
456 #define PSRAM_UHS_MC_CA_MAP_BIT15_SHIFT          (15)
457 #define PSRAM_UHS_MC_CA_MAP_BIT16(n)             (((n) & 0x1F) << 20)
458 #define PSRAM_UHS_MC_CA_MAP_BIT16_MASK           (0x1F << 20)
459 #define PSRAM_UHS_MC_CA_MAP_BIT16_SHIFT          (20)
460 #define PSRAM_UHS_MC_CA_MAP_BIT17(n)             (((n) & 0x1F) << 25)
461 #define PSRAM_UHS_MC_CA_MAP_BIT17_MASK           (0x1F << 25)
462 #define PSRAM_UHS_MC_CA_MAP_BIT17_SHIFT          (25)
463 
464 // reg_18c
465 #define PSRAM_UHS_MC_CA_MAP_BIT18(n)             (((n) & 0x1F) << 0)
466 #define PSRAM_UHS_MC_CA_MAP_BIT18_MASK           (0x1F << 0)
467 #define PSRAM_UHS_MC_CA_MAP_BIT18_SHIFT          (0)
468 #define PSRAM_UHS_MC_CA_MAP_BIT19(n)             (((n) & 0x1F) << 5)
469 #define PSRAM_UHS_MC_CA_MAP_BIT19_MASK           (0x1F << 5)
470 #define PSRAM_UHS_MC_CA_MAP_BIT19_SHIFT          (5)
471 #define PSRAM_UHS_MC_CA_MAP_BIT20(n)             (((n) & 0x1F) << 10)
472 #define PSRAM_UHS_MC_CA_MAP_BIT20_MASK           (0x1F << 10)
473 #define PSRAM_UHS_MC_CA_MAP_BIT20_SHIFT          (10)
474 #define PSRAM_UHS_MC_CA_MAP_BIT21(n)             (((n) & 0x1F) << 15)
475 #define PSRAM_UHS_MC_CA_MAP_BIT21_MASK           (0x1F << 15)
476 #define PSRAM_UHS_MC_CA_MAP_BIT21_SHIFT          (15)
477 #define PSRAM_UHS_MC_CA_MAP_BIT22(n)             (((n) & 0x1F) << 20)
478 #define PSRAM_UHS_MC_CA_MAP_BIT22_MASK           (0x1F << 20)
479 #define PSRAM_UHS_MC_CA_MAP_BIT22_SHIFT          (20)
480 #define PSRAM_UHS_MC_CA_MAP_BIT23(n)             (((n) & 0x1F) << 25)
481 #define PSRAM_UHS_MC_CA_MAP_BIT23_MASK           (0x1F << 25)
482 #define PSRAM_UHS_MC_CA_MAP_BIT23_SHIFT          (25)
483 
484 // reg_190
485 #define PSRAM_UHS_MC_CA_MAP_BIT24(n)             (((n) & 0x1F) << 0)
486 #define PSRAM_UHS_MC_CA_MAP_BIT24_MASK           (0x1F << 0)
487 #define PSRAM_UHS_MC_CA_MAP_BIT24_SHIFT          (0)
488 #define PSRAM_UHS_MC_CA_MAP_BIT25(n)             (((n) & 0x1F) << 5)
489 #define PSRAM_UHS_MC_CA_MAP_BIT25_MASK           (0x1F << 5)
490 #define PSRAM_UHS_MC_CA_MAP_BIT25_SHIFT          (5)
491 #define PSRAM_UHS_MC_CA_MAP_BIT26(n)             (((n) & 0x1F) << 10)
492 #define PSRAM_UHS_MC_CA_MAP_BIT26_MASK           (0x1F << 10)
493 #define PSRAM_UHS_MC_CA_MAP_BIT26_SHIFT          (10)
494 #define PSRAM_UHS_MC_CA_MAP_BIT27(n)             (((n) & 0x1F) << 15)
495 #define PSRAM_UHS_MC_CA_MAP_BIT27_MASK           (0x1F << 15)
496 #define PSRAM_UHS_MC_CA_MAP_BIT27_SHIFT          (15)
497 #define PSRAM_UHS_MC_CA_MAP_BIT28(n)             (((n) & 0x1F) << 20)
498 #define PSRAM_UHS_MC_CA_MAP_BIT28_MASK           (0x1F << 20)
499 #define PSRAM_UHS_MC_CA_MAP_BIT28_SHIFT          (20)
500 #define PSRAM_UHS_MC_CA_MAP_BIT29(n)             (((n) & 0x1F) << 25)
501 #define PSRAM_UHS_MC_CA_MAP_BIT29_MASK           (0x1F << 25)
502 #define PSRAM_UHS_MC_CA_MAP_BIT29_SHIFT          (25)
503 
504 // reg_194
505 #define PSRAM_UHS_MC_CA_MAP_BIT30(n)             (((n) & 0x1F) << 0)
506 #define PSRAM_UHS_MC_CA_MAP_BIT30_MASK           (0x1F << 0)
507 #define PSRAM_UHS_MC_CA_MAP_BIT30_SHIFT          (0)
508 #define PSRAM_UHS_MC_CA_MAP_BIT31(n)             (((n) & 0x1F) << 5)
509 #define PSRAM_UHS_MC_CA_MAP_BIT31_MASK           (0x1F << 5)
510 #define PSRAM_UHS_MC_CA_MAP_BIT31_SHIFT          (5)
511 #define PSRAM_UHS_MC_CA_MAP_BIT32(n)             (((n) & 0x1F) << 10)
512 #define PSRAM_UHS_MC_CA_MAP_BIT32_MASK           (0x1F << 10)
513 #define PSRAM_UHS_MC_CA_MAP_BIT32_SHIFT          (10)
514 
515 // reg_190
516 
517 // reg_400
518 #define PSRAM_UHS_MC_INIT_COMPLETE               (1 << 0)
519 
520 // reg_404
521 #define PSRAM_UHS_MC_BUSY                        (1 << 0)
522 #define PSRAM_UHS_MC_MGR_RXFIFO_R_EMPTY          (1 << 1)
523 #define PSRAM_UHS_MC_MGR_RXFIFO_FULL_CNT(n)      (((n) & 0xF) << 2)
524 #define PSRAM_UHS_MC_MGR_RXFIFO_FULL_CNT_MASK    (0xF << 2)
525 #define PSRAM_UHS_MC_MGR_RXFIFO_FULL_CNT_SHIFT   (2)
526 #define PSRAM_UHS_MC_MGR_TXFIFO_W_FULL           (1 << 6)
527 #define PSRAM_UHS_MC_MGR_TXFIFO_EMPTY_CNT(n)     (((n) & 0xF) << 7)
528 #define PSRAM_UHS_MC_MGR_TXFIFO_EMPTY_CNT_MASK   (0xF << 7)
529 #define PSRAM_UHS_MC_MGR_TXFIFO_EMPTY_CNT_SHIFT  (7)
530 #define PSRAM_UHS_MC_WB_FILL_LEVEL(n)            (((n) & 0x1F) << 11)
531 #define PSRAM_UHS_MC_WB_FILL_LEVEL_MASK          (0x1F << 11)
532 #define PSRAM_UHS_MC_WB_FILL_LEVEL_SHIFT         (11)
533 #define PSRAM_UHS_MC_CP_FSM_STATE(n)             (((n) & 0xF) << 16)
534 #define PSRAM_UHS_MC_CP_FSM_STATE_MASK           (0xF << 16)
535 #define PSRAM_UHS_MC_CP_FSM_STATE_SHIFT          (16)
536 #define PSRAM_UHS_MC_RD_FSM(n)                   (((n) & 0x3) << 20)
537 #define PSRAM_UHS_MC_RD_FSM_MASK                 (0x3 << 20)
538 #define PSRAM_UHS_MC_RD_FSM_SHIFT                (20)
539 
540 // reg_440
541 #define PSRAM_UHS_MC_PMU_MONITOR_START           (1 << 0)
542 #define PSRAM_UHS_MC_PMU_MONITOR_END             (1 << 1)
543 
544 // reg_444
545 #define PSRAM_UHS_MC_PMU_TOL_MON_CLK_CYCLE0(n)   (((n) & 0xFFFFFFFF) << 0)
546 #define PSRAM_UHS_MC_PMU_TOL_MON_CLK_CYCLE0_MASK (0xFFFFFFFF << 0)
547 #define PSRAM_UHS_MC_PMU_TOL_MON_CLK_CYCLE0_SHIFT (0)
548 
549 // reg_448
550 #define PSRAM_UHS_MC_PMU_TOL_MON_CLK_CYCLE1(n)   (((n) & 0xFFFFFFFF) << 0)
551 #define PSRAM_UHS_MC_PMU_TOL_MON_CLK_CYCLE1_MASK (0xFFFFFFFF << 0)
552 #define PSRAM_UHS_MC_PMU_TOL_MON_CLK_CYCLE1_SHIFT (0)
553 
554 // reg_44c
555 #define PSRAM_UHS_MC_PMU_TOL_WR_DATA_BYTES0(n)   (((n) & 0xFFFFFFFF) << 0)
556 #define PSRAM_UHS_MC_PMU_TOL_WR_DATA_BYTES0_MASK (0xFFFFFFFF << 0)
557 #define PSRAM_UHS_MC_PMU_TOL_WR_DATA_BYTES0_SHIFT (0)
558 
559 // reg_450
560 #define PSRAM_UHS_MC_PMU_TOL_WR_DATA_BYTES1(n)   (((n) & 0xFFFFFFFF) << 0)
561 #define PSRAM_UHS_MC_PMU_TOL_WR_DATA_BYTES1_MASK (0xFFFFFFFF << 0)
562 #define PSRAM_UHS_MC_PMU_TOL_WR_DATA_BYTES1_SHIFT (0)
563 
564 // reg_454
565 #define PSRAM_UHS_MC_PMU_TOL_RD_DATA_BYTES0(n)   (((n) & 0xFFFFFFFF) << 0)
566 #define PSRAM_UHS_MC_PMU_TOL_RD_DATA_BYTES0_MASK (0xFFFFFFFF << 0)
567 #define PSRAM_UHS_MC_PMU_TOL_RD_DATA_BYTES0_SHIFT (0)
568 
569 // reg_458
570 #define PSRAM_UHS_MC_PMU_TOL_RD_DATA_BYTES1(n)   (((n) & 0xFFFFFFFF) << 0)
571 #define PSRAM_UHS_MC_PMU_TOL_RD_DATA_BYTES1_MASK (0xFFFFFFFF << 0)
572 #define PSRAM_UHS_MC_PMU_TOL_RD_DATA_BYTES1_SHIFT (0)
573 
574 // reg_45c
575 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_LATENCY0(n)  (((n) & 0xFFFFFFFF) << 0)
576 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_LATENCY0_MASK (0xFFFFFFFF << 0)
577 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_LATENCY0_SHIFT (0)
578 
579 // reg_460
580 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_LATENCY1(n)  (((n) & 0xFFFFFFFF) << 0)
581 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_LATENCY1_MASK (0xFFFFFFFF << 0)
582 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_LATENCY1_SHIFT (0)
583 
584 // reg_464
585 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_NUM0(n)      (((n) & 0xFFFFFFFF) << 0)
586 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_NUM0_MASK    (0xFFFFFFFF << 0)
587 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_NUM0_SHIFT   (0)
588 
589 // reg_468
590 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_NUM1(n)      (((n) & 0xFFFFFFFF) << 0)
591 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_NUM1_MASK    (0xFFFFFFFF << 0)
592 #define PSRAM_UHS_MC_PMU_TOL_RD_ACC_NUM1_SHIFT   (0)
593 
594 // reg_46c
595 #define PSRAM_UHS_MC_PMU_MAX_RD_ACC_LATENCY(n)   (((n) & 0xFFFF) << 0)
596 #define PSRAM_UHS_MC_PMU_MAX_RD_ACC_LATENCY_MASK (0xFFFF << 0)
597 #define PSRAM_UHS_MC_PMU_MAX_RD_ACC_LATENCY_SHIFT (0)
598 
599 // reg_840
600 #define PSRAM_UHS_MC_PHY_CTRL_DELAY(n)           (((n) & 0x3) << 0)
601 #define PSRAM_UHS_MC_PHY_CTRL_DELAY_MASK         (0x3 << 0)
602 #define PSRAM_UHS_MC_PHY_CTRL_DELAY_SHIFT        (0)
603 #define PSRAM_UHS_MC_RESERVED_2_REG840           (1 << 2)
604 #define PSRAM_UHS_MC_PHY_RX_DLY_EN               (1 << 3)
605 #define PSRAM_UHS_MC_ANA_LOOPBACK_EN             (1 << 4)
606 #define PSRAM_UHS_MC_ANA_TEST_TXFIFO             (1 << 5)
607 #define PSRAM_UHS_MC_PHY_LOOPBACK_EN             (1 << 6)
608 #define PSRAM_UHS_MC_PHY_ALIGN_BYPASS            (1 << 7)
609 #define PSRAM_UHS_MC_PHY0_CONFLICT_CLR           (1 << 8)
610 #define PSRAM_UHS_MC_PHY1_CONFLICT_CLR           (1 << 9)
611 #define PSRAM_UHS_MC_PHY_IDLE_PAD_EN             (1 << 10)
612 #define PSRAM_UHS_MC_PHY_DUMMY_CYC_EN            (1 << 11)
613 
614 // reg_844
615 #define PSRAM_UHS_MC_T_WPST(n)                   (((n) & 0x7) << 0)
616 #define PSRAM_UHS_MC_T_WPST_MASK                 (0x7 << 0)
617 #define PSRAM_UHS_MC_T_WPST_SHIFT                (0)
618 
619 // reg_848
620 #define PSRAM_UHS_MC_T_LAT_SWITCH_CYC(n)         (((n) & 0x7) << 0)
621 #define PSRAM_UHS_MC_T_LAT_SWITCH_CYC_MASK       (0x7 << 0)
622 #define PSRAM_UHS_MC_T_LAT_SWITCH_CYC_SHIFT      (0)
623 
624 // reg_84c
625 #define PSRAM_UHS_MC_PHY0_CONFLICT_STS           (1 << 0)
626 #define PSRAM_UHS_MC_PHY1_CONFLICT_STS           (1 << 1)
627 #define PSRAM_UHS_MC_PHY0_FSM_STATE(n)           (((n) & 0xF) << 2)
628 #define PSRAM_UHS_MC_PHY0_FSM_STATE_MASK         (0xF << 2)
629 #define PSRAM_UHS_MC_PHY0_FSM_STATE_SHIFT        (2)
630 #define PSRAM_UHS_MC_PHY1_FSM_STATE(n)           (((n) & 0xF) << 6)
631 #define PSRAM_UHS_MC_PHY1_FSM_STATE_MASK         (0xF << 6)
632 #define PSRAM_UHS_MC_PHY1_FSM_STATE_SHIFT        (6)
633 
634 #endif
635