1 /* SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020 Marvell International Ltd.
5 * https://spdx.org/licenses
13 * Configuration and status register (CSR) address and type definitions for
16 * This file is auto generated. Do not edit.
21 * Enumeration xcv_bar_e
23 * XCV Base Address Register Enumeration Enumerates the base address
26 #define XCV_BAR_E_XCVX_PF_BAR0(a) (0x87e0db000000ll + 0ll * (a))
27 #define XCV_BAR_E_XCVX_PF_BAR0_SIZE 0x100000ull
28 #define XCV_BAR_E_XCVX_PF_BAR4(a) (0x87e0dbf00000ll + 0ll * (a))
29 #define XCV_BAR_E_XCVX_PF_BAR4_SIZE 0x100000ull
32 * Enumeration xcv_int_vec_e
34 * XCV MSI-X Vector Enumeration Enumerates the MSI-X interrupt vectors.
36 #define XCV_INT_VEC_E_INT (0)
39 * Register (RSL) xcv#_batch_crd_ret
41 * XCV Batch Credit Return Register
43 union xcvx_batch_crd_ret {
45 struct xcvx_batch_crd_ret_s {
47 u64 reserved_1_63 : 63;
49 /* struct xcvx_batch_crd_ret_s cn; */
52 static inline u64 XCVX_BATCH_CRD_RET(u64 a)
53 __attribute__ ((pure, always_inline));
54 static inline u64 XCVX_BATCH_CRD_RET(u64 a)
60 * Register (RSL) xcv#_comp_ctl
62 * XCV Compensation Controller Register This register controls
63 * programmable compensation.
67 struct xcvx_comp_ctl_s {
69 u64 reserved_1_26 : 26;
76 u64 reserved_37_39 : 3;
78 u64 reserved_45_47 : 3;
80 u64 reserved_53_55 : 3;
82 u64 reserved_61_62 : 2;
85 /* struct xcvx_comp_ctl_s cn; */
88 static inline u64 XCVX_COMP_CTL(u64 a)
89 __attribute__ ((pure, always_inline));
90 static inline u64 XCVX_COMP_CTL(u64 a)
96 * Register (RSL) xcv#_ctl
98 * XCV Control Register This register contains the status control bits.
106 u64 reserved_4_63 : 60;
108 /* struct xcvx_ctl_s cn; */
111 static inline u64 XCVX_CTL(u64 a)
112 __attribute__ ((pure, always_inline));
113 static inline u64 XCVX_CTL(u64 a)
119 * Register (RSL) xcv#_dll_ctl
121 * XCV DLL Controller Register The RGMII timing specification requires
122 * that devices transmit clock and data synchronously. The specification
123 * requires external sources (namely the PC board trace routes) to
124 * introduce the appropriate 1.5 to 2.0 ns of delay. To eliminate the
125 * need for the PC board delays, the RGMII interface has optional on-
126 * board DLLs for both transmit and receive. For correct operation, at
127 * most one of the transmitter, board, or receiver involved in an RGMII
128 * link should introduce delay. By default/reset, the RGMII receivers
129 * delay the received clock, and the RGMII transmitters do not delay the
130 * transmitted clock. Whether this default works as-is with a given link
131 * partner depends on the behavior of the link partner and the PC board.
132 * These are the possible modes of RGMII receive operation: *
133 * XCV()_DLL_CTL[CLKRX_BYP] = 0 (reset value) - The RGMII receive
134 * interface introduces clock delay using its internal DLL. This mode is
135 * appropriate if neither the remote transmitter nor the PC board delays
136 * the clock. * XCV()_DLL_CTL[CLKRX_BYP] = 1, [CLKRX_SET] = 0x0 - The
137 * RGMII receive interface introduces no clock delay. This mode is
138 * appropriate if either the remote transmitter or the PC board delays
139 * the clock. These are the possible modes of RGMII transmit operation:
140 * * XCV()_DLL_CTL[CLKTX_BYP] = 1, [CLKTX_SET] = 0x0 (reset value) - The
141 * RGMII transmit interface introduces no clock delay. This mode is
142 * appropriate is either the remote receiver or the PC board delays the
143 * clock. * XCV()_DLL_CTL[CLKTX_BYP] = 0 - The RGMII transmit interface
144 * introduces clock delay using its internal DLL. This mode is
145 * appropriate if neither the remote receiver nor the PC board delays the
150 struct xcvx_dll_ctl_s {
152 u64 reserved_2_7 : 6;
159 u64 reserved_32_63 : 32;
161 /* struct xcvx_dll_ctl_s cn; */
164 static inline u64 XCVX_DLL_CTL(u64 a)
165 __attribute__ ((pure, always_inline));
166 static inline u64 XCVX_DLL_CTL(u64 a)
172 * Register (RSL) xcv#_eco
174 * INTERNAL: XCV ECO Register
180 u64 reserved_16_63 : 48;
182 /* struct xcvx_eco_s cn; */
185 static inline u64 XCVX_ECO(u64 a)
186 __attribute__ ((pure, always_inline));
187 static inline u64 XCVX_ECO(u64 a)
189 return 0x200 + 0 * a;
193 * Register (RSL) xcv#_inbnd_status
195 * XCV Inband Status Register This register contains RGMII inband status.
197 union xcvx_inbnd_status {
199 struct xcvx_inbnd_status_s {
203 u64 reserved_4_63 : 60;
205 /* struct xcvx_inbnd_status_s cn; */
208 static inline u64 XCVX_INBND_STATUS(u64 a)
209 __attribute__ ((pure, always_inline));
210 static inline u64 XCVX_INBND_STATUS(u64 a)
216 * Register (RSL) xcv#_int
218 * XCV Interrupt Register This register flags error for TX FIFO overflow,
219 * TX FIFO underflow and incomplete byte for 10/100 Mode. It also flags
220 * status change for link duplex, link speed and link up/down.
232 u64 reserved_7_63 : 57;
234 /* struct xcvx_int_s cn; */
237 static inline u64 XCVX_INT(u64 a)
238 __attribute__ ((pure, always_inline));
239 static inline u64 XCVX_INT(u64 a)
245 * Register (RSL) xcv#_int_ena_w1c
247 * Loopback Error Interrupt Enable Clear Register This register clears
248 * interrupt enable bits.
250 union xcvx_int_ena_w1c {
252 struct xcvx_int_ena_w1c_s {
260 u64 reserved_7_63 : 57;
262 /* struct xcvx_int_ena_w1c_s cn; */
265 static inline u64 XCVX_INT_ENA_W1C(u64 a)
266 __attribute__ ((pure, always_inline));
267 static inline u64 XCVX_INT_ENA_W1C(u64 a)
273 * Register (RSL) xcv#_int_ena_w1s
275 * Loopback Error Interrupt Enable Set Register This register sets
276 * interrupt enable bits.
278 union xcvx_int_ena_w1s {
280 struct xcvx_int_ena_w1s_s {
288 u64 reserved_7_63 : 57;
290 /* struct xcvx_int_ena_w1s_s cn; */
293 static inline u64 XCVX_INT_ENA_W1S(u64 a)
294 __attribute__ ((pure, always_inline));
295 static inline u64 XCVX_INT_ENA_W1S(u64 a)
301 * Register (RSL) xcv#_int_w1s
303 * Loopback Error Interrupt Set Register This register sets interrupt
308 struct xcvx_int_w1s_s {
316 u64 reserved_7_63 : 57;
318 /* struct xcvx_int_w1s_s cn; */
321 static inline u64 XCVX_INT_W1S(u64 a)
322 __attribute__ ((pure, always_inline));
323 static inline u64 XCVX_INT_W1S(u64 a)
329 * Register (RSL) xcv#_msix_pba#
331 * XCV MSI-X Pending Bit Array Registers This register is the MSI-X PBA
332 * table; the bit number is indexed by the XCV_INT_VEC_E enumeration.
334 union xcvx_msix_pbax {
336 struct xcvx_msix_pbax_s {
339 /* struct xcvx_msix_pbax_s cn; */
342 static inline u64 XCVX_MSIX_PBAX(u64 a, u64 b)
343 __attribute__ ((pure, always_inline));
344 static inline u64 XCVX_MSIX_PBAX(u64 a, u64 b)
346 return 0xf0000 + 0 * a + 8 * b;
350 * Register (RSL) xcv#_msix_vec#_addr
352 * XCV MSI-X Vector-Table Address Register This register is the MSI-X
353 * vector table, indexed by the XCV_INT_VEC_E enumeration.
355 union xcvx_msix_vecx_addr {
357 struct xcvx_msix_vecx_addr_s {
361 u64 reserved_49_63 : 15;
363 /* struct xcvx_msix_vecx_addr_s cn; */
366 static inline u64 XCVX_MSIX_VECX_ADDR(u64 a, u64 b)
367 __attribute__ ((pure, always_inline));
368 static inline u64 XCVX_MSIX_VECX_ADDR(u64 a, u64 b)
370 return 0 + 0 * a + 0x10 * b;
374 * Register (RSL) xcv#_msix_vec#_ctl
376 * XCV MSI-X Vector-Table Control and Data Register This register is the
377 * MSI-X vector table, indexed by the XCV_INT_VEC_E enumeration.
379 union xcvx_msix_vecx_ctl {
381 struct xcvx_msix_vecx_ctl_s {
383 u64 reserved_20_31 : 12;
385 u64 reserved_33_63 : 31;
387 /* struct xcvx_msix_vecx_ctl_s cn; */
390 static inline u64 XCVX_MSIX_VECX_CTL(u64 a, u64 b)
391 __attribute__ ((pure, always_inline));
392 static inline u64 XCVX_MSIX_VECX_CTL(u64 a, u64 b)
394 return 8 + 0 * a + 0x10 * b;
398 * Register (RSL) xcv#_reset
400 * XCV Reset Registers This register controls reset.
404 struct xcvx_reset_s {
405 u64 rx_dat_rst_n : 1;
406 u64 rx_pkt_rst_n : 1;
407 u64 tx_dat_rst_n : 1;
408 u64 tx_pkt_rst_n : 1;
409 u64 reserved_4_6 : 3;
411 u64 reserved_8_10 : 3;
413 u64 reserved_12_14 : 3;
415 u64 reserved_16_62 : 47;
418 /* struct xcvx_reset_s cn; */
421 static inline u64 XCVX_RESET(u64 a)
422 __attribute__ ((pure, always_inline));
423 static inline u64 XCVX_RESET(u64 a)
428 #endif /* __CSRS_XCV_H__ */