HPM SDK
HPMicro Software Development Kit
hpm_femc_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2024 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 
9 #ifndef HPM_FEMC_H
10 #define HPM_FEMC_H
11 
12 typedef struct {
13  __RW uint32_t CTRL; /* 0x0: Control Register */
14  __RW uint32_t IOCTRL; /* 0x4: IO Mux Control Register */
15  __RW uint32_t BMW0; /* 0x8: Bus (AXI) Weight Control Register 0 */
16  __RW uint32_t BMW1; /* 0xC: Bus (AXI) Weight Control Register 1 */
17  __RW uint32_t BR[7]; /* 0x10 - 0x28: Base Register 0 (for SDRAM CS0 device) */
18  __R uint8_t RESERVED0[12]; /* 0x2C - 0x37: Reserved */
19  __RW uint32_t INTEN; /* 0x38: Interrupt Enable Register */
20  __W uint32_t INTR; /* 0x3C: Interrupt Status Register */
21  __RW uint32_t SDRCTRL0; /* 0x40: SDRAM Control Register 0 */
22  __RW uint32_t SDRCTRL1; /* 0x44: SDRAM Control Register 1 */
23  __RW uint32_t SDRCTRL2; /* 0x48: SDRAM Control Register 2 */
24  __RW uint32_t SDRCTRL3; /* 0x4C: SDRAM Control Register 3 */
25  __R uint8_t RESERVED1[32]; /* 0x50 - 0x6F: Reserved */
26  __RW uint32_t SRCTRL0; /* 0x70: SRAM0 control register 0 */
27  __RW uint32_t SRCTRL1; /* 0x74: SRAM0 control register 1 */
28  __R uint8_t RESERVED2[24]; /* 0x78 - 0x8F: Reserved */
29  __RW uint32_t SADDR; /* 0x90: IP Command Control Register 0 */
30  __RW uint32_t DATSZ; /* 0x94: IP Command Control Register 1 */
31  __RW uint32_t BYTEMSK; /* 0x98: IP Command Control Register 2 */
32  __RW uint32_t IPCMD; /* 0x9C: IP Command Register */
33  __RW uint32_t IPTX; /* 0xA0: TX DATA Register */
34  __R uint8_t RESERVED3[12]; /* 0xA4 - 0xAF: Reserved */
35  __RW uint32_t IPRX; /* 0xB0: RX DATA Register */
36  __R uint8_t RESERVED4[12]; /* 0xB4 - 0xBF: Reserved */
37  __R uint32_t STAT0; /* 0xC0: Status Register 0 */
38  __R uint8_t RESERVED5[60]; /* 0xC4 - 0xFF: Reserved */
39  __RW uint32_t BR2[2]; /* 0x100 - 0x104: Base Register (for SRAM CS1/2 device) */
40  __R uint8_t RESERVED6[24]; /* 0x108 - 0x11F: Reserved */
41  __RW uint32_t SRCTRL2; /* 0x120: SRAM1/2 control register 0 */
42  __RW uint32_t SRCTRL3; /* 0x124: SRAM1/2 control register 1 */
43  __R uint8_t RESERVED7[40]; /* 0x128 - 0x14F: Reserved */
44  __RW uint32_t DLYCFG; /* 0x150: Delay Line Config Register */
45 } FEMC_Type;
46 
47 
48 /* Bitfield definition for register: CTRL */
49 /*
50  * BTO (RW)
51  *
52  * Bus timeout cycles
53  * AXI Bus timeout cycle is as following (255*(2^BTO)):
54  * 00000b - 255*1
55  * 00001-11110b - 255*2 - 255*2^30
56  * 11111b - 255*2^31
57  */
58 #define FEMC_CTRL_BTO_MASK (0x1F000000UL)
59 #define FEMC_CTRL_BTO_SHIFT (24U)
60 #define FEMC_CTRL_BTO_SET(x) (((uint32_t)(x) << FEMC_CTRL_BTO_SHIFT) & FEMC_CTRL_BTO_MASK)
61 #define FEMC_CTRL_BTO_GET(x) (((uint32_t)(x) & FEMC_CTRL_BTO_MASK) >> FEMC_CTRL_BTO_SHIFT)
62 
63 /*
64  * CTO (RW)
65  *
66  * Command Execution timeout cycles
67  * When Command Execution time exceed this timeout cycles, IPCMDERR or AXICMDERR interrupt is
68  * generated. When CTO is set to zero, timeout cycle is 256*1024 cycle. otherwisee timeout cycle is
69  * CTO*1024 cycle.
70  */
71 #define FEMC_CTRL_CTO_MASK (0xFF0000UL)
72 #define FEMC_CTRL_CTO_SHIFT (16U)
73 #define FEMC_CTRL_CTO_SET(x) (((uint32_t)(x) << FEMC_CTRL_CTO_SHIFT) & FEMC_CTRL_CTO_MASK)
74 #define FEMC_CTRL_CTO_GET(x) (((uint32_t)(x) & FEMC_CTRL_CTO_MASK) >> FEMC_CTRL_CTO_SHIFT)
75 
76 /*
77  * DQS (RW)
78  *
79  * DQS (read strobe) mode
80  * 0b - Dummy read strobe loopbacked internally
81  * 1b - Dummy read strobe loopbacked from DQS pad
82  */
83 #define FEMC_CTRL_DQS_MASK (0x4U)
84 #define FEMC_CTRL_DQS_SHIFT (2U)
85 #define FEMC_CTRL_DQS_SET(x) (((uint32_t)(x) << FEMC_CTRL_DQS_SHIFT) & FEMC_CTRL_DQS_MASK)
86 #define FEMC_CTRL_DQS_GET(x) (((uint32_t)(x) & FEMC_CTRL_DQS_MASK) >> FEMC_CTRL_DQS_SHIFT)
87 
88 /*
89  * DIS (RW)
90  *
91  * Module Disable
92  * 0b - Module enabled
93  * 1b - Module disabled
94  */
95 #define FEMC_CTRL_DIS_MASK (0x2U)
96 #define FEMC_CTRL_DIS_SHIFT (1U)
97 #define FEMC_CTRL_DIS_SET(x) (((uint32_t)(x) << FEMC_CTRL_DIS_SHIFT) & FEMC_CTRL_DIS_MASK)
98 #define FEMC_CTRL_DIS_GET(x) (((uint32_t)(x) & FEMC_CTRL_DIS_MASK) >> FEMC_CTRL_DIS_SHIFT)
99 
100 /*
101  * RST (RW)
102  *
103  * Software Reset
104  * Reset all internal logic in SEMC except configuration register
105  */
106 #define FEMC_CTRL_RST_MASK (0x1U)
107 #define FEMC_CTRL_RST_SHIFT (0U)
108 #define FEMC_CTRL_RST_SET(x) (((uint32_t)(x) << FEMC_CTRL_RST_SHIFT) & FEMC_CTRL_RST_MASK)
109 #define FEMC_CTRL_RST_GET(x) (((uint32_t)(x) & FEMC_CTRL_RST_MASK) >> FEMC_CTRL_RST_SHIFT)
110 
111 /* Bitfield definition for register: IOCTRL */
112 /*
113  * IO_SCS_1 (RW)
114  *
115  * IO_SCS_1 output selection
116  * 1001b -SRAM CE2#
117  */
118 #define FEMC_IOCTRL_IO_SCS_1_MASK (0xF000U)
119 #define FEMC_IOCTRL_IO_SCS_1_SHIFT (12U)
120 #define FEMC_IOCTRL_IO_SCS_1_SET(x) (((uint32_t)(x) << FEMC_IOCTRL_IO_SCS_1_SHIFT) & FEMC_IOCTRL_IO_SCS_1_MASK)
121 #define FEMC_IOCTRL_IO_SCS_1_GET(x) (((uint32_t)(x) & FEMC_IOCTRL_IO_SCS_1_MASK) >> FEMC_IOCTRL_IO_SCS_1_SHIFT)
122 
123 /*
124  * IO_SCS_0 (RW)
125  *
126  * IO_SCS_0 output selection
127  * 1000b -SRAM CE1#
128  */
129 #define FEMC_IOCTRL_IO_SCS_0_MASK (0xF00U)
130 #define FEMC_IOCTRL_IO_SCS_0_SHIFT (8U)
131 #define FEMC_IOCTRL_IO_SCS_0_SET(x) (((uint32_t)(x) << FEMC_IOCTRL_IO_SCS_0_SHIFT) & FEMC_IOCTRL_IO_SCS_0_MASK)
132 #define FEMC_IOCTRL_IO_SCS_0_GET(x) (((uint32_t)(x) & FEMC_IOCTRL_IO_SCS_0_MASK) >> FEMC_IOCTRL_IO_SCS_0_SHIFT)
133 
134 /*
135  * IO_CSX (RW)
136  *
137  * IO_CSX output selection
138  * 0001b - SDRAM CS1
139  * 0110b - SRAM CE0#
140  */
141 #define FEMC_IOCTRL_IO_CSX_MASK (0xF0U)
142 #define FEMC_IOCTRL_IO_CSX_SHIFT (4U)
143 #define FEMC_IOCTRL_IO_CSX_SET(x) (((uint32_t)(x) << FEMC_IOCTRL_IO_CSX_SHIFT) & FEMC_IOCTRL_IO_CSX_MASK)
144 #define FEMC_IOCTRL_IO_CSX_GET(x) (((uint32_t)(x) & FEMC_IOCTRL_IO_CSX_MASK) >> FEMC_IOCTRL_IO_CSX_SHIFT)
145 
146 /* Bitfield definition for register: BMW0 */
147 /*
148  * RWS (RW)
149  *
150  * Weight of slave hit with Read/Write Switch. This weight score is valid when queue command's slave is
151  * same as current executing command with read/write operation switch.
152  */
153 #define FEMC_BMW0_RWS_MASK (0xFF0000UL)
154 #define FEMC_BMW0_RWS_SHIFT (16U)
155 #define FEMC_BMW0_RWS_SET(x) (((uint32_t)(x) << FEMC_BMW0_RWS_SHIFT) & FEMC_BMW0_RWS_MASK)
156 #define FEMC_BMW0_RWS_GET(x) (((uint32_t)(x) & FEMC_BMW0_RWS_MASK) >> FEMC_BMW0_RWS_SHIFT)
157 
158 /*
159  * SH (RW)
160  *
161  * Weight of Slave Hit without read/write switch. This weight score is valid when queue command's slave is
162  * same as current executing command without read/write operation switch.
163  */
164 #define FEMC_BMW0_SH_MASK (0xFF00U)
165 #define FEMC_BMW0_SH_SHIFT (8U)
166 #define FEMC_BMW0_SH_SET(x) (((uint32_t)(x) << FEMC_BMW0_SH_SHIFT) & FEMC_BMW0_SH_MASK)
167 #define FEMC_BMW0_SH_GET(x) (((uint32_t)(x) & FEMC_BMW0_SH_MASK) >> FEMC_BMW0_SH_SHIFT)
168 
169 /*
170  * AGE (RW)
171  *
172  * Weight of AGE calculation. Each command in queue has an age signal to indicate its wait period. It is
173  * multiplied by WAGE to get weight score.
174  */
175 #define FEMC_BMW0_AGE_MASK (0xF0U)
176 #define FEMC_BMW0_AGE_SHIFT (4U)
177 #define FEMC_BMW0_AGE_SET(x) (((uint32_t)(x) << FEMC_BMW0_AGE_SHIFT) & FEMC_BMW0_AGE_MASK)
178 #define FEMC_BMW0_AGE_GET(x) (((uint32_t)(x) & FEMC_BMW0_AGE_MASK) >> FEMC_BMW0_AGE_SHIFT)
179 
180 /*
181  * QOS (RW)
182  *
183  * Weight of QOS calculation. AXI bus access has AxQOS signal set, which is used as a priority indicator
184  * for the associated write or read transaction. A higher value indicates a higher priority transaction. AxQOS
185  * is multiplied by WQOS to get weight score.
186  */
187 #define FEMC_BMW0_QOS_MASK (0xFU)
188 #define FEMC_BMW0_QOS_SHIFT (0U)
189 #define FEMC_BMW0_QOS_SET(x) (((uint32_t)(x) << FEMC_BMW0_QOS_SHIFT) & FEMC_BMW0_QOS_MASK)
190 #define FEMC_BMW0_QOS_GET(x) (((uint32_t)(x) & FEMC_BMW0_QOS_MASK) >> FEMC_BMW0_QOS_SHIFT)
191 
192 /* Bitfield definition for register: BMW1 */
193 /*
194  * BR (RW)
195  *
196  * Weight of Bank Rotation. This weight score is valid when queue command's bank is not same as current
197  * executing command.
198  */
199 #define FEMC_BMW1_BR_MASK (0xFF000000UL)
200 #define FEMC_BMW1_BR_SHIFT (24U)
201 #define FEMC_BMW1_BR_SET(x) (((uint32_t)(x) << FEMC_BMW1_BR_SHIFT) & FEMC_BMW1_BR_MASK)
202 #define FEMC_BMW1_BR_GET(x) (((uint32_t)(x) & FEMC_BMW1_BR_MASK) >> FEMC_BMW1_BR_SHIFT)
203 
204 /*
205  * RWS (RW)
206  *
207  * Weight of slave hit with Read/Write Switch. This weight score is valid when queue command's slave is
208  * same as current executing command with read/write operation switch.
209  */
210 #define FEMC_BMW1_RWS_MASK (0xFF0000UL)
211 #define FEMC_BMW1_RWS_SHIFT (16U)
212 #define FEMC_BMW1_RWS_SET(x) (((uint32_t)(x) << FEMC_BMW1_RWS_SHIFT) & FEMC_BMW1_RWS_MASK)
213 #define FEMC_BMW1_RWS_GET(x) (((uint32_t)(x) & FEMC_BMW1_RWS_MASK) >> FEMC_BMW1_RWS_SHIFT)
214 
215 /*
216  * PH (RW)
217  *
218  * Weight of Slave Hit without read/write switch. This weight score is valid when queue command's slave is
219  * same as current executing command without read/write operation switch.
220  */
221 #define FEMC_BMW1_PH_MASK (0xFF00U)
222 #define FEMC_BMW1_PH_SHIFT (8U)
223 #define FEMC_BMW1_PH_SET(x) (((uint32_t)(x) << FEMC_BMW1_PH_SHIFT) & FEMC_BMW1_PH_MASK)
224 #define FEMC_BMW1_PH_GET(x) (((uint32_t)(x) & FEMC_BMW1_PH_MASK) >> FEMC_BMW1_PH_SHIFT)
225 
226 /*
227  * AGE (RW)
228  *
229  * Weight of AGE calculation. Each command in queue has an age signal to indicate its wait period. It is
230  * multiplied by WAGE to get weight score.
231  */
232 #define FEMC_BMW1_AGE_MASK (0xF0U)
233 #define FEMC_BMW1_AGE_SHIFT (4U)
234 #define FEMC_BMW1_AGE_SET(x) (((uint32_t)(x) << FEMC_BMW1_AGE_SHIFT) & FEMC_BMW1_AGE_MASK)
235 #define FEMC_BMW1_AGE_GET(x) (((uint32_t)(x) & FEMC_BMW1_AGE_MASK) >> FEMC_BMW1_AGE_SHIFT)
236 
237 /*
238  * QOS (RW)
239  *
240  * Weight of QOS calculation. AXI bus access has AxQOS signal set, which is used as a priority indicator
241  * for the associated write or read transaction. A higher value indicates a higher priority transaction. AxQOS
242  * is multiplied by WQOS to get weight score.
243  */
244 #define FEMC_BMW1_QOS_MASK (0xFU)
245 #define FEMC_BMW1_QOS_SHIFT (0U)
246 #define FEMC_BMW1_QOS_SET(x) (((uint32_t)(x) << FEMC_BMW1_QOS_SHIFT) & FEMC_BMW1_QOS_MASK)
247 #define FEMC_BMW1_QOS_GET(x) (((uint32_t)(x) & FEMC_BMW1_QOS_MASK) >> FEMC_BMW1_QOS_SHIFT)
248 
249 /* Bitfield definition for register array: BR */
250 /*
251  * BASE (RW)
252  *
253  * Base Address
254  * This field determines high position 20 bits of SoC level Base Address. SoC level Base Address low
255  * position 12 bits are all zero.
256  */
257 #define FEMC_BR_BASE_MASK (0xFFFFF000UL)
258 #define FEMC_BR_BASE_SHIFT (12U)
259 #define FEMC_BR_BASE_SET(x) (((uint32_t)(x) << FEMC_BR_BASE_SHIFT) & FEMC_BR_BASE_MASK)
260 #define FEMC_BR_BASE_GET(x) (((uint32_t)(x) & FEMC_BR_BASE_MASK) >> FEMC_BR_BASE_SHIFT)
261 
262 /*
263  * SIZE (RW)
264  *
265  * Memory size
266  * 00000b - 4KB
267  * 00001b - 8KB
268  * 00010b - 16KB
269  * 00011b - 32KB
270  * 00100b - 64KB
271  * 00101b - 128KB
272  * 00110b - 256KB
273  * 00111b - 512KB
274  * 01000b - 1MB
275  * 01001b - 2MB
276  * 01010b - 4MB
277  * 01011b - 8MB
278  * 01100b - 16MB
279  * 01101b - 32MB
280  * 01110b - 64MB
281  * 01111b - 128MB
282  * 10000b - 256MB
283  * 10001b - 512MB
284  * 10010b - 1GB
285  * 10011b - 2GB
286  * 10100-11111b - 4GB
287  */
288 #define FEMC_BR_SIZE_MASK (0x3EU)
289 #define FEMC_BR_SIZE_SHIFT (1U)
290 #define FEMC_BR_SIZE_SET(x) (((uint32_t)(x) << FEMC_BR_SIZE_SHIFT) & FEMC_BR_SIZE_MASK)
291 #define FEMC_BR_SIZE_GET(x) (((uint32_t)(x) & FEMC_BR_SIZE_MASK) >> FEMC_BR_SIZE_SHIFT)
292 
293 /*
294  * VLD (RW)
295  *
296  * Valid
297  */
298 #define FEMC_BR_VLD_MASK (0x1U)
299 #define FEMC_BR_VLD_SHIFT (0U)
300 #define FEMC_BR_VLD_SET(x) (((uint32_t)(x) << FEMC_BR_VLD_SHIFT) & FEMC_BR_VLD_MASK)
301 #define FEMC_BR_VLD_GET(x) (((uint32_t)(x) & FEMC_BR_VLD_MASK) >> FEMC_BR_VLD_SHIFT)
302 
303 /* Bitfield definition for register: INTEN */
304 /*
305  * AXIBUSERR (RW)
306  *
307  * AXI BUS error interrupt enable
308  * 0b - Interrupt is disabled
309  * 1b - Interrupt is enabled
310  */
311 #define FEMC_INTEN_AXIBUSERR_MASK (0x8U)
312 #define FEMC_INTEN_AXIBUSERR_SHIFT (3U)
313 #define FEMC_INTEN_AXIBUSERR_SET(x) (((uint32_t)(x) << FEMC_INTEN_AXIBUSERR_SHIFT) & FEMC_INTEN_AXIBUSERR_MASK)
314 #define FEMC_INTEN_AXIBUSERR_GET(x) (((uint32_t)(x) & FEMC_INTEN_AXIBUSERR_MASK) >> FEMC_INTEN_AXIBUSERR_SHIFT)
315 
316 /*
317  * AXICMDERR (RW)
318  *
319  * AXI command error interrupt enable
320  * 0b - Interrupt is disabled
321  * 1b - Interrupt is enabled
322  */
323 #define FEMC_INTEN_AXICMDERR_MASK (0x4U)
324 #define FEMC_INTEN_AXICMDERR_SHIFT (2U)
325 #define FEMC_INTEN_AXICMDERR_SET(x) (((uint32_t)(x) << FEMC_INTEN_AXICMDERR_SHIFT) & FEMC_INTEN_AXICMDERR_MASK)
326 #define FEMC_INTEN_AXICMDERR_GET(x) (((uint32_t)(x) & FEMC_INTEN_AXICMDERR_MASK) >> FEMC_INTEN_AXICMDERR_SHIFT)
327 
328 /*
329  * IPCMDERR (RW)
330  *
331  * IP command error interrupt enable
332  * 0b - Interrupt is disabled
333  * 1b - Interrupt is enabled
334  */
335 #define FEMC_INTEN_IPCMDERR_MASK (0x2U)
336 #define FEMC_INTEN_IPCMDERR_SHIFT (1U)
337 #define FEMC_INTEN_IPCMDERR_SET(x) (((uint32_t)(x) << FEMC_INTEN_IPCMDERR_SHIFT) & FEMC_INTEN_IPCMDERR_MASK)
338 #define FEMC_INTEN_IPCMDERR_GET(x) (((uint32_t)(x) & FEMC_INTEN_IPCMDERR_MASK) >> FEMC_INTEN_IPCMDERR_SHIFT)
339 
340 /*
341  * IPCMDDONE (RW)
342  *
343  * IP command done interrupt enable
344  * 0b - Interrupt is disabled
345  * 1b - Interrupt is enabled
346  */
347 #define FEMC_INTEN_IPCMDDONE_MASK (0x1U)
348 #define FEMC_INTEN_IPCMDDONE_SHIFT (0U)
349 #define FEMC_INTEN_IPCMDDONE_SET(x) (((uint32_t)(x) << FEMC_INTEN_IPCMDDONE_SHIFT) & FEMC_INTEN_IPCMDDONE_MASK)
350 #define FEMC_INTEN_IPCMDDONE_GET(x) (((uint32_t)(x) & FEMC_INTEN_IPCMDDONE_MASK) >> FEMC_INTEN_IPCMDDONE_SHIFT)
351 
352 /* Bitfield definition for register: INTR */
353 /*
354  * AXIBUSERR (W1C)
355  *
356  * AXI bus error interrupt
357  * AXI Bus error interrupt is generated in following cases:
358  * • AXI address is invalid
359  * • AXI 8-bit or 16-bit WRAP write/read
360  */
361 #define FEMC_INTR_AXIBUSERR_MASK (0x8U)
362 #define FEMC_INTR_AXIBUSERR_SHIFT (3U)
363 #define FEMC_INTR_AXIBUSERR_SET(x) (((uint32_t)(x) << FEMC_INTR_AXIBUSERR_SHIFT) & FEMC_INTR_AXIBUSERR_MASK)
364 #define FEMC_INTR_AXIBUSERR_GET(x) (((uint32_t)(x) & FEMC_INTR_AXIBUSERR_MASK) >> FEMC_INTR_AXIBUSERR_SHIFT)
365 
366 /*
367  * AXICMDERR (W1C)
368  *
369  * AXI command error interrupt
370  * AXI command error interrupt is generated when AXI command execution timeout.
371  */
372 #define FEMC_INTR_AXICMDERR_MASK (0x4U)
373 #define FEMC_INTR_AXICMDERR_SHIFT (2U)
374 #define FEMC_INTR_AXICMDERR_SET(x) (((uint32_t)(x) << FEMC_INTR_AXICMDERR_SHIFT) & FEMC_INTR_AXICMDERR_MASK)
375 #define FEMC_INTR_AXICMDERR_GET(x) (((uint32_t)(x) & FEMC_INTR_AXICMDERR_MASK) >> FEMC_INTR_AXICMDERR_SHIFT)
376 
377 /*
378  * IPCMDERR (W1C)
379  *
380  * IP command error done interrupt
381  * IP command error interrupt is generated in following case:
382  * • IP Command Address target invalid device space
383  * • IP Command Code unsupported
384  * • IP Command triggered when previous command
385  */
386 #define FEMC_INTR_IPCMDERR_MASK (0x2U)
387 #define FEMC_INTR_IPCMDERR_SHIFT (1U)
388 #define FEMC_INTR_IPCMDERR_SET(x) (((uint32_t)(x) << FEMC_INTR_IPCMDERR_SHIFT) & FEMC_INTR_IPCMDERR_MASK)
389 #define FEMC_INTR_IPCMDERR_GET(x) (((uint32_t)(x) & FEMC_INTR_IPCMDERR_MASK) >> FEMC_INTR_IPCMDERR_SHIFT)
390 
391 /*
392  * IPCMDDONE (W1C)
393  *
394  * IP command normal done interrupt
395  */
396 #define FEMC_INTR_IPCMDDONE_MASK (0x1U)
397 #define FEMC_INTR_IPCMDDONE_SHIFT (0U)
398 #define FEMC_INTR_IPCMDDONE_SET(x) (((uint32_t)(x) << FEMC_INTR_IPCMDDONE_SHIFT) & FEMC_INTR_IPCMDDONE_MASK)
399 #define FEMC_INTR_IPCMDDONE_GET(x) (((uint32_t)(x) & FEMC_INTR_IPCMDDONE_MASK) >> FEMC_INTR_IPCMDDONE_SHIFT)
400 
401 /* Bitfield definition for register: SDRCTRL0 */
402 /*
403  * BANK2 (RW)
404  *
405  * 2 Bank selection bit
406  * 0b - SDRAM device has 4 banks.
407  * 1b - SDRAM device has 2 banks.
408  */
409 #define FEMC_SDRCTRL0_BANK2_MASK (0x4000U)
410 #define FEMC_SDRCTRL0_BANK2_SHIFT (14U)
411 #define FEMC_SDRCTRL0_BANK2_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL0_BANK2_SHIFT) & FEMC_SDRCTRL0_BANK2_MASK)
412 #define FEMC_SDRCTRL0_BANK2_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL0_BANK2_MASK) >> FEMC_SDRCTRL0_BANK2_SHIFT)
413 
414 /*
415  * CAS (RW)
416  *
417  * CAS Latency
418  * 00b - 1
419  * 01b - 1
420  * 10b - 2
421  * 11b - 3
422  */
423 #define FEMC_SDRCTRL0_CAS_MASK (0xC00U)
424 #define FEMC_SDRCTRL0_CAS_SHIFT (10U)
425 #define FEMC_SDRCTRL0_CAS_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL0_CAS_SHIFT) & FEMC_SDRCTRL0_CAS_MASK)
426 #define FEMC_SDRCTRL0_CAS_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL0_CAS_MASK) >> FEMC_SDRCTRL0_CAS_SHIFT)
427 
428 /*
429  * COL (RW)
430  *
431  * Column address bit number
432  * 00b - 12 bit
433  * 01b - 11 bit
434  * 10b - 10 bit
435  * 11b - 9 bit
436  */
437 #define FEMC_SDRCTRL0_COL_MASK (0x300U)
438 #define FEMC_SDRCTRL0_COL_SHIFT (8U)
439 #define FEMC_SDRCTRL0_COL_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL0_COL_SHIFT) & FEMC_SDRCTRL0_COL_MASK)
440 #define FEMC_SDRCTRL0_COL_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL0_COL_MASK) >> FEMC_SDRCTRL0_COL_SHIFT)
441 
442 /*
443  * COL8 (RW)
444  *
445  * Column 8 selection bit
446  * 0b - Column address bit number is decided by COL field.
447  * 1b - Column address bit number is 8. COL field is ignored.
448  */
449 #define FEMC_SDRCTRL0_COL8_MASK (0x80U)
450 #define FEMC_SDRCTRL0_COL8_SHIFT (7U)
451 #define FEMC_SDRCTRL0_COL8_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL0_COL8_SHIFT) & FEMC_SDRCTRL0_COL8_MASK)
452 #define FEMC_SDRCTRL0_COL8_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL0_COL8_MASK) >> FEMC_SDRCTRL0_COL8_SHIFT)
453 
454 /*
455  * BURSTLEN (RW)
456  *
457  * Burst Length
458  * 000b - 1
459  * 001b - 2
460  * 010b - 4
461  * 011b - 8
462  * 100b - 8
463  * 101b - 8
464  * 110b - 8
465  * 111b - 8
466  */
467 #define FEMC_SDRCTRL0_BURSTLEN_MASK (0x70U)
468 #define FEMC_SDRCTRL0_BURSTLEN_SHIFT (4U)
469 #define FEMC_SDRCTRL0_BURSTLEN_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL0_BURSTLEN_SHIFT) & FEMC_SDRCTRL0_BURSTLEN_MASK)
470 #define FEMC_SDRCTRL0_BURSTLEN_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL0_BURSTLEN_MASK) >> FEMC_SDRCTRL0_BURSTLEN_SHIFT)
471 
472 /*
473  * HIGHBAND (RW)
474  *
475  * high band select
476  * 0: use data[15:0] for 16bit SDRAM;
477  * 1: use data[31:16] for 16bit SDRAM;
478  * only used when Port Size is 16bit(PORTSZ=01b)
479  */
480 #define FEMC_SDRCTRL0_HIGHBAND_MASK (0x8U)
481 #define FEMC_SDRCTRL0_HIGHBAND_SHIFT (3U)
482 #define FEMC_SDRCTRL0_HIGHBAND_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL0_HIGHBAND_SHIFT) & FEMC_SDRCTRL0_HIGHBAND_MASK)
483 #define FEMC_SDRCTRL0_HIGHBAND_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL0_HIGHBAND_MASK) >> FEMC_SDRCTRL0_HIGHBAND_SHIFT)
484 
485 /*
486  * PORTSZ (RW)
487  *
488  * Port Size
489  * 00b - 8bit
490  * 01b - 16bit
491  * 10b - 32bit
492  */
493 #define FEMC_SDRCTRL0_PORTSZ_MASK (0x3U)
494 #define FEMC_SDRCTRL0_PORTSZ_SHIFT (0U)
495 #define FEMC_SDRCTRL0_PORTSZ_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL0_PORTSZ_SHIFT) & FEMC_SDRCTRL0_PORTSZ_MASK)
496 #define FEMC_SDRCTRL0_PORTSZ_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL0_PORTSZ_MASK) >> FEMC_SDRCTRL0_PORTSZ_SHIFT)
497 
498 /* Bitfield definition for register: SDRCTRL1 */
499 /*
500  * ACT2PRE (RW)
501  *
502  * ACT to Precharge minimum time
503  * It is promised ACT2PRE+1 clock cycles delay between ACTIVE command to PRECHARGE/PRECHARGE_ALL command.
504  */
505 #define FEMC_SDRCTRL1_ACT2PRE_MASK (0xF00000UL)
506 #define FEMC_SDRCTRL1_ACT2PRE_SHIFT (20U)
507 #define FEMC_SDRCTRL1_ACT2PRE_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL1_ACT2PRE_SHIFT) & FEMC_SDRCTRL1_ACT2PRE_MASK)
508 #define FEMC_SDRCTRL1_ACT2PRE_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL1_ACT2PRE_MASK) >> FEMC_SDRCTRL1_ACT2PRE_SHIFT)
509 
510 /*
511  * CKEOFF (RW)
512  *
513  * CKE OFF minimum time
514  * It is promised clock suspend last at leat CKEOFF+1 clock cycles.
515  */
516 #define FEMC_SDRCTRL1_CKEOFF_MASK (0xF0000UL)
517 #define FEMC_SDRCTRL1_CKEOFF_SHIFT (16U)
518 #define FEMC_SDRCTRL1_CKEOFF_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL1_CKEOFF_SHIFT) & FEMC_SDRCTRL1_CKEOFF_MASK)
519 #define FEMC_SDRCTRL1_CKEOFF_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL1_CKEOFF_MASK) >> FEMC_SDRCTRL1_CKEOFF_SHIFT)
520 
521 /*
522  * WRC (RW)
523  *
524  * Write recovery time
525  * It is promised WRC+1 clock cycles delay between WRITE command to PRECHARGE/PRECHARGE_ALL command. This could help to meet tWR timing requirement by SDRAM device.
526  */
527 #define FEMC_SDRCTRL1_WRC_MASK (0xE000U)
528 #define FEMC_SDRCTRL1_WRC_SHIFT (13U)
529 #define FEMC_SDRCTRL1_WRC_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL1_WRC_SHIFT) & FEMC_SDRCTRL1_WRC_MASK)
530 #define FEMC_SDRCTRL1_WRC_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL1_WRC_MASK) >> FEMC_SDRCTRL1_WRC_SHIFT)
531 
532 /*
533  * RFRC (RW)
534  *
535  * Refresh recovery time
536  * It is promised RFRC+1 clock cycles delay between REFRESH command to ACTIVE command. Thiscould help to meet tRFC timing requirement by SDRAM device.
537  */
538 #define FEMC_SDRCTRL1_RFRC_MASK (0x1F00U)
539 #define FEMC_SDRCTRL1_RFRC_SHIFT (8U)
540 #define FEMC_SDRCTRL1_RFRC_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL1_RFRC_SHIFT) & FEMC_SDRCTRL1_RFRC_MASK)
541 #define FEMC_SDRCTRL1_RFRC_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL1_RFRC_MASK) >> FEMC_SDRCTRL1_RFRC_SHIFT)
542 
543 /*
544  * ACT2RW (RW)
545  *
546  * ACT to Read/Write wait time
547  * It is promised ACT2RW+1 clock cycles delay between ACTIVE command to READ/WRITE command.This could help to meet tRCD timing requirement by SDRAM device.
548  */
549 #define FEMC_SDRCTRL1_ACT2RW_MASK (0xF0U)
550 #define FEMC_SDRCTRL1_ACT2RW_SHIFT (4U)
551 #define FEMC_SDRCTRL1_ACT2RW_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL1_ACT2RW_SHIFT) & FEMC_SDRCTRL1_ACT2RW_MASK)
552 #define FEMC_SDRCTRL1_ACT2RW_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL1_ACT2RW_MASK) >> FEMC_SDRCTRL1_ACT2RW_SHIFT)
553 
554 /*
555  * PRE2ACT (RW)
556  *
557  * PRECHARGE to ACT/Refresh wait time
558  * It is promised PRE2ACT+1 clock cycles delay between PRECHARGE/PRECHARGE_ALL commandto ACTIVE/REFRESH command. This could help to meet tRP timing requirement by SDRAM device.
559  */
560 #define FEMC_SDRCTRL1_PRE2ACT_MASK (0xFU)
561 #define FEMC_SDRCTRL1_PRE2ACT_SHIFT (0U)
562 #define FEMC_SDRCTRL1_PRE2ACT_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL1_PRE2ACT_SHIFT) & FEMC_SDRCTRL1_PRE2ACT_MASK)
563 #define FEMC_SDRCTRL1_PRE2ACT_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL1_PRE2ACT_MASK) >> FEMC_SDRCTRL1_PRE2ACT_SHIFT)
564 
565 /* Bitfield definition for register: SDRCTRL2 */
566 /*
567  * ITO (RW)
568  *
569  * SDRAM Idle timeout
570  * It closes all opened pages if the SDRAM idle time lasts more than idle timeout period. SDRAM is
571  * considered idle when there is no AXI Bus transfer and no SDRAM command pending.
572  * 00000000b - IDLE timeout period is 256*Prescale period.
573  * 00000001-11111111b - IDLE timeout period is ITO*Prescale period.
574  */
575 #define FEMC_SDRCTRL2_ITO_MASK (0xFF000000UL)
576 #define FEMC_SDRCTRL2_ITO_SHIFT (24U)
577 #define FEMC_SDRCTRL2_ITO_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL2_ITO_SHIFT) & FEMC_SDRCTRL2_ITO_MASK)
578 #define FEMC_SDRCTRL2_ITO_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL2_ITO_MASK) >> FEMC_SDRCTRL2_ITO_SHIFT)
579 
580 /*
581  * ACT2ACT (RW)
582  *
583  * ACT to ACT wait time
584  * It is promised ACT2ACT+1 clock cycles delay between ACTIVE command to ACTIVE command. This
585  * could help to meet tRRD timing requirement by SDRAM device.
586  */
587 #define FEMC_SDRCTRL2_ACT2ACT_MASK (0xFF0000UL)
588 #define FEMC_SDRCTRL2_ACT2ACT_SHIFT (16U)
589 #define FEMC_SDRCTRL2_ACT2ACT_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL2_ACT2ACT_SHIFT) & FEMC_SDRCTRL2_ACT2ACT_MASK)
590 #define FEMC_SDRCTRL2_ACT2ACT_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL2_ACT2ACT_MASK) >> FEMC_SDRCTRL2_ACT2ACT_SHIFT)
591 
592 /*
593  * REF2REF (RW)
594  *
595  * Refresh to Refresh wait time
596  * It is promised REF2REF+1 clock cycles delay between REFRESH command to REFRESH command.
597  * This could help to meet tRFC timing requirement by SDRAM device.
598  */
599 #define FEMC_SDRCTRL2_REF2REF_MASK (0xFF00U)
600 #define FEMC_SDRCTRL2_REF2REF_SHIFT (8U)
601 #define FEMC_SDRCTRL2_REF2REF_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL2_REF2REF_SHIFT) & FEMC_SDRCTRL2_REF2REF_MASK)
602 #define FEMC_SDRCTRL2_REF2REF_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL2_REF2REF_MASK) >> FEMC_SDRCTRL2_REF2REF_SHIFT)
603 
604 /*
605  * SRRC (RW)
606  *
607  * Self Refresh Recovery time
608  * It is promised SRRC+1 clock cycles delay between Self-REFRESH command to any command.
609  */
610 #define FEMC_SDRCTRL2_SRRC_MASK (0xFFU)
611 #define FEMC_SDRCTRL2_SRRC_SHIFT (0U)
612 #define FEMC_SDRCTRL2_SRRC_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL2_SRRC_SHIFT) & FEMC_SDRCTRL2_SRRC_MASK)
613 #define FEMC_SDRCTRL2_SRRC_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL2_SRRC_MASK) >> FEMC_SDRCTRL2_SRRC_SHIFT)
614 
615 /* Bitfield definition for register: SDRCTRL3 */
616 /*
617  * UT (RW)
618  *
619  * Refresh urgent threshold
620  * Internal refresh request is generated on every Refresh period. Before internal request timer count up to
621  * urgent request threshold, the refresh request is considered as normal refresh request. Normal refresh
622  * request is handled in lower priority than any pending AXI command or IP command to SDRAM device.
623  * When internal request timer count up to this urgent threshold, refresh request is considered as urgent
624  * refresh request. Urgent refresh request is handled in higher priority than any pending AXI command or IP
625  * command to SDRAM device.
626  * NOTE: When urgent threshold is no less than refresh period, refresh request is always considered as
627  * urgent refresh request.
628  * Refresh urgent threshold is as follwoing:
629  * 00000000b - 256*Prescaler period
630  * 00000001-11111111b - UT*Prescaler period
631  */
632 #define FEMC_SDRCTRL3_UT_MASK (0xFF000000UL)
633 #define FEMC_SDRCTRL3_UT_SHIFT (24U)
634 #define FEMC_SDRCTRL3_UT_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL3_UT_SHIFT) & FEMC_SDRCTRL3_UT_MASK)
635 #define FEMC_SDRCTRL3_UT_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL3_UT_MASK) >> FEMC_SDRCTRL3_UT_SHIFT)
636 
637 /*
638  * RT (RW)
639  *
640  * Refresh timer period
641  * Refresh timer period is as following:
642  * 00000000b - 256*Prescaler period
643  * 00000001-11111111b - RT*Prescaler period
644  */
645 #define FEMC_SDRCTRL3_RT_MASK (0xFF0000UL)
646 #define FEMC_SDRCTRL3_RT_SHIFT (16U)
647 #define FEMC_SDRCTRL3_RT_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL3_RT_SHIFT) & FEMC_SDRCTRL3_RT_MASK)
648 #define FEMC_SDRCTRL3_RT_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL3_RT_MASK) >> FEMC_SDRCTRL3_RT_SHIFT)
649 
650 /*
651  * PRESCALE (RW)
652  *
653  * Prescaler timer period
654  * Prescaler timer period is as following:
655  * 00000000b - 256*16 clock cycles
656  * 00000001-11111111b - PRESCALE*16 clock cycles
657  */
658 #define FEMC_SDRCTRL3_PRESCALE_MASK (0xFF00U)
659 #define FEMC_SDRCTRL3_PRESCALE_SHIFT (8U)
660 #define FEMC_SDRCTRL3_PRESCALE_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL3_PRESCALE_SHIFT) & FEMC_SDRCTRL3_PRESCALE_MASK)
661 #define FEMC_SDRCTRL3_PRESCALE_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL3_PRESCALE_MASK) >> FEMC_SDRCTRL3_PRESCALE_SHIFT)
662 
663 /*
664  * REBL (RW)
665  *
666  * Refresh burst length
667  * It could send multiple Auto-Refresh command in one burst when REBL is set to non-zero. The
668  * number of Auto-Refresh command cycle sent to all SDRAM device in one refresh period is as following.
669  * 000b - 1
670  * 001b - 2
671  * 010b - 3
672  * 011b - 4
673  * 100b - 5
674  * 101b - 6
675  * 110b - 7
676  * 111b - 8
677  */
678 #define FEMC_SDRCTRL3_REBL_MASK (0xEU)
679 #define FEMC_SDRCTRL3_REBL_SHIFT (1U)
680 #define FEMC_SDRCTRL3_REBL_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL3_REBL_SHIFT) & FEMC_SDRCTRL3_REBL_MASK)
681 #define FEMC_SDRCTRL3_REBL_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL3_REBL_MASK) >> FEMC_SDRCTRL3_REBL_SHIFT)
682 
683 /*
684  * REN (RW)
685  *
686  * Refresh enable
687  */
688 #define FEMC_SDRCTRL3_REN_MASK (0x1U)
689 #define FEMC_SDRCTRL3_REN_SHIFT (0U)
690 #define FEMC_SDRCTRL3_REN_SET(x) (((uint32_t)(x) << FEMC_SDRCTRL3_REN_SHIFT) & FEMC_SDRCTRL3_REN_MASK)
691 #define FEMC_SDRCTRL3_REN_GET(x) (((uint32_t)(x) & FEMC_SDRCTRL3_REN_MASK) >> FEMC_SDRCTRL3_REN_SHIFT)
692 
693 /* Bitfield definition for register: SRCTRL0 */
694 /*
695  * ADVH (RW)
696  *
697  * ADV hold state
698  * 0b - ADV is high during address hold state
699  * 1b - ADV is low during address hold state
700  */
701 #define FEMC_SRCTRL0_ADVH_MASK (0x800U)
702 #define FEMC_SRCTRL0_ADVH_SHIFT (11U)
703 #define FEMC_SRCTRL0_ADVH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL0_ADVH_SHIFT) & FEMC_SRCTRL0_ADVH_MASK)
704 #define FEMC_SRCTRL0_ADVH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL0_ADVH_MASK) >> FEMC_SRCTRL0_ADVH_SHIFT)
705 
706 /*
707  * ADVP (RW)
708  *
709  * ADV polarity
710  * 0b - ADV is active low
711  * 1b - ADV is active high
712  */
713 #define FEMC_SRCTRL0_ADVP_MASK (0x400U)
714 #define FEMC_SRCTRL0_ADVP_SHIFT (10U)
715 #define FEMC_SRCTRL0_ADVP_SET(x) (((uint32_t)(x) << FEMC_SRCTRL0_ADVP_SHIFT) & FEMC_SRCTRL0_ADVP_MASK)
716 #define FEMC_SRCTRL0_ADVP_GET(x) (((uint32_t)(x) & FEMC_SRCTRL0_ADVP_MASK) >> FEMC_SRCTRL0_ADVP_SHIFT)
717 
718 /*
719  * ADM (RW)
720  *
721  * address data mode
722  * 00b - address and data MUX mode
723  * 11b - address and data non-MUX mode
724  */
725 #define FEMC_SRCTRL0_ADM_MASK (0x300U)
726 #define FEMC_SRCTRL0_ADM_SHIFT (8U)
727 #define FEMC_SRCTRL0_ADM_SET(x) (((uint32_t)(x) << FEMC_SRCTRL0_ADM_SHIFT) & FEMC_SRCTRL0_ADM_MASK)
728 #define FEMC_SRCTRL0_ADM_GET(x) (((uint32_t)(x) & FEMC_SRCTRL0_ADM_MASK) >> FEMC_SRCTRL0_ADM_SHIFT)
729 
730 /*
731  * PORTSZ (RW)
732  *
733  * port size
734  * 0b - 8bit
735  * 1b - 16bit
736  */
737 #define FEMC_SRCTRL0_PORTSZ_MASK (0x1U)
738 #define FEMC_SRCTRL0_PORTSZ_SHIFT (0U)
739 #define FEMC_SRCTRL0_PORTSZ_SET(x) (((uint32_t)(x) << FEMC_SRCTRL0_PORTSZ_SHIFT) & FEMC_SRCTRL0_PORTSZ_MASK)
740 #define FEMC_SRCTRL0_PORTSZ_GET(x) (((uint32_t)(x) & FEMC_SRCTRL0_PORTSZ_MASK) >> FEMC_SRCTRL0_PORTSZ_SHIFT)
741 
742 /* Bitfield definition for register: SRCTRL1 */
743 /*
744  * OEH (RW)
745  *
746  * OE high time, is OEH+1 clock cycles
747  */
748 #define FEMC_SRCTRL1_OEH_MASK (0xF0000000UL)
749 #define FEMC_SRCTRL1_OEH_SHIFT (28U)
750 #define FEMC_SRCTRL1_OEH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_OEH_SHIFT) & FEMC_SRCTRL1_OEH_MASK)
751 #define FEMC_SRCTRL1_OEH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_OEH_MASK) >> FEMC_SRCTRL1_OEH_SHIFT)
752 
753 /*
754  * OEL (RW)
755  *
756  * OE low time, is OEL+1 clock cycles
757  */
758 #define FEMC_SRCTRL1_OEL_MASK (0xF000000UL)
759 #define FEMC_SRCTRL1_OEL_SHIFT (24U)
760 #define FEMC_SRCTRL1_OEL_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_OEL_SHIFT) & FEMC_SRCTRL1_OEL_MASK)
761 #define FEMC_SRCTRL1_OEL_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_OEL_MASK) >> FEMC_SRCTRL1_OEL_SHIFT)
762 
763 /*
764  * WEH (RW)
765  *
766  * WE high time, is WEH+1 clock cycles
767  */
768 #define FEMC_SRCTRL1_WEH_MASK (0xF00000UL)
769 #define FEMC_SRCTRL1_WEH_SHIFT (20U)
770 #define FEMC_SRCTRL1_WEH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_WEH_SHIFT) & FEMC_SRCTRL1_WEH_MASK)
771 #define FEMC_SRCTRL1_WEH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_WEH_MASK) >> FEMC_SRCTRL1_WEH_SHIFT)
772 
773 /*
774  * WEL (RW)
775  *
776  * WE low time, is WEL+1 clock cycles
777  */
778 #define FEMC_SRCTRL1_WEL_MASK (0xF0000UL)
779 #define FEMC_SRCTRL1_WEL_SHIFT (16U)
780 #define FEMC_SRCTRL1_WEL_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_WEL_SHIFT) & FEMC_SRCTRL1_WEL_MASK)
781 #define FEMC_SRCTRL1_WEL_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_WEL_MASK) >> FEMC_SRCTRL1_WEL_SHIFT)
782 
783 /*
784  * AH (RW)
785  *
786  * Address hold time, is AH+1 clock cycles
787  */
788 #define FEMC_SRCTRL1_AH_MASK (0xF000U)
789 #define FEMC_SRCTRL1_AH_SHIFT (12U)
790 #define FEMC_SRCTRL1_AH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_AH_SHIFT) & FEMC_SRCTRL1_AH_MASK)
791 #define FEMC_SRCTRL1_AH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_AH_MASK) >> FEMC_SRCTRL1_AH_SHIFT)
792 
793 /*
794  * AS (RW)
795  *
796  * Address setup time, is AS+1 clock cycles
797  */
798 #define FEMC_SRCTRL1_AS_MASK (0xF00U)
799 #define FEMC_SRCTRL1_AS_SHIFT (8U)
800 #define FEMC_SRCTRL1_AS_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_AS_SHIFT) & FEMC_SRCTRL1_AS_MASK)
801 #define FEMC_SRCTRL1_AS_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_AS_MASK) >> FEMC_SRCTRL1_AS_SHIFT)
802 
803 /*
804  * CEH (RW)
805  *
806  * Chip enable hold time, is CEH+1 clock cycles
807  */
808 #define FEMC_SRCTRL1_CEH_MASK (0xF0U)
809 #define FEMC_SRCTRL1_CEH_SHIFT (4U)
810 #define FEMC_SRCTRL1_CEH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_CEH_SHIFT) & FEMC_SRCTRL1_CEH_MASK)
811 #define FEMC_SRCTRL1_CEH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_CEH_MASK) >> FEMC_SRCTRL1_CEH_SHIFT)
812 
813 /*
814  * CES (RW)
815  *
816  * Chip enable setup time, is CES+1 clock cycles
817  */
818 #define FEMC_SRCTRL1_CES_MASK (0xFU)
819 #define FEMC_SRCTRL1_CES_SHIFT (0U)
820 #define FEMC_SRCTRL1_CES_SET(x) (((uint32_t)(x) << FEMC_SRCTRL1_CES_SHIFT) & FEMC_SRCTRL1_CES_MASK)
821 #define FEMC_SRCTRL1_CES_GET(x) (((uint32_t)(x) & FEMC_SRCTRL1_CES_MASK) >> FEMC_SRCTRL1_CES_SHIFT)
822 
823 /* Bitfield definition for register: SADDR */
824 /*
825  * SA (RW)
826  *
827  * Slave address
828  */
829 #define FEMC_SADDR_SA_MASK (0xFFFFFFFFUL)
830 #define FEMC_SADDR_SA_SHIFT (0U)
831 #define FEMC_SADDR_SA_SET(x) (((uint32_t)(x) << FEMC_SADDR_SA_SHIFT) & FEMC_SADDR_SA_MASK)
832 #define FEMC_SADDR_SA_GET(x) (((uint32_t)(x) & FEMC_SADDR_SA_MASK) >> FEMC_SADDR_SA_SHIFT)
833 
834 /* Bitfield definition for register: DATSZ */
835 /*
836  * DATSZ (RW)
837  *
838  * Data Size in Byte
839  * When IP command is not a write/read operation, DATSZ field would be ignored.
840  * 000b - 4
841  * 001b - 1
842  * 010b - 2
843  * 011b - 3
844  * 100b - 4
845  * 101b - 4
846  * 110b - 4
847  * 111b - 4
848  */
849 #define FEMC_DATSZ_DATSZ_MASK (0x7U)
850 #define FEMC_DATSZ_DATSZ_SHIFT (0U)
851 #define FEMC_DATSZ_DATSZ_SET(x) (((uint32_t)(x) << FEMC_DATSZ_DATSZ_SHIFT) & FEMC_DATSZ_DATSZ_MASK)
852 #define FEMC_DATSZ_DATSZ_GET(x) (((uint32_t)(x) & FEMC_DATSZ_DATSZ_MASK) >> FEMC_DATSZ_DATSZ_SHIFT)
853 
854 /* Bitfield definition for register: BYTEMSK */
855 /*
856  * BM3 (RW)
857  *
858  * Byte Mask for Byte 3 (IPTXD bit 31:24)
859  * 0b - Byte Unmasked
860  * 1b - Byte Masked
861  */
862 #define FEMC_BYTEMSK_BM3_MASK (0x8U)
863 #define FEMC_BYTEMSK_BM3_SHIFT (3U)
864 #define FEMC_BYTEMSK_BM3_SET(x) (((uint32_t)(x) << FEMC_BYTEMSK_BM3_SHIFT) & FEMC_BYTEMSK_BM3_MASK)
865 #define FEMC_BYTEMSK_BM3_GET(x) (((uint32_t)(x) & FEMC_BYTEMSK_BM3_MASK) >> FEMC_BYTEMSK_BM3_SHIFT)
866 
867 /*
868  * BM2 (RW)
869  *
870  * Byte Mask for Byte 2 (IPTXD bit 23:16)
871  * 0b - Byte Unmasked
872  * 1b - Byte Masked
873  */
874 #define FEMC_BYTEMSK_BM2_MASK (0x4U)
875 #define FEMC_BYTEMSK_BM2_SHIFT (2U)
876 #define FEMC_BYTEMSK_BM2_SET(x) (((uint32_t)(x) << FEMC_BYTEMSK_BM2_SHIFT) & FEMC_BYTEMSK_BM2_MASK)
877 #define FEMC_BYTEMSK_BM2_GET(x) (((uint32_t)(x) & FEMC_BYTEMSK_BM2_MASK) >> FEMC_BYTEMSK_BM2_SHIFT)
878 
879 /*
880  * BM1 (RW)
881  *
882  * Byte Mask for Byte 1 (IPTXD bit 15:8)
883  * 0b - Byte Unmasked
884  * 1b - Byte Masked
885  */
886 #define FEMC_BYTEMSK_BM1_MASK (0x2U)
887 #define FEMC_BYTEMSK_BM1_SHIFT (1U)
888 #define FEMC_BYTEMSK_BM1_SET(x) (((uint32_t)(x) << FEMC_BYTEMSK_BM1_SHIFT) & FEMC_BYTEMSK_BM1_MASK)
889 #define FEMC_BYTEMSK_BM1_GET(x) (((uint32_t)(x) & FEMC_BYTEMSK_BM1_MASK) >> FEMC_BYTEMSK_BM1_SHIFT)
890 
891 /*
892  * BM0 (RW)
893  *
894  * Byte Mask for Byte 0 (IPTXD bit 7:0)
895  * 0b - Byte Unmasked
896  * 1b - Byte Masked
897  */
898 #define FEMC_BYTEMSK_BM0_MASK (0x1U)
899 #define FEMC_BYTEMSK_BM0_SHIFT (0U)
900 #define FEMC_BYTEMSK_BM0_SET(x) (((uint32_t)(x) << FEMC_BYTEMSK_BM0_SHIFT) & FEMC_BYTEMSK_BM0_MASK)
901 #define FEMC_BYTEMSK_BM0_GET(x) (((uint32_t)(x) & FEMC_BYTEMSK_BM0_MASK) >> FEMC_BYTEMSK_BM0_SHIFT)
902 
903 /* Bitfield definition for register: IPCMD */
904 /*
905  * KEY (WO)
906  *
907  * This field should be written with 0x5AA5 when trigging an IP command for all device types. The memory
908  * device is selected by BRx settings and IPCR0 registers.
909  */
910 #define FEMC_IPCMD_KEY_MASK (0xFFFF0000UL)
911 #define FEMC_IPCMD_KEY_SHIFT (16U)
912 #define FEMC_IPCMD_KEY_SET(x) (((uint32_t)(x) << FEMC_IPCMD_KEY_SHIFT) & FEMC_IPCMD_KEY_MASK)
913 #define FEMC_IPCMD_KEY_GET(x) (((uint32_t)(x) & FEMC_IPCMD_KEY_MASK) >> FEMC_IPCMD_KEY_SHIFT)
914 
915 /*
916  * CMD (RW)
917  *
918  * SDRAM Commands:
919  * • 0x8: READ
920  * • 0x9: WRITE
921  * • 0xA: MODESET
922  * • 0xB: ACTIVE
923  * • 0xC: AUTO REFRESH
924  * • 0xD: SELF REFRESH
925  * • 0xE: PRECHARGE
926  * • 0xF: PRECHARGE ALL
927  * • Others: RSVD
928  * NOTE: SELF REFRESH is sent to all SDRAM devices because they shared same CLK pin.
929  */
930 #define FEMC_IPCMD_CMD_MASK (0xFFFFU)
931 #define FEMC_IPCMD_CMD_SHIFT (0U)
932 #define FEMC_IPCMD_CMD_SET(x) (((uint32_t)(x) << FEMC_IPCMD_CMD_SHIFT) & FEMC_IPCMD_CMD_MASK)
933 #define FEMC_IPCMD_CMD_GET(x) (((uint32_t)(x) & FEMC_IPCMD_CMD_MASK) >> FEMC_IPCMD_CMD_SHIFT)
934 
935 /* Bitfield definition for register: IPTX */
936 /*
937  * DAT (RW)
938  *
939  * Data
940  */
941 #define FEMC_IPTX_DAT_MASK (0xFFFFFFFFUL)
942 #define FEMC_IPTX_DAT_SHIFT (0U)
943 #define FEMC_IPTX_DAT_SET(x) (((uint32_t)(x) << FEMC_IPTX_DAT_SHIFT) & FEMC_IPTX_DAT_MASK)
944 #define FEMC_IPTX_DAT_GET(x) (((uint32_t)(x) & FEMC_IPTX_DAT_MASK) >> FEMC_IPTX_DAT_SHIFT)
945 
946 /* Bitfield definition for register: IPRX */
947 /*
948  * DAT (RW)
949  *
950  * Data
951  */
952 #define FEMC_IPRX_DAT_MASK (0xFFFFFFFFUL)
953 #define FEMC_IPRX_DAT_SHIFT (0U)
954 #define FEMC_IPRX_DAT_SET(x) (((uint32_t)(x) << FEMC_IPRX_DAT_SHIFT) & FEMC_IPRX_DAT_MASK)
955 #define FEMC_IPRX_DAT_GET(x) (((uint32_t)(x) & FEMC_IPRX_DAT_MASK) >> FEMC_IPRX_DAT_SHIFT)
956 
957 /* Bitfield definition for register: STAT0 */
958 /*
959  * IDLE (RO)
960  *
961  * Indicating whether it is in IDLE state.
962  * When IDLE=1, it is in IDLE state. There is no pending AXI command in internal queue and no
963  * pending device access.
964  */
965 #define FEMC_STAT0_IDLE_MASK (0x1U)
966 #define FEMC_STAT0_IDLE_SHIFT (0U)
967 #define FEMC_STAT0_IDLE_GET(x) (((uint32_t)(x) & FEMC_STAT0_IDLE_MASK) >> FEMC_STAT0_IDLE_SHIFT)
968 
969 /* Bitfield definition for register array: BR2 */
970 /*
971  * BASE (RW)
972  *
973  * Base Address
974  * This field determines high position 20 bits of SoC level Base Address. SoC level Base Address low
975  * position 12 bits are all zero.
976  */
977 #define FEMC_BR2_BASE_MASK (0xFFFFF000UL)
978 #define FEMC_BR2_BASE_SHIFT (12U)
979 #define FEMC_BR2_BASE_SET(x) (((uint32_t)(x) << FEMC_BR2_BASE_SHIFT) & FEMC_BR2_BASE_MASK)
980 #define FEMC_BR2_BASE_GET(x) (((uint32_t)(x) & FEMC_BR2_BASE_MASK) >> FEMC_BR2_BASE_SHIFT)
981 
982 /*
983  * SIZE (RW)
984  *
985  * Memory size
986  * 00000b - 4KB
987  * 00001b - 8KB
988  * 00010b - 16KB
989  * 00011b - 32KB
990  * 00100b - 64KB
991  * 00101b - 128KB
992  * 00110b - 256KB
993  * 00111b - 512KB
994  * 01000b - 1MB
995  * 01001b - 2MB
996  * 01010b - 4MB
997  * 01011b - 8MB
998  * 01100b - 16MB
999  * 01101b - 32MB
1000  * 01110b - 64MB
1001  * 01111b - 128MB
1002  * 10000b - 256MB
1003  * 10001b - 512MB
1004  * 10010b - 1GB
1005  * 10011b - 2GB
1006  * 10100-11111b - 4GB
1007  */
1008 #define FEMC_BR2_SIZE_MASK (0x3EU)
1009 #define FEMC_BR2_SIZE_SHIFT (1U)
1010 #define FEMC_BR2_SIZE_SET(x) (((uint32_t)(x) << FEMC_BR2_SIZE_SHIFT) & FEMC_BR2_SIZE_MASK)
1011 #define FEMC_BR2_SIZE_GET(x) (((uint32_t)(x) & FEMC_BR2_SIZE_MASK) >> FEMC_BR2_SIZE_SHIFT)
1012 
1013 /*
1014  * VLD (RW)
1015  *
1016  * Valid
1017  */
1018 #define FEMC_BR2_VLD_MASK (0x1U)
1019 #define FEMC_BR2_VLD_SHIFT (0U)
1020 #define FEMC_BR2_VLD_SET(x) (((uint32_t)(x) << FEMC_BR2_VLD_SHIFT) & FEMC_BR2_VLD_MASK)
1021 #define FEMC_BR2_VLD_GET(x) (((uint32_t)(x) & FEMC_BR2_VLD_MASK) >> FEMC_BR2_VLD_SHIFT)
1022 
1023 /* Bitfield definition for register: SRCTRL2 */
1024 /*
1025  * ADVH (RW)
1026  *
1027  * ADV hold state
1028  * 0b - ADV is high during address hold state
1029  * 1b - ADV is low during address hold state
1030  */
1031 #define FEMC_SRCTRL2_ADVH_MASK (0x800U)
1032 #define FEMC_SRCTRL2_ADVH_SHIFT (11U)
1033 #define FEMC_SRCTRL2_ADVH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL2_ADVH_SHIFT) & FEMC_SRCTRL2_ADVH_MASK)
1034 #define FEMC_SRCTRL2_ADVH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL2_ADVH_MASK) >> FEMC_SRCTRL2_ADVH_SHIFT)
1035 
1036 /*
1037  * ADVP (RW)
1038  *
1039  * ADV polarity
1040  * 0b - ADV is active low
1041  * 1b - ADV is active high
1042  */
1043 #define FEMC_SRCTRL2_ADVP_MASK (0x400U)
1044 #define FEMC_SRCTRL2_ADVP_SHIFT (10U)
1045 #define FEMC_SRCTRL2_ADVP_SET(x) (((uint32_t)(x) << FEMC_SRCTRL2_ADVP_SHIFT) & FEMC_SRCTRL2_ADVP_MASK)
1046 #define FEMC_SRCTRL2_ADVP_GET(x) (((uint32_t)(x) & FEMC_SRCTRL2_ADVP_MASK) >> FEMC_SRCTRL2_ADVP_SHIFT)
1047 
1048 /*
1049  * ADM (RW)
1050  *
1051  * address data mode
1052  * 00b - address and data MUX mode
1053  * 11b - address and data non-MUX mode
1054  */
1055 #define FEMC_SRCTRL2_ADM_MASK (0x300U)
1056 #define FEMC_SRCTRL2_ADM_SHIFT (8U)
1057 #define FEMC_SRCTRL2_ADM_SET(x) (((uint32_t)(x) << FEMC_SRCTRL2_ADM_SHIFT) & FEMC_SRCTRL2_ADM_MASK)
1058 #define FEMC_SRCTRL2_ADM_GET(x) (((uint32_t)(x) & FEMC_SRCTRL2_ADM_MASK) >> FEMC_SRCTRL2_ADM_SHIFT)
1059 
1060 /*
1061  * PORTSZ (RW)
1062  *
1063  * port size
1064  * 0b - 8bit
1065  * 1b - 16bit
1066  */
1067 #define FEMC_SRCTRL2_PORTSZ_MASK (0x1U)
1068 #define FEMC_SRCTRL2_PORTSZ_SHIFT (0U)
1069 #define FEMC_SRCTRL2_PORTSZ_SET(x) (((uint32_t)(x) << FEMC_SRCTRL2_PORTSZ_SHIFT) & FEMC_SRCTRL2_PORTSZ_MASK)
1070 #define FEMC_SRCTRL2_PORTSZ_GET(x) (((uint32_t)(x) & FEMC_SRCTRL2_PORTSZ_MASK) >> FEMC_SRCTRL2_PORTSZ_SHIFT)
1071 
1072 /* Bitfield definition for register: SRCTRL3 */
1073 /*
1074  * OEH (RW)
1075  *
1076  * OE high time, is OEH+1 clock cycles
1077  */
1078 #define FEMC_SRCTRL3_OEH_MASK (0xF0000000UL)
1079 #define FEMC_SRCTRL3_OEH_SHIFT (28U)
1080 #define FEMC_SRCTRL3_OEH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_OEH_SHIFT) & FEMC_SRCTRL3_OEH_MASK)
1081 #define FEMC_SRCTRL3_OEH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_OEH_MASK) >> FEMC_SRCTRL3_OEH_SHIFT)
1082 
1083 /*
1084  * OEL (RW)
1085  *
1086  * OE low time, is OEL+1 clock cycles
1087  */
1088 #define FEMC_SRCTRL3_OEL_MASK (0xF000000UL)
1089 #define FEMC_SRCTRL3_OEL_SHIFT (24U)
1090 #define FEMC_SRCTRL3_OEL_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_OEL_SHIFT) & FEMC_SRCTRL3_OEL_MASK)
1091 #define FEMC_SRCTRL3_OEL_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_OEL_MASK) >> FEMC_SRCTRL3_OEL_SHIFT)
1092 
1093 /*
1094  * WEH (RW)
1095  *
1096  * WE high time, is WEH+1 clock cycles
1097  */
1098 #define FEMC_SRCTRL3_WEH_MASK (0xF00000UL)
1099 #define FEMC_SRCTRL3_WEH_SHIFT (20U)
1100 #define FEMC_SRCTRL3_WEH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_WEH_SHIFT) & FEMC_SRCTRL3_WEH_MASK)
1101 #define FEMC_SRCTRL3_WEH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_WEH_MASK) >> FEMC_SRCTRL3_WEH_SHIFT)
1102 
1103 /*
1104  * WEL (RW)
1105  *
1106  * WE low time, is WEL+1 clock cycles
1107  */
1108 #define FEMC_SRCTRL3_WEL_MASK (0xF0000UL)
1109 #define FEMC_SRCTRL3_WEL_SHIFT (16U)
1110 #define FEMC_SRCTRL3_WEL_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_WEL_SHIFT) & FEMC_SRCTRL3_WEL_MASK)
1111 #define FEMC_SRCTRL3_WEL_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_WEL_MASK) >> FEMC_SRCTRL3_WEL_SHIFT)
1112 
1113 /*
1114  * AH (RW)
1115  *
1116  * Address hold time, is AH+1 clock cycles
1117  */
1118 #define FEMC_SRCTRL3_AH_MASK (0xF000U)
1119 #define FEMC_SRCTRL3_AH_SHIFT (12U)
1120 #define FEMC_SRCTRL3_AH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_AH_SHIFT) & FEMC_SRCTRL3_AH_MASK)
1121 #define FEMC_SRCTRL3_AH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_AH_MASK) >> FEMC_SRCTRL3_AH_SHIFT)
1122 
1123 /*
1124  * AS (RW)
1125  *
1126  * Address setup time, is AS+1 clock cycles
1127  */
1128 #define FEMC_SRCTRL3_AS_MASK (0xF00U)
1129 #define FEMC_SRCTRL3_AS_SHIFT (8U)
1130 #define FEMC_SRCTRL3_AS_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_AS_SHIFT) & FEMC_SRCTRL3_AS_MASK)
1131 #define FEMC_SRCTRL3_AS_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_AS_MASK) >> FEMC_SRCTRL3_AS_SHIFT)
1132 
1133 /*
1134  * CEH (RW)
1135  *
1136  * Chip enable hold time, is CEH+1 clock cycles
1137  */
1138 #define FEMC_SRCTRL3_CEH_MASK (0xF0U)
1139 #define FEMC_SRCTRL3_CEH_SHIFT (4U)
1140 #define FEMC_SRCTRL3_CEH_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_CEH_SHIFT) & FEMC_SRCTRL3_CEH_MASK)
1141 #define FEMC_SRCTRL3_CEH_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_CEH_MASK) >> FEMC_SRCTRL3_CEH_SHIFT)
1142 
1143 /*
1144  * CES (RW)
1145  *
1146  * Chip enable setup time, is CES+1 clock cycles
1147  */
1148 #define FEMC_SRCTRL3_CES_MASK (0xFU)
1149 #define FEMC_SRCTRL3_CES_SHIFT (0U)
1150 #define FEMC_SRCTRL3_CES_SET(x) (((uint32_t)(x) << FEMC_SRCTRL3_CES_SHIFT) & FEMC_SRCTRL3_CES_MASK)
1151 #define FEMC_SRCTRL3_CES_GET(x) (((uint32_t)(x) & FEMC_SRCTRL3_CES_MASK) >> FEMC_SRCTRL3_CES_SHIFT)
1152 
1153 /* Bitfield definition for register: DLYCFG */
1154 /*
1155  * OE (RW)
1156  *
1157  * delay clock output enable, should be set after setting DLYEN and DLYSEL
1158  */
1159 #define FEMC_DLYCFG_OE_MASK (0x2000U)
1160 #define FEMC_DLYCFG_OE_SHIFT (13U)
1161 #define FEMC_DLYCFG_OE_SET(x) (((uint32_t)(x) << FEMC_DLYCFG_OE_SHIFT) & FEMC_DLYCFG_OE_MASK)
1162 #define FEMC_DLYCFG_OE_GET(x) (((uint32_t)(x) & FEMC_DLYCFG_OE_MASK) >> FEMC_DLYCFG_OE_SHIFT)
1163 
1164 /*
1165  * DLYSEL (RW)
1166  *
1167  * delay line select, 0 for 1 cell, 31 for all 32 cells
1168  */
1169 #define FEMC_DLYCFG_DLYSEL_MASK (0x3EU)
1170 #define FEMC_DLYCFG_DLYSEL_SHIFT (1U)
1171 #define FEMC_DLYCFG_DLYSEL_SET(x) (((uint32_t)(x) << FEMC_DLYCFG_DLYSEL_SHIFT) & FEMC_DLYCFG_DLYSEL_MASK)
1172 #define FEMC_DLYCFG_DLYSEL_GET(x) (((uint32_t)(x) & FEMC_DLYCFG_DLYSEL_MASK) >> FEMC_DLYCFG_DLYSEL_SHIFT)
1173 
1174 /*
1175  * DLYEN (RW)
1176  *
1177  * delay line enable
1178  */
1179 #define FEMC_DLYCFG_DLYEN_MASK (0x1U)
1180 #define FEMC_DLYCFG_DLYEN_SHIFT (0U)
1181 #define FEMC_DLYCFG_DLYEN_SET(x) (((uint32_t)(x) << FEMC_DLYCFG_DLYEN_SHIFT) & FEMC_DLYCFG_DLYEN_MASK)
1182 #define FEMC_DLYCFG_DLYEN_GET(x) (((uint32_t)(x) & FEMC_DLYCFG_DLYEN_MASK) >> FEMC_DLYCFG_DLYEN_SHIFT)
1183 
1184 
1185 
1186 /* BR register group index macro definition */
1187 #define FEMC_BR_BASE0 (0UL)
1188 #define FEMC_BR_BASE1 (1UL)
1189 #define FEMC_BR_BASE6 (6UL)
1190 
1191 /* BR2 register group index macro definition */
1192 #define FEMC_BR2_BASE0 (0UL)
1193 #define FEMC_BR2_BASE1 (1UL)
1194 
1195 
1196 #endif /* HPM_FEMC_H */
Definition: hpm_femc_regs.h:12