1 /*
2  * Copyright 1997-2016 Freescale Semiconductor, Inc.
3  * Copyright 2016-2024 NXP
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 /*!
9  * @file S32Z2_GPR1.h
10  * @version 2.3
11  * @date 2024-05-03
12  * @brief Peripheral Access Layer for S32Z2_GPR1
13  *
14  * This file contains register definitions and macros for easy access to their
15  * bit fields.
16  *
17  * This file assumes LITTLE endian system.
18  */
19 
20 /**
21 * @page misra_violations MISRA-C:2012 violations
22 *
23 * @section [global]
24 * Violates MISRA 2012 Advisory Rule 2.3, local typedef not referenced
25 * The SoC header defines typedef for all modules.
26 *
27 * @section [global]
28 * Violates MISRA 2012 Advisory Rule 2.5, local macro not referenced
29 * The SoC header defines macros for all modules and registers.
30 *
31 * @section [global]
32 * Violates MISRA 2012 Advisory Directive 4.9, Function-like macro
33 * These are generated macros used for accessing the bit-fields from registers.
34 *
35 * @section [global]
36 * Violates MISRA 2012 Required Rule 5.1, identifier clash
37 * The supported compilers use more than 31 significant characters for identifiers.
38 *
39 * @section [global]
40 * Violates MISRA 2012 Required Rule 5.2, identifier clash
41 * The supported compilers use more than 31 significant characters for identifiers.
42 *
43 * @section [global]
44 * Violates MISRA 2012 Required Rule 5.4, identifier clash
45 * The supported compilers use more than 31 significant characters for identifiers.
46 *
47 * @section [global]
48 * Violates MISRA 2012 Required Rule 5.5, identifier clash
49 * The supported compilers use more than 31 significant characters for identifiers.
50 *
51 * @section [global]
52 * Violates MISRA 2012 Required Rule 21.1, defined macro '__I' is reserved to the compiler
53 * This type qualifier is needed to ensure correct I/O access and addressing.
54 */
55 
56 /* Prevention from multiple including the same memory map */
57 #if !defined(S32Z2_GPR1_H_)  /* Check if memory map has not been already included */
58 #define S32Z2_GPR1_H_
59 
60 #include "S32Z2_COMMON.h"
61 
62 /* ----------------------------------------------------------------------------
63    -- GPR1 Peripheral Access Layer
64    ---------------------------------------------------------------------------- */
65 
66 /*!
67  * @addtogroup GPR1_Peripheral_Access_Layer GPR1 Peripheral Access Layer
68  * @{
69  */
70 
71 /** GPR1 - Register Layout Typedef */
72 typedef struct {
73   __IO uint32_t LVFCCUGD1;                         /**< VFCCU Global DID register 1, offset: 0x0 */
74   __IO uint32_t LVFCCULD3;                         /**< VFCCU Local DID register 3, offset: 0x4 */
75   __IO uint32_t LVFCCULD4;                         /**< VFCCU Local DID register 4, offset: 0x8 */
76   __IO uint32_t LVFCCULD5;                         /**< VFCCU Local DID register 5, offset: 0xC */
77   uint8_t RESERVED_0[20];
78   __IO uint32_t DESTC2;                            /**< Source Control for RGMII TX CLK, offset: 0x24 */
79   uint8_t RESERVED_1[12];
80   __IO uint32_t FUNCC2;                            /**< Zipwire Configuration, offset: 0x34 */
81   uint8_t RESERVED_2[12];
82   __I  uint32_t INITM1;                            /**< NoC Initiator NIU Timeout Status, offset: 0x44 */
83   __I  uint32_t TARGTMS1;                          /**< NoC Target NIU Timeout Status, offset: 0x48 */
84   __IO uint32_t TARGTMC1;                          /**< NoC Target NIU Timeout Control, offset: 0x4C */
85   uint8_t RESERVED_3[4];
86   __IO uint32_t NETCC0;                            /**< NETC Control register 0, offset: 0x54 */
87   __IO uint32_t NETCC1;                            /**< NETC Control register 1, offset: 0x58 */
88   __IO uint32_t CLKOUT1SEL;                        /**< CLKOUT_1 MUX select, offset: 0x5C */
89   uint8_t RESERVED_4[20];
90   __IO uint32_t XPAR1;                             /**< Interface parity control and status register, offset: 0x74 */
91 } GPR1_Type, *GPR1_MemMapPtr;
92 
93 /** Number of instances of the GPR1 module. */
94 #define GPR1_INSTANCE_COUNT                      (1u)
95 
96 /* GPR1 - Peripheral instance base addresses */
97 /** Peripheral GPR1 base address */
98 #define IP_GPR1_BASE                             (0x40860000u)
99 /** Peripheral GPR1 base pointer */
100 #define IP_GPR1                                  ((GPR1_Type *)IP_GPR1_BASE)
101 /** Array initializer of GPR1 peripheral base addresses */
102 #define IP_GPR1_BASE_ADDRS                       { IP_GPR1_BASE }
103 /** Array initializer of GPR1 peripheral base pointers */
104 #define IP_GPR1_BASE_PTRS                        { IP_GPR1 }
105 
106 /* ----------------------------------------------------------------------------
107    -- GPR1 Register Masks
108    ---------------------------------------------------------------------------- */
109 
110 /*!
111  * @addtogroup GPR1_Register_Masks GPR1 Register Masks
112  * @{
113  */
114 
115 /*! @name LVFCCUGD1 - VFCCU Global DID register 1 */
116 /*! @{ */
117 
118 #define GPR1_LVFCCUGD1_FHID_MASK                 (0xFU)
119 #define GPR1_LVFCCUGD1_FHID_SHIFT                (0U)
120 #define GPR1_LVFCCUGD1_FHID_WIDTH                (4U)
121 #define GPR1_LVFCCUGD1_FHID(x)                   (((uint32_t)(((uint32_t)(x)) << GPR1_LVFCCUGD1_FHID_SHIFT)) & GPR1_LVFCCUGD1_FHID_MASK)
122 /*! @} */
123 
124 /*! @name LVFCCULD3 - VFCCU Local DID register 3 */
125 /*! @{ */
126 
127 #define GPR1_LVFCCULD3_FHID_MASK                 (0xFFFFFFFFU)
128 #define GPR1_LVFCCULD3_FHID_SHIFT                (0U)
129 #define GPR1_LVFCCULD3_FHID_WIDTH                (32U)
130 #define GPR1_LVFCCULD3_FHID(x)                   (((uint32_t)(((uint32_t)(x)) << GPR1_LVFCCULD3_FHID_SHIFT)) & GPR1_LVFCCULD3_FHID_MASK)
131 /*! @} */
132 
133 /*! @name LVFCCULD4 - VFCCU Local DID register 4 */
134 /*! @{ */
135 
136 #define GPR1_LVFCCULD4_FHID_MASK                 (0xFFFFFFFFU)
137 #define GPR1_LVFCCULD4_FHID_SHIFT                (0U)
138 #define GPR1_LVFCCULD4_FHID_WIDTH                (32U)
139 #define GPR1_LVFCCULD4_FHID(x)                   (((uint32_t)(((uint32_t)(x)) << GPR1_LVFCCULD4_FHID_SHIFT)) & GPR1_LVFCCULD4_FHID_MASK)
140 /*! @} */
141 
142 /*! @name LVFCCULD5 - VFCCU Local DID register 5 */
143 /*! @{ */
144 
145 #define GPR1_LVFCCULD5_FHID_MASK                 (0xFFFFFFFFU)
146 #define GPR1_LVFCCULD5_FHID_SHIFT                (0U)
147 #define GPR1_LVFCCULD5_FHID_WIDTH                (32U)
148 #define GPR1_LVFCCULD5_FHID(x)                   (((uint32_t)(((uint32_t)(x)) << GPR1_LVFCCULD5_FHID_SHIFT)) & GPR1_LVFCCULD5_FHID_MASK)
149 /*! @} */
150 
151 /*! @name DESTC2 - Source Control for RGMII TX CLK */
152 /*! @{ */
153 
154 #define GPR1_DESTC2_CTRL_MASK                    (0xFFFFFFFFU)
155 #define GPR1_DESTC2_CTRL_SHIFT                   (0U)
156 #define GPR1_DESTC2_CTRL_WIDTH                   (32U)
157 #define GPR1_DESTC2_CTRL(x)                      (((uint32_t)(((uint32_t)(x)) << GPR1_DESTC2_CTRL_SHIFT)) & GPR1_DESTC2_CTRL_MASK)
158 /*! @} */
159 
160 /*! @name FUNCC2 - Zipwire Configuration */
161 /*! @{ */
162 
163 #define GPR1_FUNCC2_CTRL_MASK                    (0xFFFFFFFFU)
164 #define GPR1_FUNCC2_CTRL_SHIFT                   (0U)
165 #define GPR1_FUNCC2_CTRL_WIDTH                   (32U)
166 #define GPR1_FUNCC2_CTRL(x)                      (((uint32_t)(((uint32_t)(x)) << GPR1_FUNCC2_CTRL_SHIFT)) & GPR1_FUNCC2_CTRL_MASK)
167 /*! @} */
168 
169 /*! @name INITM1 - NoC Initiator NIU Timeout Status */
170 /*! @{ */
171 
172 #define GPR1_INITM1_STAT_MASK                    (0xFFFFFFFFU)
173 #define GPR1_INITM1_STAT_SHIFT                   (0U)
174 #define GPR1_INITM1_STAT_WIDTH                   (32U)
175 #define GPR1_INITM1_STAT(x)                      (((uint32_t)(((uint32_t)(x)) << GPR1_INITM1_STAT_SHIFT)) & GPR1_INITM1_STAT_MASK)
176 /*! @} */
177 
178 /*! @name TARGTMS1 - NoC Target NIU Timeout Status */
179 /*! @{ */
180 
181 #define GPR1_TARGTMS1_STAT_MASK                  (0xFFFFFFFFU)
182 #define GPR1_TARGTMS1_STAT_SHIFT                 (0U)
183 #define GPR1_TARGTMS1_STAT_WIDTH                 (32U)
184 #define GPR1_TARGTMS1_STAT(x)                    (((uint32_t)(((uint32_t)(x)) << GPR1_TARGTMS1_STAT_SHIFT)) & GPR1_TARGTMS1_STAT_MASK)
185 /*! @} */
186 
187 /*! @name TARGTMC1 - NoC Target NIU Timeout Control */
188 /*! @{ */
189 
190 #define GPR1_TARGTMC1_EN_MASK                    (0xFFFFFFFFU)
191 #define GPR1_TARGTMC1_EN_SHIFT                   (0U)
192 #define GPR1_TARGTMC1_EN_WIDTH                   (32U)
193 #define GPR1_TARGTMC1_EN(x)                      (((uint32_t)(((uint32_t)(x)) << GPR1_TARGTMC1_EN_SHIFT)) & GPR1_TARGTMC1_EN_MASK)
194 /*! @} */
195 
196 /*! @name NETCC0 - NETC Control register 0 */
197 /*! @{ */
198 
199 #define GPR1_NETCC0_IERBLOCK_MASK                (0x1U)
200 #define GPR1_NETCC0_IERBLOCK_SHIFT               (0U)
201 #define GPR1_NETCC0_IERBLOCK_WIDTH               (1U)
202 #define GPR1_NETCC0_IERBLOCK(x)                  (((uint32_t)(((uint32_t)(x)) << GPR1_NETCC0_IERBLOCK_SHIFT)) & GPR1_NETCC0_IERBLOCK_MASK)
203 /*! @} */
204 
205 /*! @name NETCC1 - NETC Control register 1 */
206 /*! @{ */
207 
208 #define GPR1_NETCC1_LINK0MIIP_MASK               (0xFU)
209 #define GPR1_NETCC1_LINK0MIIP_SHIFT              (0U)
210 #define GPR1_NETCC1_LINK0MIIP_WIDTH              (4U)
211 #define GPR1_NETCC1_LINK0MIIP(x)                 (((uint32_t)(((uint32_t)(x)) << GPR1_NETCC1_LINK0MIIP_SHIFT)) & GPR1_NETCC1_LINK0MIIP_MASK)
212 
213 #define GPR1_NETCC1_LINK1MIIP_MASK               (0xF0U)
214 #define GPR1_NETCC1_LINK1MIIP_SHIFT              (4U)
215 #define GPR1_NETCC1_LINK1MIIP_WIDTH              (4U)
216 #define GPR1_NETCC1_LINK1MIIP(x)                 (((uint32_t)(((uint32_t)(x)) << GPR1_NETCC1_LINK1MIIP_SHIFT)) & GPR1_NETCC1_LINK1MIIP_MASK)
217 /*! @} */
218 
219 /*! @name CLKOUT1SEL - CLKOUT_1 MUX select */
220 /*! @{ */
221 
222 #define GPR1_CLKOUT1SEL_MUXSEL_MASK              (0x3FU)
223 #define GPR1_CLKOUT1SEL_MUXSEL_SHIFT             (0U)
224 #define GPR1_CLKOUT1SEL_MUXSEL_WIDTH             (6U)
225 #define GPR1_CLKOUT1SEL_MUXSEL(x)                (((uint32_t)(((uint32_t)(x)) << GPR1_CLKOUT1SEL_MUXSEL_SHIFT)) & GPR1_CLKOUT1SEL_MUXSEL_MASK)
226 /*! @} */
227 
228 /*! @name XPAR1 - Interface parity control and status register */
229 /*! @{ */
230 
231 #define GPR1_XPAR1_DIS_MASK                      (0x1U)
232 #define GPR1_XPAR1_DIS_SHIFT                     (0U)
233 #define GPR1_XPAR1_DIS_WIDTH                     (1U)
234 #define GPR1_XPAR1_DIS(x)                        (((uint32_t)(((uint32_t)(x)) << GPR1_XPAR1_DIS_SHIFT)) & GPR1_XPAR1_DIS_MASK)
235 
236 #define GPR1_XPAR1_STAT_MASK                     (0x100U)
237 #define GPR1_XPAR1_STAT_SHIFT                    (8U)
238 #define GPR1_XPAR1_STAT_WIDTH                    (1U)
239 #define GPR1_XPAR1_STAT(x)                       (((uint32_t)(((uint32_t)(x)) << GPR1_XPAR1_STAT_SHIFT)) & GPR1_XPAR1_STAT_MASK)
240 /*! @} */
241 
242 /*!
243  * @}
244  */ /* end of group GPR1_Register_Masks */
245 
246 /*!
247  * @}
248  */ /* end of group GPR1_Peripheral_Access_Layer */
249 
250 #endif  /* #if !defined(S32Z2_GPR1_H_) */
251