Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: ISC */
0002 
0003 #ifndef __MT7603_REGS_H
0004 #define __MT7603_REGS_H
0005 
0006 #define MT_HW_REV           0x1000
0007 #define MT_HW_CHIPID            0x1008
0008 #define MT_TOP_MISC2            0x1134
0009 
0010 #define MT_MCU_BASE         0x2000
0011 #define MT_MCU(ofs)         (MT_MCU_BASE + (ofs))
0012 
0013 #define MT_MCU_PCIE_REMAP_1     MT_MCU(0x500)
0014 #define MT_MCU_PCIE_REMAP_1_OFFSET  GENMASK(17, 0)
0015 #define MT_MCU_PCIE_REMAP_1_BASE    GENMASK(31, 18)
0016 
0017 #define MT_MCU_PCIE_REMAP_2     MT_MCU(0x504)
0018 #define MT_MCU_PCIE_REMAP_2_OFFSET  GENMASK(18, 0)
0019 #define MT_MCU_PCIE_REMAP_2_BASE    GENMASK(31, 19)
0020 
0021 #define MT_HIF_BASE         0x4000
0022 #define MT_HIF(ofs)         (MT_HIF_BASE + (ofs))
0023 
0024 #define MT_INT_SOURCE_CSR       MT_HIF(0x200)
0025 #define MT_INT_MASK_CSR         MT_HIF(0x204)
0026 #define MT_DELAY_INT_CFG        MT_HIF(0x210)
0027 
0028 #define MT_INT_RX_DONE(_n)      BIT(_n)
0029 #define MT_INT_RX_DONE_ALL      GENMASK(1, 0)
0030 #define MT_INT_TX_DONE_ALL      GENMASK(19, 4)
0031 #define MT_INT_TX_DONE(_n)      BIT((_n) + 4)
0032 
0033 #define MT_INT_RX_COHERENT      BIT(20)
0034 #define MT_INT_TX_COHERENT      BIT(21)
0035 #define MT_INT_MAC_IRQ3         BIT(27)
0036 
0037 #define MT_INT_MCU_CMD          BIT(30)
0038 
0039 #define MT_WPDMA_GLO_CFG        MT_HIF(0x208)
0040 #define MT_WPDMA_GLO_CFG_TX_DMA_EN  BIT(0)
0041 #define MT_WPDMA_GLO_CFG_TX_DMA_BUSY    BIT(1)
0042 #define MT_WPDMA_GLO_CFG_RX_DMA_EN  BIT(2)
0043 #define MT_WPDMA_GLO_CFG_RX_DMA_BUSY    BIT(3)
0044 #define MT_WPDMA_GLO_CFG_DMA_BURST_SIZE GENMASK(5, 4)
0045 #define MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE  BIT(6)
0046 #define MT_WPDMA_GLO_CFG_BIG_ENDIAN BIT(7)
0047 #define MT_WPDMA_GLO_CFG_HDR_SEG_LEN    GENMASK(15, 8)
0048 #define MT_WPDMA_GLO_CFG_SW_RESET   BIT(24)
0049 #define MT_WPDMA_GLO_CFG_FORCE_TX_EOF   BIT(25)
0050 #define MT_WPDMA_GLO_CFG_CLK_GATE_DIS   BIT(30)
0051 #define MT_WPDMA_GLO_CFG_RX_2B_OFFSET   BIT(31)
0052 
0053 #define MT_WPDMA_RST_IDX        MT_HIF(0x20c)
0054 
0055 #define MT_WPDMA_DEBUG          MT_HIF(0x244)
0056 #define MT_WPDMA_DEBUG_VALUE        GENMASK(17, 0)
0057 #define MT_WPDMA_DEBUG_SEL      BIT(27)
0058 #define MT_WPDMA_DEBUG_IDX      GENMASK(31, 28)
0059 
0060 #define MT_TX_RING_BASE         MT_HIF(0x300)
0061 #define MT_RX_RING_BASE         MT_HIF(0x400)
0062 
0063 #define MT_TXTIME_THRESH_BASE       MT_HIF(0x500)
0064 #define MT_TXTIME_THRESH(n)     (MT_TXTIME_THRESH_BASE + ((n) * 4))
0065 
0066 #define MT_PAGE_COUNT_BASE      MT_HIF(0x540)
0067 #define MT_PAGE_COUNT(n)        (MT_PAGE_COUNT_BASE + ((n) * 4))
0068 
0069 #define MT_SCH_1            MT_HIF(0x588)
0070 #define MT_SCH_2            MT_HIF(0x58c)
0071 #define MT_SCH_3            MT_HIF(0x590)
0072 
0073 #define MT_SCH_4            MT_HIF(0x594)
0074 #define MT_SCH_4_FORCE_QID      GENMASK(4, 0)
0075 #define MT_SCH_4_BYPASS         BIT(5)
0076 #define MT_SCH_4_RESET          BIT(8)
0077 
0078 #define MT_GROUP_THRESH_BASE        MT_HIF(0x598)
0079 #define MT_GROUP_THRESH(n)      (MT_GROUP_THRESH_BASE + ((n) * 4))
0080 
0081 #define MT_QUEUE_PRIORITY_1     MT_HIF(0x580)
0082 #define MT_QUEUE_PRIORITY_2     MT_HIF(0x584)
0083 
0084 #define MT_BMAP_0           MT_HIF(0x5b0)
0085 #define MT_BMAP_1           MT_HIF(0x5b4)
0086 #define MT_BMAP_2           MT_HIF(0x5b8)
0087 
0088 #define MT_HIGH_PRIORITY_1      MT_HIF(0x5bc)
0089 #define MT_HIGH_PRIORITY_2      MT_HIF(0x5c0)
0090 
0091 #define MT_PRIORITY_MASK        MT_HIF(0x5c4)
0092 
0093 #define MT_RSV_MAX_THRESH       MT_HIF(0x5c8)
0094 
0095 #define MT_PSE_BASE         0x8000
0096 #define MT_PSE(ofs)         (MT_PSE_BASE + (ofs))
0097 
0098 #define MT_MCU_DEBUG_RESET      MT_PSE(0x16c)
0099 #define MT_MCU_DEBUG_RESET_PSE      BIT(0)
0100 #define MT_MCU_DEBUG_RESET_PSE_S    BIT(1)
0101 #define MT_MCU_DEBUG_RESET_QUEUES   GENMASK(6, 2)
0102 
0103 #define MT_PSE_FC_P0            MT_PSE(0x120)
0104 #define MT_PSE_FC_P0_MIN_RESERVE    GENMASK(11, 0)
0105 #define MT_PSE_FC_P0_MAX_QUOTA      GENMASK(27, 16)
0106 
0107 #define MT_PSE_FRP          MT_PSE(0x138)
0108 #define MT_PSE_FRP_P0           GENMASK(2, 0)
0109 #define MT_PSE_FRP_P1           GENMASK(5, 3)
0110 #define MT_PSE_FRP_P2_RQ0       GENMASK(8, 6)
0111 #define MT_PSE_FRP_P2_RQ1       GENMASK(11, 9)
0112 #define MT_PSE_FRP_P2_RQ2       GENMASK(14, 12)
0113 
0114 #define MT_FC_RSV_COUNT_0       MT_PSE(0x13c)
0115 #define MT_FC_RSV_COUNT_0_P0        GENMASK(11, 0)
0116 #define MT_FC_RSV_COUNT_0_P1        GENMASK(27, 16)
0117 
0118 #define MT_FC_SP2_Q0Q1          MT_PSE(0x14c)
0119 #define MT_FC_SP2_Q0Q1_SRC_COUNT_Q0 GENMASK(11, 0)
0120 #define MT_FC_SP2_Q0Q1_SRC_COUNT_Q1 GENMASK(27, 16)
0121 
0122 #define MT_PSE_FW_SHARED        MT_PSE(0x17c)
0123 
0124 #define MT_PSE_RTA          MT_PSE(0x194)
0125 #define MT_PSE_RTA_QUEUE_ID     GENMASK(4, 0)
0126 #define MT_PSE_RTA_PORT_ID      GENMASK(6, 5)
0127 #define MT_PSE_RTA_REDIRECT_EN      BIT(7)
0128 #define MT_PSE_RTA_TAG_ID       GENMASK(15, 8)
0129 #define MT_PSE_RTA_WRITE        BIT(16)
0130 #define MT_PSE_RTA_BUSY         BIT(31)
0131 
0132 #define MT_WF_PHY_BASE          0x10000
0133 #define MT_WF_PHY_OFFSET        0x1000
0134 #define MT_WF_PHY(ofs)          (MT_WF_PHY_BASE + (ofs))
0135 
0136 #define MT_AGC_BASE         MT_WF_PHY(0x500)
0137 #define MT_AGC(n)           (MT_AGC_BASE + ((n) * 4))
0138 
0139 #define MT_AGC1_BASE            MT_WF_PHY(0x1500)
0140 #define MT_AGC1(n)          (MT_AGC1_BASE + ((n) * 4))
0141 
0142 #define MT_AGC_41_RSSI_0        GENMASK(23, 16)
0143 #define MT_AGC_41_RSSI_1        GENMASK(7, 0)
0144 
0145 #define MT_RXTD_BASE            MT_WF_PHY(0x600)
0146 #define MT_RXTD(n)          (MT_RXTD_BASE + ((n) * 4))
0147 
0148 #define MT_RXTD_6_ACI_TH        GENMASK(4, 0)
0149 #define MT_RXTD_6_CCAED_TH      GENMASK(14, 8)
0150 
0151 #define MT_RXTD_8_LOWER_SIGNAL      GENMASK(5, 0)
0152 
0153 #define MT_RXTD_13_ACI_TH_EN        BIT(0)
0154 
0155 #define MT_WF_PHY_CR_TSSI_BASE      MT_WF_PHY(0xd00)
0156 #define MT_WF_PHY_CR_TSSI(phy, n)   (MT_WF_PHY_CR_TSSI_BASE +   \
0157                      ((phy) * MT_WF_PHY_OFFSET) +   \
0158                      ((n) * 4))
0159 
0160 #define MT_PHYCTRL_BASE         MT_WF_PHY(0x4100)
0161 #define MT_PHYCTRL(n)           (MT_PHYCTRL_BASE + ((n) * 4))
0162 
0163 #define MT_PHYCTRL_2_STATUS_RESET   BIT(6)
0164 #define MT_PHYCTRL_2_STATUS_EN      BIT(7)
0165 
0166 #define MT_PHYCTRL_STAT_PD      MT_PHYCTRL(3)
0167 #define MT_PHYCTRL_STAT_PD_OFDM     GENMASK(31, 16)
0168 #define MT_PHYCTRL_STAT_PD_CCK      GENMASK(15, 0)
0169 
0170 #define MT_PHYCTRL_STAT_MDRDY       MT_PHYCTRL(8)
0171 #define MT_PHYCTRL_STAT_MDRDY_OFDM  GENMASK(31, 16)
0172 #define MT_PHYCTRL_STAT_MDRDY_CCK   GENMASK(15, 0)
0173 
0174 #define MT_WF_AGG_BASE          0x21200
0175 #define MT_WF_AGG(ofs)          (MT_WF_AGG_BASE + (ofs))
0176 
0177 #define MT_AGG_ARCR         MT_WF_AGG(0x010)
0178 #define MT_AGG_ARCR_INIT_RATE1      BIT(0)
0179 #define MT_AGG_ARCR_FB_SGI_DISABLE  BIT(1)
0180 #define MT_AGG_ARCR_RATE8_DOWN_WRAP BIT(2)
0181 #define MT_AGG_ARCR_RTS_RATE_THR    GENMASK(12, 8)
0182 #define MT_AGG_ARCR_RATE_DOWN_RATIO GENMASK(17, 16)
0183 #define MT_AGG_ARCR_RATE_DOWN_RATIO_EN  BIT(19)
0184 #define MT_AGG_ARCR_RATE_UP_EXTRA_TH    GENMASK(22, 20)
0185 #define MT_AGG_ARCR_SPE_DIS_TH      GENMASK(27, 24)
0186 
0187 #define MT_AGG_ARUCR            MT_WF_AGG(0x014)
0188 #define MT_AGG_ARDCR            MT_WF_AGG(0x018)
0189 #define MT_AGG_ARxCR_LIMIT_SHIFT(_n)    (4 * (_n))
0190 #define MT_AGG_ARxCR_LIMIT(_n)      GENMASK(2 + \
0191                         MT_AGG_ARxCR_LIMIT_SHIFT(_n), \
0192                         MT_AGG_ARxCR_LIMIT_SHIFT(_n))
0193 
0194 #define MT_AGG_LIMIT            MT_WF_AGG(0x040)
0195 #define MT_AGG_LIMIT_1          MT_WF_AGG(0x044)
0196 #define MT_AGG_LIMIT_AC(_n)     GENMASK(((_n) + 1) * 8 - 1, (_n) * 8)
0197 
0198 #define MT_AGG_BA_SIZE_LIMIT_0      MT_WF_AGG(0x048)
0199 #define MT_AGG_BA_SIZE_LIMIT_1      MT_WF_AGG(0x04c)
0200 #define MT_AGG_BA_SIZE_LIMIT_SHIFT  8
0201 
0202 #define MT_AGG_PCR          MT_WF_AGG(0x050)
0203 #define MT_AGG_PCR_MM           BIT(16)
0204 #define MT_AGG_PCR_GF           BIT(17)
0205 #define MT_AGG_PCR_BW40         BIT(18)
0206 #define MT_AGG_PCR_RIFS         BIT(19)
0207 #define MT_AGG_PCR_BW80         BIT(20)
0208 #define MT_AGG_PCR_BW160        BIT(21)
0209 #define MT_AGG_PCR_ERP          BIT(22)
0210 
0211 #define MT_AGG_PCR_RTS          MT_WF_AGG(0x054)
0212 #define MT_AGG_PCR_RTS_THR      GENMASK(19, 0)
0213 #define MT_AGG_PCR_RTS_PKT_THR      GENMASK(31, 25)
0214 
0215 #define MT_AGG_ASRCR            MT_WF_AGG(0x060)
0216 #define MT_AGG_ASRCR_RANGE(val, n)  (((val) >> ((n) << 3)) & GENMASK(5, 0))
0217 
0218 #define MT_AGG_CONTROL          MT_WF_AGG(0x070)
0219 #define MT_AGG_CONTROL_NO_BA_RULE   BIT(0)
0220 #define MT_AGG_CONTROL_NO_BA_AR_RULE    BIT(1)
0221 #define MT_AGG_CONTROL_CFEND_SPE_EN BIT(3)
0222 #define MT_AGG_CONTROL_CFEND_RATE   GENMASK(15, 4)
0223 #define MT_AGG_CONTROL_BAR_SPE_EN   BIT(19)
0224 #define MT_AGG_CONTROL_BAR_RATE     GENMASK(31, 20)
0225 
0226 #define MT_AGG_TMP          MT_WF_AGG(0x0d8)
0227 
0228 #define MT_AGG_BWCR         MT_WF_AGG(0x0ec)
0229 #define MT_AGG_BWCR_BW          GENMASK(3, 2)
0230 
0231 #define MT_AGG_RETRY_CONTROL        MT_WF_AGG(0x0f4)
0232 #define MT_AGG_RETRY_CONTROL_RTS_LIMIT  GENMASK(11, 7)
0233 #define MT_AGG_RETRY_CONTROL_BAR_LIMIT  GENMASK(15, 12)
0234 
0235 #define MT_WF_DMA_BASE          0x21c00
0236 #define MT_WF_DMA(ofs)          (MT_WF_DMA_BASE + (ofs))
0237 
0238 #define MT_DMA_DCR0         MT_WF_DMA(0x000)
0239 #define MT_DMA_DCR0_MAX_RX_LEN      GENMASK(15, 0)
0240 #define MT_DMA_DCR0_DAMSDU      BIT(16)
0241 #define MT_DMA_DCR0_RX_VEC_DROP     BIT(17)
0242 
0243 #define MT_DMA_DCR1         MT_WF_DMA(0x004)
0244 
0245 #define MT_DMA_FQCR0            MT_WF_DMA(0x008)
0246 #define MT_DMA_FQCR0_TARGET_WCID    GENMASK(7, 0)
0247 #define MT_DMA_FQCR0_TARGET_BSS     GENMASK(13, 8)
0248 #define MT_DMA_FQCR0_TARGET_QID     GENMASK(20, 16)
0249 #define MT_DMA_FQCR0_DEST_PORT_ID   GENMASK(23, 22)
0250 #define MT_DMA_FQCR0_DEST_QUEUE_ID  GENMASK(28, 24)
0251 #define MT_DMA_FQCR0_MODE       BIT(29)
0252 #define MT_DMA_FQCR0_STATUS     BIT(30)
0253 #define MT_DMA_FQCR0_BUSY       BIT(31)
0254 
0255 #define MT_DMA_RCFR0            MT_WF_DMA(0x070)
0256 #define MT_DMA_VCFR0            MT_WF_DMA(0x07c)
0257 
0258 #define MT_DMA_TCFR0            MT_WF_DMA(0x080)
0259 #define MT_DMA_TCFR1            MT_WF_DMA(0x084)
0260 #define MT_DMA_TCFR_TXS_AGGR_TIMEOUT    GENMASK(27, 16)
0261 #define MT_DMA_TCFR_TXS_QUEUE       BIT(14)
0262 #define MT_DMA_TCFR_TXS_AGGR_COUNT  GENMASK(12, 8)
0263 #define MT_DMA_TCFR_TXS_BIT_MAP     GENMASK(6, 0)
0264 
0265 #define MT_DMA_TMCFR0           MT_WF_DMA(0x088)
0266 
0267 #define MT_WF_ARB_BASE          0x21400
0268 #define MT_WF_ARB(ofs)          (MT_WF_ARB_BASE + (ofs))
0269 
0270 #define MT_WMM_AIFSN            MT_WF_ARB(0x020)
0271 #define MT_WMM_AIFSN_MASK       GENMASK(3, 0)
0272 #define MT_WMM_AIFSN_SHIFT(_n)      ((_n) * 4)
0273 
0274 #define MT_WMM_CWMAX_BASE       MT_WF_ARB(0x028)
0275 #define MT_WMM_CWMAX(_n)        (MT_WMM_CWMAX_BASE + (((_n) / 2) << 2))
0276 #define MT_WMM_CWMAX_SHIFT(_n)      (((_n) & 1) * 16)
0277 #define MT_WMM_CWMAX_MASK       GENMASK(15, 0)
0278 
0279 #define MT_WMM_CWMIN            MT_WF_ARB(0x040)
0280 #define MT_WMM_CWMIN_MASK       GENMASK(7, 0)
0281 #define MT_WMM_CWMIN_SHIFT(_n)      ((_n) * 8)
0282 
0283 #define MT_WF_ARB_RQCR          MT_WF_ARB(0x070)
0284 #define MT_WF_ARB_RQCR_RX_START     BIT(0)
0285 #define MT_WF_ARB_RQCR_RXV_START    BIT(4)
0286 #define MT_WF_ARB_RQCR_RXV_R_EN     BIT(7)
0287 #define MT_WF_ARB_RQCR_RXV_T_EN     BIT(8)
0288 
0289 #define MT_ARB_SCR          MT_WF_ARB(0x080)
0290 #define MT_ARB_SCR_BCNQ_OPMODE_MASK GENMASK(1, 0)
0291 #define MT_ARB_SCR_BCNQ_OPMODE_SHIFT(n) ((n) * 2)
0292 #define MT_ARB_SCR_TX_DISABLE       BIT(8)
0293 #define MT_ARB_SCR_RX_DISABLE       BIT(9)
0294 #define MT_ARB_SCR_BCNQ_EMPTY_SKIP  BIT(28)
0295 #define MT_ARB_SCR_TTTT_BTIM_PRIO   BIT(29)
0296 #define MT_ARB_SCR_TBTT_BCN_PRIO    BIT(30)
0297 #define MT_ARB_SCR_TBTT_BCAST_PRIO  BIT(31)
0298 
0299 enum {
0300     MT_BCNQ_OPMODE_STA =    0,
0301     MT_BCNQ_OPMODE_AP = 1,
0302     MT_BCNQ_OPMODE_ADHOC =  2,
0303 };
0304 
0305 #define MT_WF_ARB_TX_START_0        MT_WF_ARB(0x100)
0306 #define MT_WF_ARB_TX_START_1        MT_WF_ARB(0x104)
0307 #define MT_WF_ARB_TX_FLUSH_0        MT_WF_ARB(0x108)
0308 #define MT_WF_ARB_TX_FLUSH_1        MT_WF_ARB(0x10c)
0309 #define MT_WF_ARB_TX_STOP_0     MT_WF_ARB(0x110)
0310 #define MT_WF_ARB_TX_STOP_1     MT_WF_ARB(0x114)
0311 
0312 #define MT_WF_ARB_BCN_START     MT_WF_ARB(0x118)
0313 #define MT_WF_ARB_BCN_START_BSSn(n) BIT(0 + (n))
0314 #define MT_WF_ARB_BCN_START_T_PRE_TTTT  BIT(10)
0315 #define MT_WF_ARB_BCN_START_T_TTTT  BIT(11)
0316 #define MT_WF_ARB_BCN_START_T_PRE_TBTT  BIT(12)
0317 #define MT_WF_ARB_BCN_START_T_TBTT  BIT(13)
0318 #define MT_WF_ARB_BCN_START_T_SLOT_IDLE BIT(14)
0319 #define MT_WF_ARB_BCN_START_T_TX_START  BIT(15)
0320 #define MT_WF_ARB_BCN_START_BSS0n(n)    BIT((n) ? 16 + ((n) - 1) : 0)
0321 
0322 #define MT_WF_ARB_BCN_FLUSH     MT_WF_ARB(0x11c)
0323 #define MT_WF_ARB_BCN_FLUSH_BSSn(n) BIT(0 + (n))
0324 #define MT_WF_ARB_BCN_FLUSH_BSS0n(n)    BIT((n) ? 16 + ((n) - 1) : 0)
0325 
0326 #define MT_WF_ARB_CAB_START     MT_WF_ARB(0x120)
0327 #define MT_WF_ARB_CAB_START_BSSn(n) BIT(0 + (n))
0328 #define MT_WF_ARB_CAB_START_BSS0n(n)    BIT((n) ? 16 + ((n) - 1) : 0)
0329 
0330 #define MT_WF_ARB_CAB_FLUSH     MT_WF_ARB(0x124)
0331 #define MT_WF_ARB_CAB_FLUSH_BSSn(n) BIT(0 + (n))
0332 #define MT_WF_ARB_CAB_FLUSH_BSS0n(n)    BIT((n) ? 16 + ((n) - 1) : 0)
0333 
0334 #define MT_WF_ARB_CAB_COUNT(n)      MT_WF_ARB(0x128 + (n) * 4)
0335 #define MT_WF_ARB_CAB_COUNT_SHIFT   4
0336 #define MT_WF_ARB_CAB_COUNT_MASK    GENMASK(3, 0)
0337 #define MT_WF_ARB_CAB_COUNT_B0_REG(n)   MT_WF_ARB_CAB_COUNT(((n) > 12 ? 2 : \
0338                                  ((n) > 4 ? 1 : 0)))
0339 #define MT_WF_ARB_CAB_COUNT_B0_SHIFT(n) (((n) > 12 ? (n) - 12 : \
0340                      ((n) > 4 ? (n) - 4 : \
0341                       (n) ? (n) + 3 : 0)) * 4)
0342 
0343 #define MT_TX_ABORT         MT_WF_ARB(0x134)
0344 #define MT_TX_ABORT_EN          BIT(0)
0345 #define MT_TX_ABORT_WCID        GENMASK(15, 8)
0346 
0347 #define MT_WF_TMAC_BASE         0x21600
0348 #define MT_WF_TMAC(ofs)         (MT_WF_TMAC_BASE + (ofs))
0349 
0350 #define MT_TMAC_TCR         MT_WF_TMAC(0x000)
0351 #define MT_TMAC_TCR_BLINK_SEL       GENMASK(7, 6)
0352 #define MT_TMAC_TCR_PRE_RTS_GUARD   GENMASK(11, 8)
0353 #define MT_TMAC_TCR_PRE_RTS_SEC_IDLE    GENMASK(13, 12)
0354 #define MT_TMAC_TCR_RTS_SIGTA       BIT(14)
0355 #define MT_TMAC_TCR_LDPC_OFS        BIT(15)
0356 #define MT_TMAC_TCR_TX_STREAMS      GENMASK(17, 16)
0357 #define MT_TMAC_TCR_SCH_IDLE_SEL    GENMASK(19, 18)
0358 #define MT_TMAC_TCR_SCH_DET_PER_IOD BIT(20)
0359 #define MT_TMAC_TCR_DCH_DET_DISABLE BIT(21)
0360 #define MT_TMAC_TCR_TX_RIFS     BIT(22)
0361 #define MT_TMAC_TCR_RX_RIFS_MODE    BIT(23)
0362 #define MT_TMAC_TCR_TXOP_TBTT_CTL   BIT(24)
0363 #define MT_TMAC_TCR_TBTT_TX_STOP_CTL    BIT(25)
0364 #define MT_TMAC_TCR_TXOP_BURST_STOP BIT(26)
0365 #define MT_TMAC_TCR_RDG_RA_MODE     BIT(27)
0366 #define MT_TMAC_TCR_RDG_RESP        BIT(29)
0367 #define MT_TMAC_TCR_RDG_NO_PENDING  BIT(30)
0368 #define MT_TMAC_TCR_SMOOTHING       BIT(31)
0369 
0370 #define MT_WMM_TXOP_BASE        MT_WF_TMAC(0x010)
0371 #define MT_WMM_TXOP(_n)         (MT_WMM_TXOP_BASE + \
0372                      ((((_n) / 2) ^ 0x1) << 2))
0373 #define MT_WMM_TXOP_SHIFT(_n)       (((_n) & 1) * 16)
0374 #define MT_WMM_TXOP_MASK        GENMASK(15, 0)
0375 
0376 #define MT_TIMEOUT_CCK          MT_WF_TMAC(0x090)
0377 #define MT_TIMEOUT_OFDM         MT_WF_TMAC(0x094)
0378 #define MT_TIMEOUT_VAL_PLCP     GENMASK(15, 0)
0379 #define MT_TIMEOUT_VAL_CCA      GENMASK(31, 16)
0380 
0381 #define MT_TXREQ            MT_WF_TMAC(0x09c)
0382 #define MT_TXREQ_CCA_SRC_SEL        GENMASK(31, 30)
0383 
0384 #define MT_RXREQ            MT_WF_TMAC(0x0a0)
0385 #define MT_RXREQ_DELAY          GENMASK(8, 0)
0386 
0387 #define MT_IFS              MT_WF_TMAC(0x0a4)
0388 #define MT_IFS_EIFS         GENMASK(8, 0)
0389 #define MT_IFS_RIFS         GENMASK(14, 10)
0390 #define MT_IFS_SIFS         GENMASK(22, 16)
0391 #define MT_IFS_SLOT         GENMASK(30, 24)
0392 
0393 #define MT_TMAC_PCR         MT_WF_TMAC(0x0b4)
0394 #define MT_TMAC_PCR_RATE        GENMASK(8, 0)
0395 #define MT_TMAC_PCR_RATE_FIXED      BIT(15)
0396 #define MT_TMAC_PCR_ANT_ID      GENMASK(21, 16)
0397 #define MT_TMAC_PCR_ANT_ID_SEL      BIT(22)
0398 #define MT_TMAC_PCR_SPE_EN      BIT(23)
0399 #define MT_TMAC_PCR_ANT_PRI     GENMASK(26, 24)
0400 #define MT_TMAC_PCR_ANT_PRI_SEL     GENMASK(27)
0401 
0402 #define MT_WF_RMAC_BASE         0x21800
0403 #define MT_WF_RMAC(ofs)         (MT_WF_RMAC_BASE + (ofs))
0404 
0405 #define MT_WF_RFCR          MT_WF_RMAC(0x000)
0406 #define MT_WF_RFCR_DROP_STBC_MULTI  BIT(0)
0407 #define MT_WF_RFCR_DROP_FCSFAIL     BIT(1)
0408 #define MT_WF_RFCR_DROP_VERSION     BIT(3)
0409 #define MT_WF_RFCR_DROP_PROBEREQ    BIT(4)
0410 #define MT_WF_RFCR_DROP_MCAST       BIT(5)
0411 #define MT_WF_RFCR_DROP_BCAST       BIT(6)
0412 #define MT_WF_RFCR_DROP_MCAST_FILTERED  BIT(7)
0413 #define MT_WF_RFCR_DROP_A3_MAC      BIT(8)
0414 #define MT_WF_RFCR_DROP_A3_BSSID    BIT(9)
0415 #define MT_WF_RFCR_DROP_A2_BSSID    BIT(10)
0416 #define MT_WF_RFCR_DROP_OTHER_BEACON    BIT(11)
0417 #define MT_WF_RFCR_DROP_FRAME_REPORT    BIT(12)
0418 #define MT_WF_RFCR_DROP_CTL_RSV     BIT(13)
0419 #define MT_WF_RFCR_DROP_CTS     BIT(14)
0420 #define MT_WF_RFCR_DROP_RTS     BIT(15)
0421 #define MT_WF_RFCR_DROP_DUPLICATE   BIT(16)
0422 #define MT_WF_RFCR_DROP_OTHER_BSS   BIT(17)
0423 #define MT_WF_RFCR_DROP_OTHER_UC    BIT(18)
0424 #define MT_WF_RFCR_DROP_OTHER_TIM   BIT(19)
0425 #define MT_WF_RFCR_DROP_NDPA        BIT(20)
0426 #define MT_WF_RFCR_DROP_UNWANTED_CTL    BIT(21)
0427 
0428 #define MT_BSSID0(idx)          MT_WF_RMAC(0x004 + (idx) * 8)
0429 #define MT_BSSID1(idx)          MT_WF_RMAC(0x008 + (idx) * 8)
0430 #define MT_BSSID1_VALID         BIT(16)
0431 
0432 #define MT_MAC_ADDR0(idx)       MT_WF_RMAC(0x024 + (idx) * 8)
0433 #define MT_MAC_ADDR1(idx)       MT_WF_RMAC(0x028 + (idx) * 8)
0434 #define MT_MAC_ADDR1_ADDR       GENMASK(15, 0)
0435 #define MT_MAC_ADDR1_VALID      BIT(16)
0436 
0437 #define MT_BA_CONTROL_0         MT_WF_RMAC(0x068)
0438 #define MT_BA_CONTROL_1         MT_WF_RMAC(0x06c)
0439 #define MT_BA_CONTROL_1_ADDR        GENMASK(15, 0)
0440 #define MT_BA_CONTROL_1_TID     GENMASK(19, 16)
0441 #define MT_BA_CONTROL_1_IGNORE_TID  BIT(20)
0442 #define MT_BA_CONTROL_1_IGNORE_ALL  BIT(21)
0443 #define MT_BA_CONTROL_1_RESET       BIT(22)
0444 
0445 #define MT_WF_RMACDR            MT_WF_RMAC(0x078)
0446 #define MT_WF_RMACDR_TSF_PROBERSP_DIS   BIT(0)
0447 #define MT_WF_RMACDR_TSF_TIM        BIT(4)
0448 #define MT_WF_RMACDR_MBSSID_MASK    GENMASK(25, 24)
0449 #define MT_WF_RMACDR_CHECK_HTC_BY_RATE  BIT(26)
0450 #define MT_WF_RMACDR_MAXLEN_20BIT   BIT(30)
0451 
0452 #define MT_WF_RMAC_RMCR         MT_WF_RMAC(0x080)
0453 #define MT_WF_RMAC_RMCR_SMPS_MODE   GENMASK(21, 20)
0454 #define MT_WF_RMAC_RMCR_RX_STREAMS  GENMASK(24, 22)
0455 #define MT_WF_RMAC_RMCR_SMPS_RTS    BIT(25)
0456 
0457 #define MT_WF_RMAC_CH_FREQ      MT_WF_RMAC(0x090)
0458 #define MT_WF_RMAC_MAXMINLEN        MT_WF_RMAC(0x098)
0459 #define MT_WF_RFCR1         MT_WF_RMAC(0x0a4)
0460 #define MT_WF_RMAC_TMR_PA       MT_WF_RMAC(0x0e0)
0461 
0462 #define MT_WF_SEC_BASE          0x21a00
0463 #define MT_WF_SEC(ofs)          (MT_WF_SEC_BASE + (ofs))
0464 
0465 #define MT_SEC_SCR          MT_WF_SEC(0x004)
0466 #define MT_SEC_SCR_MASK_ORDER       GENMASK(1, 0)
0467 
0468 #define MT_WTBL_OFF_BASE        0x23000
0469 #define MT_WTBL_OFF(n)          (MT_WTBL_OFF_BASE + (n))
0470 
0471 #define MT_WTBL_UPDATE          MT_WTBL_OFF(0x000)
0472 #define MT_WTBL_UPDATE_WLAN_IDX     GENMASK(7, 0)
0473 #define MT_WTBL_UPDATE_WTBL2        BIT(11)
0474 #define MT_WTBL_UPDATE_ADM_COUNT_CLEAR  BIT(12)
0475 #define MT_WTBL_UPDATE_RATE_UPDATE  BIT(13)
0476 #define MT_WTBL_UPDATE_TX_COUNT_CLEAR   BIT(14)
0477 #define MT_WTBL_UPDATE_RX_COUNT_CLEAR   BIT(15)
0478 #define MT_WTBL_UPDATE_BUSY     BIT(16)
0479 
0480 #define MT_WTBL_RMVTCR          MT_WTBL_OFF(0x008)
0481 #define MT_WTBL_RMVTCR_RX_MV_MODE   BIT(23)
0482 
0483 #define MT_LPON_BASE            0x24000
0484 #define MT_LPON(n)          (MT_LPON_BASE + (n))
0485 
0486 #define MT_LPON_T0CR            MT_LPON(0x010)
0487 #define MT_LPON_T0CR_MODE       GENMASK(1, 0)
0488 
0489 #define MT_LPON_UTTR0           MT_LPON(0x018)
0490 #define MT_LPON_UTTR1           MT_LPON(0x01c)
0491 
0492 #define MT_LPON_BTEIR           MT_LPON(0x020)
0493 #define MT_LPON_BTEIR_MBSS_MODE     GENMASK(31, 29)
0494 
0495 #define MT_PRE_TBTT         MT_LPON(0x030)
0496 #define MT_PRE_TBTT_MASK        GENMASK(7, 0)
0497 #define MT_PRE_TBTT_SHIFT       8
0498 
0499 #define MT_TBTT             MT_LPON(0x034)
0500 #define MT_TBTT_PERIOD          GENMASK(15, 0)
0501 #define MT_TBTT_DTIM_PERIOD     GENMASK(23, 16)
0502 #define MT_TBTT_TBTT_WAKE_PERIOD    GENMASK(27, 24)
0503 #define MT_TBTT_DTIM_WAKE_PERIOD    GENMASK(30, 28)
0504 #define MT_TBTT_CAL_ENABLE      BIT(31)
0505 
0506 #define MT_TBTT_TIMER_CFG       MT_LPON(0x05c)
0507 
0508 #define MT_LPON_SBTOR(n)        MT_LPON(0x0a0)
0509 #define MT_LPON_SBTOR_SUB_BSS_EN    BIT(29)
0510 #define MT_LPON_SBTOR_TIME_OFFSET   GENMASK(19, 0)
0511 
0512 #define MT_INT_WAKEUP_BASE      0x24400
0513 #define MT_INT_WAKEUP(n)        (MT_INT_WAKEUP_BASE + (n))
0514 
0515 #define MT_HW_INT_STATUS(n)     MT_INT_WAKEUP(0x3c + (n) * 8)
0516 #define MT_HW_INT_MASK(n)       MT_INT_WAKEUP(0x40 + (n) * 8)
0517 
0518 #define MT_HW_INT3_TBTT0        BIT(15)
0519 #define MT_HW_INT3_PRE_TBTT0        BIT(31)
0520 
0521 #define MT_WTBL1_BASE           0x28000
0522 
0523 #define MT_WTBL_ON_BASE         (MT_WTBL1_BASE + 0x2000)
0524 #define MT_WTBL_ON(_n)          (MT_WTBL_ON_BASE + (_n))
0525 
0526 #define MT_WTBL_RIUCR0          MT_WTBL_ON(0x200)
0527 
0528 #define MT_WTBL_RIUCR1          MT_WTBL_ON(0x204)
0529 #define MT_WTBL_RIUCR1_RATE0        GENMASK(11, 0)
0530 #define MT_WTBL_RIUCR1_RATE1        GENMASK(23, 12)
0531 #define MT_WTBL_RIUCR1_RATE2_LO     GENMASK(31, 24)
0532 
0533 #define MT_WTBL_RIUCR2          MT_WTBL_ON(0x208)
0534 #define MT_WTBL_RIUCR2_RATE2_HI     GENMASK(3, 0)
0535 #define MT_WTBL_RIUCR2_RATE3        GENMASK(15, 4)
0536 #define MT_WTBL_RIUCR2_RATE4        GENMASK(27, 16)
0537 #define MT_WTBL_RIUCR2_RATE5_LO     GENMASK(31, 28)
0538 
0539 #define MT_WTBL_RIUCR3          MT_WTBL_ON(0x20c)
0540 #define MT_WTBL_RIUCR3_RATE5_HI     GENMASK(7, 0)
0541 #define MT_WTBL_RIUCR3_RATE6        GENMASK(19, 8)
0542 #define MT_WTBL_RIUCR3_RATE7        GENMASK(31, 20)
0543 
0544 #define MT_MIB_BASE         0x2c000
0545 #define MT_MIB(_n)          (MT_MIB_BASE + (_n))
0546 
0547 #define MT_MIB_CTL          MT_MIB(0x00)
0548 #define MT_MIB_CTL_PSCCA_TIME       GENMASK(13, 11)
0549 #define MT_MIB_CTL_CCA_NAV_TX       GENMASK(16, 14)
0550 #define MT_MIB_CTL_ED_TIME      GENMASK(30, 28)
0551 #define MT_MIB_CTL_READ_CLR_DIS     BIT(31)
0552 
0553 #define MT_MIB_STAT(_n)         MT_MIB(0x08 + (_n) * 4)
0554 
0555 #define MT_MIB_STAT_CCA         MT_MIB_STAT(9)
0556 #define MT_MIB_STAT_CCA_MASK        GENMASK(23, 0)
0557 
0558 #define MT_MIB_STAT_PSCCA       MT_MIB_STAT(16)
0559 #define MT_MIB_STAT_PSCCA_MASK      GENMASK(23, 0)
0560 
0561 #define MT_TX_AGG_CNT(n)        MT_MIB(0xa8 + ((n) << 2))
0562 
0563 #define MT_MIB_STAT_ED          MT_MIB_STAT(18)
0564 #define MT_MIB_STAT_ED_MASK     GENMASK(23, 0)
0565 
0566 #define MT_PCIE_REMAP_BASE_1        0x40000
0567 #define MT_PCIE_REMAP_BASE_2        0x80000
0568 
0569 #define MT_TX_HW_QUEUE_MGMT     4
0570 #define MT_TX_HW_QUEUE_MCU      5
0571 #define MT_TX_HW_QUEUE_BCN      7
0572 #define MT_TX_HW_QUEUE_BMC      8
0573 
0574 #define MT_LED_BASE_PHYS        0x80024000
0575 #define MT_LED_PHYS(_n)         (MT_LED_BASE_PHYS + (_n))
0576 
0577 #define MT_LED_CTRL         MT_LED_PHYS(0x00)
0578 
0579 #define MT_LED_CTRL_REPLAY(_n)      BIT(0 + (8 * (_n)))
0580 #define MT_LED_CTRL_POLARITY(_n)    BIT(1 + (8 * (_n)))
0581 #define MT_LED_CTRL_TX_BLINK_MODE(_n)   BIT(2 + (8 * (_n)))
0582 #define MT_LED_CTRL_TX_MANUAL_BLINK(_n) BIT(3 + (8 * (_n)))
0583 #define MT_LED_CTRL_TX_OVER_BLINK(_n)   BIT(5 + (8 * (_n)))
0584 #define MT_LED_CTRL_KICK(_n)        BIT(7 + (8 * (_n)))
0585 
0586 #define MT_LED_STATUS_0(_n)     MT_LED_PHYS(0x10 + ((_n) * 8))
0587 #define MT_LED_STATUS_1(_n)     MT_LED_PHYS(0x14 + ((_n) * 8))
0588 #define MT_LED_STATUS_OFF       GENMASK(31, 24)
0589 #define MT_LED_STATUS_ON        GENMASK(23, 16)
0590 #define MT_LED_STATUS_DURATION      GENMASK(15, 0)
0591 
0592 #define MT_CLIENT_BASE_PHYS_ADDR    0x800c0000
0593 
0594 #define MT_CLIENT_TMAC_INFO_TEMPLATE    0x040
0595 
0596 #define MT_CLIENT_STATUS        0x06c
0597 
0598 #define MT_CLIENT_RESET_TX      0x070
0599 #define MT_CLIENT_RESET_TX_R_E_1    BIT(16)
0600 #define MT_CLIENT_RESET_TX_R_E_2    BIT(17)
0601 #define MT_CLIENT_RESET_TX_R_E_1_S  BIT(20)
0602 #define MT_CLIENT_RESET_TX_R_E_2_S  BIT(21)
0603 
0604 #define MT_EFUSE_BASE           0x81070000
0605 
0606 #define MT_EFUSE_BASE_CTRL      0x000
0607 #define MT_EFUSE_BASE_CTRL_EMPTY    BIT(30)
0608 
0609 #define MT_EFUSE_CTRL           0x008
0610 #define MT_EFUSE_CTRL_AOUT      GENMASK(5, 0)
0611 #define MT_EFUSE_CTRL_MODE      GENMASK(7, 6)
0612 #define MT_EFUSE_CTRL_LDO_OFF_TIME  GENMASK(13, 8)
0613 #define MT_EFUSE_CTRL_LDO_ON_TIME   GENMASK(15, 14)
0614 #define MT_EFUSE_CTRL_AIN       GENMASK(25, 16)
0615 #define MT_EFUSE_CTRL_VALID     BIT(29)
0616 #define MT_EFUSE_CTRL_KICK      BIT(30)
0617 #define MT_EFUSE_CTRL_SEL       BIT(31)
0618 
0619 #define MT_EFUSE_WDATA(_i)      (0x010 + ((_i) * 4))
0620 #define MT_EFUSE_RDATA(_i)      (0x030 + ((_i) * 4))
0621 
0622 #define MT_CLIENT_RXINF         0x068
0623 #define MT_CLIENT_RXINF_RXSH_GROUPS GENMASK(2, 0)
0624 
0625 #define MT_PSE_BASE_PHYS_ADDR       0xa0000000
0626 
0627 #define MT_PSE_WTBL_2_PHYS_ADDR     0xa5000000
0628 
0629 #define MT_WTBL1_SIZE           (8 * 4)
0630 #define MT_WTBL2_SIZE           (16 * 4)
0631 #define MT_WTBL3_OFFSET         (MT7603_WTBL_SIZE * MT_WTBL2_SIZE)
0632 #define MT_WTBL3_SIZE           (16 * 4)
0633 #define MT_WTBL4_OFFSET         (MT7603_WTBL_SIZE * MT_WTBL3_SIZE + \
0634                      MT_WTBL3_OFFSET)
0635 #define MT_WTBL4_SIZE           (8 * 4)
0636 
0637 #define MT_WTBL1_W0_ADDR_HI     GENMASK(15, 0)
0638 #define MT_WTBL1_W0_MUAR_IDX        GENMASK(21, 16)
0639 #define MT_WTBL1_W0_RX_CHECK_A1     BIT(22)
0640 #define MT_WTBL1_W0_KEY_IDX     GENMASK(24, 23)
0641 #define MT_WTBL1_W0_RX_CHECK_KEY_IDX    BIT(25)
0642 #define MT_WTBL1_W0_RX_KEY_VALID    BIT(26)
0643 #define MT_WTBL1_W0_RX_IK_VALID     BIT(27)
0644 #define MT_WTBL1_W0_RX_VALID        BIT(28)
0645 #define MT_WTBL1_W0_RX_CHECK_A2     BIT(29)
0646 #define MT_WTBL1_W0_RX_DATA_VALID   BIT(30)
0647 #define MT_WTBL1_W0_WRITE_BURST     BIT(31)
0648 
0649 #define MT_WTBL1_W1_ADDR_LO     GENMASK(31, 0)
0650 
0651 #define MT_WTBL1_W2_MPDU_DENSITY    GENMASK(2, 0)
0652 #define MT_WTBL1_W2_KEY_TYPE        GENMASK(6, 3)
0653 #define MT_WTBL1_W2_EVEN_PN     BIT(7)
0654 #define MT_WTBL1_W2_TO_DS       BIT(8)
0655 #define MT_WTBL1_W2_FROM_DS     BIT(9)
0656 #define MT_WTBL1_W2_HEADER_TRANS    BIT(10)
0657 #define MT_WTBL1_W2_AMPDU_FACTOR    GENMASK(13, 11)
0658 #define MT_WTBL1_W2_PWR_MGMT        BIT(14)
0659 #define MT_WTBL1_W2_RDG         BIT(15)
0660 #define MT_WTBL1_W2_RTS         BIT(16)
0661 #define MT_WTBL1_W2_CFACK       BIT(17)
0662 #define MT_WTBL1_W2_RDG_BA      BIT(18)
0663 #define MT_WTBL1_W2_SMPS        BIT(19)
0664 #define MT_WTBL1_W2_TXS_BAF_REPORT  BIT(20)
0665 #define MT_WTBL1_W2_DYN_BW      BIT(21)
0666 #define MT_WTBL1_W2_LDPC        BIT(22)
0667 #define MT_WTBL1_W2_ITXBF       BIT(23)
0668 #define MT_WTBL1_W2_ETXBF       BIT(24)
0669 #define MT_WTBL1_W2_TXOP_PS     BIT(25)
0670 #define MT_WTBL1_W2_MESH        BIT(26)
0671 #define MT_WTBL1_W2_QOS         BIT(27)
0672 #define MT_WTBL1_W2_HT          BIT(28)
0673 #define MT_WTBL1_W2_VHT         BIT(29)
0674 #define MT_WTBL1_W2_ADMISSION_CONTROL   BIT(30)
0675 #define MT_WTBL1_W2_GROUP_ID        BIT(31)
0676 
0677 #define MT_WTBL1_W3_WTBL2_FRAME_ID  GENMASK(10, 0)
0678 #define MT_WTBL1_W3_WTBL2_ENTRY_ID  GENMASK(15, 11)
0679 #define MT_WTBL1_W3_WTBL4_FRAME_ID  GENMASK(26, 16)
0680 #define MT_WTBL1_W3_CHECK_PER       BIT(27)
0681 #define MT_WTBL1_W3_KEEP_I_PSM      BIT(28)
0682 #define MT_WTBL1_W3_I_PSM       BIT(29)
0683 #define MT_WTBL1_W3_POWER_SAVE      BIT(30)
0684 #define MT_WTBL1_W3_SKIP_TX     BIT(31)
0685 
0686 #define MT_WTBL1_W4_WTBL3_FRAME_ID  GENMASK(10, 0)
0687 #define MT_WTBL1_W4_WTBL3_ENTRY_ID  GENMASK(16, 11)
0688 #define MT_WTBL1_W4_WTBL4_ENTRY_ID  GENMASK(22, 17)
0689 #define MT_WTBL1_W4_PARTIAL_AID     GENMASK(31, 23)
0690 
0691 #define MT_WTBL2_W0_PN_LO       GENMASK(31, 0)
0692 
0693 #define MT_WTBL2_W1_PN_HI       GENMASK(15, 0)
0694 #define MT_WTBL2_W1_NON_QOS_SEQNO   GENMASK(27, 16)
0695 
0696 #define MT_WTBL2_W2_TID0_SN     GENMASK(11, 0)
0697 #define MT_WTBL2_W2_TID1_SN     GENMASK(23, 12)
0698 #define MT_WTBL2_W2_TID2_SN_LO      GENMASK(31, 24)
0699 
0700 #define MT_WTBL2_W3_TID2_SN_HI      GENMASK(3, 0)
0701 #define MT_WTBL2_W3_TID3_SN     GENMASK(15, 4)
0702 #define MT_WTBL2_W3_TID4_SN     GENMASK(27, 16)
0703 #define MT_WTBL2_W3_TID5_SN_LO      GENMASK(31, 28)
0704 
0705 #define MT_WTBL2_W4_TID5_SN_HI      GENMASK(7, 0)
0706 #define MT_WTBL2_W4_TID6_SN     GENMASK(19, 8)
0707 #define MT_WTBL2_W4_TID7_SN     GENMASK(31, 20)
0708 
0709 #define MT_WTBL2_W5_TX_COUNT_RATE1  GENMASK(15, 0)
0710 #define MT_WTBL2_W5_FAIL_COUNT_RATE1    GENAMSK(31, 16)
0711 
0712 #define MT_WTBL2_W6_TX_COUNT_RATE2  GENMASK(7, 0)
0713 #define MT_WTBL2_W6_TX_COUNT_RATE3  GENMASK(15, 8)
0714 #define MT_WTBL2_W6_TX_COUNT_RATE4  GENMASK(23, 16)
0715 #define MT_WTBL2_W6_TX_COUNT_RATE5  GENMASK(31, 24)
0716 
0717 #define MT_WTBL2_W7_TX_COUNT_CUR_BW GENMASK(15, 0)
0718 #define MT_WTBL2_W7_FAIL_COUNT_CUR_BW   GENMASK(31, 16)
0719 
0720 #define MT_WTBL2_W8_TX_COUNT_OTHER_BW   GENMASK(15, 0)
0721 #define MT_WTBL2_W8_FAIL_COUNT_OTHER_BW GENMASK(31, 16)
0722 
0723 #define MT_WTBL2_W9_POWER_OFFSET    GENMASK(4, 0)
0724 #define MT_WTBL2_W9_SPATIAL_EXT     BIT(5)
0725 #define MT_WTBL2_W9_ANT_PRIORITY    GENMASK(8, 6)
0726 #define MT_WTBL2_W9_CC_BW_SEL       GENMASK(10, 9)
0727 #define MT_WTBL2_W9_CHANGE_BW_RATE  GENMASK(13, 11)
0728 #define MT_WTBL2_W9_BW_CAP      GENMASK(15, 14)
0729 #define MT_WTBL2_W9_SHORT_GI_20     BIT(16)
0730 #define MT_WTBL2_W9_SHORT_GI_40     BIT(17)
0731 #define MT_WTBL2_W9_SHORT_GI_80     BIT(18)
0732 #define MT_WTBL2_W9_SHORT_GI_160    BIT(19)
0733 #define MT_WTBL2_W9_MPDU_FAIL_COUNT GENMASK(25, 23)
0734 #define MT_WTBL2_W9_MPDU_OK_COUNT   GENMASK(28, 26)
0735 #define MT_WTBL2_W9_RATE_IDX        GENMASK(31, 29)
0736 
0737 #define MT_WTBL2_W10_RATE1      GENMASK(11, 0)
0738 #define MT_WTBL2_W10_RATE2      GENMASK(23, 12)
0739 #define MT_WTBL2_W10_RATE3_LO       GENMASK(31, 24)
0740 
0741 #define MT_WTBL2_W11_RATE3_HI       GENMASK(3, 0)
0742 #define MT_WTBL2_W11_RATE4      GENMASK(15, 4)
0743 #define MT_WTBL2_W11_RATE5      GENMASK(27, 16)
0744 #define MT_WTBL2_W11_RATE6_LO       GENMASK(31, 28)
0745 
0746 #define MT_WTBL2_W12_RATE6_HI       GENMASK(7, 0)
0747 #define MT_WTBL2_W12_RATE7      GENMASK(19, 8)
0748 #define MT_WTBL2_W12_RATE8      GENMASK(31, 20)
0749 
0750 #define MT_WTBL2_W13_AVG_RCPI0      GENMASK(7, 0)
0751 #define MT_WTBL2_W13_AVG_RCPI1      GENMASK(15, 8)
0752 #define MT_WTBL2_W13_AVG_RCPI2      GENAMSK(23, 16)
0753 
0754 #define MT_WTBL2_W14_CC_NOISE_1S    GENMASK(6, 0)
0755 #define MT_WTBL2_W14_CC_NOISE_2S    GENMASK(13, 7)
0756 #define MT_WTBL2_W14_CC_NOISE_3S    GENMASK(20, 14)
0757 #define MT_WTBL2_W14_CHAN_EST_RMS   GENMASK(24, 21)
0758 #define MT_WTBL2_W14_CC_NOISE_SEL   BIT(15)
0759 #define MT_WTBL2_W14_ANT_SEL        GENMASK(31, 26)
0760 
0761 #define MT_WTBL2_W15_BA_WIN_SIZE    GENMASK(2, 0)
0762 #define MT_WTBL2_W15_BA_WIN_SIZE_SHIFT  3
0763 #define MT_WTBL2_W15_BA_EN_TIDS     GENMASK(31, 24)
0764 
0765 #define MT_WTBL1_OR         (MT_WTBL1_BASE + 0x2300)
0766 #define MT_WTBL1_OR_PSM_WRITE       BIT(31)
0767 
0768 #endif