]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_R5_UltraScale_MPSoC/RTOSDemo_R5_bsp/psu_cortexr5_0/libsrc/resetps_v1_0/src/xresetps_hw.h
Update Zynq, MPSoc Cortex-A53 and MPSoc Cortex-R5 demo projects to build with the...
[freertos] / FreeRTOS / Demo / CORTEX_R5_UltraScale_MPSoC / RTOSDemo_R5_bsp / psu_cortexr5_0 / libsrc / resetps_v1_0 / src / xresetps_hw.h
1 /******************************************************************************
2 *
3 * Copyright (C) 2017 Xilinx, Inc.  All rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 *
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
30 *
31 ******************************************************************************/
32 /****************************************************************************/
33 /**
34 *
35 * @file xresetps_hw.h
36 * @addtogroup xresetps_v1_0
37 * @{
38 *
39 * This file contains the hardware interface to the System Reset controller.
40 *
41 * <pre>
42 * MODIFICATION HISTORY:
43 * Ver   Who    Date     Changes
44 * ----- ------ -------- ---------------------------------------------
45 * 1.00  cjp    09/05/17 First release
46 * </pre>
47 *
48 ******************************************************************************/
49 #ifndef XRESETPS_HW_H           /* prevent circular inclusions */
50 #define XRESETPS_HW_H           /* by using protection macros */
51
52 /***************************** Include Files *********************************/
53 #include "xil_types.h"
54 #include "xil_assert.h"
55 #include "xil_io.h"
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
61 /************************** Constant Definitions *****************************/
62 /* Register address defines */
63 /* CRF_APB defines */
64 #define XRESETPS_CRF_APB_BASE         (0XFD1A0000U)
65 /* RST_FPD_TOP Address and mask definations */
66 #define XRESETPS_CRF_APB_RST_FPD_TOP \
67                                   ((XRESETPS_CRF_APB_BASE) + ((u32)0X00000100U))
68 #define PCIE_CFG_RESET_MASK       ((u32)0X00080000U)
69 #define PCIE_BRIDGE_RESET_MASK    ((u32)0X00040000U)
70 #define PCIE_CTRL_RESET_MASK      ((u32)0X00020000U)
71 #define DP_RESET_MASK             ((u32)0X00010000U)
72 #define SWDT_RESET_MASK           ((u32)0X00008000U)
73 #define AFI_FM5_RESET_MASK        ((u32)0X00001000U)
74 #define AFI_FM4_RESET_MASK        ((u32)0X00000800U)
75 #define AFI_FM3_RESET_MASK        ((u32)0X00000400U)
76 #define AFI_FM2_RESET_MASK        ((u32)0X00000200U)
77 #define AFI_FM1_RESET_MASK        ((u32)0X00000100U)
78 #define AFI_FM0_RESET_MASK        ((u32)0X00000080U)
79 #define GDMA_RESET_MASK           ((u32)0X00000040U)
80 #define GPU_PP1_RESET_MASK        ((u32)0X00000020U)
81 #define GPU_PP0_RESET_MASK        ((u32)0X00000010U)
82 #define GPU_RESET_MASK            ((u32)0X00000008U)
83 #define GT_RESET_MASK             ((u32)0X00000004U)
84 #define SATA_RESET_MASK           ((u32)0X00000002U)
85 /* RST_FPD_APU Address and mask definations */
86 #define XRESETPS_CRF_APB_RST_FPD_APU \
87                                   ((XRESETPS_CRF_APB_BASE) + ((u32)0X00000104U))
88 #define ACPU3_PWRON_RESET_MASK    ((u32)0X00002000U)
89 #define ACPU2_PWRON_RESET_MASK    ((u32)0X00001000U)
90 #define ACPU1_PWRON_RESET_MASK    ((u32)0X00000800U)
91 #define ACPU0_PWRON_RESET_MASK    ((u32)0X00000400U)
92 #define APU_L2_RESET_MASK         ((u32)0X00000100U)
93 #define ACPU3_RESET_MASK          ((u32)0X00000008U)
94 #define ACPU2_RESET_MASK          ((u32)0X00000004U)
95 #define ACPU1_RESET_MASK          ((u32)0X00000002U)
96 #define ACPU0_RESET_MASK          ((u32)0X00000001U)
97 /* RST_DDR_SS Address and mask definations */
98 #define XRESETPS_CRF_APB_RST_DDR_SS \
99                                   ((XRESETPS_CRF_APB_BASE) + ((u32)0X00000108U))
100 #define DDR_RESET_MASK            ((u32)0X00000008U)
101 #define DDR_APM_RESET_MASK        ((u32)0X00000004U)
102 /* APLL_CTRL Address and mask definations */
103 #define XRESETPS_CRF_APB_APLL_CTRL \
104                                   ((XRESETPS_CRF_APB_BASE) + ((u32)0X00000020U))
105 #define APLL_RESET_MASK           ((u32)0X00000001U)
106 /* DPLL_CTRL Address and mask definations */
107 #define XRESETPS_CRF_APB_DPLL_CTRL \
108                                   ((XRESETPS_CRF_APB_BASE) + ((u32)0X0000002CU))
109 #define DPLL_RESET_MASK           ((u32)0X00000001U)
110 /* VPLL_CTRL Address and mask definations */
111 #define XRESETPS_CRF_APB_VPLL_CTRL \
112                                   ((XRESETPS_CRF_APB_BASE) + ((u32)0X00000038U))
113 #define VPLL_RESET_MASK           ((u32)0X00000001U)
114
115 /* CRL_APB defines */
116 #define XRESETPS_CRL_APB_BASE     (0XFF5E0000U)
117 /* RESET_CTRL Address and mask definations */
118 #define XRESETPS_CRL_APB_RESET_CTRL \
119                                   ((XRESETPS_CRL_APB_BASE) + ((u32)0X00000218U))
120 #define SOFT_RESET_MASK           ((u32)0X00000010U)
121 /* RST_LPD_IOU0 Address and mask definations */
122 #define XRESETPS_CRL_APB_RST_LPD_IOU0 \
123                                   ((XRESETPS_CRL_APB_BASE) + ((u32)0X00000230U))
124 #define GEM0_RESET_MASK           ((u32)0X00000001U)
125 #define GEM1_RESET_MASK           ((u32)0X00000002U)
126 #define GEM2_RESET_MASK           ((u32)0X00000004U)
127 #define GEM3_RESET_MASK           ((u32)0X00000008U)
128 /* RST_LPD_IOU2 Address and mask definations */
129 #define XRESETPS_CRL_APB_RST_LPD_IOU2 \
130                                   ((XRESETPS_CRL_APB_BASE) + ((u32)0X00000238U))
131 #define QSPI_RESET_MASK           ((u32)0X00000001U)
132 #define UART0_RESET_MASK          ((u32)0X00000002U)
133 #define UART1_RESET_MASK          ((u32)0X00000004U)
134 #define SPI0_RESET_MASK           ((u32)0X00000008U)
135 #define SPI1_RESET_MASK           ((u32)0X00000010U)
136 #define SDIO0_RESET_MASK          ((u32)0X00000020U)
137 #define SDIO1_RESET_MASK          ((u32)0X00000040U)
138 #define CAN0_RESET_MASK           ((u32)0X00000080U)
139 #define CAN1_RESET_MASK           ((u32)0X00000100U)
140 #define I2C0_RESET_MASK           ((u32)0X00000200U)
141 #define I2C1_RESET_MASK           ((u32)0X00000400U)
142 #define TTC0_RESET_MASK           ((u32)0X00000800U)
143 #define TTC1_RESET_MASK           ((u32)0X00001000U)
144 #define TTC2_RESET_MASK           ((u32)0X00002000U)
145 #define TTC3_RESET_MASK           ((u32)0X00004000U)
146 #define SWDT_RESET_MASK           ((u32)0X00008000U)
147 #define NAND_RESET_MASK           ((u32)0X00010000U)
148 #define ADMA_RESET_MASK           ((u32)0X00020000U)
149 #define GPIO_RESET_MASK           ((u32)0X00040000U)
150 #define IOU_CC_RESET_MASK         ((u32)0X00080000U)
151 #define TIMESTAMP_RESET_MASK      ((u32)0X00100000U)
152 /* RST_LPD_TOP Address and mask definations */
153 #define XRESETPS_CRL_APB_RST_LPD_TOP \
154                                   ((XRESETPS_CRL_APB_BASE) + ((u32)0X0000023CU))
155 #define RPU_R50_RESET_MASK        ((u32)0X00000001U)
156 #define RPU_R51_RESET_MASK        ((u32)0X00000002U)
157 #define RPU_AMBA_RESET_MASK       ((u32)0X00000004U)
158 #define OCM_RESET_MASK            ((u32)0X00000008U)
159 #define RPU_PGE_RESET_MASK        ((u32)0X00000010U)
160 #define USB0_CORERESET_MASK       ((u32)0X00000040U)
161 #define USB1_CORERESET_MASK       ((u32)0X00000080U)
162 #define USB0_HIBERRESET_MASK      ((u32)0X00000100U)
163 #define USB1_HIBERRESET_MASK      ((u32)0X00000200U)
164 #define USB0_APB_RESET_MASK       ((u32)0X00000400U)
165 #define USB1_APB_RESET_MASK       ((u32)0X00000800U)
166 #define IPI_RESET_MASK            ((u32)0X00004000U)
167 #define APM_RESET_MASK            ((u32)0X00008000U)
168 #define RTC_RESET_MASK            ((u32)0X00010000U)
169 #define SYSMON_RESET_MASK         ((u32)0X00020000U)
170 #define AFI_FM6_RESET_MASK        ((u32)0X00080000U)
171 #define LPD_SWDT_RESET_MASK       ((u32)0X00100000U)
172 #define FPD_RESET_MASK            ((u32)0X00800000U)
173 /* RST_LPD_DBG Address and mask definations */
174 #define XRESETPS_CRL_APB_RST_LPD_DBG \
175                                   ((XRESETPS_CRL_APB_BASE) + ((u32)0X00000240U))
176 #define RPU_DBG1_RESET_MASK       ((u32)0X00000020U)
177 #define RPU_DBG0_RESET_MASK       ((u32)0X00000010U)
178 #define DBG_LPD_RESET_MASK        ((u32)0X00000002U)
179 #define DBG_FPD_RESET_MASK        ((u32)0X00000001U)
180 /* IOPLL_CTRL Address and mask definations */
181 #define XRESETPS_CRL_APB_IOPLL_CTRL \
182                                   ((XRESETPS_CRL_APB_BASE) + ((u32)0X00000020U))
183 #define IOPLL_RESET_MASK          ((u32)0X00000001U)
184 /* RPLL_CTRL Address and mask definations */
185 #define XRESETPS_CRL_APB_RPLL_CTRL \
186                                   ((XRESETPS_CRL_APB_BASE) + ((u32)0X00000030U))
187 #define RPLL_RESET_MASK           ((u32)0X00000001U)
188 #define RPLL_BYPASS_MASK          ((u32)0X00000008U)
189
190 /* PMU_IOM defines */
191 #define XRESETPS_PMU_IOM_BASE     (0XFFD40000U)
192 /* PMU_IOM_GPO3 Address and mask definations */
193 #define XRESETPS_PMU_IOM_GPO3_CTRL \
194                                   ((XRESETPS_PMU_IOM_BASE) + ((u32)0X0000001CU))
195 #define GPO3_PL0_RESET_MASK       ((u32)0X00000001U)
196 #define GPO3_PL1_RESET_MASK       ((u32)0X00000002U)
197 #define GPO3_PL2_RESET_MASK       ((u32)0X00000004U)
198 #define GPO3_PL3_RESET_MASK       ((u32)0X00000008U)
199 #define GPO3_PL4_RESET_MASK       ((u32)0X00000010U)
200 #define GPO3_PL5_RESET_MASK       ((u32)0X00000020U)
201 #define GPO3_PL6_RESET_MASK       ((u32)0X00000040U)
202 #define GPO3_PL7_RESET_MASK       ((u32)0X00000080U)
203 #define GPO3_PL8_RESET_MASK       ((u32)0X00000100U)
204 #define GPO3_PL9_RESET_MASK       ((u32)0X00000200U)
205 #define GPO3_PL10_RESET_MASK      ((u32)0X00000400U)
206 #define GPO3_PL11_RESET_MASK      ((u32)0X00000800U)
207 #define GPO3_PL12_RESET_MASK      ((u32)0X00001000U)
208 #define GPO3_PL13_RESET_MASK      ((u32)0X00002000U)
209 #define GPO3_PL14_RESET_MASK      ((u32)0X00004000U)
210 #define GPO3_PL15_RESET_MASK      ((u32)0X00008000U)
211 #define GPO3_PL16_RESET_MASK      ((u32)0X00010000U)
212 #define GPO3_PL17_RESET_MASK      ((u32)0X00020000U)
213 #define GPO3_PL18_RESET_MASK      ((u32)0X00040000U)
214 #define GPO3_PL19_RESET_MASK      ((u32)0X00080000U)
215 #define GPO3_PL20_RESET_MASK      ((u32)0X00100000U)
216 #define GPO3_PL21_RESET_MASK      ((u32)0X00200000U)
217 #define GPO3_PL22_RESET_MASK      ((u32)0X00400000U)
218 #define GPO3_PL23_RESET_MASK      ((u32)0X00800000U)
219 #define GPO3_PL24_RESET_MASK      ((u32)0X01000000U)
220 #define GPO3_PL25_RESET_MASK      ((u32)0X02000000U)
221 #define GPO3_PL26_RESET_MASK      ((u32)0X04000000U)
222 #define GPO3_PL27_RESET_MASK      ((u32)0X08000000U)
223 #define GPO3_PL28_RESET_MASK      ((u32)0X10000000U)
224 #define GPO3_PL29_RESET_MASK      ((u32)0X20000000U)
225 #define GPO3_PL30_RESET_MASK      ((u32)0X40000000U)
226 #define GPO3_PL31_RESET_MASK      ((u32)0X80000000U)
227
228 /* PMU_LCL defines */
229 #define XRESETPS_PMU_LCL_BASE     (0XFFD60000U)
230 /* GPO Read control address */
231 #define XRESETPS_PMU_LCL_READ_CTRL \
232                                   ((XRESETPS_PMU_LCL_BASE) + ((u32)0X0000021CU))
233
234 /* PMU_GLB defines */
235 #define XRESETPS_PMU_GLB_BASE     (0XFFD80000U)
236 /* PMU_GLB_RST Address and mask definations */
237 #define XRESETPS_PMU_GLB_RST_CTRL ((XRESETPS_PMU_GLB_BASE) + ((u32)0X00000608U))
238 #define RPU_LS_RESET_MASK         ((u32)0X00000100U)
239 #define FPD_APU_RESET_MASK        ((u32)0X00000200U)
240 #define PS_ONLY_RESET_MASK        ((u32)0X00000400U)
241 /* PMU_GLB_PS Address and mask definations */
242 #define XRESETPS_PMU_GLB_PS_CTRL  ((XRESETPS_PMU_GLB_BASE) + ((u32)0X00000004U))
243 #define PROG_ENABLE_MASK          ((u32)0X00000002U)
244 #define PROG_GATE_MASK            ((u32)0X00000001U)
245 /* PMU_GLB_AIB Address and mask definations */
246 #define XRESETPS_PMU_GLB_AIB_CTRL ((XRESETPS_PMU_GLB_BASE) + ((u32)0X00000600U))
247 #define LPD_AFI_FM_ISO_MASK       ((u32)0X00000001U)
248 #define LPD_AFI_FS_ISO_MASK       ((u32)0X00000002U)
249 #define FPD_AFI_FM_ISO_MASK       ((u32)0X00000004U)
250 #define FPD_AFI_FS_ISO_MASK       ((u32)0X00000008U)
251 #define AIB_ISO_CTRL_MASK         (LPD_AFI_FM_ISO_MASK | LPD_AFI_FS_ISO_MASK | \
252                                       FPD_AFI_FM_ISO_MASK | FPD_AFI_FS_ISO_MASK)
253 /* PMU_GLB_AIB status Address and mask definations */
254 #define XRESETPS_PMU_GLB_AIB_STATUS \
255                                   ((XRESETPS_PMU_GLB_BASE) + ((u32)0X00000604U))
256 #define AIB_ISO_STATUS_MASK       (AIB_ISO_CTRL_MASK)
257 /* PMU_GLB_PWR status Address and mask definations */
258 #define XRESETPS_PMU_GLB_PWR_STATUS \
259                                   ((XRESETPS_PMU_GLB_BASE) + ((u32)0X00000100U))
260 #define FPD_PSCHK_MASK            ((u32)0x00400000U)
261 #define PCIE_CTRL_PSCHK_MASK      (FPD_PSCHK_MASK)
262 #define DP_PSCHK_MASK             (FPD_PSCHK_MASK)
263 #define SATA_PSCHK_MASK           (FPD_PSCHK_MASK)
264 #define R50_PSCHK_MASK            ((u32)0x00000400U)
265 #define R51_PSCHK_MASK            ((u32)0x00000800U)
266 #define GPU_PP0_PSCHK_MASK        (((u32)0x00000010U) | (FPD_PSCHK_MASK))
267 #define GPU_PP1_PSCHK_MASK        (((u32)0x00000020U) | (FPD_PSCHK_MASK))
268 #define GPU_PSCHK_MASK            ((GPU_PP0_PSCHK_MASK) | \
269                                         (GPU_PP1_PSCHK_MASK) | (FPD_PSCHK_MASK))
270
271 /* LPD_SLCR defines */
272 #define XRESETPS_LPD_SCR_BASE     (0XFF410000U)
273 /* LPD_SCR_AXIISO_REQ and LPD_SCR_AXIISO_ACK Address and mask definations */
274 #define XRESETPS_LPD_SCR_AXIISO_REQ_CTRL \
275                                   ((XRESETPS_LPD_SCR_BASE) + ((u32)0X00003030U))
276 #define XRESETPS_LPD_SCR_AXIISO_ACK_CTRL \
277                                   ((XRESETPS_LPD_SCR_BASE) + ((u32)0X00003040U))
278 #define RPU0_MASTER_ISO_MASK      ((u32)0X00010000U)
279 #define RPU1_MASTER_ISO_MASK      ((u32)0X00020000U)
280 #define RPU_MASTER_ISO_MASK       (RPU0_MASTER_ISO_MASK | RPU1_MASTER_ISO_MASK)
281 #define RPU0_SLAVE_ISO_MASK       ((u32)0X00040000U)
282 #define RPU1_SLAVE_ISO_MASK       ((u32)0X00080000U)
283 #define RPU_SLAVE_ISO_MASK        (RPU0_SLAVE_ISO_MASK | RPU1_SLAVE_ISO_MASK)
284 #define FPD_OCM_ISO_MASK          ((u32)0X00000008U)
285 #define FPD_LPDIBS_ISO_MASK       ((u32)0X00000004U)
286 #define AFIFS1_ISO_MASK           ((u32)0X00000002U)
287 #define AFIFS0_ISO_MASK           ((u32)0X00000001U)
288 #define FPD_TO_LPD_ISO_MASK       (FPD_LPDIBS_ISO_MASK | FPD_OCM_ISO_MASK | \
289                                               AFIFS0_ISO_MASK | AFIFS1_ISO_MASK)
290 #define LPD_DDR_ISO_MASK          ((u32)0X08000000U)
291 #define FPD_MAIN_ISO_MASK         ((u32)0X01000000U)
292 #define LPD_TO_FPD_ISO_MASK       (LPD_DDR_ISO_MASK | FPD_MAIN_ISO_MASK)
293 /* LPD_SLCR_APBISO_REQ Address and mask definations */
294 #define XRESETPS_LPD_SLCR_APBISO_REQ_CTRL \
295                                   ((XRESETPS_LPD_SCR_BASE) + ((u32)0X00003048U))
296 #define GPU_ISO_MASK              ((u32)0X00000001U)
297
298 /* CSU defines */
299 #define XRESETPS_CSU_BASE         (0xFFCA0000U)
300 #define XRESETPS_CSU_VERSION_REG  ((XRESETPS_CSU_BASE) + ((u32)0x00000044U))
301 #define XRESETPS_PLATFORM_PS_VER1 ((u32)0x00000000U)
302 #define PS_VERSION_MASK           ((u32)0x0000000FU)
303
304 /* Timeout delay defines */
305 #define XRESETPS_RST_PROP_DELAY   (0xFU)
306 #define XRESETPS_AIB_ISO_DELAY    (0xFU)
307 #define XRESETPS_AIB_PSPL_DELAY   (0xFU)
308 #define XRESETPS_PULSE_PROP_DELAY (0xFU)
309
310 /* AIB ack reconfirmation count */
311 #define XRESETPS_AIB_PSPL_RECONFIRM_CNT \
312                                   (0x2U)
313
314 /**************************** Type Definitions *******************************/
315
316 /***************** Macros (Inline Functions) Definitions *********************/
317
318 /************************** Function Prototypes ******************************/
319
320
321 /************************** Variable Definitions *****************************/
322
323 #ifdef __cplusplus
324 }
325 #endif
326 #endif /* end of protection macro */
327 /** @} */