GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / net / wireless / quantenna / qtnfmac / pearl / pcie_regs_pearl.h
1 /*
2  * Copyright (c) 2015 Quantenna Communications, Inc.
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  */
16
17 #ifndef __PEARL_PCIE_H
18 #define __PEARL_PCIE_H
19
20 #define PCIE_GEN2_BASE                          (0xe9000000)
21 #define PCIE_GEN3_BASE                          (0xe7000000)
22
23 #define PEARL_CUR_PCIE_BASE                     (PCIE_GEN2_BASE)
24 #define PCIE_HDP_OFFSET                         (0x2000)
25
26 #define PCIE_HDP_CTRL(base)                     ((base) + 0x2c00)
27 #define PCIE_HDP_AXI_CTRL(base)                 ((base) + 0x2c04)
28 #define PCIE_HDP_HOST_WR_DESC0(base)            ((base) + 0x2c10)
29 #define PCIE_HDP_HOST_WR_DESC0_H(base)          ((base) + 0x2c14)
30 #define PCIE_HDP_HOST_WR_DESC1(base)            ((base) + 0x2c18)
31 #define PCIE_HDP_HOST_WR_DESC1_H(base)          ((base) + 0x2c1c)
32 #define PCIE_HDP_HOST_WR_DESC2(base)            ((base) + 0x2c20)
33 #define PCIE_HDP_HOST_WR_DESC2_H(base)          ((base) + 0x2c24)
34 #define PCIE_HDP_HOST_WR_DESC3(base)            ((base) + 0x2c28)
35 #define PCIE_HDP_HOST_WR_DESC4_H(base)          ((base) + 0x2c2c)
36 #define PCIE_HDP_RX_INT_CTRL(base)              ((base) + 0x2c30)
37 #define PCIE_HDP_TX_INT_CTRL(base)              ((base) + 0x2c34)
38 #define PCIE_HDP_INT_STATUS(base)               ((base) + 0x2c38)
39 #define PCIE_HDP_INT_EN(base)                   ((base) + 0x2c3c)
40 #define PCIE_HDP_RX_DESC0_PTR(base)             ((base) + 0x2c40)
41 #define PCIE_HDP_RX_DESC0_NOE(base)             ((base) + 0x2c44)
42 #define PCIE_HDP_RX_DESC1_PTR(base)             ((base) + 0x2c48)
43 #define PCIE_HDP_RX_DESC1_NOE(base)             ((base) + 0x2c4c)
44 #define PCIE_HDP_RX_DESC2_PTR(base)             ((base) + 0x2c50)
45 #define PCIE_HDP_RX_DESC2_NOE(base)             ((base) + 0x2c54)
46 #define PCIE_HDP_RX_DESC3_PTR(base)             ((base) + 0x2c58)
47 #define PCIE_HDP_RX_DESC3_NOE(base)             ((base) + 0x2c5c)
48
49 #define PCIE_HDP_TX0_BASE_ADDR(base)            ((base) + 0x2c60)
50 #define PCIE_HDP_TX1_BASE_ADDR(base)            ((base) + 0x2c64)
51 #define PCIE_HDP_TX0_Q_CTRL(base)               ((base) + 0x2c70)
52 #define PCIE_HDP_TX1_Q_CTRL(base)               ((base) + 0x2c74)
53 #define PCIE_HDP_CFG0(base)                     ((base) + 0x2c80)
54 #define PCIE_HDP_CFG1(base)                     ((base) + 0x2c84)
55 #define PCIE_HDP_CFG2(base)                     ((base) + 0x2c88)
56 #define PCIE_HDP_CFG3(base)                     ((base) + 0x2c8c)
57 #define PCIE_HDP_CFG4(base)                     ((base) + 0x2c90)
58 #define PCIE_HDP_CFG5(base)                     ((base) + 0x2c94)
59 #define PCIE_HDP_CFG6(base)                     ((base) + 0x2c98)
60 #define PCIE_HDP_CFG7(base)                     ((base) + 0x2c9c)
61 #define PCIE_HDP_CFG8(base)                     ((base) + 0x2ca0)
62 #define PCIE_HDP_CFG9(base)                     ((base) + 0x2ca4)
63 #define PCIE_HDP_CFG10(base)                    ((base) + 0x2ca8)
64 #define PCIE_HDP_CFG11(base)                    ((base) + 0x2cac)
65 #define PCIE_INT(base)                          ((base) + 0x2cb0)
66 #define PCIE_INT_MASK(base)                     ((base) + 0x2cb4)
67 #define PCIE_MSI_MASK(base)                     ((base) + 0x2cb8)
68 #define PCIE_MSI_PNDG(base)                     ((base) + 0x2cbc)
69 #define PCIE_PRI_CFG(base)                      ((base) + 0x2cc0)
70 #define PCIE_PHY_CR(base)                       ((base) + 0x2cc4)
71 #define PCIE_HDP_CTAG_CTRL(base)                ((base) + 0x2cf4)
72 #define PCIE_HDP_HHBM_BUF_PTR(base)             ((base) + 0x2d00)
73 #define PCIE_HDP_HHBM_BUF_PTR_H(base)           ((base) + 0x2d04)
74 #define PCIE_HDP_HHBM_BUF_FIFO_NOE(base)        ((base) + 0x2d04)
75 #define PCIE_HDP_RX0DMA_CNT(base)               ((base) + 0x2d10)
76 #define PCIE_HDP_RX1DMA_CNT(base)               ((base) + 0x2d14)
77 #define PCIE_HDP_RX2DMA_CNT(base)               ((base) + 0x2d18)
78 #define PCIE_HDP_RX3DMA_CNT(base)               ((base) + 0x2d1c)
79 #define PCIE_HDP_TX0DMA_CNT(base)               ((base) + 0x2d20)
80 #define PCIE_HDP_TX1DMA_CNT(base)               ((base) + 0x2d24)
81 #define PCIE_HDP_RXDMA_CTRL(base)               ((base) + 0x2d28)
82 #define PCIE_HDP_TX_HOST_Q_SZ_CTRL(base)        ((base) + 0x2d2c)
83 #define PCIE_HDP_TX_HOST_Q_BASE_L(base)         ((base) + 0x2d30)
84 #define PCIE_HDP_TX_HOST_Q_BASE_H(base)         ((base) + 0x2d34)
85 #define PCIE_HDP_TX_HOST_Q_WR_PTR(base)         ((base) + 0x2d38)
86 #define PCIE_HDP_TX_HOST_Q_RD_PTR(base)         ((base) + 0x2d3c)
87 #define PCIE_HDP_TX_HOST_Q_STS(base)            ((base) + 0x2d40)
88
89 /* Host HBM pool registers */
90 #define PCIE_HHBM_CSR_REG(base)                 ((base) + 0x2e00)
91 #define PCIE_HHBM_Q_BASE_REG(base)              ((base) + 0x2e04)
92 #define PCIE_HHBM_Q_LIMIT_REG(base)             ((base) + 0x2e08)
93 #define PCIE_HHBM_Q_WR_REG(base)                ((base) + 0x2e0c)
94 #define PCIE_HHBM_Q_RD_REG(base)                ((base) + 0x2e10)
95 #define PCIE_HHBM_POOL_DATA_0_H(base)           ((base) + 0x2e90)
96 #define PCIE_HHBM_CONFIG(base)                  ((base) + 0x2f9c)
97 #define PCIE_HHBM_POOL_REQ_0(base)              ((base) + 0x2f10)
98 #define PCIE_HHBM_POOL_DATA_0(base)             ((base) + 0x2f40)
99 #define PCIE_HHBM_WATERMARK_MASKED_INT(base)    ((base) + 0x2f68)
100 #define PCIE_HHBM_WATERMARK_INT(base)           ((base) + 0x2f6c)
101 #define PCIE_HHBM_POOL_WATERMARK(base)          ((base) + 0x2f70)
102 #define PCIE_HHBM_POOL_OVERFLOW_CNT(base)       ((base) + 0x2f90)
103 #define PCIE_HHBM_POOL_UNDERFLOW_CNT(base)      ((base) + 0x2f94)
104 #define HBM_INT_STATUS(base)                    ((base) + 0x2f9c)
105 #define PCIE_HHBM_POOL_CNFIG(base)              ((base) + 0x2f9c)
106
107 /* host HBM bit field definition */
108 #define HHBM_CONFIG_SOFT_RESET                  (BIT(8))
109 #define HHBM_WR_REQ                             (BIT(0))
110 #define HHBM_RD_REQ                             (BIT(1))
111 #define HHBM_DONE                               (BIT(31))
112 #define HHBM_64BIT                              (BIT(10))
113
114 /* offsets for dual PCIE */
115 #define PCIE_PORT_LINK_CTL(base)                ((base) + 0x0710)
116 #define PCIE_GEN2_CTL(base)                     ((base) + 0x080C)
117 #define PCIE_GEN3_OFF(base)                     ((base) + 0x0890)
118 #define PCIE_ATU_CTRL1(base)                    ((base) + 0x0904)
119 #define PCIE_ATU_CTRL2(base)                    ((base) + 0x0908)
120 #define PCIE_ATU_BASE_LOW(base)                 ((base) + 0x090C)
121 #define PCIE_ATU_BASE_HIGH(base)                ((base) + 0x0910)
122 #define PCIE_ATU_BASE_LIMIT(base)               ((base) + 0x0914)
123 #define PCIE_ATU_TGT_LOW(base)                  ((base) + 0x0918)
124 #define PCIE_ATU_TGT_HIGH(base)                 ((base) + 0x091C)
125 #define PCIE_DMA_WR_ENABLE(base)                ((base) + 0x097C)
126 #define PCIE_DMA_WR_CHWTLOW(base)               ((base) + 0x0988)
127 #define PCIE_DMA_WR_CHWTHIG(base)               ((base) + 0x098C)
128 #define PCIE_DMA_WR_INTSTS(base)                ((base) + 0x09BC)
129 #define PCIE_DMA_WR_INTMASK(base)               ((base) + 0x09C4)
130 #define PCIE_DMA_WR_INTCLER(base)               ((base) + 0x09C8)
131 #define PCIE_DMA_WR_DONE_IMWR_ADDR_L(base)      ((base) + 0x09D0)
132 #define PCIE_DMA_WR_DONE_IMWR_ADDR_H(base)      ((base) + 0x09D4)
133 #define PCIE_DMA_WR_ABORT_IMWR_ADDR_L(base)     ((base) + 0x09D8)
134 #define PCIE_DMA_WR_ABORT_IMWR_ADDR_H(base)     ((base) + 0x09DC)
135 #define PCIE_DMA_WR_IMWR_DATA(base)             ((base) + 0x09E0)
136 #define PCIE_DMA_WR_LL_ERR_EN(base)             ((base) + 0x0A00)
137 #define PCIE_DMA_WR_DOORBELL(base)              ((base) + 0x0980)
138 #define PCIE_DMA_RD_ENABLE(base)                ((base) + 0x099C)
139 #define PCIE_DMA_RD_DOORBELL(base)              ((base) + 0x09A0)
140 #define PCIE_DMA_RD_CHWTLOW(base)               ((base) + 0x09A8)
141 #define PCIE_DMA_RD_CHWTHIG(base)               ((base) + 0x09AC)
142 #define PCIE_DMA_RD_INTSTS(base)                ((base) + 0x0A10)
143 #define PCIE_DMA_RD_INTMASK(base)               ((base) + 0x0A18)
144 #define PCIE_DMA_RD_INTCLER(base)               ((base) + 0x0A1C)
145 #define PCIE_DMA_RD_ERR_STS_L(base)             ((base) + 0x0A24)
146 #define PCIE_DMA_RD_ERR_STS_H(base)             ((base) + 0x0A28)
147 #define PCIE_DMA_RD_LL_ERR_EN(base)             ((base) + 0x0A34)
148 #define PCIE_DMA_RD_DONE_IMWR_ADDR_L(base)      ((base) + 0x0A3C)
149 #define PCIE_DMA_RD_DONE_IMWR_ADDR_H(base)      ((base) + 0x0A40)
150 #define PCIE_DMA_RD_ABORT_IMWR_ADDR_L(base)     ((base) + 0x0A44)
151 #define PCIE_DMA_RD_ABORT_IMWR_ADDR_H(base)     ((base) + 0x0A48)
152 #define PCIE_DMA_RD_IMWR_DATA(base)             ((base) + 0x0A4C)
153 #define PCIE_DMA_CHNL_CONTEXT(base)             ((base) + 0x0A6C)
154 #define PCIE_DMA_CHNL_CNTRL(base)               ((base) + 0x0A70)
155 #define PCIE_DMA_XFR_SIZE(base)                 ((base) + 0x0A78)
156 #define PCIE_DMA_SAR_LOW(base)                  ((base) + 0x0A7C)
157 #define PCIE_DMA_SAR_HIGH(base)                 ((base) + 0x0A80)
158 #define PCIE_DMA_DAR_LOW(base)                  ((base) + 0x0A84)
159 #define PCIE_DMA_DAR_HIGH(base)                 ((base) + 0x0A88)
160 #define PCIE_DMA_LLPTR_LOW(base)                ((base) + 0x0A8C)
161 #define PCIE_DMA_LLPTR_HIGH(base)               ((base) + 0x0A90)
162 #define PCIE_DMA_WRLL_ERR_ENB(base)             ((base) + 0x0A00)
163 #define PCIE_DMA_RDLL_ERR_ENB(base)             ((base) + 0x0A34)
164 #define PCIE_DMABD_CHNL_CNTRL(base)             ((base) + 0x8000)
165 #define PCIE_DMABD_XFR_SIZE(base)               ((base) + 0x8004)
166 #define PCIE_DMABD_SAR_LOW(base)                ((base) + 0x8008)
167 #define PCIE_DMABD_SAR_HIGH(base)               ((base) + 0x800c)
168 #define PCIE_DMABD_DAR_LOW(base)                ((base) + 0x8010)
169 #define PCIE_DMABD_DAR_HIGH(base)               ((base) + 0x8014)
170 #define PCIE_DMABD_LLPTR_LOW(base)              ((base) + 0x8018)
171 #define PCIE_DMABD_LLPTR_HIGH(base)             ((base) + 0x801c)
172 #define PCIE_WRDMA0_CHNL_CNTRL(base)            ((base) + 0x8000)
173 #define PCIE_WRDMA0_XFR_SIZE(base)              ((base) + 0x8004)
174 #define PCIE_WRDMA0_SAR_LOW(base)               ((base) + 0x8008)
175 #define PCIE_WRDMA0_SAR_HIGH(base)              ((base) + 0x800c)
176 #define PCIE_WRDMA0_DAR_LOW(base)               ((base) + 0x8010)
177 #define PCIE_WRDMA0_DAR_HIGH(base)              ((base) + 0x8014)
178 #define PCIE_WRDMA0_LLPTR_LOW(base)             ((base) + 0x8018)
179 #define PCIE_WRDMA0_LLPTR_HIGH(base)            ((base) + 0x801c)
180 #define PCIE_WRDMA1_CHNL_CNTRL(base)            ((base) + 0x8020)
181 #define PCIE_WRDMA1_XFR_SIZE(base)              ((base) + 0x8024)
182 #define PCIE_WRDMA1_SAR_LOW(base)               ((base) + 0x8028)
183 #define PCIE_WRDMA1_SAR_HIGH(base)              ((base) + 0x802c)
184 #define PCIE_WRDMA1_DAR_LOW(base)               ((base) + 0x8030)
185 #define PCIE_WRDMA1_DAR_HIGH(base)              ((base) + 0x8034)
186 #define PCIE_WRDMA1_LLPTR_LOW(base)             ((base) + 0x8038)
187 #define PCIE_WRDMA1_LLPTR_HIGH(base)            ((base) + 0x803c)
188 #define PCIE_RDDMA0_CHNL_CNTRL(base)            ((base) + 0x8040)
189 #define PCIE_RDDMA0_XFR_SIZE(base)              ((base) + 0x8044)
190 #define PCIE_RDDMA0_SAR_LOW(base)               ((base) + 0x8048)
191 #define PCIE_RDDMA0_SAR_HIGH(base)              ((base) + 0x804c)
192 #define PCIE_RDDMA0_DAR_LOW(base)               ((base) + 0x8050)
193 #define PCIE_RDDMA0_DAR_HIGH(base)              ((base) + 0x8054)
194 #define PCIE_RDDMA0_LLPTR_LOW(base)             ((base) + 0x8058)
195 #define PCIE_RDDMA0_LLPTR_HIGH(base)            ((base) + 0x805c)
196 #define PCIE_RDDMA1_CHNL_CNTRL(base)            ((base) + 0x8060)
197 #define PCIE_RDDMA1_XFR_SIZE(base)              ((base) + 0x8064)
198 #define PCIE_RDDMA1_SAR_LOW(base)               ((base) + 0x8068)
199 #define PCIE_RDDMA1_SAR_HIGH(base)              ((base) + 0x806c)
200 #define PCIE_RDDMA1_DAR_LOW(base)               ((base) + 0x8070)
201 #define PCIE_RDDMA1_DAR_HIGH(base)              ((base) + 0x8074)
202 #define PCIE_RDDMA1_LLPTR_LOW(base)             ((base) + 0x8078)
203 #define PCIE_RDDMA1_LLPTR_HIGH(base)            ((base) + 0x807c)
204
205 #define PCIE_ID(base)                           ((base) + 0x0000)
206 #define PCIE_CMD(base)                          ((base) + 0x0004)
207 #define PCIE_BAR(base, n)                       ((base) + 0x0010 + ((n) << 2))
208 #define PCIE_CAP_PTR(base)                      ((base) + 0x0034)
209 #define PCIE_MSI_LBAR(base)                     ((base) + 0x0054)
210 #define PCIE_MSI_CTRL(base)                     ((base) + 0x0050)
211 #define PCIE_MSI_ADDR_L(base)                   ((base) + 0x0054)
212 #define PCIE_MSI_ADDR_H(base)                   ((base) + 0x0058)
213 #define PCIE_MSI_DATA(base)                     ((base) + 0x005C)
214 #define PCIE_MSI_MASK_BIT(base)                 ((base) + 0x0060)
215 #define PCIE_MSI_PEND_BIT(base)                 ((base) + 0x0064)
216 #define PCIE_DEVCAP(base)                       ((base) + 0x0074)
217 #define PCIE_DEVCTLSTS(base)                    ((base) + 0x0078)
218
219 #define PCIE_CMDSTS(base)                       ((base) + 0x0004)
220 #define PCIE_LINK_STAT(base)                    ((base) + 0x80)
221 #define PCIE_LINK_CTL2(base)                    ((base) + 0xa0)
222 #define PCIE_ASPM_L1_CTRL(base)                 ((base) + 0x70c)
223 #define PCIE_ASPM_LINK_CTRL(base)               (PCIE_LINK_STAT)
224 #define PCIE_ASPM_L1_SUBSTATE_TIMING(base)      ((base) + 0xB44)
225 #define PCIE_L1SUB_CTRL1(base)                  ((base) + 0x150)
226 #define PCIE_PMCSR(base)                        ((base) + 0x44)
227 #define PCIE_CFG_SPACE_LIMIT(base)              ((base) + 0x100)
228
229 /* PCIe link defines */
230 #define PEARL_PCIE_LINKUP                       (0x7)
231 #define PEARL_PCIE_DATA_LINK                    (BIT(0))
232 #define PEARL_PCIE_PHY_LINK                     (BIT(1))
233 #define PEARL_PCIE_LINK_RST                     (BIT(3))
234 #define PEARL_PCIE_FATAL_ERR                    (BIT(5))
235 #define PEARL_PCIE_NONFATAL_ERR                 (BIT(6))
236
237 /* PCIe Lane defines */
238 #define PCIE_G2_LANE_X1                         ((BIT(0)) << 16)
239 #define PCIE_G2_LANE_X2                         ((BIT(0) | BIT(1)) << 16)
240
241 /* PCIe DLL link enable */
242 #define PCIE_DLL_LINK_EN                        ((BIT(0)) << 5)
243
244 #define PCIE_LINK_GEN1                          (BIT(0))
245 #define PCIE_LINK_GEN2                          (BIT(1))
246 #define PCIE_LINK_GEN3                          (BIT(2))
247 #define PCIE_LINK_MODE(x)                       (((x) >> 16) & 0x7)
248
249 #define MSI_EN                                  (BIT(0))
250 #define MSI_64_EN                               (BIT(7))
251 #define PCIE_MSI_ADDR_OFFSET(a)                 ((a) & 0xFFFF)
252 #define PCIE_MSI_ADDR_ALIGN(a)                  ((a) & (~0xFFFF))
253
254 #define PCIE_BAR_MASK(base, n)                  ((base) + 0x1010 + ((n) << 2))
255 #define PCIE_MAX_BAR                            (6)
256
257 #define PCIE_ATU_VIEW(base)                     ((base) + 0x0900)
258 #define PCIE_ATU_CTL1(base)                     ((base) + 0x0904)
259 #define PCIE_ATU_CTL2(base)                     ((base) + 0x0908)
260 #define PCIE_ATU_LBAR(base)                     ((base) + 0x090c)
261 #define PCIE_ATU_UBAR(base)                     ((base) + 0x0910)
262 #define PCIE_ATU_LAR(base)                      ((base) + 0x0914)
263 #define PCIE_ATU_LTAR(base)                     ((base) + 0x0918)
264 #define PCIE_ATU_UTAR(base)                     ((base) + 0x091c)
265
266 #define PCIE_MSI_ADDR_LOWER(base)               ((base) + 0x0820)
267 #define PCIE_MSI_ADDR_UPPER(base)               ((base) + 0x0824)
268 #define PCIE_MSI_ENABLE(base)                   ((base) + 0x0828)
269 #define PCIE_MSI_MASK_RC(base)                  ((base) + 0x082c)
270 #define PCIE_MSI_STATUS(base)                   ((base) + 0x0830)
271 #define PEARL_PCIE_MSI_REGION                   (0xce000000)
272 #define PEARL_PCIE_MSI_DATA                     (0)
273 #define PCIE_MSI_GPIO(base)                     ((base) + 0x0888)
274
275 #define PCIE_HDP_HOST_QUEUE_FULL        (BIT(17))
276 #define USE_BAR_MATCH_MODE
277 #define PCIE_ATU_OB_REGION              (BIT(0))
278 #define PCIE_ATU_EN_REGION              (BIT(31))
279 #define PCIE_ATU_EN_MATCH               (BIT(30))
280 #define PCIE_BASE_REGION                (0xb0000000)
281 #define PCIE_MEM_MAP_SIZE               (512 * 1024)
282
283 #define PCIE_OB_REG_REGION              (0xcf000000)
284 #define PCIE_CONFIG_REGION              (0xcf000000)
285 #define PCIE_CONFIG_SIZE                (4096)
286 #define PCIE_CONFIG_CH                  (1)
287
288 /* inbound mapping */
289 #define PCIE_IB_BAR0                    (0x00000000)    /* ddr */
290 #define PCIE_IB_BAR0_CH                 (0)
291 #define PCIE_IB_BAR3                    (0xe0000000)    /* sys_reg */
292 #define PCIE_IB_BAR3_CH                 (1)
293
294 /* outbound mapping */
295 #define PCIE_MEM_CH                     (0)
296 #define PCIE_REG_CH                     (1)
297 #define PCIE_MEM_REGION                 (0xc0000000)
298 #define PCIE_MEM_SIZE                   (0x000fffff)
299 #define PCIE_MEM_TAR                    (0x80000000)
300
301 #define PCIE_MSI_REGION                 (0xce000000)
302 #define PCIE_MSI_SIZE                   (KBYTE(4) - 1)
303 #define PCIE_MSI_CH                     (1)
304
305 /* size of config region */
306 #define PCIE_CFG_SIZE                   (0x0000ffff)
307
308 #define PCIE_ATU_DIR_IB                 (BIT(31))
309 #define PCIE_ATU_DIR_OB                 (0)
310 #define PCIE_ATU_DIR_CFG                (2)
311 #define PCIE_ATU_DIR_MATCH_IB           (BIT(31) | BIT(30))
312
313 #define PCIE_DMA_WR_0                   (0)
314 #define PCIE_DMA_WR_1                   (1)
315 #define PCIE_DMA_RD_0                   (2)
316 #define PCIE_DMA_RD_1                   (3)
317
318 #define PCIE_DMA_CHNL_CNTRL_CB          (BIT(0))
319 #define PCIE_DMA_CHNL_CNTRL_TCB         (BIT(1))
320 #define PCIE_DMA_CHNL_CNTRL_LLP         (BIT(2))
321 #define PCIE_DMA_CHNL_CNTRL_LIE         (BIT(3))
322 #define PCIE_DMA_CHNL_CNTRL_RIE         (BIT(4))
323 #define PCIE_DMA_CHNL_CNTRL_CSS         (BIT(8))
324 #define PCIE_DMA_CHNL_CNTRL_LLE         (BIT(9))
325 #define PCIE_DMA_CHNL_CNTRL_TLP         (BIT(26))
326
327 #define PCIE_DMA_CHNL_CONTEXT_RD        (BIT(31))
328 #define PCIE_DMA_CHNL_CONTEXT_WR        (0)
329 #define PCIE_MAX_BAR                    (6)
330
331 /* PCIe HDP interrupt status definition */
332 #define PCIE_HDP_INT_EP_RXDMA           (BIT(0))
333 #define PCIE_HDP_INT_HBM_UF             (BIT(1))
334 #define PCIE_HDP_INT_RX_LEN_ERR         (BIT(2))
335 #define PCIE_HDP_INT_RX_HDR_LEN_ERR     (BIT(3))
336 #define PCIE_HDP_INT_EP_TXDMA           (BIT(12))
337 #define PCIE_HDP_INT_HHBM_UF            (BIT(13))
338 #define PCIE_HDP_INT_EP_TXEMPTY         (BIT(15))
339 #define PCIE_HDP_INT_IPC                (BIT(29))
340
341 /* PCIe interrupt status definition */
342 #define PCIE_INT_MSI                    (BIT(24))
343 #define PCIE_INT_INTX                   (BIT(23))
344
345 /* PCIe legacy INTx */
346 #define PEARL_PCIE_CFG0_OFFSET          (0x6C)
347 #define PEARL_ASSERT_INTX               (BIT(9))
348
349 /* SYS CTL regs */
350 #define QTN_PEARL_SYSCTL_LHOST_IRQ_OFFSET       (0x001C)
351
352 #define QTN_PEARL_IPC_IRQ_WORD(irq)     (BIT(irq) | BIT(irq + 16))
353 #define QTN_PEARL_LHOST_IPC_IRQ         (6)
354
355 #endif /* __PEARL_PCIE_H */