1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
2 
3 /* This file is autogenerated by cml-utils 2021-10-10 13:25:08 +0200.
4  * Commit ID: 26db2002924973d36a30b369c94f025a678fe9ea (dirty)
5  */
6 
7 #ifndef _LAN966X_REGS_H_
8 #define _LAN966X_REGS_H_
9 
10 #include <linux/bitfield.h>
11 #include <linux/types.h>
12 #include <linux/bug.h>
13 
14 enum lan966x_target {
15 	TARGET_AFI = 2,
16 	TARGET_ANA = 3,
17 	TARGET_CHIP_TOP = 5,
18 	TARGET_CPU = 6,
19 	TARGET_DEV = 13,
20 	TARGET_FDMA = 21,
21 	TARGET_GCB = 27,
22 	TARGET_ORG = 36,
23 	TARGET_PTP = 41,
24 	TARGET_QS = 42,
25 	TARGET_QSYS = 46,
26 	TARGET_REW = 47,
27 	TARGET_SYS = 52,
28 	TARGET_VCAP = 61,
29 	NUM_TARGETS = 66
30 };
31 
32 #define __REG(...)    __VA_ARGS__
33 
34 /*      AFI:PORT_TBL:PORT_FRM_OUT */
35 #define AFI_PORT_FRM_OUT(g)       __REG(TARGET_AFI, 0, 1, 98816, g, 10, 8, 0, 0, 1, 4)
36 
37 #define AFI_PORT_FRM_OUT_FRM_OUT_CNT             GENMASK(26, 16)
38 #define AFI_PORT_FRM_OUT_FRM_OUT_CNT_SET(x)\
39 	FIELD_PREP(AFI_PORT_FRM_OUT_FRM_OUT_CNT, x)
40 #define AFI_PORT_FRM_OUT_FRM_OUT_CNT_GET(x)\
41 	FIELD_GET(AFI_PORT_FRM_OUT_FRM_OUT_CNT, x)
42 
43 /*      AFI:PORT_TBL:PORT_CFG */
44 #define AFI_PORT_CFG(g)           __REG(TARGET_AFI, 0, 1, 98816, g, 10, 8, 4, 0, 1, 4)
45 
46 #define AFI_PORT_CFG_FC_SKIP_TTI_INJ             BIT(16)
47 #define AFI_PORT_CFG_FC_SKIP_TTI_INJ_SET(x)\
48 	FIELD_PREP(AFI_PORT_CFG_FC_SKIP_TTI_INJ, x)
49 #define AFI_PORT_CFG_FC_SKIP_TTI_INJ_GET(x)\
50 	FIELD_GET(AFI_PORT_CFG_FC_SKIP_TTI_INJ, x)
51 
52 #define AFI_PORT_CFG_FRM_OUT_MAX                 GENMASK(9, 0)
53 #define AFI_PORT_CFG_FRM_OUT_MAX_SET(x)\
54 	FIELD_PREP(AFI_PORT_CFG_FRM_OUT_MAX, x)
55 #define AFI_PORT_CFG_FRM_OUT_MAX_GET(x)\
56 	FIELD_GET(AFI_PORT_CFG_FRM_OUT_MAX, x)
57 
58 /*      ANA:ANA:ADVLEARN */
59 #define ANA_ADVLEARN              __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 0, 0, 1, 4)
60 
61 #define ANA_ADVLEARN_VLAN_CHK                    BIT(0)
62 #define ANA_ADVLEARN_VLAN_CHK_SET(x)\
63 	FIELD_PREP(ANA_ADVLEARN_VLAN_CHK, x)
64 #define ANA_ADVLEARN_VLAN_CHK_GET(x)\
65 	FIELD_GET(ANA_ADVLEARN_VLAN_CHK, x)
66 
67 /*      ANA:ANA:VLANMASK */
68 #define ANA_VLANMASK              __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 8, 0, 1, 4)
69 
70 /*      ANA:ANA:ANAINTR */
71 #define ANA_ANAINTR               __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 16, 0, 1, 4)
72 
73 #define ANA_ANAINTR_INTR                         BIT(1)
74 #define ANA_ANAINTR_INTR_SET(x)\
75 	FIELD_PREP(ANA_ANAINTR_INTR, x)
76 #define ANA_ANAINTR_INTR_GET(x)\
77 	FIELD_GET(ANA_ANAINTR_INTR, x)
78 
79 #define ANA_ANAINTR_INTR_ENA                     BIT(0)
80 #define ANA_ANAINTR_INTR_ENA_SET(x)\
81 	FIELD_PREP(ANA_ANAINTR_INTR_ENA, x)
82 #define ANA_ANAINTR_INTR_ENA_GET(x)\
83 	FIELD_GET(ANA_ANAINTR_INTR_ENA, x)
84 
85 /*      ANA:ANA:AUTOAGE */
86 #define ANA_AUTOAGE               __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 44, 0, 1, 4)
87 
88 #define ANA_AUTOAGE_AGE_PERIOD                   GENMASK(20, 1)
89 #define ANA_AUTOAGE_AGE_PERIOD_SET(x)\
90 	FIELD_PREP(ANA_AUTOAGE_AGE_PERIOD, x)
91 #define ANA_AUTOAGE_AGE_PERIOD_GET(x)\
92 	FIELD_GET(ANA_AUTOAGE_AGE_PERIOD, x)
93 
94 /*      ANA:ANA:MIRRORPORTS */
95 #define ANA_MIRRORPORTS           __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 60, 0, 1, 4)
96 
97 #define ANA_MIRRORPORTS_MIRRORPORTS              GENMASK(8, 0)
98 #define ANA_MIRRORPORTS_MIRRORPORTS_SET(x)\
99 	FIELD_PREP(ANA_MIRRORPORTS_MIRRORPORTS, x)
100 #define ANA_MIRRORPORTS_MIRRORPORTS_GET(x)\
101 	FIELD_GET(ANA_MIRRORPORTS_MIRRORPORTS, x)
102 
103 /*      ANA:ANA:EMIRRORPORTS */
104 #define ANA_EMIRRORPORTS          __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 64, 0, 1, 4)
105 
106 #define ANA_EMIRRORPORTS_EMIRRORPORTS            GENMASK(8, 0)
107 #define ANA_EMIRRORPORTS_EMIRRORPORTS_SET(x)\
108 	FIELD_PREP(ANA_EMIRRORPORTS_EMIRRORPORTS, x)
109 #define ANA_EMIRRORPORTS_EMIRRORPORTS_GET(x)\
110 	FIELD_GET(ANA_EMIRRORPORTS_EMIRRORPORTS, x)
111 
112 /*      ANA:ANA:FLOODING */
113 #define ANA_FLOODING(r)           __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 68, r, 8, 4)
114 
115 #define ANA_FLOODING_FLD_UNICAST                 GENMASK(17, 12)
116 #define ANA_FLOODING_FLD_UNICAST_SET(x)\
117 	FIELD_PREP(ANA_FLOODING_FLD_UNICAST, x)
118 #define ANA_FLOODING_FLD_UNICAST_GET(x)\
119 	FIELD_GET(ANA_FLOODING_FLD_UNICAST, x)
120 
121 #define ANA_FLOODING_FLD_BROADCAST               GENMASK(11, 6)
122 #define ANA_FLOODING_FLD_BROADCAST_SET(x)\
123 	FIELD_PREP(ANA_FLOODING_FLD_BROADCAST, x)
124 #define ANA_FLOODING_FLD_BROADCAST_GET(x)\
125 	FIELD_GET(ANA_FLOODING_FLD_BROADCAST, x)
126 
127 #define ANA_FLOODING_FLD_MULTICAST               GENMASK(5, 0)
128 #define ANA_FLOODING_FLD_MULTICAST_SET(x)\
129 	FIELD_PREP(ANA_FLOODING_FLD_MULTICAST, x)
130 #define ANA_FLOODING_FLD_MULTICAST_GET(x)\
131 	FIELD_GET(ANA_FLOODING_FLD_MULTICAST, x)
132 
133 /*      ANA:ANA:FLOODING_IPMC */
134 #define ANA_FLOODING_IPMC         __REG(TARGET_ANA, 0, 1, 29824, 0, 1, 244, 100, 0, 1, 4)
135 
136 #define ANA_FLOODING_IPMC_FLD_MC4_CTRL           GENMASK(23, 18)
137 #define ANA_FLOODING_IPMC_FLD_MC4_CTRL_SET(x)\
138 	FIELD_PREP(ANA_FLOODING_IPMC_FLD_MC4_CTRL, x)
139 #define ANA_FLOODING_IPMC_FLD_MC4_CTRL_GET(x)\
140 	FIELD_GET(ANA_FLOODING_IPMC_FLD_MC4_CTRL, x)
141 
142 #define ANA_FLOODING_IPMC_FLD_MC4_DATA           GENMASK(17, 12)
143 #define ANA_FLOODING_IPMC_FLD_MC4_DATA_SET(x)\
144 	FIELD_PREP(ANA_FLOODING_IPMC_FLD_MC4_DATA, x)
145 #define ANA_FLOODING_IPMC_FLD_MC4_DATA_GET(x)\
146 	FIELD_GET(ANA_FLOODING_IPMC_FLD_MC4_DATA, x)
147 
148 #define ANA_FLOODING_IPMC_FLD_MC6_CTRL           GENMASK(11, 6)
149 #define ANA_FLOODING_IPMC_FLD_MC6_CTRL_SET(x)\
150 	FIELD_PREP(ANA_FLOODING_IPMC_FLD_MC6_CTRL, x)
151 #define ANA_FLOODING_IPMC_FLD_MC6_CTRL_GET(x)\
152 	FIELD_GET(ANA_FLOODING_IPMC_FLD_MC6_CTRL, x)
153 
154 #define ANA_FLOODING_IPMC_FLD_MC6_DATA           GENMASK(5, 0)
155 #define ANA_FLOODING_IPMC_FLD_MC6_DATA_SET(x)\
156 	FIELD_PREP(ANA_FLOODING_IPMC_FLD_MC6_DATA, x)
157 #define ANA_FLOODING_IPMC_FLD_MC6_DATA_GET(x)\
158 	FIELD_GET(ANA_FLOODING_IPMC_FLD_MC6_DATA, x)
159 
160 /*      ANA:PGID:PGID */
161 #define ANA_PGID(g)               __REG(TARGET_ANA, 0, 1, 27648, g, 89, 8, 0, 0, 1, 4)
162 
163 #define ANA_PGID_PGID                            GENMASK(8, 0)
164 #define ANA_PGID_PGID_SET(x)\
165 	FIELD_PREP(ANA_PGID_PGID, x)
166 #define ANA_PGID_PGID_GET(x)\
167 	FIELD_GET(ANA_PGID_PGID, x)
168 
169 /*      ANA:PGID:PGID_CFG */
170 #define ANA_PGID_CFG(g)           __REG(TARGET_ANA, 0, 1, 27648, g, 89, 8, 4, 0, 1, 4)
171 
172 #define ANA_PGID_CFG_OBEY_VLAN                   BIT(0)
173 #define ANA_PGID_CFG_OBEY_VLAN_SET(x)\
174 	FIELD_PREP(ANA_PGID_CFG_OBEY_VLAN, x)
175 #define ANA_PGID_CFG_OBEY_VLAN_GET(x)\
176 	FIELD_GET(ANA_PGID_CFG_OBEY_VLAN, x)
177 
178 /*      ANA:ANA_TABLES:MACHDATA */
179 #define ANA_MACHDATA              __REG(TARGET_ANA, 0, 1, 27520, 0, 1, 128, 40, 0, 1, 4)
180 
181 /*      ANA:ANA_TABLES:MACLDATA */
182 #define ANA_MACLDATA              __REG(TARGET_ANA, 0, 1, 27520, 0, 1, 128, 44, 0, 1, 4)
183 
184 /*      ANA:ANA_TABLES:MACACCESS */
185 #define ANA_MACACCESS             __REG(TARGET_ANA, 0, 1, 27520, 0, 1, 128, 48, 0, 1, 4)
186 
187 #define ANA_MACACCESS_CHANGE2SW                  BIT(17)
188 #define ANA_MACACCESS_CHANGE2SW_SET(x)\
189 	FIELD_PREP(ANA_MACACCESS_CHANGE2SW, x)
190 #define ANA_MACACCESS_CHANGE2SW_GET(x)\
191 	FIELD_GET(ANA_MACACCESS_CHANGE2SW, x)
192 
193 #define ANA_MACACCESS_MAC_CPU_COPY               BIT(16)
194 #define ANA_MACACCESS_MAC_CPU_COPY_SET(x)\
195 	FIELD_PREP(ANA_MACACCESS_MAC_CPU_COPY, x)
196 #define ANA_MACACCESS_MAC_CPU_COPY_GET(x)\
197 	FIELD_GET(ANA_MACACCESS_MAC_CPU_COPY, x)
198 
199 #define ANA_MACACCESS_VALID                      BIT(12)
200 #define ANA_MACACCESS_VALID_SET(x)\
201 	FIELD_PREP(ANA_MACACCESS_VALID, x)
202 #define ANA_MACACCESS_VALID_GET(x)\
203 	FIELD_GET(ANA_MACACCESS_VALID, x)
204 
205 #define ANA_MACACCESS_ENTRYTYPE                  GENMASK(11, 10)
206 #define ANA_MACACCESS_ENTRYTYPE_SET(x)\
207 	FIELD_PREP(ANA_MACACCESS_ENTRYTYPE, x)
208 #define ANA_MACACCESS_ENTRYTYPE_GET(x)\
209 	FIELD_GET(ANA_MACACCESS_ENTRYTYPE, x)
210 
211 #define ANA_MACACCESS_DEST_IDX                   GENMASK(9, 4)
212 #define ANA_MACACCESS_DEST_IDX_SET(x)\
213 	FIELD_PREP(ANA_MACACCESS_DEST_IDX, x)
214 #define ANA_MACACCESS_DEST_IDX_GET(x)\
215 	FIELD_GET(ANA_MACACCESS_DEST_IDX, x)
216 
217 #define ANA_MACACCESS_MAC_TABLE_CMD              GENMASK(3, 0)
218 #define ANA_MACACCESS_MAC_TABLE_CMD_SET(x)\
219 	FIELD_PREP(ANA_MACACCESS_MAC_TABLE_CMD, x)
220 #define ANA_MACACCESS_MAC_TABLE_CMD_GET(x)\
221 	FIELD_GET(ANA_MACACCESS_MAC_TABLE_CMD, x)
222 
223 /*      ANA:ANA_TABLES:MACTINDX */
224 #define ANA_MACTINDX              __REG(TARGET_ANA, 0, 1, 27520, 0, 1, 128, 52, 0, 1, 4)
225 
226 #define ANA_MACTINDX_BUCKET                      GENMASK(12, 11)
227 #define ANA_MACTINDX_BUCKET_SET(x)\
228 	FIELD_PREP(ANA_MACTINDX_BUCKET, x)
229 #define ANA_MACTINDX_BUCKET_GET(x)\
230 	FIELD_GET(ANA_MACTINDX_BUCKET, x)
231 
232 #define ANA_MACTINDX_M_INDEX                     GENMASK(10, 0)
233 #define ANA_MACTINDX_M_INDEX_SET(x)\
234 	FIELD_PREP(ANA_MACTINDX_M_INDEX, x)
235 #define ANA_MACTINDX_M_INDEX_GET(x)\
236 	FIELD_GET(ANA_MACTINDX_M_INDEX, x)
237 
238 /*      ANA:ANA_TABLES:VLAN_PORT_MASK */
239 #define ANA_VLAN_PORT_MASK        __REG(TARGET_ANA, 0, 1, 27520, 0, 1, 128, 56, 0, 1, 4)
240 
241 #define ANA_VLAN_PORT_MASK_VLAN_PORT_MASK        GENMASK(8, 0)
242 #define ANA_VLAN_PORT_MASK_VLAN_PORT_MASK_SET(x)\
243 	FIELD_PREP(ANA_VLAN_PORT_MASK_VLAN_PORT_MASK, x)
244 #define ANA_VLAN_PORT_MASK_VLAN_PORT_MASK_GET(x)\
245 	FIELD_GET(ANA_VLAN_PORT_MASK_VLAN_PORT_MASK, x)
246 
247 /*      ANA:ANA_TABLES:VLANACCESS */
248 #define ANA_VLANACCESS            __REG(TARGET_ANA, 0, 1, 27520, 0, 1, 128, 60, 0, 1, 4)
249 
250 #define ANA_VLANACCESS_VLAN_TBL_CMD              GENMASK(1, 0)
251 #define ANA_VLANACCESS_VLAN_TBL_CMD_SET(x)\
252 	FIELD_PREP(ANA_VLANACCESS_VLAN_TBL_CMD, x)
253 #define ANA_VLANACCESS_VLAN_TBL_CMD_GET(x)\
254 	FIELD_GET(ANA_VLANACCESS_VLAN_TBL_CMD, x)
255 
256 /*      ANA:ANA_TABLES:VLANTIDX */
257 #define ANA_VLANTIDX              __REG(TARGET_ANA, 0, 1, 27520, 0, 1, 128, 64, 0, 1, 4)
258 
259 #define ANA_VLANTIDX_VLAN_PGID_CPU_DIS           BIT(18)
260 #define ANA_VLANTIDX_VLAN_PGID_CPU_DIS_SET(x)\
261 	FIELD_PREP(ANA_VLANTIDX_VLAN_PGID_CPU_DIS, x)
262 #define ANA_VLANTIDX_VLAN_PGID_CPU_DIS_GET(x)\
263 	FIELD_GET(ANA_VLANTIDX_VLAN_PGID_CPU_DIS, x)
264 
265 #define ANA_VLANTIDX_V_INDEX                     GENMASK(11, 0)
266 #define ANA_VLANTIDX_V_INDEX_SET(x)\
267 	FIELD_PREP(ANA_VLANTIDX_V_INDEX, x)
268 #define ANA_VLANTIDX_V_INDEX_GET(x)\
269 	FIELD_GET(ANA_VLANTIDX_V_INDEX, x)
270 
271 /*      ANA:PORT:VLAN_CFG */
272 #define ANA_VLAN_CFG(g)           __REG(TARGET_ANA, 0, 1, 28672, g, 9, 128, 0, 0, 1, 4)
273 
274 #define ANA_VLAN_CFG_VLAN_AWARE_ENA              BIT(20)
275 #define ANA_VLAN_CFG_VLAN_AWARE_ENA_SET(x)\
276 	FIELD_PREP(ANA_VLAN_CFG_VLAN_AWARE_ENA, x)
277 #define ANA_VLAN_CFG_VLAN_AWARE_ENA_GET(x)\
278 	FIELD_GET(ANA_VLAN_CFG_VLAN_AWARE_ENA, x)
279 
280 #define ANA_VLAN_CFG_VLAN_POP_CNT                GENMASK(19, 18)
281 #define ANA_VLAN_CFG_VLAN_POP_CNT_SET(x)\
282 	FIELD_PREP(ANA_VLAN_CFG_VLAN_POP_CNT, x)
283 #define ANA_VLAN_CFG_VLAN_POP_CNT_GET(x)\
284 	FIELD_GET(ANA_VLAN_CFG_VLAN_POP_CNT, x)
285 
286 #define ANA_VLAN_CFG_VLAN_VID                    GENMASK(11, 0)
287 #define ANA_VLAN_CFG_VLAN_VID_SET(x)\
288 	FIELD_PREP(ANA_VLAN_CFG_VLAN_VID, x)
289 #define ANA_VLAN_CFG_VLAN_VID_GET(x)\
290 	FIELD_GET(ANA_VLAN_CFG_VLAN_VID, x)
291 
292 /*      ANA:PORT:DROP_CFG */
293 #define ANA_DROP_CFG(g)           __REG(TARGET_ANA, 0, 1, 28672, g, 9, 128, 4, 0, 1, 4)
294 
295 #define ANA_DROP_CFG_DROP_UNTAGGED_ENA           BIT(6)
296 #define ANA_DROP_CFG_DROP_UNTAGGED_ENA_SET(x)\
297 	FIELD_PREP(ANA_DROP_CFG_DROP_UNTAGGED_ENA, x)
298 #define ANA_DROP_CFG_DROP_UNTAGGED_ENA_GET(x)\
299 	FIELD_GET(ANA_DROP_CFG_DROP_UNTAGGED_ENA, x)
300 
301 #define ANA_DROP_CFG_DROP_PRIO_S_TAGGED_ENA      BIT(3)
302 #define ANA_DROP_CFG_DROP_PRIO_S_TAGGED_ENA_SET(x)\
303 	FIELD_PREP(ANA_DROP_CFG_DROP_PRIO_S_TAGGED_ENA, x)
304 #define ANA_DROP_CFG_DROP_PRIO_S_TAGGED_ENA_GET(x)\
305 	FIELD_GET(ANA_DROP_CFG_DROP_PRIO_S_TAGGED_ENA, x)
306 
307 #define ANA_DROP_CFG_DROP_PRIO_C_TAGGED_ENA      BIT(2)
308 #define ANA_DROP_CFG_DROP_PRIO_C_TAGGED_ENA_SET(x)\
309 	FIELD_PREP(ANA_DROP_CFG_DROP_PRIO_C_TAGGED_ENA, x)
310 #define ANA_DROP_CFG_DROP_PRIO_C_TAGGED_ENA_GET(x)\
311 	FIELD_GET(ANA_DROP_CFG_DROP_PRIO_C_TAGGED_ENA, x)
312 
313 #define ANA_DROP_CFG_DROP_MC_SMAC_ENA            BIT(0)
314 #define ANA_DROP_CFG_DROP_MC_SMAC_ENA_SET(x)\
315 	FIELD_PREP(ANA_DROP_CFG_DROP_MC_SMAC_ENA, x)
316 #define ANA_DROP_CFG_DROP_MC_SMAC_ENA_GET(x)\
317 	FIELD_GET(ANA_DROP_CFG_DROP_MC_SMAC_ENA, x)
318 
319 /*      ANA:PORT:VCAP_S2_CFG */
320 #define ANA_VCAP_S2_CFG(g)        __REG(TARGET_ANA, 0, 1, 28672, g, 9, 128, 28, 0, 1, 4)
321 
322 #define ANA_VCAP_S2_CFG_ISDX_ENA                 GENMASK(20, 19)
323 #define ANA_VCAP_S2_CFG_ISDX_ENA_SET(x)\
324 	FIELD_PREP(ANA_VCAP_S2_CFG_ISDX_ENA, x)
325 #define ANA_VCAP_S2_CFG_ISDX_ENA_GET(x)\
326 	FIELD_GET(ANA_VCAP_S2_CFG_ISDX_ENA, x)
327 
328 #define ANA_VCAP_S2_CFG_UDP_PAYLOAD_ENA          GENMASK(18, 17)
329 #define ANA_VCAP_S2_CFG_UDP_PAYLOAD_ENA_SET(x)\
330 	FIELD_PREP(ANA_VCAP_S2_CFG_UDP_PAYLOAD_ENA, x)
331 #define ANA_VCAP_S2_CFG_UDP_PAYLOAD_ENA_GET(x)\
332 	FIELD_GET(ANA_VCAP_S2_CFG_UDP_PAYLOAD_ENA, x)
333 
334 #define ANA_VCAP_S2_CFG_ETYPE_PAYLOAD_ENA        GENMASK(16, 15)
335 #define ANA_VCAP_S2_CFG_ETYPE_PAYLOAD_ENA_SET(x)\
336 	FIELD_PREP(ANA_VCAP_S2_CFG_ETYPE_PAYLOAD_ENA, x)
337 #define ANA_VCAP_S2_CFG_ETYPE_PAYLOAD_ENA_GET(x)\
338 	FIELD_GET(ANA_VCAP_S2_CFG_ETYPE_PAYLOAD_ENA, x)
339 
340 #define ANA_VCAP_S2_CFG_ENA                      BIT(14)
341 #define ANA_VCAP_S2_CFG_ENA_SET(x)\
342 	FIELD_PREP(ANA_VCAP_S2_CFG_ENA, x)
343 #define ANA_VCAP_S2_CFG_ENA_GET(x)\
344 	FIELD_GET(ANA_VCAP_S2_CFG_ENA, x)
345 
346 #define ANA_VCAP_S2_CFG_SNAP_DIS                 GENMASK(13, 12)
347 #define ANA_VCAP_S2_CFG_SNAP_DIS_SET(x)\
348 	FIELD_PREP(ANA_VCAP_S2_CFG_SNAP_DIS, x)
349 #define ANA_VCAP_S2_CFG_SNAP_DIS_GET(x)\
350 	FIELD_GET(ANA_VCAP_S2_CFG_SNAP_DIS, x)
351 
352 #define ANA_VCAP_S2_CFG_ARP_DIS                  GENMASK(11, 10)
353 #define ANA_VCAP_S2_CFG_ARP_DIS_SET(x)\
354 	FIELD_PREP(ANA_VCAP_S2_CFG_ARP_DIS, x)
355 #define ANA_VCAP_S2_CFG_ARP_DIS_GET(x)\
356 	FIELD_GET(ANA_VCAP_S2_CFG_ARP_DIS, x)
357 
358 #define ANA_VCAP_S2_CFG_IP_TCPUDP_DIS            GENMASK(9, 8)
359 #define ANA_VCAP_S2_CFG_IP_TCPUDP_DIS_SET(x)\
360 	FIELD_PREP(ANA_VCAP_S2_CFG_IP_TCPUDP_DIS, x)
361 #define ANA_VCAP_S2_CFG_IP_TCPUDP_DIS_GET(x)\
362 	FIELD_GET(ANA_VCAP_S2_CFG_IP_TCPUDP_DIS, x)
363 
364 #define ANA_VCAP_S2_CFG_IP_OTHER_DIS             GENMASK(7, 6)
365 #define ANA_VCAP_S2_CFG_IP_OTHER_DIS_SET(x)\
366 	FIELD_PREP(ANA_VCAP_S2_CFG_IP_OTHER_DIS, x)
367 #define ANA_VCAP_S2_CFG_IP_OTHER_DIS_GET(x)\
368 	FIELD_GET(ANA_VCAP_S2_CFG_IP_OTHER_DIS, x)
369 
370 #define ANA_VCAP_S2_CFG_IP6_CFG                  GENMASK(5, 2)
371 #define ANA_VCAP_S2_CFG_IP6_CFG_SET(x)\
372 	FIELD_PREP(ANA_VCAP_S2_CFG_IP6_CFG, x)
373 #define ANA_VCAP_S2_CFG_IP6_CFG_GET(x)\
374 	FIELD_GET(ANA_VCAP_S2_CFG_IP6_CFG, x)
375 
376 #define ANA_VCAP_S2_CFG_OAM_DIS                  GENMASK(1, 0)
377 #define ANA_VCAP_S2_CFG_OAM_DIS_SET(x)\
378 	FIELD_PREP(ANA_VCAP_S2_CFG_OAM_DIS, x)
379 #define ANA_VCAP_S2_CFG_OAM_DIS_GET(x)\
380 	FIELD_GET(ANA_VCAP_S2_CFG_OAM_DIS, x)
381 
382 /*      ANA:PORT:CPU_FWD_CFG */
383 #define ANA_CPU_FWD_CFG(g)        __REG(TARGET_ANA, 0, 1, 28672, g, 9, 128, 96, 0, 1, 4)
384 
385 #define ANA_CPU_FWD_CFG_MLD_REDIR_ENA            BIT(6)
386 #define ANA_CPU_FWD_CFG_MLD_REDIR_ENA_SET(x)\
387 	FIELD_PREP(ANA_CPU_FWD_CFG_MLD_REDIR_ENA, x)
388 #define ANA_CPU_FWD_CFG_MLD_REDIR_ENA_GET(x)\
389 	FIELD_GET(ANA_CPU_FWD_CFG_MLD_REDIR_ENA, x)
390 
391 #define ANA_CPU_FWD_CFG_IGMP_REDIR_ENA           BIT(5)
392 #define ANA_CPU_FWD_CFG_IGMP_REDIR_ENA_SET(x)\
393 	FIELD_PREP(ANA_CPU_FWD_CFG_IGMP_REDIR_ENA, x)
394 #define ANA_CPU_FWD_CFG_IGMP_REDIR_ENA_GET(x)\
395 	FIELD_GET(ANA_CPU_FWD_CFG_IGMP_REDIR_ENA, x)
396 
397 #define ANA_CPU_FWD_CFG_IPMC_CTRL_COPY_ENA       BIT(4)
398 #define ANA_CPU_FWD_CFG_IPMC_CTRL_COPY_ENA_SET(x)\
399 	FIELD_PREP(ANA_CPU_FWD_CFG_IPMC_CTRL_COPY_ENA, x)
400 #define ANA_CPU_FWD_CFG_IPMC_CTRL_COPY_ENA_GET(x)\
401 	FIELD_GET(ANA_CPU_FWD_CFG_IPMC_CTRL_COPY_ENA, x)
402 
403 #define ANA_CPU_FWD_CFG_SRC_COPY_ENA             BIT(3)
404 #define ANA_CPU_FWD_CFG_SRC_COPY_ENA_SET(x)\
405 	FIELD_PREP(ANA_CPU_FWD_CFG_SRC_COPY_ENA, x)
406 #define ANA_CPU_FWD_CFG_SRC_COPY_ENA_GET(x)\
407 	FIELD_GET(ANA_CPU_FWD_CFG_SRC_COPY_ENA, x)
408 
409 /*      ANA:PORT:CPU_FWD_BPDU_CFG */
410 #define ANA_CPU_FWD_BPDU_CFG(g)   __REG(TARGET_ANA, 0, 1, 28672, g, 9, 128, 100, 0, 1, 4)
411 
412 /*      ANA:PORT:PORT_CFG */
413 #define ANA_PORT_CFG(g)           __REG(TARGET_ANA, 0, 1, 28672, g, 9, 128, 112, 0, 1, 4)
414 
415 #define ANA_PORT_CFG_SRC_MIRROR_ENA              BIT(13)
416 #define ANA_PORT_CFG_SRC_MIRROR_ENA_SET(x)\
417 	FIELD_PREP(ANA_PORT_CFG_SRC_MIRROR_ENA, x)
418 #define ANA_PORT_CFG_SRC_MIRROR_ENA_GET(x)\
419 	FIELD_GET(ANA_PORT_CFG_SRC_MIRROR_ENA, x)
420 
421 #define ANA_PORT_CFG_LEARNAUTO                   BIT(6)
422 #define ANA_PORT_CFG_LEARNAUTO_SET(x)\
423 	FIELD_PREP(ANA_PORT_CFG_LEARNAUTO, x)
424 #define ANA_PORT_CFG_LEARNAUTO_GET(x)\
425 	FIELD_GET(ANA_PORT_CFG_LEARNAUTO, x)
426 
427 #define ANA_PORT_CFG_LEARN_ENA                   BIT(5)
428 #define ANA_PORT_CFG_LEARN_ENA_SET(x)\
429 	FIELD_PREP(ANA_PORT_CFG_LEARN_ENA, x)
430 #define ANA_PORT_CFG_LEARN_ENA_GET(x)\
431 	FIELD_GET(ANA_PORT_CFG_LEARN_ENA, x)
432 
433 #define ANA_PORT_CFG_RECV_ENA                    BIT(4)
434 #define ANA_PORT_CFG_RECV_ENA_SET(x)\
435 	FIELD_PREP(ANA_PORT_CFG_RECV_ENA, x)
436 #define ANA_PORT_CFG_RECV_ENA_GET(x)\
437 	FIELD_GET(ANA_PORT_CFG_RECV_ENA, x)
438 
439 #define ANA_PORT_CFG_PORTID_VAL                  GENMASK(3, 0)
440 #define ANA_PORT_CFG_PORTID_VAL_SET(x)\
441 	FIELD_PREP(ANA_PORT_CFG_PORTID_VAL, x)
442 #define ANA_PORT_CFG_PORTID_VAL_GET(x)\
443 	FIELD_GET(ANA_PORT_CFG_PORTID_VAL, x)
444 
445 /*      ANA:PORT:POL_CFG */
446 #define ANA_POL_CFG(g)            __REG(TARGET_ANA, 0, 1, 28672, g, 9, 128, 116, 0, 1, 4)
447 
448 #define ANA_POL_CFG_PORT_POL_ENA                 BIT(17)
449 #define ANA_POL_CFG_PORT_POL_ENA_SET(x)\
450 	FIELD_PREP(ANA_POL_CFG_PORT_POL_ENA, x)
451 #define ANA_POL_CFG_PORT_POL_ENA_GET(x)\
452 	FIELD_GET(ANA_POL_CFG_PORT_POL_ENA, x)
453 
454 #define ANA_POL_CFG_POL_ORDER                    GENMASK(8, 0)
455 #define ANA_POL_CFG_POL_ORDER_SET(x)\
456 	FIELD_PREP(ANA_POL_CFG_POL_ORDER, x)
457 #define ANA_POL_CFG_POL_ORDER_GET(x)\
458 	FIELD_GET(ANA_POL_CFG_POL_ORDER, x)
459 
460 /*      ANA:PFC:PFC_CFG */
461 #define ANA_PFC_CFG(g)            __REG(TARGET_ANA, 0, 1, 30720, g, 8, 64, 0, 0, 1, 4)
462 
463 #define ANA_PFC_CFG_FC_LINK_SPEED                GENMASK(1, 0)
464 #define ANA_PFC_CFG_FC_LINK_SPEED_SET(x)\
465 	FIELD_PREP(ANA_PFC_CFG_FC_LINK_SPEED, x)
466 #define ANA_PFC_CFG_FC_LINK_SPEED_GET(x)\
467 	FIELD_GET(ANA_PFC_CFG_FC_LINK_SPEED, x)
468 
469 /*      ANA:COMMON:AGGR_CFG */
470 #define ANA_AGGR_CFG              __REG(TARGET_ANA, 0, 1, 31232, 0, 1, 552, 0, 0, 1, 4)
471 
472 #define ANA_AGGR_CFG_AC_RND_ENA                  BIT(6)
473 #define ANA_AGGR_CFG_AC_RND_ENA_SET(x)\
474 	FIELD_PREP(ANA_AGGR_CFG_AC_RND_ENA, x)
475 #define ANA_AGGR_CFG_AC_RND_ENA_GET(x)\
476 	FIELD_GET(ANA_AGGR_CFG_AC_RND_ENA, x)
477 
478 #define ANA_AGGR_CFG_AC_DMAC_ENA                 BIT(5)
479 #define ANA_AGGR_CFG_AC_DMAC_ENA_SET(x)\
480 	FIELD_PREP(ANA_AGGR_CFG_AC_DMAC_ENA, x)
481 #define ANA_AGGR_CFG_AC_DMAC_ENA_GET(x)\
482 	FIELD_GET(ANA_AGGR_CFG_AC_DMAC_ENA, x)
483 
484 #define ANA_AGGR_CFG_AC_SMAC_ENA                 BIT(4)
485 #define ANA_AGGR_CFG_AC_SMAC_ENA_SET(x)\
486 	FIELD_PREP(ANA_AGGR_CFG_AC_SMAC_ENA, x)
487 #define ANA_AGGR_CFG_AC_SMAC_ENA_GET(x)\
488 	FIELD_GET(ANA_AGGR_CFG_AC_SMAC_ENA, x)
489 
490 #define ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA         BIT(3)
491 #define ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA_SET(x)\
492 	FIELD_PREP(ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA, x)
493 #define ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA_GET(x)\
494 	FIELD_GET(ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA, x)
495 
496 #define ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA           BIT(2)
497 #define ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA_SET(x)\
498 	FIELD_PREP(ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA, x)
499 #define ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA_GET(x)\
500 	FIELD_GET(ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA, x)
501 
502 #define ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA           BIT(1)
503 #define ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA_SET(x)\
504 	FIELD_PREP(ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA, x)
505 #define ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA_GET(x)\
506 	FIELD_GET(ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA, x)
507 
508 #define ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA           BIT(0)
509 #define ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA_SET(x)\
510 	FIELD_PREP(ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA, x)
511 #define ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA_GET(x)\
512 	FIELD_GET(ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA, x)
513 
514 /*      ANA:POL:POL_PIR_CFG */
515 #define ANA_POL_PIR_CFG(g)        __REG(TARGET_ANA, 0, 1, 16384, g, 345, 32, 0, 0, 1, 4)
516 
517 #define ANA_POL_PIR_CFG_PIR_RATE                 GENMASK(20, 6)
518 #define ANA_POL_PIR_CFG_PIR_RATE_SET(x)\
519 	FIELD_PREP(ANA_POL_PIR_CFG_PIR_RATE, x)
520 #define ANA_POL_PIR_CFG_PIR_RATE_GET(x)\
521 	FIELD_GET(ANA_POL_PIR_CFG_PIR_RATE, x)
522 
523 #define ANA_POL_PIR_CFG_PIR_BURST                GENMASK(5, 0)
524 #define ANA_POL_PIR_CFG_PIR_BURST_SET(x)\
525 	FIELD_PREP(ANA_POL_PIR_CFG_PIR_BURST, x)
526 #define ANA_POL_PIR_CFG_PIR_BURST_GET(x)\
527 	FIELD_GET(ANA_POL_PIR_CFG_PIR_BURST, x)
528 
529 /*      ANA:POL:POL_MODE_CFG */
530 #define ANA_POL_MODE(g)           __REG(TARGET_ANA, 0, 1, 16384, g, 345, 32, 8, 0, 1, 4)
531 
532 #define ANA_POL_MODE_DROP_ON_YELLOW_ENA          BIT(11)
533 #define ANA_POL_MODE_DROP_ON_YELLOW_ENA_SET(x)\
534 	FIELD_PREP(ANA_POL_MODE_DROP_ON_YELLOW_ENA, x)
535 #define ANA_POL_MODE_DROP_ON_YELLOW_ENA_GET(x)\
536 	FIELD_GET(ANA_POL_MODE_DROP_ON_YELLOW_ENA, x)
537 
538 #define ANA_POL_MODE_MARK_ALL_FRMS_RED_ENA       BIT(10)
539 #define ANA_POL_MODE_MARK_ALL_FRMS_RED_ENA_SET(x)\
540 	FIELD_PREP(ANA_POL_MODE_MARK_ALL_FRMS_RED_ENA, x)
541 #define ANA_POL_MODE_MARK_ALL_FRMS_RED_ENA_GET(x)\
542 	FIELD_GET(ANA_POL_MODE_MARK_ALL_FRMS_RED_ENA, x)
543 
544 #define ANA_POL_MODE_IPG_SIZE                    GENMASK(9, 5)
545 #define ANA_POL_MODE_IPG_SIZE_SET(x)\
546 	FIELD_PREP(ANA_POL_MODE_IPG_SIZE, x)
547 #define ANA_POL_MODE_IPG_SIZE_GET(x)\
548 	FIELD_GET(ANA_POL_MODE_IPG_SIZE, x)
549 
550 #define ANA_POL_MODE_FRM_MODE                    GENMASK(4, 3)
551 #define ANA_POL_MODE_FRM_MODE_SET(x)\
552 	FIELD_PREP(ANA_POL_MODE_FRM_MODE, x)
553 #define ANA_POL_MODE_FRM_MODE_GET(x)\
554 	FIELD_GET(ANA_POL_MODE_FRM_MODE, x)
555 
556 #define ANA_POL_MODE_OVERSHOOT_ENA               BIT(0)
557 #define ANA_POL_MODE_OVERSHOOT_ENA_SET(x)\
558 	FIELD_PREP(ANA_POL_MODE_OVERSHOOT_ENA, x)
559 #define ANA_POL_MODE_OVERSHOOT_ENA_GET(x)\
560 	FIELD_GET(ANA_POL_MODE_OVERSHOOT_ENA, x)
561 
562 /*      ANA:POL:POL_PIR_STATE */
563 #define ANA_POL_PIR_STATE(g)      __REG(TARGET_ANA, 0, 1, 16384, g, 345, 32, 12, 0, 1, 4)
564 
565 #define ANA_POL_PIR_STATE_PIR_LVL                GENMASK(21, 0)
566 #define ANA_POL_PIR_STATE_PIR_LVL_SET(x)\
567 	FIELD_PREP(ANA_POL_PIR_STATE_PIR_LVL, x)
568 #define ANA_POL_PIR_STATE_PIR_LVL_GET(x)\
569 	FIELD_GET(ANA_POL_PIR_STATE_PIR_LVL, x)
570 
571 /*      CHIP_TOP:CUPHY_CFG:CUPHY_PORT_CFG */
572 #define CHIP_TOP_CUPHY_PORT_CFG(r) __REG(TARGET_CHIP_TOP, 0, 1, 16, 0, 1, 20, 8, r, 2, 4)
573 
574 #define CHIP_TOP_CUPHY_PORT_CFG_GTX_CLK_ENA      BIT(0)
575 #define CHIP_TOP_CUPHY_PORT_CFG_GTX_CLK_ENA_SET(x)\
576 	FIELD_PREP(CHIP_TOP_CUPHY_PORT_CFG_GTX_CLK_ENA, x)
577 #define CHIP_TOP_CUPHY_PORT_CFG_GTX_CLK_ENA_GET(x)\
578 	FIELD_GET(CHIP_TOP_CUPHY_PORT_CFG_GTX_CLK_ENA, x)
579 
580 /*      DEV:PORT_MODE:CLOCK_CFG */
581 #define DEV_CLOCK_CFG(t)          __REG(TARGET_DEV, t, 8, 0, 0, 1, 28, 0, 0, 1, 4)
582 
583 #define DEV_CLOCK_CFG_MAC_TX_RST                 BIT(7)
584 #define DEV_CLOCK_CFG_MAC_TX_RST_SET(x)\
585 	FIELD_PREP(DEV_CLOCK_CFG_MAC_TX_RST, x)
586 #define DEV_CLOCK_CFG_MAC_TX_RST_GET(x)\
587 	FIELD_GET(DEV_CLOCK_CFG_MAC_TX_RST, x)
588 
589 #define DEV_CLOCK_CFG_MAC_RX_RST                 BIT(6)
590 #define DEV_CLOCK_CFG_MAC_RX_RST_SET(x)\
591 	FIELD_PREP(DEV_CLOCK_CFG_MAC_RX_RST, x)
592 #define DEV_CLOCK_CFG_MAC_RX_RST_GET(x)\
593 	FIELD_GET(DEV_CLOCK_CFG_MAC_RX_RST, x)
594 
595 #define DEV_CLOCK_CFG_PCS_TX_RST                 BIT(5)
596 #define DEV_CLOCK_CFG_PCS_TX_RST_SET(x)\
597 	FIELD_PREP(DEV_CLOCK_CFG_PCS_TX_RST, x)
598 #define DEV_CLOCK_CFG_PCS_TX_RST_GET(x)\
599 	FIELD_GET(DEV_CLOCK_CFG_PCS_TX_RST, x)
600 
601 #define DEV_CLOCK_CFG_PCS_RX_RST                 BIT(4)
602 #define DEV_CLOCK_CFG_PCS_RX_RST_SET(x)\
603 	FIELD_PREP(DEV_CLOCK_CFG_PCS_RX_RST, x)
604 #define DEV_CLOCK_CFG_PCS_RX_RST_GET(x)\
605 	FIELD_GET(DEV_CLOCK_CFG_PCS_RX_RST, x)
606 
607 #define DEV_CLOCK_CFG_PORT_RST                   BIT(3)
608 #define DEV_CLOCK_CFG_PORT_RST_SET(x)\
609 	FIELD_PREP(DEV_CLOCK_CFG_PORT_RST, x)
610 #define DEV_CLOCK_CFG_PORT_RST_GET(x)\
611 	FIELD_GET(DEV_CLOCK_CFG_PORT_RST, x)
612 
613 #define DEV_CLOCK_CFG_LINK_SPEED                 GENMASK(1, 0)
614 #define DEV_CLOCK_CFG_LINK_SPEED_SET(x)\
615 	FIELD_PREP(DEV_CLOCK_CFG_LINK_SPEED, x)
616 #define DEV_CLOCK_CFG_LINK_SPEED_GET(x)\
617 	FIELD_GET(DEV_CLOCK_CFG_LINK_SPEED, x)
618 
619 /*      DEV:MAC_CFG_STATUS:MAC_ENA_CFG */
620 #define DEV_MAC_ENA_CFG(t)        __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 0, 0, 1, 4)
621 
622 #define DEV_MAC_ENA_CFG_RX_ENA                   BIT(4)
623 #define DEV_MAC_ENA_CFG_RX_ENA_SET(x)\
624 	FIELD_PREP(DEV_MAC_ENA_CFG_RX_ENA, x)
625 #define DEV_MAC_ENA_CFG_RX_ENA_GET(x)\
626 	FIELD_GET(DEV_MAC_ENA_CFG_RX_ENA, x)
627 
628 #define DEV_MAC_ENA_CFG_TX_ENA                   BIT(0)
629 #define DEV_MAC_ENA_CFG_TX_ENA_SET(x)\
630 	FIELD_PREP(DEV_MAC_ENA_CFG_TX_ENA, x)
631 #define DEV_MAC_ENA_CFG_TX_ENA_GET(x)\
632 	FIELD_GET(DEV_MAC_ENA_CFG_TX_ENA, x)
633 
634 /*      DEV:MAC_CFG_STATUS:MAC_MODE_CFG */
635 #define DEV_MAC_MODE_CFG(t)       __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 4, 0, 1, 4)
636 
637 #define DEV_MAC_MODE_CFG_GIGA_MODE_ENA           BIT(4)
638 #define DEV_MAC_MODE_CFG_GIGA_MODE_ENA_SET(x)\
639 	FIELD_PREP(DEV_MAC_MODE_CFG_GIGA_MODE_ENA, x)
640 #define DEV_MAC_MODE_CFG_GIGA_MODE_ENA_GET(x)\
641 	FIELD_GET(DEV_MAC_MODE_CFG_GIGA_MODE_ENA, x)
642 
643 /*      DEV:MAC_CFG_STATUS:MAC_MAXLEN_CFG */
644 #define DEV_MAC_MAXLEN_CFG(t)     __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 8, 0, 1, 4)
645 
646 #define DEV_MAC_MAXLEN_CFG_MAX_LEN               GENMASK(15, 0)
647 #define DEV_MAC_MAXLEN_CFG_MAX_LEN_SET(x)\
648 	FIELD_PREP(DEV_MAC_MAXLEN_CFG_MAX_LEN, x)
649 #define DEV_MAC_MAXLEN_CFG_MAX_LEN_GET(x)\
650 	FIELD_GET(DEV_MAC_MAXLEN_CFG_MAX_LEN, x)
651 
652 /*      DEV:MAC_CFG_STATUS:MAC_TAGS_CFG */
653 #define DEV_MAC_TAGS_CFG(t)       __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 12, 0, 1, 4)
654 
655 #define DEV_MAC_TAGS_CFG_VLAN_DBL_AWR_ENA        BIT(1)
656 #define DEV_MAC_TAGS_CFG_VLAN_DBL_AWR_ENA_SET(x)\
657 	FIELD_PREP(DEV_MAC_TAGS_CFG_VLAN_DBL_AWR_ENA, x)
658 #define DEV_MAC_TAGS_CFG_VLAN_DBL_AWR_ENA_GET(x)\
659 	FIELD_GET(DEV_MAC_TAGS_CFG_VLAN_DBL_AWR_ENA, x)
660 
661 #define DEV_MAC_TAGS_CFG_VLAN_AWR_ENA            BIT(0)
662 #define DEV_MAC_TAGS_CFG_VLAN_AWR_ENA_SET(x)\
663 	FIELD_PREP(DEV_MAC_TAGS_CFG_VLAN_AWR_ENA, x)
664 #define DEV_MAC_TAGS_CFG_VLAN_AWR_ENA_GET(x)\
665 	FIELD_GET(DEV_MAC_TAGS_CFG_VLAN_AWR_ENA, x)
666 
667 /*      DEV:MAC_CFG_STATUS:MAC_IFG_CFG */
668 #define DEV_MAC_IFG_CFG(t)        __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 20, 0, 1, 4)
669 
670 #define DEV_MAC_IFG_CFG_TX_IFG                   GENMASK(12, 8)
671 #define DEV_MAC_IFG_CFG_TX_IFG_SET(x)\
672 	FIELD_PREP(DEV_MAC_IFG_CFG_TX_IFG, x)
673 #define DEV_MAC_IFG_CFG_TX_IFG_GET(x)\
674 	FIELD_GET(DEV_MAC_IFG_CFG_TX_IFG, x)
675 
676 #define DEV_MAC_IFG_CFG_RX_IFG2                  GENMASK(7, 4)
677 #define DEV_MAC_IFG_CFG_RX_IFG2_SET(x)\
678 	FIELD_PREP(DEV_MAC_IFG_CFG_RX_IFG2, x)
679 #define DEV_MAC_IFG_CFG_RX_IFG2_GET(x)\
680 	FIELD_GET(DEV_MAC_IFG_CFG_RX_IFG2, x)
681 
682 #define DEV_MAC_IFG_CFG_RX_IFG1                  GENMASK(3, 0)
683 #define DEV_MAC_IFG_CFG_RX_IFG1_SET(x)\
684 	FIELD_PREP(DEV_MAC_IFG_CFG_RX_IFG1, x)
685 #define DEV_MAC_IFG_CFG_RX_IFG1_GET(x)\
686 	FIELD_GET(DEV_MAC_IFG_CFG_RX_IFG1, x)
687 
688 /*      DEV:MAC_CFG_STATUS:MAC_HDX_CFG */
689 #define DEV_MAC_HDX_CFG(t)        __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 24, 0, 1, 4)
690 
691 #define DEV_MAC_HDX_CFG_SEED                     GENMASK(23, 16)
692 #define DEV_MAC_HDX_CFG_SEED_SET(x)\
693 	FIELD_PREP(DEV_MAC_HDX_CFG_SEED, x)
694 #define DEV_MAC_HDX_CFG_SEED_GET(x)\
695 	FIELD_GET(DEV_MAC_HDX_CFG_SEED, x)
696 
697 #define DEV_MAC_HDX_CFG_SEED_LOAD                BIT(12)
698 #define DEV_MAC_HDX_CFG_SEED_LOAD_SET(x)\
699 	FIELD_PREP(DEV_MAC_HDX_CFG_SEED_LOAD, x)
700 #define DEV_MAC_HDX_CFG_SEED_LOAD_GET(x)\
701 	FIELD_GET(DEV_MAC_HDX_CFG_SEED_LOAD, x)
702 
703 /*      DEV:MAC_CFG_STATUS:MAC_FC_MAC_LOW_CFG */
704 #define DEV_FC_MAC_LOW_CFG(t)     __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 32, 0, 1, 4)
705 
706 /*      DEV:MAC_CFG_STATUS:MAC_FC_MAC_HIGH_CFG */
707 #define DEV_FC_MAC_HIGH_CFG(t)    __REG(TARGET_DEV, t, 8, 28, 0, 1, 44, 36, 0, 1, 4)
708 
709 /*      DEV:PCS1G_CFG_STATUS:PCS1G_CFG */
710 #define DEV_PCS1G_CFG(t)          __REG(TARGET_DEV, t, 8, 72, 0, 1, 68, 0, 0, 1, 4)
711 
712 #define DEV_PCS1G_CFG_PCS_ENA                    BIT(0)
713 #define DEV_PCS1G_CFG_PCS_ENA_SET(x)\
714 	FIELD_PREP(DEV_PCS1G_CFG_PCS_ENA, x)
715 #define DEV_PCS1G_CFG_PCS_ENA_GET(x)\
716 	FIELD_GET(DEV_PCS1G_CFG_PCS_ENA, x)
717 
718 /*      DEV:PCS1G_CFG_STATUS:PCS1G_MODE_CFG */
719 #define DEV_PCS1G_MODE_CFG(t)     __REG(TARGET_DEV, t, 8, 72, 0, 1, 68, 4, 0, 1, 4)
720 
721 #define DEV_PCS1G_MODE_CFG_SGMII_MODE_ENA        BIT(0)
722 #define DEV_PCS1G_MODE_CFG_SGMII_MODE_ENA_SET(x)\
723 	FIELD_PREP(DEV_PCS1G_MODE_CFG_SGMII_MODE_ENA, x)
724 #define DEV_PCS1G_MODE_CFG_SGMII_MODE_ENA_GET(x)\
725 	FIELD_GET(DEV_PCS1G_MODE_CFG_SGMII_MODE_ENA, x)
726 
727 #define DEV_PCS1G_MODE_CFG_SAVE_PREAMBLE_ENA        BIT(1)
728 #define DEV_PCS1G_MODE_CFG_SAVE_PREAMBLE_ENA_SET(x)\
729 	FIELD_PREP(DEV_PCS1G_MODE_CFG_SAVE_PREAMBLE_ENA, x)
730 #define DEV_PCS1G_MODE_CFG_SAVE_PREAMBLE_ENA_GET(x)\
731 	FIELD_GET(DEV_PCS1G_MODE_CFG_SAVE_PREAMBLE_ENA, x)
732 
733 /*      DEV:PCS1G_CFG_STATUS:PCS1G_SD_CFG */
734 #define DEV_PCS1G_SD_CFG(t)       __REG(TARGET_DEV, t, 8, 72, 0, 1, 68, 8, 0, 1, 4)
735 
736 #define DEV_PCS1G_SD_CFG_SD_ENA                  BIT(0)
737 #define DEV_PCS1G_SD_CFG_SD_ENA_SET(x)\
738 	FIELD_PREP(DEV_PCS1G_SD_CFG_SD_ENA, x)
739 #define DEV_PCS1G_SD_CFG_SD_ENA_GET(x)\
740 	FIELD_GET(DEV_PCS1G_SD_CFG_SD_ENA, x)
741 
742 /*      DEV:PCS1G_CFG_STATUS:PCS1G_ANEG_CFG */
743 #define DEV_PCS1G_ANEG_CFG(t)     __REG(TARGET_DEV, t, 8, 72, 0, 1, 68, 12, 0, 1, 4)
744 
745 #define DEV_PCS1G_ANEG_CFG_ADV_ABILITY           GENMASK(31, 16)
746 #define DEV_PCS1G_ANEG_CFG_ADV_ABILITY_SET(x)\
747 	FIELD_PREP(DEV_PCS1G_ANEG_CFG_ADV_ABILITY, x)
748 #define DEV_PCS1G_ANEG_CFG_ADV_ABILITY_GET(x)\
749 	FIELD_GET(DEV_PCS1G_ANEG_CFG_ADV_ABILITY, x)
750 
751 #define DEV_PCS1G_ANEG_CFG_SW_RESOLVE_ENA        BIT(8)
752 #define DEV_PCS1G_ANEG_CFG_SW_RESOLVE_ENA_SET(x)\
753 	FIELD_PREP(DEV_PCS1G_ANEG_CFG_SW_RESOLVE_ENA, x)
754 #define DEV_PCS1G_ANEG_CFG_SW_RESOLVE_ENA_GET(x)\
755 	FIELD_GET(DEV_PCS1G_ANEG_CFG_SW_RESOLVE_ENA, x)
756 
757 #define DEV_PCS1G_ANEG_CFG_RESTART_ONE_SHOT      BIT(1)
758 #define DEV_PCS1G_ANEG_CFG_RESTART_ONE_SHOT_SET(x)\
759 	FIELD_PREP(DEV_PCS1G_ANEG_CFG_RESTART_ONE_SHOT, x)
760 #define DEV_PCS1G_ANEG_CFG_RESTART_ONE_SHOT_GET(x)\
761 	FIELD_GET(DEV_PCS1G_ANEG_CFG_RESTART_ONE_SHOT, x)
762 
763 #define DEV_PCS1G_ANEG_CFG_ENA                   BIT(0)
764 #define DEV_PCS1G_ANEG_CFG_ENA_SET(x)\
765 	FIELD_PREP(DEV_PCS1G_ANEG_CFG_ENA, x)
766 #define DEV_PCS1G_ANEG_CFG_ENA_GET(x)\
767 	FIELD_GET(DEV_PCS1G_ANEG_CFG_ENA, x)
768 
769 /*      DEV:PCS1G_CFG_STATUS:PCS1G_ANEG_STATUS */
770 #define DEV_PCS1G_ANEG_STATUS(t)  __REG(TARGET_DEV, t, 8, 72, 0, 1, 68, 32, 0, 1, 4)
771 
772 #define DEV_PCS1G_ANEG_STATUS_LP_ADV             GENMASK(31, 16)
773 #define DEV_PCS1G_ANEG_STATUS_LP_ADV_SET(x)\
774 	FIELD_PREP(DEV_PCS1G_ANEG_STATUS_LP_ADV, x)
775 #define DEV_PCS1G_ANEG_STATUS_LP_ADV_GET(x)\
776 	FIELD_GET(DEV_PCS1G_ANEG_STATUS_LP_ADV, x)
777 
778 #define DEV_PCS1G_ANEG_STATUS_ANEG_COMPLETE      BIT(0)
779 #define DEV_PCS1G_ANEG_STATUS_ANEG_COMPLETE_SET(x)\
780 	FIELD_PREP(DEV_PCS1G_ANEG_STATUS_ANEG_COMPLETE, x)
781 #define DEV_PCS1G_ANEG_STATUS_ANEG_COMPLETE_GET(x)\
782 	FIELD_GET(DEV_PCS1G_ANEG_STATUS_ANEG_COMPLETE, x)
783 
784 /*      DEV:PCS1G_CFG_STATUS:PCS1G_LINK_STATUS */
785 #define DEV_PCS1G_LINK_STATUS(t)  __REG(TARGET_DEV, t, 8, 72, 0, 1, 68, 40, 0, 1, 4)
786 
787 #define DEV_PCS1G_LINK_STATUS_LINK_STATUS        BIT(4)
788 #define DEV_PCS1G_LINK_STATUS_LINK_STATUS_SET(x)\
789 	FIELD_PREP(DEV_PCS1G_LINK_STATUS_LINK_STATUS, x)
790 #define DEV_PCS1G_LINK_STATUS_LINK_STATUS_GET(x)\
791 	FIELD_GET(DEV_PCS1G_LINK_STATUS_LINK_STATUS, x)
792 
793 #define DEV_PCS1G_LINK_STATUS_SYNC_STATUS        BIT(0)
794 #define DEV_PCS1G_LINK_STATUS_SYNC_STATUS_SET(x)\
795 	FIELD_PREP(DEV_PCS1G_LINK_STATUS_SYNC_STATUS, x)
796 #define DEV_PCS1G_LINK_STATUS_SYNC_STATUS_GET(x)\
797 	FIELD_GET(DEV_PCS1G_LINK_STATUS_SYNC_STATUS, x)
798 
799 /*      DEV:PCS1G_CFG_STATUS:PCS1G_STICKY */
800 #define DEV_PCS1G_STICKY(t)       __REG(TARGET_DEV, t, 8, 72, 0, 1, 68, 48, 0, 1, 4)
801 
802 #define DEV_PCS1G_STICKY_LINK_DOWN_STICKY        BIT(4)
803 #define DEV_PCS1G_STICKY_LINK_DOWN_STICKY_SET(x)\
804 	FIELD_PREP(DEV_PCS1G_STICKY_LINK_DOWN_STICKY, x)
805 #define DEV_PCS1G_STICKY_LINK_DOWN_STICKY_GET(x)\
806 	FIELD_GET(DEV_PCS1G_STICKY_LINK_DOWN_STICKY, x)
807 
808 /*      FDMA:FDMA:FDMA_CH_ACTIVATE */
809 #define FDMA_CH_ACTIVATE          __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 0, 0, 1, 4)
810 
811 #define FDMA_CH_ACTIVATE_CH_ACTIVATE             GENMASK(7, 0)
812 #define FDMA_CH_ACTIVATE_CH_ACTIVATE_SET(x)\
813 	FIELD_PREP(FDMA_CH_ACTIVATE_CH_ACTIVATE, x)
814 #define FDMA_CH_ACTIVATE_CH_ACTIVATE_GET(x)\
815 	FIELD_GET(FDMA_CH_ACTIVATE_CH_ACTIVATE, x)
816 
817 /*      FDMA:FDMA:FDMA_CH_RELOAD */
818 #define FDMA_CH_RELOAD            __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 4, 0, 1, 4)
819 
820 #define FDMA_CH_RELOAD_CH_RELOAD                 GENMASK(7, 0)
821 #define FDMA_CH_RELOAD_CH_RELOAD_SET(x)\
822 	FIELD_PREP(FDMA_CH_RELOAD_CH_RELOAD, x)
823 #define FDMA_CH_RELOAD_CH_RELOAD_GET(x)\
824 	FIELD_GET(FDMA_CH_RELOAD_CH_RELOAD, x)
825 
826 /*      FDMA:FDMA:FDMA_CH_DISABLE */
827 #define FDMA_CH_DISABLE           __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 8, 0, 1, 4)
828 
829 #define FDMA_CH_DISABLE_CH_DISABLE               GENMASK(7, 0)
830 #define FDMA_CH_DISABLE_CH_DISABLE_SET(x)\
831 	FIELD_PREP(FDMA_CH_DISABLE_CH_DISABLE, x)
832 #define FDMA_CH_DISABLE_CH_DISABLE_GET(x)\
833 	FIELD_GET(FDMA_CH_DISABLE_CH_DISABLE, x)
834 
835 /*      FDMA:FDMA:FDMA_CH_DB_DISCARD */
836 #define FDMA_CH_DB_DISCARD        __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 16, 0, 1, 4)
837 
838 #define FDMA_CH_DB_DISCARD_DB_DISCARD            GENMASK(7, 0)
839 #define FDMA_CH_DB_DISCARD_DB_DISCARD_SET(x)\
840 	FIELD_PREP(FDMA_CH_DB_DISCARD_DB_DISCARD, x)
841 #define FDMA_CH_DB_DISCARD_DB_DISCARD_GET(x)\
842 	FIELD_GET(FDMA_CH_DB_DISCARD_DB_DISCARD, x)
843 
844 /*      FDMA:FDMA:FDMA_DCB_LLP */
845 #define FDMA_DCB_LLP(r)           __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 52, r, 8, 4)
846 
847 /*      FDMA:FDMA:FDMA_DCB_LLP1 */
848 #define FDMA_DCB_LLP1(r)          __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 84, r, 8, 4)
849 
850 /*      FDMA:FDMA:FDMA_CH_ACTIVE */
851 #define FDMA_CH_ACTIVE            __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 180, 0, 1, 4)
852 
853 /*      FDMA:FDMA:FDMA_CH_CFG */
854 #define FDMA_CH_CFG(r)            __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 224, r, 8, 4)
855 
856 #define FDMA_CH_CFG_CH_INTR_DB_EOF_ONLY          BIT(4)
857 #define FDMA_CH_CFG_CH_INTR_DB_EOF_ONLY_SET(x)\
858 	FIELD_PREP(FDMA_CH_CFG_CH_INTR_DB_EOF_ONLY, x)
859 #define FDMA_CH_CFG_CH_INTR_DB_EOF_ONLY_GET(x)\
860 	FIELD_GET(FDMA_CH_CFG_CH_INTR_DB_EOF_ONLY, x)
861 
862 #define FDMA_CH_CFG_CH_INJ_PORT                  BIT(3)
863 #define FDMA_CH_CFG_CH_INJ_PORT_SET(x)\
864 	FIELD_PREP(FDMA_CH_CFG_CH_INJ_PORT, x)
865 #define FDMA_CH_CFG_CH_INJ_PORT_GET(x)\
866 	FIELD_GET(FDMA_CH_CFG_CH_INJ_PORT, x)
867 
868 #define FDMA_CH_CFG_CH_DCB_DB_CNT                GENMASK(2, 1)
869 #define FDMA_CH_CFG_CH_DCB_DB_CNT_SET(x)\
870 	FIELD_PREP(FDMA_CH_CFG_CH_DCB_DB_CNT, x)
871 #define FDMA_CH_CFG_CH_DCB_DB_CNT_GET(x)\
872 	FIELD_GET(FDMA_CH_CFG_CH_DCB_DB_CNT, x)
873 
874 #define FDMA_CH_CFG_CH_MEM                       BIT(0)
875 #define FDMA_CH_CFG_CH_MEM_SET(x)\
876 	FIELD_PREP(FDMA_CH_CFG_CH_MEM, x)
877 #define FDMA_CH_CFG_CH_MEM_GET(x)\
878 	FIELD_GET(FDMA_CH_CFG_CH_MEM, x)
879 
880 /*      FDMA:FDMA:FDMA_PORT_CTRL */
881 #define FDMA_PORT_CTRL(r)         __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 376, r, 2, 4)
882 
883 #define FDMA_PORT_CTRL_INJ_STOP                  BIT(4)
884 #define FDMA_PORT_CTRL_INJ_STOP_SET(x)\
885 	FIELD_PREP(FDMA_PORT_CTRL_INJ_STOP, x)
886 #define FDMA_PORT_CTRL_INJ_STOP_GET(x)\
887 	FIELD_GET(FDMA_PORT_CTRL_INJ_STOP, x)
888 
889 #define FDMA_PORT_CTRL_XTR_STOP                  BIT(2)
890 #define FDMA_PORT_CTRL_XTR_STOP_SET(x)\
891 	FIELD_PREP(FDMA_PORT_CTRL_XTR_STOP, x)
892 #define FDMA_PORT_CTRL_XTR_STOP_GET(x)\
893 	FIELD_GET(FDMA_PORT_CTRL_XTR_STOP, x)
894 
895 /*      FDMA:FDMA:FDMA_INTR_DB */
896 #define FDMA_INTR_DB              __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 392, 0, 1, 4)
897 
898 /*      FDMA:FDMA:FDMA_INTR_DB_ENA */
899 #define FDMA_INTR_DB_ENA          __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 396, 0, 1, 4)
900 
901 #define FDMA_INTR_DB_ENA_INTR_DB_ENA             GENMASK(7, 0)
902 #define FDMA_INTR_DB_ENA_INTR_DB_ENA_SET(x)\
903 	FIELD_PREP(FDMA_INTR_DB_ENA_INTR_DB_ENA, x)
904 #define FDMA_INTR_DB_ENA_INTR_DB_ENA_GET(x)\
905 	FIELD_GET(FDMA_INTR_DB_ENA_INTR_DB_ENA, x)
906 
907 /*      FDMA:FDMA:FDMA_INTR_ERR */
908 #define FDMA_INTR_ERR             __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 400, 0, 1, 4)
909 
910 /*      FDMA:FDMA:FDMA_ERRORS */
911 #define FDMA_ERRORS               __REG(TARGET_FDMA, 0, 1, 8, 0, 1, 428, 412, 0, 1, 4)
912 
913 /*      PTP:PTP_CFG:PTP_PIN_INTR */
914 #define PTP_PIN_INTR              __REG(TARGET_PTP, 0, 1, 512, 0, 1, 16, 0, 0, 1, 4)
915 
916 #define PTP_PIN_INTR_INTR_PTP                    GENMASK(7, 0)
917 #define PTP_PIN_INTR_INTR_PTP_SET(x)\
918 	FIELD_PREP(PTP_PIN_INTR_INTR_PTP, x)
919 #define PTP_PIN_INTR_INTR_PTP_GET(x)\
920 	FIELD_GET(PTP_PIN_INTR_INTR_PTP, x)
921 
922 /*      PTP:PTP_CFG:PTP_PIN_INTR_ENA */
923 #define PTP_PIN_INTR_ENA          __REG(TARGET_PTP, 0, 1, 512, 0, 1, 16, 4, 0, 1, 4)
924 
925 #define PTP_PIN_INTR_ENA_INTR_ENA                GENMASK(7, 0)
926 #define PTP_PIN_INTR_ENA_INTR_ENA_SET(x)\
927 	FIELD_PREP(PTP_PIN_INTR_ENA_INTR_ENA, x)
928 #define PTP_PIN_INTR_ENA_INTR_ENA_GET(x)\
929 	FIELD_GET(PTP_PIN_INTR_ENA_INTR_ENA, x)
930 
931 /*      PTP:PTP_CFG:PTP_DOM_CFG */
932 #define PTP_DOM_CFG               __REG(TARGET_PTP, 0, 1, 512, 0, 1, 16, 12, 0, 1, 4)
933 
934 #define PTP_DOM_CFG_ENA                          GENMASK(11, 9)
935 #define PTP_DOM_CFG_ENA_SET(x)\
936 	FIELD_PREP(PTP_DOM_CFG_ENA, x)
937 #define PTP_DOM_CFG_ENA_GET(x)\
938 	FIELD_GET(PTP_DOM_CFG_ENA, x)
939 
940 #define PTP_DOM_CFG_CLKCFG_DIS                   GENMASK(2, 0)
941 #define PTP_DOM_CFG_CLKCFG_DIS_SET(x)\
942 	FIELD_PREP(PTP_DOM_CFG_CLKCFG_DIS, x)
943 #define PTP_DOM_CFG_CLKCFG_DIS_GET(x)\
944 	FIELD_GET(PTP_DOM_CFG_CLKCFG_DIS, x)
945 
946 /*      PTP:PTP_TOD_DOMAINS:CLK_PER_CFG */
947 #define PTP_CLK_PER_CFG(g, r)     __REG(TARGET_PTP, 0, 1, 528, g, 3, 28, 0, r, 2, 4)
948 
949 /*      PTP:PTP_PINS:PTP_PIN_CFG */
950 #define PTP_PIN_CFG(g)            __REG(TARGET_PTP, 0, 1, 0, g, 8, 64, 0, 0, 1, 4)
951 
952 #define PTP_PIN_CFG_PIN_ACTION                   GENMASK(29, 27)
953 #define PTP_PIN_CFG_PIN_ACTION_SET(x)\
954 	FIELD_PREP(PTP_PIN_CFG_PIN_ACTION, x)
955 #define PTP_PIN_CFG_PIN_ACTION_GET(x)\
956 	FIELD_GET(PTP_PIN_CFG_PIN_ACTION, x)
957 
958 #define PTP_PIN_CFG_PIN_SYNC                     GENMASK(26, 25)
959 #define PTP_PIN_CFG_PIN_SYNC_SET(x)\
960 	FIELD_PREP(PTP_PIN_CFG_PIN_SYNC, x)
961 #define PTP_PIN_CFG_PIN_SYNC_GET(x)\
962 	FIELD_GET(PTP_PIN_CFG_PIN_SYNC, x)
963 
964 #define PTP_PIN_CFG_PIN_SELECT                   GENMASK(23, 21)
965 #define PTP_PIN_CFG_PIN_SELECT_SET(x)\
966 	FIELD_PREP(PTP_PIN_CFG_PIN_SELECT, x)
967 #define PTP_PIN_CFG_PIN_SELECT_GET(x)\
968 	FIELD_GET(PTP_PIN_CFG_PIN_SELECT, x)
969 
970 #define PTP_PIN_CFG_PIN_DOM                      GENMASK(17, 16)
971 #define PTP_PIN_CFG_PIN_DOM_SET(x)\
972 	FIELD_PREP(PTP_PIN_CFG_PIN_DOM, x)
973 #define PTP_PIN_CFG_PIN_DOM_GET(x)\
974 	FIELD_GET(PTP_PIN_CFG_PIN_DOM, x)
975 
976 /*      PTP:PTP_PINS:PTP_TOD_SEC_MSB */
977 #define PTP_TOD_SEC_MSB(g)        __REG(TARGET_PTP, 0, 1, 0, g, 8, 64, 4, 0, 1, 4)
978 
979 #define PTP_TOD_SEC_MSB_TOD_SEC_MSB              GENMASK(15, 0)
980 #define PTP_TOD_SEC_MSB_TOD_SEC_MSB_SET(x)\
981 	FIELD_PREP(PTP_TOD_SEC_MSB_TOD_SEC_MSB, x)
982 #define PTP_TOD_SEC_MSB_TOD_SEC_MSB_GET(x)\
983 	FIELD_GET(PTP_TOD_SEC_MSB_TOD_SEC_MSB, x)
984 
985 /*      PTP:PTP_PINS:PTP_TOD_SEC_LSB */
986 #define PTP_TOD_SEC_LSB(g)        __REG(TARGET_PTP, 0, 1, 0, g, 8, 64, 8, 0, 1, 4)
987 
988 /*      PTP:PTP_PINS:PTP_TOD_NSEC */
989 #define PTP_TOD_NSEC(g)           __REG(TARGET_PTP, 0, 1, 0, g, 8, 64, 12, 0, 1, 4)
990 
991 #define PTP_TOD_NSEC_TOD_NSEC                    GENMASK(29, 0)
992 #define PTP_TOD_NSEC_TOD_NSEC_SET(x)\
993 	FIELD_PREP(PTP_TOD_NSEC_TOD_NSEC, x)
994 #define PTP_TOD_NSEC_TOD_NSEC_GET(x)\
995 	FIELD_GET(PTP_TOD_NSEC_TOD_NSEC, x)
996 
997 /*      PTP:PTP_PINS:WF_HIGH_PERIOD */
998 #define PTP_WF_HIGH_PERIOD(g)     __REG(TARGET_PTP,\
999 					0, 1, 0, g, 8, 64, 24, 0, 1, 4)
1000 
1001 #define PTP_WF_HIGH_PERIOD_PIN_WFH(x)            ((x) & GENMASK(29, 0))
1002 #define PTP_WF_HIGH_PERIOD_PIN_WFH_M             GENMASK(29, 0)
1003 #define PTP_WF_HIGH_PERIOD_PIN_WFH_X(x)          ((x) & GENMASK(29, 0))
1004 
1005 /*      PTP:PTP_PINS:WF_LOW_PERIOD */
1006 #define PTP_WF_LOW_PERIOD(g)      __REG(TARGET_PTP,\
1007 					0, 1, 0, g, 8, 64, 28, 0, 1, 4)
1008 
1009 #define PTP_WF_LOW_PERIOD_PIN_WFL(x)             ((x) & GENMASK(29, 0))
1010 #define PTP_WF_LOW_PERIOD_PIN_WFL_M              GENMASK(29, 0)
1011 #define PTP_WF_LOW_PERIOD_PIN_WFL_X(x)           ((x) & GENMASK(29, 0))
1012 
1013 /*      PTP:PTP_TS_FIFO:PTP_TWOSTEP_CTRL */
1014 #define PTP_TWOSTEP_CTRL          __REG(TARGET_PTP, 0, 1, 612, 0, 1, 12, 0, 0, 1, 4)
1015 
1016 #define PTP_TWOSTEP_CTRL_NXT                     BIT(11)
1017 #define PTP_TWOSTEP_CTRL_NXT_SET(x)\
1018 	FIELD_PREP(PTP_TWOSTEP_CTRL_NXT, x)
1019 #define PTP_TWOSTEP_CTRL_NXT_GET(x)\
1020 	FIELD_GET(PTP_TWOSTEP_CTRL_NXT, x)
1021 
1022 #define PTP_TWOSTEP_CTRL_VLD                     BIT(10)
1023 #define PTP_TWOSTEP_CTRL_VLD_SET(x)\
1024 	FIELD_PREP(PTP_TWOSTEP_CTRL_VLD, x)
1025 #define PTP_TWOSTEP_CTRL_VLD_GET(x)\
1026 	FIELD_GET(PTP_TWOSTEP_CTRL_VLD, x)
1027 
1028 #define PTP_TWOSTEP_CTRL_STAMP_TX                BIT(9)
1029 #define PTP_TWOSTEP_CTRL_STAMP_TX_SET(x)\
1030 	FIELD_PREP(PTP_TWOSTEP_CTRL_STAMP_TX, x)
1031 #define PTP_TWOSTEP_CTRL_STAMP_TX_GET(x)\
1032 	FIELD_GET(PTP_TWOSTEP_CTRL_STAMP_TX, x)
1033 
1034 #define PTP_TWOSTEP_CTRL_STAMP_PORT              GENMASK(8, 1)
1035 #define PTP_TWOSTEP_CTRL_STAMP_PORT_SET(x)\
1036 	FIELD_PREP(PTP_TWOSTEP_CTRL_STAMP_PORT, x)
1037 #define PTP_TWOSTEP_CTRL_STAMP_PORT_GET(x)\
1038 	FIELD_GET(PTP_TWOSTEP_CTRL_STAMP_PORT, x)
1039 
1040 #define PTP_TWOSTEP_CTRL_OVFL                    BIT(0)
1041 #define PTP_TWOSTEP_CTRL_OVFL_SET(x)\
1042 	FIELD_PREP(PTP_TWOSTEP_CTRL_OVFL, x)
1043 #define PTP_TWOSTEP_CTRL_OVFL_GET(x)\
1044 	FIELD_GET(PTP_TWOSTEP_CTRL_OVFL, x)
1045 
1046 /*      PTP:PTP_TS_FIFO:PTP_TWOSTEP_STAMP */
1047 #define PTP_TWOSTEP_STAMP         __REG(TARGET_PTP, 0, 1, 612, 0, 1, 12, 4, 0, 1, 4)
1048 
1049 #define PTP_TWOSTEP_STAMP_STAMP_NSEC             GENMASK(31, 2)
1050 #define PTP_TWOSTEP_STAMP_STAMP_NSEC_SET(x)\
1051 	FIELD_PREP(PTP_TWOSTEP_STAMP_STAMP_NSEC, x)
1052 #define PTP_TWOSTEP_STAMP_STAMP_NSEC_GET(x)\
1053 	FIELD_GET(PTP_TWOSTEP_STAMP_STAMP_NSEC, x)
1054 
1055 /*      DEVCPU_QS:XTR:XTR_GRP_CFG */
1056 #define QS_XTR_GRP_CFG(r)         __REG(TARGET_QS, 0, 1, 0, 0, 1, 36, 0, r, 2, 4)
1057 
1058 #define QS_XTR_GRP_CFG_MODE                      GENMASK(3, 2)
1059 #define QS_XTR_GRP_CFG_MODE_SET(x)\
1060 	FIELD_PREP(QS_XTR_GRP_CFG_MODE, x)
1061 #define QS_XTR_GRP_CFG_MODE_GET(x)\
1062 	FIELD_GET(QS_XTR_GRP_CFG_MODE, x)
1063 
1064 #define QS_XTR_GRP_CFG_BYTE_SWAP                 BIT(0)
1065 #define QS_XTR_GRP_CFG_BYTE_SWAP_SET(x)\
1066 	FIELD_PREP(QS_XTR_GRP_CFG_BYTE_SWAP, x)
1067 #define QS_XTR_GRP_CFG_BYTE_SWAP_GET(x)\
1068 	FIELD_GET(QS_XTR_GRP_CFG_BYTE_SWAP, x)
1069 
1070 /*      DEVCPU_QS:XTR:XTR_RD */
1071 #define QS_XTR_RD(r)              __REG(TARGET_QS, 0, 1, 0, 0, 1, 36, 8, r, 2, 4)
1072 
1073 /*      DEVCPU_QS:XTR:XTR_FLUSH */
1074 #define QS_XTR_FLUSH              __REG(TARGET_QS, 0, 1, 0, 0, 1, 36, 24, 0, 1, 4)
1075 
1076 /*      DEVCPU_QS:XTR:XTR_DATA_PRESENT */
1077 #define QS_XTR_DATA_PRESENT       __REG(TARGET_QS, 0, 1, 0, 0, 1, 36, 28, 0, 1, 4)
1078 
1079 /*      DEVCPU_QS:INJ:INJ_GRP_CFG */
1080 #define QS_INJ_GRP_CFG(r)         __REG(TARGET_QS, 0, 1, 36, 0, 1, 40, 0, r, 2, 4)
1081 
1082 #define QS_INJ_GRP_CFG_MODE                      GENMASK(3, 2)
1083 #define QS_INJ_GRP_CFG_MODE_SET(x)\
1084 	FIELD_PREP(QS_INJ_GRP_CFG_MODE, x)
1085 #define QS_INJ_GRP_CFG_MODE_GET(x)\
1086 	FIELD_GET(QS_INJ_GRP_CFG_MODE, x)
1087 
1088 #define QS_INJ_GRP_CFG_BYTE_SWAP                 BIT(0)
1089 #define QS_INJ_GRP_CFG_BYTE_SWAP_SET(x)\
1090 	FIELD_PREP(QS_INJ_GRP_CFG_BYTE_SWAP, x)
1091 #define QS_INJ_GRP_CFG_BYTE_SWAP_GET(x)\
1092 	FIELD_GET(QS_INJ_GRP_CFG_BYTE_SWAP, x)
1093 
1094 /*      DEVCPU_QS:INJ:INJ_WR */
1095 #define QS_INJ_WR(r)              __REG(TARGET_QS, 0, 1, 36, 0, 1, 40, 8, r, 2, 4)
1096 
1097 /*      DEVCPU_QS:INJ:INJ_CTRL */
1098 #define QS_INJ_CTRL(r)            __REG(TARGET_QS, 0, 1, 36, 0, 1, 40, 16, r, 2, 4)
1099 
1100 #define QS_INJ_CTRL_GAP_SIZE                     GENMASK(24, 21)
1101 #define QS_INJ_CTRL_GAP_SIZE_SET(x)\
1102 	FIELD_PREP(QS_INJ_CTRL_GAP_SIZE, x)
1103 #define QS_INJ_CTRL_GAP_SIZE_GET(x)\
1104 	FIELD_GET(QS_INJ_CTRL_GAP_SIZE, x)
1105 
1106 #define QS_INJ_CTRL_EOF                          BIT(19)
1107 #define QS_INJ_CTRL_EOF_SET(x)\
1108 	FIELD_PREP(QS_INJ_CTRL_EOF, x)
1109 #define QS_INJ_CTRL_EOF_GET(x)\
1110 	FIELD_GET(QS_INJ_CTRL_EOF, x)
1111 
1112 #define QS_INJ_CTRL_SOF                          BIT(18)
1113 #define QS_INJ_CTRL_SOF_SET(x)\
1114 	FIELD_PREP(QS_INJ_CTRL_SOF, x)
1115 #define QS_INJ_CTRL_SOF_GET(x)\
1116 	FIELD_GET(QS_INJ_CTRL_SOF, x)
1117 
1118 #define QS_INJ_CTRL_VLD_BYTES                    GENMASK(17, 16)
1119 #define QS_INJ_CTRL_VLD_BYTES_SET(x)\
1120 	FIELD_PREP(QS_INJ_CTRL_VLD_BYTES, x)
1121 #define QS_INJ_CTRL_VLD_BYTES_GET(x)\
1122 	FIELD_GET(QS_INJ_CTRL_VLD_BYTES, x)
1123 
1124 /*      DEVCPU_QS:INJ:INJ_STATUS */
1125 #define QS_INJ_STATUS             __REG(TARGET_QS, 0, 1, 36, 0, 1, 40, 24, 0, 1, 4)
1126 
1127 #define QS_INJ_STATUS_WMARK_REACHED              GENMASK(5, 4)
1128 #define QS_INJ_STATUS_WMARK_REACHED_SET(x)\
1129 	FIELD_PREP(QS_INJ_STATUS_WMARK_REACHED, x)
1130 #define QS_INJ_STATUS_WMARK_REACHED_GET(x)\
1131 	FIELD_GET(QS_INJ_STATUS_WMARK_REACHED, x)
1132 
1133 #define QS_INJ_STATUS_FIFO_RDY                   GENMASK(3, 2)
1134 #define QS_INJ_STATUS_FIFO_RDY_SET(x)\
1135 	FIELD_PREP(QS_INJ_STATUS_FIFO_RDY, x)
1136 #define QS_INJ_STATUS_FIFO_RDY_GET(x)\
1137 	FIELD_GET(QS_INJ_STATUS_FIFO_RDY, x)
1138 
1139 /*      QSYS:SYSTEM:PORT_MODE */
1140 #define QSYS_PORT_MODE(r)         __REG(TARGET_QSYS, 0, 1, 28008, 0, 1, 216, 0, r, 10, 4)
1141 
1142 #define QSYS_PORT_MODE_DEQUEUE_DIS               BIT(1)
1143 #define QSYS_PORT_MODE_DEQUEUE_DIS_SET(x)\
1144 	FIELD_PREP(QSYS_PORT_MODE_DEQUEUE_DIS, x)
1145 #define QSYS_PORT_MODE_DEQUEUE_DIS_GET(x)\
1146 	FIELD_GET(QSYS_PORT_MODE_DEQUEUE_DIS, x)
1147 
1148 /*      QSYS:SYSTEM:SWITCH_PORT_MODE */
1149 #define QSYS_SW_PORT_MODE(r)      __REG(TARGET_QSYS, 0, 1, 28008, 0, 1, 216, 80, r, 9, 4)
1150 
1151 #define QSYS_SW_PORT_MODE_PORT_ENA               BIT(18)
1152 #define QSYS_SW_PORT_MODE_PORT_ENA_SET(x)\
1153 	FIELD_PREP(QSYS_SW_PORT_MODE_PORT_ENA, x)
1154 #define QSYS_SW_PORT_MODE_PORT_ENA_GET(x)\
1155 	FIELD_GET(QSYS_SW_PORT_MODE_PORT_ENA, x)
1156 
1157 #define QSYS_SW_PORT_MODE_SCH_NEXT_CFG           GENMASK(16, 14)
1158 #define QSYS_SW_PORT_MODE_SCH_NEXT_CFG_SET(x)\
1159 	FIELD_PREP(QSYS_SW_PORT_MODE_SCH_NEXT_CFG, x)
1160 #define QSYS_SW_PORT_MODE_SCH_NEXT_CFG_GET(x)\
1161 	FIELD_GET(QSYS_SW_PORT_MODE_SCH_NEXT_CFG, x)
1162 
1163 #define QSYS_SW_PORT_MODE_INGRESS_DROP_MODE      BIT(12)
1164 #define QSYS_SW_PORT_MODE_INGRESS_DROP_MODE_SET(x)\
1165 	FIELD_PREP(QSYS_SW_PORT_MODE_INGRESS_DROP_MODE, x)
1166 #define QSYS_SW_PORT_MODE_INGRESS_DROP_MODE_GET(x)\
1167 	FIELD_GET(QSYS_SW_PORT_MODE_INGRESS_DROP_MODE, x)
1168 
1169 #define QSYS_SW_PORT_MODE_TX_PFC_ENA             GENMASK(11, 4)
1170 #define QSYS_SW_PORT_MODE_TX_PFC_ENA_SET(x)\
1171 	FIELD_PREP(QSYS_SW_PORT_MODE_TX_PFC_ENA, x)
1172 #define QSYS_SW_PORT_MODE_TX_PFC_ENA_GET(x)\
1173 	FIELD_GET(QSYS_SW_PORT_MODE_TX_PFC_ENA, x)
1174 
1175 #define QSYS_SW_PORT_MODE_AGING_MODE             GENMASK(1, 0)
1176 #define QSYS_SW_PORT_MODE_AGING_MODE_SET(x)\
1177 	FIELD_PREP(QSYS_SW_PORT_MODE_AGING_MODE, x)
1178 #define QSYS_SW_PORT_MODE_AGING_MODE_GET(x)\
1179 	FIELD_GET(QSYS_SW_PORT_MODE_AGING_MODE, x)
1180 
1181 /*      QSYS:SYSTEM:SW_STATUS */
1182 #define QSYS_SW_STATUS(r)         __REG(TARGET_QSYS, 0, 1, 28008, 0, 1, 216, 164, r, 9, 4)
1183 
1184 #define QSYS_SW_STATUS_EQ_AVAIL                  GENMASK(7, 0)
1185 #define QSYS_SW_STATUS_EQ_AVAIL_SET(x)\
1186 	FIELD_PREP(QSYS_SW_STATUS_EQ_AVAIL, x)
1187 #define QSYS_SW_STATUS_EQ_AVAIL_GET(x)\
1188 	FIELD_GET(QSYS_SW_STATUS_EQ_AVAIL, x)
1189 
1190 /*      QSYS:SYSTEM:CPU_GROUP_MAP */
1191 #define QSYS_CPU_GROUP_MAP        __REG(TARGET_QSYS, 0, 1, 28008, 0, 1, 216, 204, 0, 1, 4)
1192 
1193 /*      QSYS:RES_CTRL:RES_CFG */
1194 #define QSYS_RES_CFG(g)           __REG(TARGET_QSYS, 0, 1, 32768, g, 1024, 8, 0, 0, 1, 4)
1195 
1196 /*      QSYS:HSCH:CIR_CFG */
1197 #define QSYS_CIR_CFG(g)           __REG(TARGET_QSYS, 0, 1, 16384, g, 90, 128, 0, 0, 1, 4)
1198 
1199 #define QSYS_CIR_CFG_CIR_RATE                    GENMASK(20, 6)
1200 #define QSYS_CIR_CFG_CIR_RATE_SET(x)\
1201 	FIELD_PREP(QSYS_CIR_CFG_CIR_RATE, x)
1202 #define QSYS_CIR_CFG_CIR_RATE_GET(x)\
1203 	FIELD_GET(QSYS_CIR_CFG_CIR_RATE, x)
1204 
1205 #define QSYS_CIR_CFG_CIR_BURST                   GENMASK(5, 0)
1206 #define QSYS_CIR_CFG_CIR_BURST_SET(x)\
1207 	FIELD_PREP(QSYS_CIR_CFG_CIR_BURST, x)
1208 #define QSYS_CIR_CFG_CIR_BURST_GET(x)\
1209 	FIELD_GET(QSYS_CIR_CFG_CIR_BURST, x)
1210 
1211 /*      QSYS:HSCH:SE_CFG */
1212 #define QSYS_SE_CFG(g)            __REG(TARGET_QSYS, 0, 1, 16384, g, 90, 128, 8, 0, 1, 4)
1213 
1214 #define QSYS_SE_CFG_SE_DWRR_CNT                  GENMASK(9, 6)
1215 #define QSYS_SE_CFG_SE_DWRR_CNT_SET(x)\
1216 	FIELD_PREP(QSYS_SE_CFG_SE_DWRR_CNT, x)
1217 #define QSYS_SE_CFG_SE_DWRR_CNT_GET(x)\
1218 	FIELD_GET(QSYS_SE_CFG_SE_DWRR_CNT, x)
1219 
1220 #define QSYS_SE_CFG_SE_RR_ENA                    BIT(5)
1221 #define QSYS_SE_CFG_SE_RR_ENA_SET(x)\
1222 	FIELD_PREP(QSYS_SE_CFG_SE_RR_ENA, x)
1223 #define QSYS_SE_CFG_SE_RR_ENA_GET(x)\
1224 	FIELD_GET(QSYS_SE_CFG_SE_RR_ENA, x)
1225 
1226 #define QSYS_SE_CFG_SE_AVB_ENA                   BIT(4)
1227 #define QSYS_SE_CFG_SE_AVB_ENA_SET(x)\
1228 	FIELD_PREP(QSYS_SE_CFG_SE_AVB_ENA, x)
1229 #define QSYS_SE_CFG_SE_AVB_ENA_GET(x)\
1230 	FIELD_GET(QSYS_SE_CFG_SE_AVB_ENA, x)
1231 
1232 #define QSYS_SE_CFG_SE_FRM_MODE                  GENMASK(3, 2)
1233 #define QSYS_SE_CFG_SE_FRM_MODE_SET(x)\
1234 	FIELD_PREP(QSYS_SE_CFG_SE_FRM_MODE, x)
1235 #define QSYS_SE_CFG_SE_FRM_MODE_GET(x)\
1236 	FIELD_GET(QSYS_SE_CFG_SE_FRM_MODE, x)
1237 
1238 #define QSYS_SE_DWRR_CFG(g, r)    __REG(TARGET_QSYS, 0, 1, 16384, g, 90, 128, 12, r, 12, 4)
1239 
1240 #define QSYS_SE_DWRR_CFG_DWRR_COST               GENMASK(4, 0)
1241 #define QSYS_SE_DWRR_CFG_DWRR_COST_SET(x)\
1242 	FIELD_PREP(QSYS_SE_DWRR_CFG_DWRR_COST, x)
1243 #define QSYS_SE_DWRR_CFG_DWRR_COST_GET(x)\
1244 	FIELD_GET(QSYS_SE_DWRR_CFG_DWRR_COST, x)
1245 
1246 /*      QSYS:TAS_CONFIG:TAS_CFG_CTRL */
1247 #define QSYS_TAS_CFG_CTRL         __REG(TARGET_QSYS, 0, 1, 57372, 0, 1, 12, 0, 0, 1, 4)
1248 
1249 #define QSYS_TAS_CFG_CTRL_LIST_NUM_MAX           GENMASK(27, 23)
1250 #define QSYS_TAS_CFG_CTRL_LIST_NUM_MAX_SET(x)\
1251 	FIELD_PREP(QSYS_TAS_CFG_CTRL_LIST_NUM_MAX, x)
1252 #define QSYS_TAS_CFG_CTRL_LIST_NUM_MAX_GET(x)\
1253 	FIELD_GET(QSYS_TAS_CFG_CTRL_LIST_NUM_MAX, x)
1254 
1255 #define QSYS_TAS_CFG_CTRL_LIST_NUM               GENMASK(22, 18)
1256 #define QSYS_TAS_CFG_CTRL_LIST_NUM_SET(x)\
1257 	FIELD_PREP(QSYS_TAS_CFG_CTRL_LIST_NUM, x)
1258 #define QSYS_TAS_CFG_CTRL_LIST_NUM_GET(x)\
1259 	FIELD_GET(QSYS_TAS_CFG_CTRL_LIST_NUM, x)
1260 
1261 #define QSYS_TAS_CFG_CTRL_ALWAYS_GB_SCH_Q        BIT(17)
1262 #define QSYS_TAS_CFG_CTRL_ALWAYS_GB_SCH_Q_SET(x)\
1263 	FIELD_PREP(QSYS_TAS_CFG_CTRL_ALWAYS_GB_SCH_Q, x)
1264 #define QSYS_TAS_CFG_CTRL_ALWAYS_GB_SCH_Q_GET(x)\
1265 	FIELD_GET(QSYS_TAS_CFG_CTRL_ALWAYS_GB_SCH_Q, x)
1266 
1267 #define QSYS_TAS_CFG_CTRL_GCL_ENTRY_NUM          GENMASK(16, 5)
1268 #define QSYS_TAS_CFG_CTRL_GCL_ENTRY_NUM_SET(x)\
1269 	FIELD_PREP(QSYS_TAS_CFG_CTRL_GCL_ENTRY_NUM, x)
1270 #define QSYS_TAS_CFG_CTRL_GCL_ENTRY_NUM_GET(x)\
1271 	FIELD_GET(QSYS_TAS_CFG_CTRL_GCL_ENTRY_NUM, x)
1272 
1273 /*      QSYS:TAS_CONFIG:TAS_GATE_STATE_CTRL */
1274 #define QSYS_TAS_GS_CTRL          __REG(TARGET_QSYS, 0, 1, 57372, 0, 1, 12, 4, 0, 1, 4)
1275 
1276 #define QSYS_TAS_GS_CTRL_HSCH_POS                GENMASK(2, 0)
1277 #define QSYS_TAS_GS_CTRL_HSCH_POS_SET(x)\
1278 	FIELD_PREP(QSYS_TAS_GS_CTRL_HSCH_POS, x)
1279 #define QSYS_TAS_GS_CTRL_HSCH_POS_GET(x)\
1280 	FIELD_GET(QSYS_TAS_GS_CTRL_HSCH_POS, x)
1281 
1282 /*      QSYS:TAS_CONFIG:TAS_STATEMACHINE_CFG */
1283 #define QSYS_TAS_STM_CFG          __REG(TARGET_QSYS, 0, 1, 57372, 0, 1, 12, 8, 0, 1, 4)
1284 
1285 #define QSYS_TAS_STM_CFG_REVISIT_DLY             GENMASK(7, 0)
1286 #define QSYS_TAS_STM_CFG_REVISIT_DLY_SET(x)\
1287 	FIELD_PREP(QSYS_TAS_STM_CFG_REVISIT_DLY, x)
1288 #define QSYS_TAS_STM_CFG_REVISIT_DLY_GET(x)\
1289 	FIELD_GET(QSYS_TAS_STM_CFG_REVISIT_DLY, x)
1290 
1291 /*      QSYS:TAS_PROFILE_CFG:TAS_PROFILE_CONFIG */
1292 #define QSYS_TAS_PROFILE_CFG(g)   __REG(TARGET_QSYS, 0, 1, 30720, g, 16, 64, 32, 0, 1, 4)
1293 
1294 #define QSYS_TAS_PROFILE_CFG_PORT_NUM            GENMASK(21, 19)
1295 #define QSYS_TAS_PROFILE_CFG_PORT_NUM_SET(x)\
1296 	FIELD_PREP(QSYS_TAS_PROFILE_CFG_PORT_NUM, x)
1297 #define QSYS_TAS_PROFILE_CFG_PORT_NUM_GET(x)\
1298 	FIELD_GET(QSYS_TAS_PROFILE_CFG_PORT_NUM, x)
1299 
1300 #define QSYS_TAS_PROFILE_CFG_LINK_SPEED          GENMASK(18, 16)
1301 #define QSYS_TAS_PROFILE_CFG_LINK_SPEED_SET(x)\
1302 	FIELD_PREP(QSYS_TAS_PROFILE_CFG_LINK_SPEED, x)
1303 #define QSYS_TAS_PROFILE_CFG_LINK_SPEED_GET(x)\
1304 	FIELD_GET(QSYS_TAS_PROFILE_CFG_LINK_SPEED, x)
1305 
1306 /*      QSYS:TAS_LIST_CFG:TAS_BASE_TIME_NSEC */
1307 #define QSYS_TAS_BT_NSEC          __REG(TARGET_QSYS, 0, 1, 27904, 0, 1, 64, 0, 0, 1, 4)
1308 
1309 #define QSYS_TAS_BT_NSEC_NSEC                    GENMASK(29, 0)
1310 #define QSYS_TAS_BT_NSEC_NSEC_SET(x)\
1311 	FIELD_PREP(QSYS_TAS_BT_NSEC_NSEC, x)
1312 #define QSYS_TAS_BT_NSEC_NSEC_GET(x)\
1313 	FIELD_GET(QSYS_TAS_BT_NSEC_NSEC, x)
1314 
1315 /*      QSYS:TAS_LIST_CFG:TAS_BASE_TIME_SEC_LSB */
1316 #define QSYS_TAS_BT_SEC_LSB       __REG(TARGET_QSYS, 0, 1, 27904, 0, 1, 64, 4, 0, 1, 4)
1317 
1318 /*      QSYS:TAS_LIST_CFG:TAS_BASE_TIME_SEC_MSB */
1319 #define QSYS_TAS_BT_SEC_MSB       __REG(TARGET_QSYS, 0, 1, 27904, 0, 1, 64, 8, 0, 1, 4)
1320 
1321 #define QSYS_TAS_BT_SEC_MSB_SEC_MSB              GENMASK(15, 0)
1322 #define QSYS_TAS_BT_SEC_MSB_SEC_MSB_SET(x)\
1323 	FIELD_PREP(QSYS_TAS_BT_SEC_MSB_SEC_MSB, x)
1324 #define QSYS_TAS_BT_SEC_MSB_SEC_MSB_GET(x)\
1325 	FIELD_GET(QSYS_TAS_BT_SEC_MSB_SEC_MSB, x)
1326 
1327 /*      QSYS:TAS_LIST_CFG:TAS_CYCLE_TIME_CFG */
1328 #define QSYS_TAS_CT_CFG           __REG(TARGET_QSYS, 0, 1, 27904, 0, 1, 64, 24, 0, 1, 4)
1329 
1330 /*      QSYS:TAS_LIST_CFG:TAS_STARTUP_CFG */
1331 #define QSYS_TAS_STARTUP_CFG      __REG(TARGET_QSYS, 0, 1, 27904, 0, 1, 64, 28, 0, 1, 4)
1332 
1333 #define QSYS_TAS_STARTUP_CFG_OBSOLETE_IDX        GENMASK(27, 23)
1334 #define QSYS_TAS_STARTUP_CFG_OBSOLETE_IDX_SET(x)\
1335 	FIELD_PREP(QSYS_TAS_STARTUP_CFG_OBSOLETE_IDX, x)
1336 #define QSYS_TAS_STARTUP_CFG_OBSOLETE_IDX_GET(x)\
1337 	FIELD_GET(QSYS_TAS_STARTUP_CFG_OBSOLETE_IDX, x)
1338 
1339 /*      QSYS:TAS_LIST_CFG:TAS_LIST_CFG */
1340 #define QSYS_TAS_LIST_CFG         __REG(TARGET_QSYS, 0, 1, 27904, 0, 1, 64, 32, 0, 1, 4)
1341 
1342 #define QSYS_TAS_LIST_CFG_LIST_BASE_ADDR         GENMASK(11, 0)
1343 #define QSYS_TAS_LIST_CFG_LIST_BASE_ADDR_SET(x)\
1344 	FIELD_PREP(QSYS_TAS_LIST_CFG_LIST_BASE_ADDR, x)
1345 #define QSYS_TAS_LIST_CFG_LIST_BASE_ADDR_GET(x)\
1346 	FIELD_GET(QSYS_TAS_LIST_CFG_LIST_BASE_ADDR, x)
1347 
1348 /*      QSYS:TAS_LIST_CFG:TAS_LIST_STATE */
1349 #define QSYS_TAS_LST              __REG(TARGET_QSYS, 0, 1, 27904, 0, 1, 64, 36, 0, 1, 4)
1350 
1351 #define QSYS_TAS_LST_LIST_STATE                  GENMASK(2, 0)
1352 #define QSYS_TAS_LST_LIST_STATE_SET(x)\
1353 	FIELD_PREP(QSYS_TAS_LST_LIST_STATE, x)
1354 #define QSYS_TAS_LST_LIST_STATE_GET(x)\
1355 	FIELD_GET(QSYS_TAS_LST_LIST_STATE, x)
1356 
1357 /*      QSYS:TAS_GCL_CFG:TAS_GCL_CTRL_CFG */
1358 #define QSYS_TAS_GCL_CT_CFG       __REG(TARGET_QSYS, 0, 1, 27968, 0, 1, 16, 0, 0, 1, 4)
1359 
1360 #define QSYS_TAS_GCL_CT_CFG_HSCH_POS             GENMASK(12, 10)
1361 #define QSYS_TAS_GCL_CT_CFG_HSCH_POS_SET(x)\
1362 	FIELD_PREP(QSYS_TAS_GCL_CT_CFG_HSCH_POS, x)
1363 #define QSYS_TAS_GCL_CT_CFG_HSCH_POS_GET(x)\
1364 	FIELD_GET(QSYS_TAS_GCL_CT_CFG_HSCH_POS, x)
1365 
1366 #define QSYS_TAS_GCL_CT_CFG_GATE_STATE           GENMASK(9, 2)
1367 #define QSYS_TAS_GCL_CT_CFG_GATE_STATE_SET(x)\
1368 	FIELD_PREP(QSYS_TAS_GCL_CT_CFG_GATE_STATE, x)
1369 #define QSYS_TAS_GCL_CT_CFG_GATE_STATE_GET(x)\
1370 	FIELD_GET(QSYS_TAS_GCL_CT_CFG_GATE_STATE, x)
1371 
1372 #define QSYS_TAS_GCL_CT_CFG_OP_TYPE              GENMASK(1, 0)
1373 #define QSYS_TAS_GCL_CT_CFG_OP_TYPE_SET(x)\
1374 	FIELD_PREP(QSYS_TAS_GCL_CT_CFG_OP_TYPE, x)
1375 #define QSYS_TAS_GCL_CT_CFG_OP_TYPE_GET(x)\
1376 	FIELD_GET(QSYS_TAS_GCL_CT_CFG_OP_TYPE, x)
1377 
1378 /*      QSYS:TAS_GCL_CFG:TAS_GCL_CTRL_CFG2 */
1379 #define QSYS_TAS_GCL_CT_CFG2      __REG(TARGET_QSYS, 0, 1, 27968, 0, 1, 16, 4, 0, 1, 4)
1380 
1381 #define QSYS_TAS_GCL_CT_CFG2_PORT_PROFILE        GENMASK(15, 12)
1382 #define QSYS_TAS_GCL_CT_CFG2_PORT_PROFILE_SET(x)\
1383 	FIELD_PREP(QSYS_TAS_GCL_CT_CFG2_PORT_PROFILE, x)
1384 #define QSYS_TAS_GCL_CT_CFG2_PORT_PROFILE_GET(x)\
1385 	FIELD_GET(QSYS_TAS_GCL_CT_CFG2_PORT_PROFILE, x)
1386 
1387 #define QSYS_TAS_GCL_CT_CFG2_NEXT_GCL            GENMASK(11, 0)
1388 #define QSYS_TAS_GCL_CT_CFG2_NEXT_GCL_SET(x)\
1389 	FIELD_PREP(QSYS_TAS_GCL_CT_CFG2_NEXT_GCL, x)
1390 #define QSYS_TAS_GCL_CT_CFG2_NEXT_GCL_GET(x)\
1391 	FIELD_GET(QSYS_TAS_GCL_CT_CFG2_NEXT_GCL, x)
1392 
1393 /*      QSYS:TAS_GCL_CFG:TAS_GCL_TIME_CFG */
1394 #define QSYS_TAS_GCL_TM_CFG       __REG(TARGET_QSYS, 0, 1, 27968, 0, 1, 16, 8, 0, 1, 4)
1395 
1396 /*      QSYS:HSCH_TAS_STATE:TAS_GATE_STATE */
1397 #define QSYS_TAS_GATE_STATE       __REG(TARGET_QSYS, 0, 1, 28004, 0, 1, 4, 0, 0, 1, 4)
1398 
1399 #define QSYS_TAS_GATE_STATE_TAS_GATE_STATE       GENMASK(7, 0)
1400 #define QSYS_TAS_GATE_STATE_TAS_GATE_STATE_SET(x)\
1401 	FIELD_PREP(QSYS_TAS_GATE_STATE_TAS_GATE_STATE, x)
1402 #define QSYS_TAS_GATE_STATE_TAS_GATE_STATE_GET(x)\
1403 	FIELD_GET(QSYS_TAS_GATE_STATE_TAS_GATE_STATE, x)
1404 
1405 /*      REW:PORT:PORT_VLAN_CFG */
1406 #define REW_PORT_VLAN_CFG(g)      __REG(TARGET_REW, 0, 1, 0, g, 10, 128, 0, 0, 1, 4)
1407 
1408 #define REW_PORT_VLAN_CFG_PORT_TPID              GENMASK(31, 16)
1409 #define REW_PORT_VLAN_CFG_PORT_TPID_SET(x)\
1410 	FIELD_PREP(REW_PORT_VLAN_CFG_PORT_TPID, x)
1411 #define REW_PORT_VLAN_CFG_PORT_TPID_GET(x)\
1412 	FIELD_GET(REW_PORT_VLAN_CFG_PORT_TPID, x)
1413 
1414 #define REW_PORT_VLAN_CFG_PORT_VID               GENMASK(11, 0)
1415 #define REW_PORT_VLAN_CFG_PORT_VID_SET(x)\
1416 	FIELD_PREP(REW_PORT_VLAN_CFG_PORT_VID, x)
1417 #define REW_PORT_VLAN_CFG_PORT_VID_GET(x)\
1418 	FIELD_GET(REW_PORT_VLAN_CFG_PORT_VID, x)
1419 
1420 /*      REW:PORT:TAG_CFG */
1421 #define REW_TAG_CFG(g)            __REG(TARGET_REW, 0, 1, 0, g, 10, 128, 4, 0, 1, 4)
1422 
1423 #define REW_TAG_CFG_TAG_CFG                      GENMASK(8, 7)
1424 #define REW_TAG_CFG_TAG_CFG_SET(x)\
1425 	FIELD_PREP(REW_TAG_CFG_TAG_CFG, x)
1426 #define REW_TAG_CFG_TAG_CFG_GET(x)\
1427 	FIELD_GET(REW_TAG_CFG_TAG_CFG, x)
1428 
1429 #define REW_TAG_CFG_TAG_TPID_CFG                 GENMASK(6, 5)
1430 #define REW_TAG_CFG_TAG_TPID_CFG_SET(x)\
1431 	FIELD_PREP(REW_TAG_CFG_TAG_TPID_CFG, x)
1432 #define REW_TAG_CFG_TAG_TPID_CFG_GET(x)\
1433 	FIELD_GET(REW_TAG_CFG_TAG_TPID_CFG, x)
1434 
1435 /*      REW:PORT:PORT_CFG */
1436 #define REW_PORT_CFG(g)           __REG(TARGET_REW, 0, 1, 0, g, 10, 128, 8, 0, 1, 4)
1437 
1438 #define REW_PORT_CFG_NO_REWRITE                  BIT(0)
1439 #define REW_PORT_CFG_NO_REWRITE_SET(x)\
1440 	FIELD_PREP(REW_PORT_CFG_NO_REWRITE, x)
1441 #define REW_PORT_CFG_NO_REWRITE_GET(x)\
1442 	FIELD_GET(REW_PORT_CFG_NO_REWRITE, x)
1443 
1444 /*      SYS:SYSTEM:RESET_CFG */
1445 #define SYS_RESET_CFG             __REG(TARGET_SYS, 0, 1, 4128, 0, 1, 168, 0, 0, 1, 4)
1446 
1447 #define SYS_RESET_CFG_CORE_ENA                   BIT(0)
1448 #define SYS_RESET_CFG_CORE_ENA_SET(x)\
1449 	FIELD_PREP(SYS_RESET_CFG_CORE_ENA, x)
1450 #define SYS_RESET_CFG_CORE_ENA_GET(x)\
1451 	FIELD_GET(SYS_RESET_CFG_CORE_ENA, x)
1452 
1453 /*      SYS:SYSTEM:PORT_MODE */
1454 #define SYS_PORT_MODE(r)          __REG(TARGET_SYS, 0, 1, 4128, 0, 1, 168, 44, r, 10, 4)
1455 
1456 #define SYS_PORT_MODE_INCL_INJ_HDR               GENMASK(5, 4)
1457 #define SYS_PORT_MODE_INCL_INJ_HDR_SET(x)\
1458 	FIELD_PREP(SYS_PORT_MODE_INCL_INJ_HDR, x)
1459 #define SYS_PORT_MODE_INCL_INJ_HDR_GET(x)\
1460 	FIELD_GET(SYS_PORT_MODE_INCL_INJ_HDR, x)
1461 
1462 #define SYS_PORT_MODE_INCL_XTR_HDR               GENMASK(3, 2)
1463 #define SYS_PORT_MODE_INCL_XTR_HDR_SET(x)\
1464 	FIELD_PREP(SYS_PORT_MODE_INCL_XTR_HDR, x)
1465 #define SYS_PORT_MODE_INCL_XTR_HDR_GET(x)\
1466 	FIELD_GET(SYS_PORT_MODE_INCL_XTR_HDR, x)
1467 
1468 /*      SYS:SYSTEM:FRONT_PORT_MODE */
1469 #define SYS_FRONT_PORT_MODE(r)    __REG(TARGET_SYS, 0, 1, 4128, 0, 1, 168, 84, r, 8, 4)
1470 
1471 #define SYS_FRONT_PORT_MODE_HDX_MODE             BIT(1)
1472 #define SYS_FRONT_PORT_MODE_HDX_MODE_SET(x)\
1473 	FIELD_PREP(SYS_FRONT_PORT_MODE_HDX_MODE, x)
1474 #define SYS_FRONT_PORT_MODE_HDX_MODE_GET(x)\
1475 	FIELD_GET(SYS_FRONT_PORT_MODE_HDX_MODE, x)
1476 
1477 /*      SYS:SYSTEM:FRM_AGING */
1478 #define SYS_FRM_AGING             __REG(TARGET_SYS, 0, 1, 4128, 0, 1, 168, 116, 0, 1, 4)
1479 
1480 #define SYS_FRM_AGING_AGE_TX_ENA                 BIT(20)
1481 #define SYS_FRM_AGING_AGE_TX_ENA_SET(x)\
1482 	FIELD_PREP(SYS_FRM_AGING_AGE_TX_ENA, x)
1483 #define SYS_FRM_AGING_AGE_TX_ENA_GET(x)\
1484 	FIELD_GET(SYS_FRM_AGING_AGE_TX_ENA, x)
1485 
1486 /*      SYS:SYSTEM:STAT_CFG */
1487 #define SYS_STAT_CFG              __REG(TARGET_SYS, 0, 1, 4128, 0, 1, 168, 120, 0, 1, 4)
1488 
1489 #define SYS_STAT_CFG_STAT_VIEW                   GENMASK(9, 0)
1490 #define SYS_STAT_CFG_STAT_VIEW_SET(x)\
1491 	FIELD_PREP(SYS_STAT_CFG_STAT_VIEW, x)
1492 #define SYS_STAT_CFG_STAT_VIEW_GET(x)\
1493 	FIELD_GET(SYS_STAT_CFG_STAT_VIEW, x)
1494 
1495 /*      SYS:PAUSE_CFG:PAUSE_CFG */
1496 #define SYS_PAUSE_CFG(r)          __REG(TARGET_SYS, 0, 1, 4296, 0, 1, 112, 0, r, 9, 4)
1497 
1498 #define SYS_PAUSE_CFG_PAUSE_START                GENMASK(18, 10)
1499 #define SYS_PAUSE_CFG_PAUSE_START_SET(x)\
1500 	FIELD_PREP(SYS_PAUSE_CFG_PAUSE_START, x)
1501 #define SYS_PAUSE_CFG_PAUSE_START_GET(x)\
1502 	FIELD_GET(SYS_PAUSE_CFG_PAUSE_START, x)
1503 
1504 #define SYS_PAUSE_CFG_PAUSE_STOP                 GENMASK(9, 1)
1505 #define SYS_PAUSE_CFG_PAUSE_STOP_SET(x)\
1506 	FIELD_PREP(SYS_PAUSE_CFG_PAUSE_STOP, x)
1507 #define SYS_PAUSE_CFG_PAUSE_STOP_GET(x)\
1508 	FIELD_GET(SYS_PAUSE_CFG_PAUSE_STOP, x)
1509 
1510 #define SYS_PAUSE_CFG_PAUSE_ENA                  BIT(0)
1511 #define SYS_PAUSE_CFG_PAUSE_ENA_SET(x)\
1512 	FIELD_PREP(SYS_PAUSE_CFG_PAUSE_ENA, x)
1513 #define SYS_PAUSE_CFG_PAUSE_ENA_GET(x)\
1514 	FIELD_GET(SYS_PAUSE_CFG_PAUSE_ENA, x)
1515 
1516 /*      SYS:PAUSE_CFG:ATOP */
1517 #define SYS_ATOP(r)               __REG(TARGET_SYS, 0, 1, 4296, 0, 1, 112, 40, r, 9, 4)
1518 
1519 /*      SYS:PAUSE_CFG:ATOP_TOT_CFG */
1520 #define SYS_ATOP_TOT_CFG          __REG(TARGET_SYS, 0, 1, 4296, 0, 1, 112, 76, 0, 1, 4)
1521 
1522 /*      SYS:PAUSE_CFG:MAC_FC_CFG */
1523 #define SYS_MAC_FC_CFG(r)         __REG(TARGET_SYS, 0, 1, 4296, 0, 1, 112, 80, r, 8, 4)
1524 
1525 #define SYS_MAC_FC_CFG_FC_LINK_SPEED             GENMASK(27, 26)
1526 #define SYS_MAC_FC_CFG_FC_LINK_SPEED_SET(x)\
1527 	FIELD_PREP(SYS_MAC_FC_CFG_FC_LINK_SPEED, x)
1528 #define SYS_MAC_FC_CFG_FC_LINK_SPEED_GET(x)\
1529 	FIELD_GET(SYS_MAC_FC_CFG_FC_LINK_SPEED, x)
1530 
1531 #define SYS_MAC_FC_CFG_FC_LATENCY_CFG            GENMASK(25, 20)
1532 #define SYS_MAC_FC_CFG_FC_LATENCY_CFG_SET(x)\
1533 	FIELD_PREP(SYS_MAC_FC_CFG_FC_LATENCY_CFG, x)
1534 #define SYS_MAC_FC_CFG_FC_LATENCY_CFG_GET(x)\
1535 	FIELD_GET(SYS_MAC_FC_CFG_FC_LATENCY_CFG, x)
1536 
1537 #define SYS_MAC_FC_CFG_ZERO_PAUSE_ENA            BIT(18)
1538 #define SYS_MAC_FC_CFG_ZERO_PAUSE_ENA_SET(x)\
1539 	FIELD_PREP(SYS_MAC_FC_CFG_ZERO_PAUSE_ENA, x)
1540 #define SYS_MAC_FC_CFG_ZERO_PAUSE_ENA_GET(x)\
1541 	FIELD_GET(SYS_MAC_FC_CFG_ZERO_PAUSE_ENA, x)
1542 
1543 #define SYS_MAC_FC_CFG_TX_FC_ENA                 BIT(17)
1544 #define SYS_MAC_FC_CFG_TX_FC_ENA_SET(x)\
1545 	FIELD_PREP(SYS_MAC_FC_CFG_TX_FC_ENA, x)
1546 #define SYS_MAC_FC_CFG_TX_FC_ENA_GET(x)\
1547 	FIELD_GET(SYS_MAC_FC_CFG_TX_FC_ENA, x)
1548 
1549 #define SYS_MAC_FC_CFG_RX_FC_ENA                 BIT(16)
1550 #define SYS_MAC_FC_CFG_RX_FC_ENA_SET(x)\
1551 	FIELD_PREP(SYS_MAC_FC_CFG_RX_FC_ENA, x)
1552 #define SYS_MAC_FC_CFG_RX_FC_ENA_GET(x)\
1553 	FIELD_GET(SYS_MAC_FC_CFG_RX_FC_ENA, x)
1554 
1555 #define SYS_MAC_FC_CFG_PAUSE_VAL_CFG             GENMASK(15, 0)
1556 #define SYS_MAC_FC_CFG_PAUSE_VAL_CFG_SET(x)\
1557 	FIELD_PREP(SYS_MAC_FC_CFG_PAUSE_VAL_CFG, x)
1558 #define SYS_MAC_FC_CFG_PAUSE_VAL_CFG_GET(x)\
1559 	FIELD_GET(SYS_MAC_FC_CFG_PAUSE_VAL_CFG, x)
1560 
1561 /*      SYS:STAT:CNT */
1562 #define SYS_CNT(g)                __REG(TARGET_SYS, 0, 1, 0, g, 896, 4, 0, 0, 1, 4)
1563 
1564 /*      SYS:RAM_CTRL:RAM_INIT */
1565 #define SYS_RAM_INIT              __REG(TARGET_SYS, 0, 1, 4432, 0, 1, 4, 0, 0, 1, 4)
1566 
1567 #define SYS_RAM_INIT_RAM_INIT                    BIT(1)
1568 #define SYS_RAM_INIT_RAM_INIT_SET(x)\
1569 	FIELD_PREP(SYS_RAM_INIT_RAM_INIT, x)
1570 #define SYS_RAM_INIT_RAM_INIT_GET(x)\
1571 	FIELD_GET(SYS_RAM_INIT_RAM_INIT, x)
1572 
1573 /*      VCAP:VCAP_CORE_CFG:VCAP_UPDATE_CTRL */
1574 #define VCAP_UPDATE_CTRL(t)       __REG(TARGET_VCAP, t, 3, 0, 0, 1, 8, 0, 0, 1, 4)
1575 
1576 #define VCAP_UPDATE_CTRL_UPDATE_CMD              GENMASK(24, 22)
1577 #define VCAP_UPDATE_CTRL_UPDATE_CMD_SET(x)\
1578 	FIELD_PREP(VCAP_UPDATE_CTRL_UPDATE_CMD, x)
1579 #define VCAP_UPDATE_CTRL_UPDATE_CMD_GET(x)\
1580 	FIELD_GET(VCAP_UPDATE_CTRL_UPDATE_CMD, x)
1581 
1582 #define VCAP_UPDATE_CTRL_UPDATE_ENTRY_DIS        BIT(21)
1583 #define VCAP_UPDATE_CTRL_UPDATE_ENTRY_DIS_SET(x)\
1584 	FIELD_PREP(VCAP_UPDATE_CTRL_UPDATE_ENTRY_DIS, x)
1585 #define VCAP_UPDATE_CTRL_UPDATE_ENTRY_DIS_GET(x)\
1586 	FIELD_GET(VCAP_UPDATE_CTRL_UPDATE_ENTRY_DIS, x)
1587 
1588 #define VCAP_UPDATE_CTRL_UPDATE_ACTION_DIS       BIT(20)
1589 #define VCAP_UPDATE_CTRL_UPDATE_ACTION_DIS_SET(x)\
1590 	FIELD_PREP(VCAP_UPDATE_CTRL_UPDATE_ACTION_DIS, x)
1591 #define VCAP_UPDATE_CTRL_UPDATE_ACTION_DIS_GET(x)\
1592 	FIELD_GET(VCAP_UPDATE_CTRL_UPDATE_ACTION_DIS, x)
1593 
1594 #define VCAP_UPDATE_CTRL_UPDATE_CNT_DIS          BIT(19)
1595 #define VCAP_UPDATE_CTRL_UPDATE_CNT_DIS_SET(x)\
1596 	FIELD_PREP(VCAP_UPDATE_CTRL_UPDATE_CNT_DIS, x)
1597 #define VCAP_UPDATE_CTRL_UPDATE_CNT_DIS_GET(x)\
1598 	FIELD_GET(VCAP_UPDATE_CTRL_UPDATE_CNT_DIS, x)
1599 
1600 #define VCAP_UPDATE_CTRL_UPDATE_ADDR             GENMASK(18, 3)
1601 #define VCAP_UPDATE_CTRL_UPDATE_ADDR_SET(x)\
1602 	FIELD_PREP(VCAP_UPDATE_CTRL_UPDATE_ADDR, x)
1603 #define VCAP_UPDATE_CTRL_UPDATE_ADDR_GET(x)\
1604 	FIELD_GET(VCAP_UPDATE_CTRL_UPDATE_ADDR, x)
1605 
1606 #define VCAP_UPDATE_CTRL_UPDATE_SHOT             BIT(2)
1607 #define VCAP_UPDATE_CTRL_UPDATE_SHOT_SET(x)\
1608 	FIELD_PREP(VCAP_UPDATE_CTRL_UPDATE_SHOT, x)
1609 #define VCAP_UPDATE_CTRL_UPDATE_SHOT_GET(x)\
1610 	FIELD_GET(VCAP_UPDATE_CTRL_UPDATE_SHOT, x)
1611 
1612 #define VCAP_UPDATE_CTRL_CLEAR_CACHE             BIT(1)
1613 #define VCAP_UPDATE_CTRL_CLEAR_CACHE_SET(x)\
1614 	FIELD_PREP(VCAP_UPDATE_CTRL_CLEAR_CACHE, x)
1615 #define VCAP_UPDATE_CTRL_CLEAR_CACHE_GET(x)\
1616 	FIELD_GET(VCAP_UPDATE_CTRL_CLEAR_CACHE, x)
1617 
1618 #define VCAP_UPDATE_CTRL_MV_TRAFFIC_IGN          BIT(0)
1619 #define VCAP_UPDATE_CTRL_MV_TRAFFIC_IGN_SET(x)\
1620 	FIELD_PREP(VCAP_UPDATE_CTRL_MV_TRAFFIC_IGN, x)
1621 #define VCAP_UPDATE_CTRL_MV_TRAFFIC_IGN_GET(x)\
1622 	FIELD_GET(VCAP_UPDATE_CTRL_MV_TRAFFIC_IGN, x)
1623 
1624 /*      VCAP:VCAP_CORE_CFG:VCAP_MV_CFG */
1625 #define VCAP_MV_CFG(t)            __REG(TARGET_VCAP, t, 3, 0, 0, 1, 8, 4, 0, 1, 4)
1626 
1627 #define VCAP_MV_CFG_MV_NUM_POS                   GENMASK(31, 16)
1628 #define VCAP_MV_CFG_MV_NUM_POS_SET(x)\
1629 	FIELD_PREP(VCAP_MV_CFG_MV_NUM_POS, x)
1630 #define VCAP_MV_CFG_MV_NUM_POS_GET(x)\
1631 	FIELD_GET(VCAP_MV_CFG_MV_NUM_POS, x)
1632 
1633 #define VCAP_MV_CFG_MV_SIZE                      GENMASK(15, 0)
1634 #define VCAP_MV_CFG_MV_SIZE_SET(x)\
1635 	FIELD_PREP(VCAP_MV_CFG_MV_SIZE, x)
1636 #define VCAP_MV_CFG_MV_SIZE_GET(x)\
1637 	FIELD_GET(VCAP_MV_CFG_MV_SIZE, x)
1638 
1639 /*      VCAP:VCAP_CORE_CACHE:VCAP_ENTRY_DAT */
1640 #define VCAP_ENTRY_DAT(t, r)      __REG(TARGET_VCAP, t, 3, 8, 0, 1, 904, 0, r, 64, 4)
1641 
1642 /*      VCAP:VCAP_CORE_CACHE:VCAP_MASK_DAT */
1643 #define VCAP_MASK_DAT(t, r)       __REG(TARGET_VCAP, t, 3, 8, 0, 1, 904, 256, r, 64, 4)
1644 
1645 /*      VCAP:VCAP_CORE_CACHE:VCAP_ACTION_DAT */
1646 #define VCAP_ACTION_DAT(t, r)     __REG(TARGET_VCAP, t, 3, 8, 0, 1, 904, 512, r, 64, 4)
1647 
1648 /*      VCAP:VCAP_CORE_CACHE:VCAP_CNT_DAT */
1649 #define VCAP_CNT_DAT(t, r)        __REG(TARGET_VCAP, t, 3, 8, 0, 1, 904, 768, r, 32, 4)
1650 
1651 /*      VCAP:VCAP_CORE_CACHE:VCAP_CNT_FW_DAT */
1652 #define VCAP_CNT_FW_DAT(t)        __REG(TARGET_VCAP, t, 3, 8, 0, 1, 904, 896, 0, 1, 4)
1653 
1654 /*      VCAP:VCAP_CORE_CACHE:VCAP_TG_DAT */
1655 #define VCAP_TG_DAT(t)            __REG(TARGET_VCAP, t, 3, 8, 0, 1, 904, 900, 0, 1, 4)
1656 
1657 /*      VCAP:VCAP_CORE_MAP:VCAP_CORE_IDX */
1658 #define VCAP_CORE_IDX(t)          __REG(TARGET_VCAP, t, 3, 912, 0, 1, 8, 0, 0, 1, 4)
1659 
1660 #define VCAP_CORE_IDX_CORE_IDX                   GENMASK(3, 0)
1661 #define VCAP_CORE_IDX_CORE_IDX_SET(x)\
1662 	FIELD_PREP(VCAP_CORE_IDX_CORE_IDX, x)
1663 #define VCAP_CORE_IDX_CORE_IDX_GET(x)\
1664 	FIELD_GET(VCAP_CORE_IDX_CORE_IDX, x)
1665 
1666 /*      VCAP:VCAP_CORE_MAP:VCAP_CORE_MAP */
1667 #define VCAP_CORE_MAP(t)          __REG(TARGET_VCAP, t, 3, 912, 0, 1, 8, 4, 0, 1, 4)
1668 
1669 #define VCAP_CORE_MAP_CORE_MAP                   GENMASK(2, 0)
1670 #define VCAP_CORE_MAP_CORE_MAP_SET(x)\
1671 	FIELD_PREP(VCAP_CORE_MAP_CORE_MAP, x)
1672 #define VCAP_CORE_MAP_CORE_MAP_GET(x)\
1673 	FIELD_GET(VCAP_CORE_MAP_CORE_MAP, x)
1674 
1675 /*      VCAP:VCAP_CONST:VCAP_VER */
1676 #define VCAP_VER(t)               __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 0, 0, 1, 4)
1677 
1678 /*      VCAP:VCAP_CONST:ENTRY_WIDTH */
1679 #define VCAP_ENTRY_WIDTH(t)       __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 4, 0, 1, 4)
1680 
1681 /*      VCAP:VCAP_CONST:ENTRY_CNT */
1682 #define VCAP_ENTRY_CNT(t)         __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 8, 0, 1, 4)
1683 
1684 /*      VCAP:VCAP_CONST:ENTRY_SWCNT */
1685 #define VCAP_ENTRY_SWCNT(t)       __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 12, 0, 1, 4)
1686 
1687 /*      VCAP:VCAP_CONST:ENTRY_TG_WIDTH */
1688 #define VCAP_ENTRY_TG_WIDTH(t)    __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 16, 0, 1, 4)
1689 
1690 /*      VCAP:VCAP_CONST:ACTION_DEF_CNT */
1691 #define VCAP_ACTION_DEF_CNT(t)    __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 20, 0, 1, 4)
1692 
1693 /*      VCAP:VCAP_CONST:ACTION_WIDTH */
1694 #define VCAP_ACTION_WIDTH(t)      __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 24, 0, 1, 4)
1695 
1696 /*      VCAP:VCAP_CONST:CNT_WIDTH */
1697 #define VCAP_CNT_WIDTH(t)         __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 28, 0, 1, 4)
1698 
1699 /*      VCAP:VCAP_CONST:CORE_CNT */
1700 #define VCAP_CORE_CNT(t)          __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 32, 0, 1, 4)
1701 
1702 /*      VCAP:VCAP_CONST:IF_CNT */
1703 #define VCAP_IF_CNT(t)            __REG(TARGET_VCAP, t, 3, 924, 0, 1, 40, 36, 0, 1, 4)
1704 
1705 #endif /* _LAN966X_REGS_H_ */
1706