xref: /openbmc/linux/drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h (revision 818b26588994d9d95743fca0a427f08ec6c1c41d)
1f21fb3edSRaghu Vatsavayi /**********************************************************************
2f21fb3edSRaghu Vatsavayi  * Author: Cavium, Inc.
3f21fb3edSRaghu Vatsavayi  *
4f21fb3edSRaghu Vatsavayi  * Contact: support@cavium.com
5f21fb3edSRaghu Vatsavayi  *          Please include "LiquidIO" in the subject.
6f21fb3edSRaghu Vatsavayi  *
750579d3dSRaghu Vatsavayi  * Copyright (c) 2003-2016 Cavium, Inc.
8f21fb3edSRaghu Vatsavayi  *
9f21fb3edSRaghu Vatsavayi  * This file is free software; you can redistribute it and/or modify
10f21fb3edSRaghu Vatsavayi  * it under the terms of the GNU General Public License, Version 2, as
11f21fb3edSRaghu Vatsavayi  * published by the Free Software Foundation.
12f21fb3edSRaghu Vatsavayi  *
13f21fb3edSRaghu Vatsavayi  * This file is distributed in the hope that it will be useful, but
14f21fb3edSRaghu Vatsavayi  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15f21fb3edSRaghu Vatsavayi  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
1650579d3dSRaghu Vatsavayi  * NONINFRINGEMENT.  See the GNU General Public License for more details.
1750579d3dSRaghu Vatsavayi  ***********************************************************************/
18f21fb3edSRaghu Vatsavayi /*! \file cn66xx_regs.h
19f21fb3edSRaghu Vatsavayi  *  \brief Host Driver: Register Address and Register Mask values for
20f21fb3edSRaghu Vatsavayi  *  Octeon CN66XX devices.
21f21fb3edSRaghu Vatsavayi  */
22f21fb3edSRaghu Vatsavayi 
23f21fb3edSRaghu Vatsavayi #ifndef __CN66XX_REGS_H__
24f21fb3edSRaghu Vatsavayi #define __CN66XX_REGS_H__
25f21fb3edSRaghu Vatsavayi 
26f21fb3edSRaghu Vatsavayi #define     CN6XXX_XPANSION_BAR             0x30
27f21fb3edSRaghu Vatsavayi 
28f21fb3edSRaghu Vatsavayi #define     CN6XXX_MSI_CAP                  0x50
29f21fb3edSRaghu Vatsavayi #define     CN6XXX_MSI_ADDR_LO              0x54
30f21fb3edSRaghu Vatsavayi #define     CN6XXX_MSI_ADDR_HI              0x58
31f21fb3edSRaghu Vatsavayi #define     CN6XXX_MSI_DATA                 0x5C
32f21fb3edSRaghu Vatsavayi 
33f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_CAP                 0x70
34f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_DEVCAP              0x74
35f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_DEVCTL              0x78
36f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_LINKCAP             0x7C
37f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_LINKCTL             0x80
38f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_SLOTCAP             0x84
39f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_SLOTCTL             0x88
40f21fb3edSRaghu Vatsavayi 
41f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_ENH_CAP             0x100
42f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_UNCORR_ERR_STATUS   0x104
43f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_UNCORR_ERR_MASK     0x108
44f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_UNCORR_ERR          0x10C
45f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_CORR_ERR_STATUS     0x110
46f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_CORR_ERR_MASK       0x114
47f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_ADV_ERR_CAP         0x118
48f21fb3edSRaghu Vatsavayi 
49f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_ACK_REPLAY_TIMER    0x700
50f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_OTHER_MSG           0x704
51f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_PORT_FORCE_LINK     0x708
52f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_ACK_FREQ            0x70C
53f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_PORT_LINK_CTL       0x710
54f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_LANE_SKEW           0x714
55f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_SYM_NUM             0x718
56f21fb3edSRaghu Vatsavayi #define     CN6XXX_PCIE_FLTMSK              0x720
57f21fb3edSRaghu Vatsavayi 
58f21fb3edSRaghu Vatsavayi /* ##############  BAR0 Registers ################  */
59f21fb3edSRaghu Vatsavayi 
60f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_CTL_PORT0                    0x0050
61f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_CTL_PORT1                    0x0060
62f21fb3edSRaghu Vatsavayi 
63f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_WINDOW_CTL                   0x02E0
64f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_DBG_DATA                     0x0310
65f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_SCRATCH1                     0x03C0
66f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_SCRATCH2                     0x03D0
67f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_CTL_STATUS                   0x0570
68f21fb3edSRaghu Vatsavayi 
69f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_ADDR_LO                   0x0000
70f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_ADDR_HI                   0x0004
71f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_ADDR64                    CN6XXX_WIN_WR_ADDR_LO
72f21fb3edSRaghu Vatsavayi 
73f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_RD_ADDR_LO                   0x0010
74f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_RD_ADDR_HI                   0x0014
75f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_RD_ADDR64                    CN6XXX_WIN_RD_ADDR_LO
76f21fb3edSRaghu Vatsavayi 
77f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_DATA_LO                   0x0020
78f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_DATA_HI                   0x0024
79f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_DATA64                    CN6XXX_WIN_WR_DATA_LO
80f21fb3edSRaghu Vatsavayi 
81f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_RD_DATA_LO                   0x0040
82f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_RD_DATA_HI                   0x0044
83f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_RD_DATA64                    CN6XXX_WIN_RD_DATA_LO
84f21fb3edSRaghu Vatsavayi 
85f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_MASK_LO                   0x0030
86f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_MASK_HI                   0x0034
87f21fb3edSRaghu Vatsavayi #define    CN6XXX_WIN_WR_MASK_REG                  CN6XXX_WIN_WR_MASK_LO
88f21fb3edSRaghu Vatsavayi 
89f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to enable Input queues */
90f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_INSTR_ENB               0x1000
91f21fb3edSRaghu Vatsavayi 
92f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to enable Output queues */
93f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_OUT_ENB                 0x1010
94f21fb3edSRaghu Vatsavayi 
95f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to determine whether Output queues are in reset. */
96f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PORT_IN_RST_OQ              0x11F0
97f21fb3edSRaghu Vatsavayi 
98f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to determine whether Input queues are in reset. */
99f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PORT_IN_RST_IQ              0x11F4
100f21fb3edSRaghu Vatsavayi 
101f21fb3edSRaghu Vatsavayi /*###################### REQUEST QUEUE #########################*/
102f21fb3edSRaghu Vatsavayi 
103f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - instr. size of each input queue. */
104f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_INSTR_SIZE             0x1020
105f21fb3edSRaghu Vatsavayi 
106f21fb3edSRaghu Vatsavayi /* 32 registers for Input Queue Instr Count - SLI_PKT_IN_DONE0_CNTS */
107f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_INSTR_COUNT_START       0x2000
108f21fb3edSRaghu Vatsavayi 
109f21fb3edSRaghu Vatsavayi /* 32 registers for Input Queue Start Addr - SLI_PKT0_INSTR_BADDR */
110f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_BASE_ADDR_START64       0x2800
111f21fb3edSRaghu Vatsavayi 
112f21fb3edSRaghu Vatsavayi /* 32 registers for Input Doorbell - SLI_PKT0_INSTR_BAOFF_DBELL */
113f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_DOORBELL_START          0x2C00
114f21fb3edSRaghu Vatsavayi 
115f21fb3edSRaghu Vatsavayi /* 32 registers for Input Queue size - SLI_PKT0_INSTR_FIFO_RSIZE */
116f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_SIZE_START              0x3000
117f21fb3edSRaghu Vatsavayi 
118f21fb3edSRaghu Vatsavayi /* 32 registers for Instruction Header Options - SLI_PKT0_INSTR_HEADER */
119f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_PKT_INSTR_HDR_START64   0x3400
120f21fb3edSRaghu Vatsavayi 
121f21fb3edSRaghu Vatsavayi /* 1 register (64-bit) - Back Pressure for each input queue - SLI_PKT0_IN_BP */
122f21fb3edSRaghu Vatsavayi #define    CN66XX_SLI_INPUT_BP_START64           0x3800
123f21fb3edSRaghu Vatsavayi 
124f21fb3edSRaghu Vatsavayi /* Each Input Queue register is at a 16-byte Offset in BAR0 */
125f21fb3edSRaghu Vatsavayi #define    CN6XXX_IQ_OFFSET                      0x10
126f21fb3edSRaghu Vatsavayi 
127f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - ES, RO, NS, Arbitration for Input Queue Data &
128f21fb3edSRaghu Vatsavayi  * gather list fetches. SLI_PKT_INPUT_CONTROL.
129f21fb3edSRaghu Vatsavayi  */
130f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_INPUT_CONTROL          0x1170
131f21fb3edSRaghu Vatsavayi 
132f21fb3edSRaghu Vatsavayi /* 1 register (64-bit) - Number of instructions to read at one time
133f21fb3edSRaghu Vatsavayi  * - 2 bits for each input ring. SLI_PKT_INSTR_RD_SIZE.
134f21fb3edSRaghu Vatsavayi  */
135f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_INSTR_RD_SIZE          0x11A0
136f21fb3edSRaghu Vatsavayi 
137f21fb3edSRaghu Vatsavayi /* 1 register (64-bit) - Assign Input ring to MAC port
138f21fb3edSRaghu Vatsavayi  * - 2 bits for each input ring. SLI_PKT_IN_PCIE_PORT.
139f21fb3edSRaghu Vatsavayi  */
140f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IN_PCIE_PORT               0x11B0
141f21fb3edSRaghu Vatsavayi 
142f21fb3edSRaghu Vatsavayi /*------- Request Queue Macros ---------*/
143f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_BASE_ADDR64(iq)          \
144f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_IQ_BASE_ADDR_START64 + ((iq) * CN6XXX_IQ_OFFSET))
145f21fb3edSRaghu Vatsavayi 
146f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_SIZE(iq)                 \
147f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_IQ_SIZE_START + ((iq) * CN6XXX_IQ_OFFSET))
148f21fb3edSRaghu Vatsavayi 
149f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_PKT_INSTR_HDR64(iq)      \
150f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_IQ_PKT_INSTR_HDR_START64 + ((iq) * CN6XXX_IQ_OFFSET))
151f21fb3edSRaghu Vatsavayi 
152f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_DOORBELL(iq)             \
153f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_IQ_DOORBELL_START + ((iq) * CN6XXX_IQ_OFFSET))
154f21fb3edSRaghu Vatsavayi 
155f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_IQ_INSTR_COUNT(iq)          \
156f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_IQ_INSTR_COUNT_START + ((iq) * CN6XXX_IQ_OFFSET))
157f21fb3edSRaghu Vatsavayi 
158f21fb3edSRaghu Vatsavayi #define    CN66XX_SLI_IQ_BP64(iq)                 \
159f21fb3edSRaghu Vatsavayi 	(CN66XX_SLI_INPUT_BP_START64 + ((iq) * CN6XXX_IQ_OFFSET))
160f21fb3edSRaghu Vatsavayi 
161f21fb3edSRaghu Vatsavayi /*------------------ Masks ----------------*/
162f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_ROUND_ROBIN_ARB         BIT(22)
163f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_DATA_NS                 BIT(8)
164f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_DATA_ES_64B_SWAP        BIT(6)
165f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_DATA_RO                 BIT(5)
166f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_USE_CSR                 BIT(4)
167f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_GATHER_NS               BIT(3)
168f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_GATHER_ES_64B_SWAP      BIT(2)
169f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_GATHER_RO               BIT(1)
170f21fb3edSRaghu Vatsavayi 
171f21fb3edSRaghu Vatsavayi #ifdef __BIG_ENDIAN_BITFIELD
172f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_MASK                    \
173f21fb3edSRaghu Vatsavayi 	(CN6XXX_INPUT_CTL_DATA_ES_64B_SWAP      \
174f21fb3edSRaghu Vatsavayi 	  | CN6XXX_INPUT_CTL_USE_CSR              \
175f21fb3edSRaghu Vatsavayi 	  | CN6XXX_INPUT_CTL_GATHER_ES_64B_SWAP)
176f21fb3edSRaghu Vatsavayi #else
177f21fb3edSRaghu Vatsavayi #define    CN6XXX_INPUT_CTL_MASK                    \
178f21fb3edSRaghu Vatsavayi 	(CN6XXX_INPUT_CTL_DATA_ES_64B_SWAP     \
179f21fb3edSRaghu Vatsavayi 	  | CN6XXX_INPUT_CTL_USE_CSR)
180f21fb3edSRaghu Vatsavayi #endif
181f21fb3edSRaghu Vatsavayi 
182f21fb3edSRaghu Vatsavayi /*############################ OUTPUT QUEUE #########################*/
183f21fb3edSRaghu Vatsavayi 
184f21fb3edSRaghu Vatsavayi /* 32 registers for Output queue buffer and info size - SLI_PKT0_OUT_SIZE */
185f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ0_BUFF_INFO_SIZE         0x0C00
186f21fb3edSRaghu Vatsavayi 
187f21fb3edSRaghu Vatsavayi /* 32 registers for Output Queue Start Addr - SLI_PKT0_SLIST_BADDR */
188f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_BASE_ADDR_START64       0x1400
189f21fb3edSRaghu Vatsavayi 
190f21fb3edSRaghu Vatsavayi /* 32 registers for Output Queue Packet Credits - SLI_PKT0_SLIST_BAOFF_DBELL */
191f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_PKT_CREDITS_START       0x1800
192f21fb3edSRaghu Vatsavayi 
193f21fb3edSRaghu Vatsavayi /* 32 registers for Output Queue size - SLI_PKT0_SLIST_FIFO_RSIZE */
194f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_SIZE_START              0x1C00
195f21fb3edSRaghu Vatsavayi 
196f21fb3edSRaghu Vatsavayi /* 32 registers for Output Queue Packet Count - SLI_PKT0_CNTS */
197f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_PKT_SENT_START          0x2400
198f21fb3edSRaghu Vatsavayi 
199f21fb3edSRaghu Vatsavayi /* Each Output Queue register is at a 16-byte Offset in BAR0 */
200f21fb3edSRaghu Vatsavayi #define    CN6XXX_OQ_OFFSET                      0x10
201f21fb3edSRaghu Vatsavayi 
202f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - 1 bit for each output queue
203f21fb3edSRaghu Vatsavayi  * - Relaxed Ordering setting for reading Output Queues descriptors
204f21fb3edSRaghu Vatsavayi  * - SLI_PKT_SLIST_ROR
205f21fb3edSRaghu Vatsavayi  */
206f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_SLIST_ROR              0x1030
207f21fb3edSRaghu Vatsavayi 
208f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - 1 bit for each output queue
209f21fb3edSRaghu Vatsavayi  * - No Snoop mode for reading Output Queues descriptors
210f21fb3edSRaghu Vatsavayi  * - SLI_PKT_SLIST_NS
211f21fb3edSRaghu Vatsavayi  */
212f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_SLIST_NS               0x1040
213f21fb3edSRaghu Vatsavayi 
214f21fb3edSRaghu Vatsavayi /* 1 register (64-bit) - 2 bits for each output queue
215f21fb3edSRaghu Vatsavayi  * - Endian-Swap mode for reading Output Queue descriptors
216f21fb3edSRaghu Vatsavayi  * - SLI_PKT_SLIST_ES
217f21fb3edSRaghu Vatsavayi  */
218f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_SLIST_ES64             0x1050
219f21fb3edSRaghu Vatsavayi 
220f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - 1 bit for each output queue
221f21fb3edSRaghu Vatsavayi  * - InfoPtr mode for Output Queues.
222f21fb3edSRaghu Vatsavayi  * - SLI_PKT_IPTR
223f21fb3edSRaghu Vatsavayi  */
224f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_IPTR                   0x1070
225f21fb3edSRaghu Vatsavayi 
226f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - 1 bit for each output queue
227f21fb3edSRaghu Vatsavayi  * - DPTR format selector for Output queues.
228f21fb3edSRaghu Vatsavayi  * - SLI_PKT_DPADDR
229f21fb3edSRaghu Vatsavayi  */
230f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_DPADDR                 0x1080
231f21fb3edSRaghu Vatsavayi 
232f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - 1 bit for each output queue
233f21fb3edSRaghu Vatsavayi  * - Relaxed Ordering setting for reading Output Queues data
234f21fb3edSRaghu Vatsavayi  * - SLI_PKT_DATA_OUT_ROR
235f21fb3edSRaghu Vatsavayi  */
236f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_DATA_OUT_ROR           0x1090
237f21fb3edSRaghu Vatsavayi 
238f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - 1 bit for each output queue
239f21fb3edSRaghu Vatsavayi  * - No Snoop mode for reading Output Queues data
240f21fb3edSRaghu Vatsavayi  * - SLI_PKT_DATA_OUT_NS
241f21fb3edSRaghu Vatsavayi  */
242f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_DATA_OUT_NS            0x10A0
243f21fb3edSRaghu Vatsavayi 
244f21fb3edSRaghu Vatsavayi /* 1 register (64-bit)  - 2 bits for each output queue
245f21fb3edSRaghu Vatsavayi  * - Endian-Swap mode for reading Output Queue data
246f21fb3edSRaghu Vatsavayi  * - SLI_PKT_DATA_OUT_ES
247f21fb3edSRaghu Vatsavayi  */
248f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_DATA_OUT_ES64          0x10B0
249f21fb3edSRaghu Vatsavayi 
250f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) - 1 bit for each output queue
251f21fb3edSRaghu Vatsavayi  * - Controls whether SLI_PKTn_CNTS is incremented for bytes or for packets.
252f21fb3edSRaghu Vatsavayi  * - SLI_PKT_OUT_BMODE
253f21fb3edSRaghu Vatsavayi  */
254f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_OUT_BMODE              0x10D0
255f21fb3edSRaghu Vatsavayi 
256f21fb3edSRaghu Vatsavayi /* 1 register (64-bit) - 2 bits for each output queue
257f21fb3edSRaghu Vatsavayi  * - Assign PCIE port for Output queues
258f21fb3edSRaghu Vatsavayi  * - SLI_PKT_PCIE_PORT.
259f21fb3edSRaghu Vatsavayi  */
260f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_PCIE_PORT64            0x10E0
261f21fb3edSRaghu Vatsavayi 
262f21fb3edSRaghu Vatsavayi /* 1 (64-bit) register for Output Queue Packet Count Interrupt Threshold
263f21fb3edSRaghu Vatsavayi  * & Time Threshold. The same setting applies to all 32 queues.
264f21fb3edSRaghu Vatsavayi  * The register is defined as a 64-bit registers, but we use the
265f21fb3edSRaghu Vatsavayi  * 32-bit offsets to define distinct addresses.
266f21fb3edSRaghu Vatsavayi  */
267f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_INT_LEVEL_PKTS          0x1120
268f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_INT_LEVEL_TIME          0x1124
269f21fb3edSRaghu Vatsavayi 
270f21fb3edSRaghu Vatsavayi /* 1 (64-bit register) for Output Queue backpressure across all rings. */
271f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_WMARK                   0x1180
272f21fb3edSRaghu Vatsavayi 
273f21fb3edSRaghu Vatsavayi /* 1 register to control output queue global backpressure & ring enable. */
274f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_CTL                    0x1220
275f21fb3edSRaghu Vatsavayi 
276f21fb3edSRaghu Vatsavayi /*------- Output Queue Macros ---------*/
277f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_BASE_ADDR64(oq)          \
278f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_OQ_BASE_ADDR_START64 + ((oq) * CN6XXX_OQ_OFFSET))
279f21fb3edSRaghu Vatsavayi 
280f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_SIZE(oq)                 \
281f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_OQ_SIZE_START + ((oq) * CN6XXX_OQ_OFFSET))
282f21fb3edSRaghu Vatsavayi 
283f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_BUFF_INFO_SIZE(oq)                 \
284f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_OQ0_BUFF_INFO_SIZE + ((oq) * CN6XXX_OQ_OFFSET))
285f21fb3edSRaghu Vatsavayi 
286f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_PKTS_SENT(oq)            \
287f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_OQ_PKT_SENT_START + ((oq) * CN6XXX_OQ_OFFSET))
288f21fb3edSRaghu Vatsavayi 
289f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_OQ_PKTS_CREDIT(oq)          \
290f21fb3edSRaghu Vatsavayi 	(CN6XXX_SLI_OQ_PKT_CREDITS_START + ((oq) * CN6XXX_OQ_OFFSET))
291f21fb3edSRaghu Vatsavayi 
292f21fb3edSRaghu Vatsavayi /*######################### DMA Counters #########################*/
293f21fb3edSRaghu Vatsavayi 
294f21fb3edSRaghu Vatsavayi /* 2 registers (64-bit) - DMA Count - 1 for each DMA counter 0/1. */
295f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_CNT_START                   0x0400
296f21fb3edSRaghu Vatsavayi 
297f21fb3edSRaghu Vatsavayi /* 2 registers (64-bit) - DMA Timer 0/1, contains DMA timer values
298f21fb3edSRaghu Vatsavayi  * SLI_DMA_0_TIM
299f21fb3edSRaghu Vatsavayi  */
300f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_TIM_START                   0x0420
301f21fb3edSRaghu Vatsavayi 
302f21fb3edSRaghu Vatsavayi /* 2 registers (64-bit) - DMA count & Time Interrupt threshold -
303f21fb3edSRaghu Vatsavayi  * SLI_DMA_0_INT_LEVEL
304f21fb3edSRaghu Vatsavayi  */
305f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_INT_LEVEL_START             0x03E0
306f21fb3edSRaghu Vatsavayi 
307f21fb3edSRaghu Vatsavayi /* Each DMA register is at a 16-byte Offset in BAR0 */
308f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_OFFSET                      0x10
309f21fb3edSRaghu Vatsavayi 
310f21fb3edSRaghu Vatsavayi /*---------- DMA Counter Macros ---------*/
311f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_CNT(dq)                      \
312f21fb3edSRaghu Vatsavayi 	(CN6XXX_DMA_CNT_START + ((dq) * CN6XXX_DMA_OFFSET))
313f21fb3edSRaghu Vatsavayi 
314f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_INT_LEVEL(dq)                \
315f21fb3edSRaghu Vatsavayi 	(CN6XXX_DMA_INT_LEVEL_START + ((dq) * CN6XXX_DMA_OFFSET))
316f21fb3edSRaghu Vatsavayi 
317f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_PKT_INT_LEVEL(dq)            \
318f21fb3edSRaghu Vatsavayi 	(CN6XXX_DMA_INT_LEVEL_START + ((dq) * CN6XXX_DMA_OFFSET))
319f21fb3edSRaghu Vatsavayi 
320f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_TIME_INT_LEVEL(dq)           \
321f21fb3edSRaghu Vatsavayi 	(CN6XXX_DMA_INT_LEVEL_START + 4 + ((dq) * CN6XXX_DMA_OFFSET))
322f21fb3edSRaghu Vatsavayi 
323f21fb3edSRaghu Vatsavayi #define    CN6XXX_DMA_TIM(dq)                      \
324f21fb3edSRaghu Vatsavayi 	(CN6XXX_DMA_TIM_START + ((dq) * CN6XXX_DMA_OFFSET))
325f21fb3edSRaghu Vatsavayi 
326f21fb3edSRaghu Vatsavayi /*######################## INTERRUPTS #########################*/
327f21fb3edSRaghu Vatsavayi 
328f21fb3edSRaghu Vatsavayi /* 1 register (64-bit) for Interrupt Summary */
329f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_INT_SUM64                  0x0330
330f21fb3edSRaghu Vatsavayi 
331f21fb3edSRaghu Vatsavayi /* 1 register (64-bit) for Interrupt Enable */
332f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_INT_ENB64_PORT0            0x0340
333f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_INT_ENB64_PORT1            0x0350
334f21fb3edSRaghu Vatsavayi 
335f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to enable Output Queue Packet/Byte Count Interrupt */
336f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_CNT_INT_ENB            0x1150
337f21fb3edSRaghu Vatsavayi 
338f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to enable Output Queue Packet Timer Interrupt */
339f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_TIME_INT_ENB           0x1160
340f21fb3edSRaghu Vatsavayi 
341f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to indicate which Output Queue reached pkt threshold */
342f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_CNT_INT                0x1130
343f21fb3edSRaghu Vatsavayi 
344f21fb3edSRaghu Vatsavayi /* 1 register (32-bit) to indicate which Output Queue reached time threshold */
345f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_PKT_TIME_INT               0x1140
346f21fb3edSRaghu Vatsavayi 
347f21fb3edSRaghu Vatsavayi /*------------------ Interrupt Masks ----------------*/
348f21fb3edSRaghu Vatsavayi 
349f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_RML_TIMEOUT_ERR           BIT(1)
350f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_BAR0_RW_TIMEOUT_ERR       BIT(2)
351f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_IO2BIG_ERR                BIT(3)
352f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PKT_COUNT                 BIT(4)
353f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PKT_TIME                  BIT(5)
354f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M0UPB0_ERR                BIT(8)
355f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M0UPWI_ERR                BIT(9)
356f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M0UNB0_ERR                BIT(10)
357f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M0UNWI_ERR                BIT(11)
358f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M1UPB0_ERR                BIT(12)
359f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M1UPWI_ERR                BIT(13)
360f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M1UNB0_ERR                BIT(14)
361f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_M1UNWI_ERR                BIT(15)
362f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_MIO_INT0                  BIT(16)
363f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_MIO_INT1                  BIT(17)
364f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_MAC_INT0                  BIT(18)
365f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_MAC_INT1                  BIT(19)
366f21fb3edSRaghu Vatsavayi 
367f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA0_FORCE                BIT_ULL(32)
368f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA1_FORCE                BIT_ULL(33)
369f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA0_COUNT                BIT_ULL(34)
370f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA1_COUNT                BIT_ULL(35)
371f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA0_TIME                 BIT_ULL(36)
372f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA1_TIME                 BIT_ULL(37)
373f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_INSTR_DB_OF_ERR           BIT_ULL(48)
374f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_SLIST_DB_OF_ERR           BIT_ULL(49)
375f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_POUT_ERR                  BIT_ULL(50)
376f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PIN_BP_ERR                BIT_ULL(51)
377f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PGL_ERR                   BIT_ULL(52)
378f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PDI_ERR                   BIT_ULL(53)
379f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_POP_ERR                   BIT_ULL(54)
380f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PINS_ERR                  BIT_ULL(55)
381f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_SPRT0_ERR                 BIT_ULL(56)
382f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_SPRT1_ERR                 BIT_ULL(57)
383f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_ILL_PAD_ERR               BIT_ULL(60)
384f21fb3edSRaghu Vatsavayi 
385f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA0_DATA                 (CN6XXX_INTR_DMA0_TIME)
386f21fb3edSRaghu Vatsavayi 
387f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA1_DATA                 (CN6XXX_INTR_DMA1_TIME)
388f21fb3edSRaghu Vatsavayi 
389f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_DMA_DATA                  \
390f21fb3edSRaghu Vatsavayi 	(CN6XXX_INTR_DMA0_DATA | CN6XXX_INTR_DMA1_DATA)
391f21fb3edSRaghu Vatsavayi 
392f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PKT_DATA                  (CN6XXX_INTR_PKT_TIME | \
393f21fb3edSRaghu Vatsavayi 						  CN6XXX_INTR_PKT_COUNT)
394f21fb3edSRaghu Vatsavayi 
395f21fb3edSRaghu Vatsavayi /* Sum of interrupts for all PCI-Express Data Interrupts */
396f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_PCIE_DATA                 \
397f21fb3edSRaghu Vatsavayi 	(CN6XXX_INTR_DMA_DATA | CN6XXX_INTR_PKT_DATA)
398f21fb3edSRaghu Vatsavayi 
399f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_MIO                       \
400f21fb3edSRaghu Vatsavayi 	(CN6XXX_INTR_MIO_INT0 | CN6XXX_INTR_MIO_INT1)
401f21fb3edSRaghu Vatsavayi 
402f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_MAC                       \
403f21fb3edSRaghu Vatsavayi 	(CN6XXX_INTR_MAC_INT0 | CN6XXX_INTR_MAC_INT1)
404f21fb3edSRaghu Vatsavayi 
405f21fb3edSRaghu Vatsavayi /* Sum of interrupts for error events */
406f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_ERR                       \
407f21fb3edSRaghu Vatsavayi 	(CN6XXX_INTR_BAR0_RW_TIMEOUT_ERR    \
408f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_IO2BIG_ERR             \
409f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_M0UPB0_ERR             \
410f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_M0UPWI_ERR             \
411f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_M0UNB0_ERR             \
412f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_M0UNWI_ERR             \
413f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_M1UPB0_ERR             \
414f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_M1UPWI_ERR             \
415*416dcc5cSWan Jiabing 	   | CN6XXX_INTR_M1UNB0_ERR             \
416f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_M1UNWI_ERR             \
417f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_INSTR_DB_OF_ERR        \
418f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_SLIST_DB_OF_ERR        \
419f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_POUT_ERR               \
420f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_PIN_BP_ERR             \
421f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_PGL_ERR                \
422f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_PDI_ERR                \
423f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_POP_ERR                \
424f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_PINS_ERR               \
425f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_SPRT0_ERR              \
426f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_SPRT1_ERR              \
427f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_ILL_PAD_ERR)
428f21fb3edSRaghu Vatsavayi 
429f21fb3edSRaghu Vatsavayi /* Programmed Mask for Interrupt Sum */
430f21fb3edSRaghu Vatsavayi #define    CN6XXX_INTR_MASK                      \
431f21fb3edSRaghu Vatsavayi 	(CN6XXX_INTR_PCIE_DATA              \
432f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_DMA0_FORCE             \
433f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_DMA1_FORCE             \
434f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_MIO                    \
435f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_MAC                    \
436f21fb3edSRaghu Vatsavayi 	   | CN6XXX_INTR_ERR)
437f21fb3edSRaghu Vatsavayi 
438f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_S2M_PORT0_CTL              0x3D80
439f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_S2M_PORT1_CTL              0x3D90
440f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_S2M_PORTX_CTL(port)        \
44197a25326SRaghu Vatsavayi 	(CN6XXX_SLI_S2M_PORT0_CTL + ((port) * 0x10))
442f21fb3edSRaghu Vatsavayi 
443f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_INT_ENB64(port)            \
44497a25326SRaghu Vatsavayi 	(CN6XXX_SLI_INT_ENB64_PORT0 + ((port) * 0x10))
445f21fb3edSRaghu Vatsavayi 
446f21fb3edSRaghu Vatsavayi #define    CN6XXX_SLI_MAC_NUMBER                 0x3E00
447f21fb3edSRaghu Vatsavayi 
448f21fb3edSRaghu Vatsavayi /* CN6XXX BAR1 Index registers. */
449f21fb3edSRaghu Vatsavayi #define    CN6XXX_PEM_BAR1_INDEX000                0x00011800C00000A8ULL
450f21fb3edSRaghu Vatsavayi #define    CN6XXX_PEM_OFFSET                       0x0000000001000000ULL
451f21fb3edSRaghu Vatsavayi 
452f21fb3edSRaghu Vatsavayi #define    CN6XXX_BAR1_INDEX_START                 CN6XXX_PEM_BAR1_INDEX000
453f21fb3edSRaghu Vatsavayi #define    CN6XXX_PCI_BAR1_OFFSET                  0x8
454f21fb3edSRaghu Vatsavayi 
455f21fb3edSRaghu Vatsavayi #define    CN6XXX_BAR1_REG(idx, port) \
45697a25326SRaghu Vatsavayi 		(CN6XXX_BAR1_INDEX_START + ((port) * CN6XXX_PEM_OFFSET) + \
457f21fb3edSRaghu Vatsavayi 		(CN6XXX_PCI_BAR1_OFFSET * (idx)))
458f21fb3edSRaghu Vatsavayi 
459f21fb3edSRaghu Vatsavayi /*############################ DPI #########################*/
460f21fb3edSRaghu Vatsavayi 
461f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_CTL                 0x0001df0000000040ULL
462f21fb3edSRaghu Vatsavayi 
463f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_CONTROL         0x0001df0000000048ULL
464f21fb3edSRaghu Vatsavayi 
465f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_REQ_GBL_ENB         0x0001df0000000050ULL
466f21fb3edSRaghu Vatsavayi 
467f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_REQ_ERR_RSP         0x0001df0000000058ULL
468f21fb3edSRaghu Vatsavayi 
469f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_REQ_ERR_RST         0x0001df0000000060ULL
470f21fb3edSRaghu Vatsavayi 
471f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_ENG0_ENB        0x0001df0000000080ULL
472f21fb3edSRaghu Vatsavayi 
473f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_ENG_ENB(q_no)   \
47497a25326SRaghu Vatsavayi 	(CN6XXX_DPI_DMA_ENG0_ENB + ((q_no) * 8))
475f21fb3edSRaghu Vatsavayi 
476f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_ENG0_BUF        0x0001df0000000880ULL
477f21fb3edSRaghu Vatsavayi 
478f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_ENG_BUF(q_no)   \
47997a25326SRaghu Vatsavayi 	(CN6XXX_DPI_DMA_ENG0_BUF + ((q_no) * 8))
480f21fb3edSRaghu Vatsavayi 
481f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_SLI_PRT0_CFG        0x0001df0000000900ULL
482f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_SLI_PRT1_CFG        0x0001df0000000908ULL
483f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_SLI_PRTX_CFG(port)        \
48497a25326SRaghu Vatsavayi 	(CN6XXX_DPI_SLI_PRT0_CFG + ((port) * 0x10))
485f21fb3edSRaghu Vatsavayi 
486f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_COMMIT_MODE     BIT_ULL(58)
487f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_PKT_HP          BIT_ULL(57)
488f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_PKT_EN          BIT_ULL(56)
489f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_O_ES            BIT_ULL(15)
490f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_O_MODE          BIT_ULL(14)
491f21fb3edSRaghu Vatsavayi 
492f21fb3edSRaghu Vatsavayi #define    CN6XXX_DPI_DMA_CTL_MASK             \
493f21fb3edSRaghu Vatsavayi 	(CN6XXX_DPI_DMA_COMMIT_MODE    |    \
494f21fb3edSRaghu Vatsavayi 	 CN6XXX_DPI_DMA_PKT_HP         |    \
495f21fb3edSRaghu Vatsavayi 	 CN6XXX_DPI_DMA_PKT_EN         |    \
496f21fb3edSRaghu Vatsavayi 	 CN6XXX_DPI_DMA_O_ES           |    \
497f21fb3edSRaghu Vatsavayi 	 CN6XXX_DPI_DMA_O_MODE)
498f21fb3edSRaghu Vatsavayi 
499f21fb3edSRaghu Vatsavayi /*############################ CIU #########################*/
500f21fb3edSRaghu Vatsavayi 
501f21fb3edSRaghu Vatsavayi #define    CN6XXX_CIU_SOFT_BIST           0x0001070000000738ULL
502f21fb3edSRaghu Vatsavayi #define    CN6XXX_CIU_SOFT_RST            0x0001070000000740ULL
503f21fb3edSRaghu Vatsavayi 
504f21fb3edSRaghu Vatsavayi /*############################ MIO #########################*/
505f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CLOCK_CFG       0x0001070000000f00ULL
506f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CLOCK_LO        0x0001070000000f08ULL
507f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CLOCK_HI        0x0001070000000f10ULL
508f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CLOCK_COMP      0x0001070000000f18ULL
509f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_TIMESTAMP       0x0001070000000f20ULL
510f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_EVT_CNT         0x0001070000000f28ULL
511f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CKOUT_THRESH_LO 0x0001070000000f30ULL
512f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CKOUT_THRESH_HI 0x0001070000000f38ULL
513f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CKOUT_HI_INCR   0x0001070000000f40ULL
514f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_CKOUT_LO_INCR   0x0001070000000f48ULL
515f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_PPS_THRESH_LO   0x0001070000000f50ULL
516f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_PPS_THRESH_HI   0x0001070000000f58ULL
517f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_PPS_HI_INCR     0x0001070000000f60ULL
518f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_PTP_PPS_LO_INCR     0x0001070000000f68ULL
519f21fb3edSRaghu Vatsavayi 
520f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_QLM4_CFG            0x00011800000015B0ULL
521f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_RST_BOOT            0x0001180000001600ULL
522f21fb3edSRaghu Vatsavayi 
523f21fb3edSRaghu Vatsavayi #define    CN6XXX_MIO_QLM_CFG_MASK        0x7
524f21fb3edSRaghu Vatsavayi 
525f21fb3edSRaghu Vatsavayi /*############################ LMC #########################*/
526f21fb3edSRaghu Vatsavayi 
527f21fb3edSRaghu Vatsavayi #define    CN6XXX_LMC0_RESET_CTL               0x0001180088000180ULL
528f21fb3edSRaghu Vatsavayi #define    CN6XXX_LMC0_RESET_CTL_DDR3RST_MASK  0x0000000000000001ULL
529f21fb3edSRaghu Vatsavayi 
530f21fb3edSRaghu Vatsavayi #endif
531