Lines Matching +full:0 +full:x7c000000

129 #define MT_MCU_WFDMA0_BASE		0x2000
132 #define MT_MCU_WFDMA0_DUMMY_CR MT_MCU_WFDMA0(0x120)
135 #define MT_MCU_WFDMA1_BASE 0x3000
139 #define MT_MCU_INT_EVENT_DMA_STOPPED BIT(0)
145 #define MT_PLE_BASE 0x820c0000
148 #define MT_PLE_HOST_RPT0 MT_PLE(0x030)
153 #define MT_FL_Q2_CTRL MT_PLE(__OFFS(PLE_FL_Q_CTRL) + 0x8)
154 #define MT_FL_Q3_CTRL MT_PLE(__OFFS(PLE_FL_Q_CTRL) + 0xc)
164 #define MT_PLE_AMSDU_PACK_MSDU_CNT(n) MT_PLE(0x10e0 + ((n) << 2))
166 #define MT_PSE_BASE 0x820c8000
170 #define MT_MDP_BASE 0x820cd000
173 #define MT_MDP_DCR0 MT_MDP(0x000)
176 #define MT_MDP_DCR1 MT_MDP(0x004)
179 #define MT_MDP_DCR2 MT_MDP(0x0e8)
193 #define MT_MDP_TO_HIF 0
196 /* TRB: band 0(0x820e1000), band 1(0x820f1000) */
197 #define MT_WF_TRB_BASE(_band) ((_band) ? 0x820f1000 : 0x820e1000)
200 #define MT_TRB_RXPSR0(_band) MT_WF_TRB(_band, 0x03c)
202 #define MT_TRB_RXPSR0_RX_RMAC_PTR GENMASK(9, 0)
204 /* TMAC: band 0(0x820e4000), band 1(0x820f4000) */
205 #define MT_WF_TMAC_BASE(_band) ((_band) ? 0x820f4000 : 0x820e4000)
208 #define MT_TMAC_TCR0(_band) MT_WF_TMAC(_band, 0)
214 #define MT_TIMEOUT_VAL_PLCP GENMASK(15, 0)
218 #define MT_TMAC_ATCR_TXV_TOUT GENMASK(7, 0)
221 #define MT_TMAC_TRCR0_TR2T_CHK GENMASK(8, 0)
225 #define MT_IFS_EIFS_OFDM GENMASK(8, 0)
231 #define MT_IFS_EIFS_CCK GENMASK(8, 0)
234 #define MT_TMAC_CTCR0_INS_DDLMT_REFTIME GENMASK(5, 0)
240 /* WF DMA TOP: band 0(0x820e7000),band 1(0x820f7000) */
241 #define MT_WF_DMA_BASE(_band) ((_band) ? 0x820f7000 : 0x820e7000)
244 #define MT_DMA_DCR0(_band) MT_WF_DMA(_band, 0x000)
248 /* WTBLOFF TOP: band 0(0x820e9000),band 1(0x820f9000) */
249 #define MT_WTBLOFF_TOP_BASE(_band) ((_band) ? 0x820f9000 : 0x820e9000)
252 #define MT_WTBLOFF_TOP_RSCR(_band) MT_WTBLOFF_TOP(_band, 0x008)
256 /* ETBF: band 0(0x820ea000), band 1(0x820fa000) */
257 #define MT_WF_ETBF_BASE(_band) ((_band) ? 0x820fa000 : 0x820ea000)
260 #define MT_ETBF_TX_NDP_BFRP(_band) MT_WF_ETBF(_band, 0x040)
262 #define MT_ETBF_TX_FB_TRI GENMASK(15, 0)
267 #define MT_ETBF_PAR_RPT0_FB_NR GENMASK(2, 0)
269 #define MT_ETBF_TX_APP_CNT(_band) MT_WF_ETBF(_band, 0x0f0)
271 #define MT_ETBF_TX_EBF_CNT GENMASK(15, 0)
273 #define MT_ETBF_RX_FB_CNT(_band) MT_WF_ETBF(_band, 0x0f8)
277 #define MT_ETBF_RX_FB_HT GENMASK(7, 0)
279 /* LPON: band 0(0x820eb000), band 1(0x820fb000) */
280 #define MT_WF_LPON_BASE(_band) ((_band) ? 0x820fb000 : 0x820eb000)
287 #define MT_LPON_TCR(_band, n) MT_WF_LPON(_band, 0x0a8 + \
289 #define MT_LPON_TCR_MT7916(_band, n) MT_WF_LPON(_band, 0x0a8 + \
291 #define MT_LPON_TCR_SW_MODE GENMASK(1, 0)
292 #define MT_LPON_TCR_SW_WRITE BIT(0)
294 #define MT_LPON_TCR_SW_READ GENMASK(1, 0)
296 /* MIB: band 0(0x820ed000), band 1(0x820fd000) */
303 #define MT_WF_MIB_BASE(_band) ((_band) ? 0x820fd000 : 0x820ed000)
306 #define MT_MIB_SDR0(_band) MT_WF_MIB(_band, 0x010)
307 #define MT_MIB_SDR0_BERACON_TX_CNT_MASK GENMASK(15, 0)
310 #define MT_MIB_SDR3_FCS_ERR_MASK GENMASK(15, 0)
314 #define MT_MIB_SDR4_RX_FIFO_FULL_MASK GENMASK(15, 0)
319 #define MT_MIB_SDR6(_band) MT_WF_MIB(_band, 0x020)
320 #define MT_MIB_SDR6_CHANNEL_IDL_CNT_MASK GENMASK(15, 0)
323 #define MT_MIB_SDR7_RX_VECTOR_MISMATCH_CNT_MASK GENMASK(15, 0)
326 #define MT_MIB_SDR8_RX_DELIMITER_FAIL_CNT_MASK GENMASK(15, 0)
330 #define MT_MIB_SDR9_CCA_BUSY_TIME_MASK GENMASK(23, 0)
333 #define MT_MIB_SDR10_MRDY_COUNT_MASK GENMASK(25, 0)
334 #define MT_MIB_SDR10_MRDY_COUNT_MASK_MT7916 GENMASK(31, 0)
337 #define MT_MIB_SDR11_RX_LEN_MISMATCH_CNT_MASK GENMASK(15, 0)
343 #define MT_MIB_SDR13_TX_STOP_Q_EMPTY_CNT_MASK GENMASK(15, 0)
347 #define MT_MIB_SDR14_TX_MPDU_ATTEMPTS_CNT_MASK GENMASK(23, 0)
348 #define MT_MIB_SDR14_TX_MPDU_ATTEMPTS_CNT_MASK_MT7916 GENMASK(31, 0)
352 #define MT_MIB_SDR15_TX_MPDU_SUCCESS_CNT_MASK GENMASK(23, 0)
353 #define MT_MIB_SDR15_TX_MPDU_SUCCESS_CNT_MASK_MT7916 GENMASK(31, 0)
357 #define MT_MIB_SDR16_PRIMARY_CCA_BUSY_TIME_MASK GENMASK(23, 0)
360 #define MT_MIB_SDR17_SECONDARY_CCA_BUSY_TIME_MASK GENMASK(23, 0)
363 #define MT_MIB_SDR18_PRIMARY_ENERGY_DETECT_TIME_MASK GENMASK(23, 0)
367 #define MT_MIB_SDR19_CCK_MDRDY_TIME_MASK GENMASK(23, 0)
370 #define MT_MIB_SDR20_OFDM_VHT_MDRDY_TIME_MASK GENMASK(23, 0)
373 #define MT_MIB_SDR21_GREEN_MDRDY_TIME_MASK GENMASK(23, 0)
383 #define MT_MIB_SDR24_RX_AMPDU_SF_CNT_MASK GENMASK(23, 0)
384 #define MT_MIB_SDR24_RX_AMPDU_SF_CNT_MASK_MT7916 GENMASK(31, 0)
391 #define MT_MIB_SDR27_TX_RWP_FAIL_CNT_MASK GENMASK(15, 0)
394 #define MT_MIB_SDR28_TX_RWP_NEED_CNT_MASK GENMASK(15, 0)
397 #define MT_MIB_SDR29_RX_PFDROP_CNT_MASK GENMASK(7, 0)
398 #define MT_MIB_SDR29_RX_PFDROP_CNT_MASK_MT7916 GENMASK(15, 0)
401 #define MT_MIB_SDR30_RX_VEC_QUEUE_OVERFLOW_DROP_CNT_MASK GENMASK(15, 0)
408 #define MT_MIB_SDR32_TX_PKT_EBF_CNT GENMASK(15, 0)
411 #define MT_MIB_SDR33(_band) MT_WF_MIB(_band, 0x088)
412 #define MT_MIB_SDR33_TX_PKT_IBF_CNT GENMASK(15, 0)
415 #define MT_MIB_MU_BF_TX_CNT GENMASK(15, 0)
425 #define MT_MIB_RTS_COUNT_MASK GENMASK(15, 0)
428 #define MT_MIB_BA_MISS_COUNT_MASK GENMASK(15, 0)
431 #define MT_MIB_MB_SDR2(_band, n) MT_WF_MIB(_band, 0x518 + (n))
432 #define MT_MIB_MB_BFTF(_band, n) MT_WF_MIB(_band, 0x510 + (n))
440 #define MT_MIB_ARNCR_RANGE(val, n) (((val) >> ((n) << 3)) & GENMASK(7, 0))
442 #define MT_MIB_BFCR0(_band) MT_WF_MIB(_band, 0x7b0)
443 #define MT_MIB_BFCR0_RX_FB_HT GENMASK(15, 0)
446 #define MT_MIB_BFCR1(_band) MT_WF_MIB(_band, 0x7b4)
447 #define MT_MIB_BFCR1_RX_FB_HE GENMASK(15, 0)
449 #define MT_MIB_BFCR2(_band) MT_WF_MIB(_band, 0x7b8)
450 #define MT_MIB_BFCR2_BFEE_TX_FB_TRIG GENMASK(15, 0)
452 #define MT_MIB_BFCR7(_band) MT_WF_MIB(_band, 0x7cc)
453 #define MT_MIB_BFCR7_BFEE_TX_FB_CPL GENMASK(15, 0)
456 #define MT_WTBLON_TOP_BASE 0x820d4000
459 #define MT_WTBLON_TOP_WDUCR_GROUP GENMASK(2, 0)
462 #define MT_WTBL_UPDATE_WLAN_IDX GENMASK(9, 0)
467 #define MT_WTBL_BASE 0x820d8000
474 /* AGG: band 0(0x820e2000), band 1(0x820f2000) */
475 #define MT_WF_AGG_BASE(_band) ((_band) ? 0x820f2000 : 0x820e2000)
482 #define MT_AGG_PCR0_MM_PROT BIT(0)
492 #define MT_AGG_PCR1_RTS0_LEN_THRES GENMASK(19, 0)
495 #define MT_AGG_ACR_CFEND_RATE GENMASK(13, 0)
510 /* ARB: band 0(0x820e3000), band 1(0x820f3000) */
511 #define MT_WF_ARB_BASE(_band) ((_band) ? 0x820f3000 : 0x820e3000)
521 /* RMAC: band 0(0x820e5000), band 1(0x820f5000) */
522 #define MT_WF_RMAC_BASE(_band) ((_band) ? 0x820f5000 : 0x820e5000)
525 #define MT_WF_RFCR(_band) MT_WF_RMAC(_band, 0x000)
526 #define MT_WF_RFCR_DROP_STBC_MULTI BIT(0)
548 #define MT_WF_RFCR1(_band) MT_WF_RMAC(_band, 0x004)
555 #define MT_WF_RMAC_RSVD0(_band) MT_WF_RMAC(_band, 0x02e0)
558 #define MT_WF_RMAC_MIB_AIRTIME0(_band) MT_WF_RMAC(_band, 0x0380)
560 #define MT_WF_RMAC_MIB_OBSS_BACKOFF GENMASK(15, 0)
563 #define MT_WF_RMAC_MIB_AIRTIME1(_band) MT_WF_RMAC(_band, 0x0384)
566 #define MT_WF_RMAC_MIB_AIRTIME3(_band) MT_WF_RMAC(_band, 0x038c)
567 #define MT_WF_RMAC_MIB_QOS01_BACKOFF GENMASK(31, 0)
569 #define MT_WF_RMAC_MIB_AIRTIME4(_band) MT_WF_RMAC(_band, 0x0390)
570 #define MT_WF_RMAC_MIB_QOS23_BACKOFF GENMASK(31, 0)
576 #define MT_WFDMA0_RST MT_WFDMA0(0x100)
580 #define MT_WFDMA0_BUSY_ENA MT_WFDMA0(0x13c)
581 #define MT_WFDMA0_BUSY_ENA_TX_FIFO0 BIT(0)
585 #define MT_WFDMA0_MCU_HOST_INT_ENA MT_WFDMA0(0x1f4)
587 #define MT_WFDMA0_GLO_CFG MT_WFDMA0(0x208)
588 #define MT_WFDMA0_GLO_CFG_TX_DMA_EN BIT(0)
594 #define MT_WFDMA0_RST_DTX_PTR MT_WFDMA0(0x20c)
596 #define MT_WFDMA0_EXT0_CFG MT_WFDMA0(0x2b0)
599 #define MT_WFDMA0_PRI_DLY_INT_CFG0 MT_WFDMA0(0x2f0)
600 #define MT_WFDMA0_PRI_DLY_INT_CFG1 MT_WFDMA0(0x2f4)
601 #define MT_WFDMA0_PRI_DLY_INT_CFG2 MT_WFDMA0(0x2f8)
602 #define MT_WPDMA_GLO_CFG MT_WFDMA0(0x208)
605 #define MT_WFDMA1_BASE 0xd5000
608 #define MT_WFDMA1_RST MT_WFDMA1(0x100)
612 #define MT_WFDMA1_BUSY_ENA MT_WFDMA1(0x13c)
613 #define MT_WFDMA1_BUSY_ENA_TX_FIFO0 BIT(0)
617 #define MT_WFDMA1_GLO_CFG MT_WFDMA1(0x208)
618 #define MT_WFDMA1_GLO_CFG_TX_DMA_EN BIT(0)
624 #define MT_WFDMA1_RST_DTX_PTR MT_WFDMA1(0x20c)
625 #define MT_WFDMA1_PRI_DLY_INT_CFG0 MT_WFDMA1(0x2f0)
629 #define MT_WFDMA_EXT_CSR_PHYS_BASE 0x18027000
633 #define MT_WFDMA_HOST_CONFIG MT_WFDMA_EXT_CSR_PHYS(0x30)
634 #define MT_WFDMA_HOST_CONFIG_PDMA_BAND BIT(0)
637 #define MT_WFDMA_WED_RING_CONTROL MT_WFDMA_EXT_CSR_PHYS(0x34)
638 #define MT_WFDMA_WED_RING_CONTROL_TX0 GENMASK(4, 0)
642 #define MT_WFDMA_EXT_CSR_HIF_MISC MT_WFDMA_EXT_CSR_PHYS(0x44)
643 #define MT_WFDMA_EXT_CSR_HIF_MISC_BUSY BIT(0)
645 #define MT_PCIE_RECOG_ID 0xd7090
646 #define MT_PCIE_RECOG_ID_MASK GENMASK(30, 0)
649 #define MT_INT_WED_SOURCE_CSR MT_WFDMA_EXT_CSR(0x200)
650 #define MT_INT_WED_MASK_CSR MT_WFDMA_EXT_CSR(0x204)
652 #define MT_WED_TX_RING_BASE MT_WFDMA_EXT_CSR(0x300)
653 #define MT_WED_RX_RING_BASE MT_WFDMA_EXT_CSR(0x400)
659 #define MT_WFDMA0_PCIE1_BUSY_ENA MT_WFDMA0_PCIE1(0x13c)
660 #define MT_WFDMA0_PCIE1_BUSY_ENA_TX_FIFO0 BIT(0)
665 #define MT_WFDMA1_PCIE1_BASE 0xd9000
668 #define MT_WFDMA1_PCIE1_BUSY_ENA MT_WFDMA1_PCIE1(0x13c)
669 #define MT_WFDMA1_PCIE1_BUSY_ENA_TX_FIFO0 BIT(0)
678 #define MT_Q_BASE(q) ((dev->wfdma_mask >> (q)) & 0x1 ? \
685 #define MT_MCUQ_RING_BASE(q) (MT_Q_BASE(q) + 0x300)
686 #define MT_TXQ_RING_BASE(q) (MT_Q_BASE(__TXQ(q)) + 0x300)
687 #define MT_RXQ_RING_BASE(q) (MT_Q_BASE(__RXQ(q)) + 0x500)
689 #define MT_MCUQ_EXT_CTRL(q) (MT_Q_BASE(q) + 0x600 + \
690 MT_MCUQ_ID(q)* 0x4)
691 #define MT_RXQ_BAND1_CTRL(q) (MT_Q_BASE(__RXQ(q)) + 0x680 + \
692 MT_RXQ_ID(q)* 0x4)
693 #define MT_TXQ_EXT_CTRL(q) (MT_Q_BASE(__TXQ(q)) + 0x600 + \
694 MT_TXQ_ID(q)* 0x4)
708 #define MT_INT_RX_DONE_WM BIT(0)
766 #define MT_TOP_RGU_BASE 0x18000000
767 #define MT_TOP_PWR_CTRL (MT_TOP_RGU_BASE + (0x0))
768 #define MT_TOP_PWR_KEY (0x5746 << 16)
769 #define MT_TOP_PWR_SW_RST BIT(0)
774 #define MT_TOP_RGU_SYSRAM_PDN (MT_TOP_RGU_BASE + 0x050)
775 #define MT_TOP_RGU_SYSRAM_SLP (MT_TOP_RGU_BASE + 0x054)
776 #define MT_TOP_WFSYS_PWR (MT_TOP_RGU_BASE + 0x010)
781 #define MT7986_TOP_WM_RESET (MT_TOP_RGU_BASE + 0x120)
782 #define MT7986_TOP_WM_RESET_MASK BIT(0)
785 #define MT_HIF_REMAP_L1 0xf11ac
786 #define MT_HIF_REMAP_L1_MT7916 0xfe260
787 #define MT_HIF_REMAP_L1_MASK GENMASK(15, 0)
788 #define MT_HIF_REMAP_L1_OFFSET GENMASK(15, 0)
790 #define MT_HIF_REMAP_BASE_L1 0xe0000
792 #define MT_HIF_REMAP_L2 0xf11b0
793 #define MT_HIF_REMAP_L2_MASK GENMASK(19, 0)
794 #define MT_HIF_REMAP_L2_OFFSET GENMASK(11, 0)
796 #define MT_HIF_REMAP_L2_MT7916 0x1b8
798 #define MT_HIF_REMAP_L2_OFFSET_MT7916 GENMASK(15, 0)
800 #define MT_HIF_REMAP_BASE_L2_MT7916 0x40000
802 #define MT_INFRA_BASE 0x18000000
803 #define MT_WFSYS0_PHY_START 0x18400000
804 #define MT_WFSYS1_PHY_START 0x18800000
805 #define MT_WFSYS1_PHY_END 0x18bfffff
806 #define MT_CBTOP1_PHY_START 0x70000000
808 #define MT_CBTOP2_PHY_START 0xf0000000
809 #define MT_INFRA_MCU_START 0x7c000000
814 #define MT_CONN_INFRA_BASE 0x18001000
817 #define MT_CONN_INFRA_EFUSE MT_CONN_INFRA(0x020)
819 #define MT_CONN_INFRA_ADIE_RESET MT_CONN_INFRA(0x030)
820 #define MT_CONN_INFRA_ADIE1_RESET_MASK BIT(0)
823 #define MT_CONN_INFRA_OSC_RC_EN MT_CONN_INFRA(0x380)
825 #define MT_CONN_INFRA_OSC_CTRL MT_CONN_INFRA(0x300)
827 #define MT_CONN_INFRA_OSC_STB_TIME_MASK GENMASK(23, 0)
829 #define MT_CONN_INFRA_HW_CTRL MT_CONN_INFRA(0x200)
830 #define MT_CONN_INFRA_HW_CTRL_MASK BIT(0)
832 #define MT_CONN_INFRA_WF_SLP_PROT MT_CONN_INFRA(0x540)
833 #define MT_CONN_INFRA_WF_SLP_PROT_MASK BIT(0)
835 #define MT_CONN_INFRA_WF_SLP_PROT_RDY MT_CONN_INFRA(0x544)
839 #define MT_CONN_INFRA_EMI_REQ MT_CONN_INFRA(0x414)
840 #define MT_CONN_INFRA_EMI_REQ_MASK BIT(0)
844 #define MT_AFE_CTRL_BASE(_band) (0x18003000 + ((_band) << 19))
847 #define MT_AFE_DIG_EN_01(_band) MT_AFE_CTRL(_band, 0x00)
848 #define MT_AFE_DIG_EN_02(_band) MT_AFE_CTRL(_band, 0x04)
849 #define MT_AFE_DIG_EN_03(_band) MT_AFE_CTRL(_band, 0x08)
850 #define MT_AFE_DIG_TOP_01(_band) MT_AFE_CTRL(_band, 0x0c)
852 #define MT_AFE_PLL_STB_TIME(_band) MT_AFE_CTRL(_band, 0xf4)
853 #define MT_AFE_PLL_STB_TIME_MASK (GENMASK(30, 16) | GENMASK(14, 0))
854 #define MT_AFE_PLL_STB_TIME_VAL (FIELD_PREP(GENMASK(30, 16), 0x4bc) | \
855 FIELD_PREP(GENMASK(14, 0), 0x7e4))
857 #define MT_AFE_WPLL_CFG_MASK GENMASK(1, 0)
864 #define MT_AFE_PLL_CFG_VAL (FIELD_PREP(MT_AFE_BPLL_CFG_MASK, 0x1) | \
865 FIELD_PREP(MT_AFE_WPLL_CFG_MASK, 0x2) | \
866 FIELD_PREP(MT_AFE_MCU_WPLL_CFG_MASK, 0x1) | \
867 FIELD_PREP(MT_AFE_MCU_BPLL_CFG_MASK, 0x2))
870 #define MT_AFE_DIG_TOP_01_VAL FIELD_PREP(MT_AFE_DIG_TOP_01_MASK, 0x9)
872 #define MT_AFE_RG_WBG_EN_RCK_MASK BIT(0)
884 #define MT_ADIE_SLP_CTRL_BASE(_band) (0x18005000 + ((_band) << 19))
887 #define MT_ADIE_SLP_CTRL_CK0(_band) MT_ADIE_SLP_CTRL(_band, 0x120)
890 #define MT_ADIE_CHIP_ID 0x02c
891 #define MT_ADIE_VERSION_MASK GENMASK(15, 0)
893 #define MT_ADIE_IDX0 GENMASK(15, 0)
896 #define MT_ADIE_RG_TOP_THADC_BG 0x034
900 #define MT_ADIE_RG_TOP_THADC 0x038
902 #define MT_ADIE_PGA_GAIN_EFUSE_MASK GENMASK(2, 0)
906 #define MT_AFE_RG_ENCAL_WBTAC_IF_SW 0x070
907 #define MT_ADIE_EFUSE_RDATA0 0x130
909 #define MT_ADIE_EFUSE2_CTRL 0x148
912 #define MT_ADIE_EFUSE_CFG 0x144
918 #define MT_ADIE_THADC_ANALOG 0x3a6
920 #define MT_ADIE_THADC_SLOP 0x3a7
923 #define MT_ADIE_7975_XTAL_CAL 0x3a1
924 #define MT_ADIE_TRIM_MASK GENMASK(6, 0)
925 #define MT_ADIE_EFUSE_TRIM_MASK GENMASK(5, 0)
929 #define MT_ADIE_7975_XO_TRIM2 0x3a2
930 #define MT_ADIE_7975_XO_TRIM3 0x3a3
931 #define MT_ADIE_7975_XO_TRIM4 0x3a4
932 #define MT_ADIE_7975_XTAL_EN 0x3a5
934 #define MT_ADIE_XO_TRIM_FLOW 0x3ac
935 #define MT_ADIE_XTAL_AXM_80M_OSC 0x390
936 #define MT_ADIE_XTAL_AXM_40M_OSC 0x391
937 #define MT_ADIE_XTAL_TRIM1_80M_OSC 0x398
938 #define MT_ADIE_XTAL_TRIM1_40M_OSC 0x399
939 #define MT_ADIE_WRI_CK_SEL 0x4ac
940 #define MT_ADIE_RG_STRAP_PIN_IN 0x4fc
941 #define MT_ADIE_XTAL_C1 0x654
942 #define MT_ADIE_XTAL_C2 0x658
943 #define MT_ADIE_RG_XO_01 0x65c
944 #define MT_ADIE_RG_XO_03 0x664
946 #define MT_ADIE_CLK_EN 0xa00
948 #define MT_ADIE_7975_XTAL 0xa18
951 #define MT_ADIE_7975_COCLK 0xa1c
952 #define MT_ADIE_7975_XO_2 0xa84
955 #define MT_ADIE_7975_XO_CTRL2 0xa94
961 #define MT_ADIE_7975_XO_CTRL6 0xaa4
965 #define MT_TOP_SPI_ADIE_BASE(_band) (0x18004000 + ((_band) << 19))
968 #define MT_TOP_SPI_BUSY_CR(_band) MT_TOP_SPI_ADIE(_band, 0)
971 #define MT_TOP_SPI_ADDR_CR(_band) MT_TOP_SPI_ADIE(_band, 0x50)
975 #define MT_TOP_SPI_WRITE_DATA_CR(_band) MT_TOP_SPI_ADIE(_band, 0x54)
976 #define MT_TOP_SPI_READ_DATA_CR(_band) MT_TOP_SPI_ADIE(_band, 0x58)
979 #define MT_INFRA_CKGEN_BASE 0x18009000
982 #define MT_INFRA_CKGEN_BUS MT_INFRA_CKGEN(0xa00)
986 #define MT_INFRA_CKGEN_BUS_WPLL_DIV_1 MT_INFRA_CKGEN(0x008)
987 #define MT_INFRA_CKGEN_BUS_WPLL_DIV_2 MT_INFRA_CKGEN(0x00c)
989 #define MT_INFRA_CKGEN_RFSPI_WPLL_DIV MT_INFRA_CKGEN(0x040)
991 #define MT_INFRA_CKGEN_DIV_EN_MASK BIT(0)
994 #define MT_INFRA_BUS_BASE 0x1800e000
997 #define MT_INFRA_BUS_OFF_TIMEOUT MT_INFRA_BUS(0x300)
999 #define MT_INFRA_BUS_TIMEOUT_EN_MASK GENMASK(3, 0)
1001 #define MT_INFRA_BUS_ON_TIMEOUT MT_INFRA_BUS(0x31c)
1002 #define MT_INFRA_BUS_EMI_START MT_INFRA_BUS(0x360)
1003 #define MT_INFRA_BUS_EMI_END MT_INFRA_BUS(0x364)
1006 #define MT_CONNINFRA_SKU_DEC_ADDR 0x18050000
1007 #define MT_CONNINFRA_SKU_MASK GENMASK(15, 0)
1031 #define MT_SWDEF_MODE MT_SWDEF(0x3c)
1032 #define MT_SWDEF_NORMAL_MODE 0
1036 #define MT_SWDEF_SER_STATS MT_SWDEF(0x040)
1037 #define MT_SWDEF_PLE_STATS MT_SWDEF(0x044)
1038 #define MT_SWDEF_PLE1_STATS MT_SWDEF(0x048)
1039 #define MT_SWDEF_PLE_AMSDU_STATS MT_SWDEF(0x04C)
1040 #define MT_SWDEF_PSE_STATS MT_SWDEF(0x050)
1041 #define MT_SWDEF_PSE1_STATS MT_SWDEF(0x054)
1042 #define MT_SWDEF_LAMC_WISR6_BN0_STATS MT_SWDEF(0x058)
1043 #define MT_SWDEF_LAMC_WISR6_BN1_STATS MT_SWDEF(0x05C)
1044 #define MT_SWDEF_LAMC_WISR7_BN0_STATS MT_SWDEF(0x060)
1045 #define MT_SWDEF_LAMC_WISR7_BN1_STATS MT_SWDEF(0x064)
1047 #define MT_DIC_CMD_REG_BASE 0x41f000
1049 #define MT_DIC_CMD_REG_CMD MT_DIC_CMD_REG(0x10)
1051 #define MT_CPU_UTIL_BASE 0x41f030
1053 #define MT_CPU_UTIL_BUSY_PCT MT_CPU_UTIL(0x00)
1054 #define MT_CPU_UTIL_PEAK_BUSY_PCT MT_CPU_UTIL(0x04)
1055 #define MT_CPU_UTIL_IDLE_CNT MT_CPU_UTIL(0x08)
1056 #define MT_CPU_UTIL_PEAK_IDLE_CNT MT_CPU_UTIL(0x0c)
1057 #define MT_CPU_UTIL_CTRL MT_CPU_UTIL(0x1c)
1060 #define MT_LED_TOP_BASE 0x18013000
1063 #define MT_LED_CTRL(_n) MT_LED_PHYS(0x00 + ((_n) * 4))
1069 #define MT_LED_TX_BLINK(_n) MT_LED_PHYS(0x10 + ((_n) * 4))
1070 #define MT_LED_TX_BLINK_ON_MASK GENMASK(7, 0)
1073 #define MT_LED_STATUS_0(_n) MT_LED_PHYS(0x20 + ((_n) * 8))
1074 #define MT_LED_STATUS_1(_n) MT_LED_PHYS(0x24 + ((_n) * 8))
1077 #define MT_LED_STATUS_DURATION GENMASK(15, 0)
1079 #define MT_LED_EN(_n) MT_LED_PHYS(0x40 + ((_n) * 4))
1081 #define MT_LED_GPIO_MUX0 0x70005050 /* GPIO 1 and GPIO 2 */
1082 #define MT_LED_GPIO_MUX1 0x70005054 /* GPIO 14 and 15 */
1083 #define MT_LED_GPIO_MUX2 0x70005058 /* GPIO 18 */
1084 #define MT_LED_GPIO_MUX3 0x7000505c /* GPIO 26 */
1087 #define MT_TOP_BASE 0x18060000
1090 #define MT_TOP_LPCR_HOST_BAND(_band) MT_TOP(0x10 + ((_band) * 0x10))
1091 #define MT_TOP_LPCR_HOST_FW_OWN BIT(0)
1095 #define MT_TOP_LPCR_HOST_BAND_IRQ_STAT(_band) MT_TOP(0x14 + ((_band) * 0x10))
1096 #define MT_TOP_LPCR_HOST_BAND_STAT BIT(0)
1098 #define MT_TOP_MISC MT_TOP(0xf0)
1099 #define MT_TOP_MISC_FW_STATE GENMASK(2, 0)
1101 #define MT_TOP_WFSYS_WAKEUP MT_TOP(0x1a4)
1102 #define MT_TOP_WFSYS_WAKEUP_MASK BIT(0)
1104 #define MT_TOP_MCU_EMI_BASE MT_TOP(0x1c4)
1105 #define MT_TOP_MCU_EMI_BASE_MASK GENMASK(19, 0)
1107 #define MT_TOP_WF_AP_PERI_BASE MT_TOP(0x1c8)
1108 #define MT_TOP_WF_AP_PERI_BASE_MASK GENMASK(19, 0)
1110 #define MT_TOP_EFUSE_BASE MT_TOP(0x1cc)
1111 #define MT_TOP_EFUSE_BASE_MASK GENMASK(19, 0)
1113 #define MT_TOP_CONN_INFRA_WAKEUP MT_TOP(0x1a0)
1114 #define MT_TOP_CONN_INFRA_WAKEUP_MASK BIT(0)
1116 #define MT_TOP_WFSYS_RESET_STATUS MT_TOP(0x2cc)
1120 #define MT_SEMA_BASE 0x18070000
1123 #define MT_SEMA_RFSPI_STATUS (MT_SEMA(0x2000) + (11 * 4))
1124 #define MT_SEMA_RFSPI_RELEASE (MT_SEMA(0x2200) + (11 * 4))
1128 #define MT_MCU_BUS_BASE 0x18400000
1131 #define MT_MCU_BUS_TIMEOUT MT_MCU_BUS(0xf0440)
1132 #define MT_MCU_BUS_TIMEOUT_SET_MASK GENMASK(7, 0)
1136 #define MT_MCU_BUS_REMAP MT_MCU_BUS(0x120)
1139 #define MT_TOP_CFG_BASE 0x184b0000
1142 #define MT_TOP_CFG_IP_VERSION_ADDR MT_TOP_CFG(0x010)
1145 #define MT_TOP_CFG_ON_BASE 0x184c1000
1148 #define MT_TOP_CFG_ON_ROM_IDX MT_TOP_CFG_ON(0x604)
1151 #define MT_SLP_BASE 0x184c3000
1154 #define MT_SLP_STATUS MT_SLP(0x00c)
1156 #define MT_SLP_CTRL_EN_MASK BIT(0)
1160 #define MT_MCU_BUS_DBG_BASE 0x18500000
1163 #define MT_MCU_BUS_DBG_TIMEOUT MT_MCU_BUS_DBG(0x0)
1168 #define MT_HW_BOUND 0x70010020
1169 #define MT_HW_REV 0x70010204
1170 #define MT_WF_SUBSYS_RST 0x70002600
1173 #define MT_PCIE_MAC_BASE 0x74030000
1175 #define MT_PCIE_MAC_INT_ENABLE MT_PCIE_MAC(0x188)
1177 #define MT_PCIE1_MAC_INT_ENABLE 0x74020188
1178 #define MT_PCIE1_MAC_INT_ENABLE_MT7916 0x74090188
1180 #define MT_WM_MCU_PC 0x7c060204
1181 #define MT_WA_MCU_PC 0x7c06020c
1184 #define MT_WF_PP_TOP_BASE 0x820cc000
1187 #define MT_WF_PP_TOP_RXQ_WFDMA_CF_5 MT_WF_PP_TOP(0x0e8)
1190 #define MT_WF_IRPI_BASE 0x83000000
1193 #define MT_WF_IRPI_NSS(phy, nss) MT_WF_IRPI(0x6000 + ((phy) << 20) + ((nss) << 16))
1194 #define MT_WF_IRPI_NSS_MT7916(phy, nss) MT_WF_IRPI(0x1000 + ((phy) << 20) + ((nss) << 16))
1197 #define MT_WF_PHY_BASE 0x83080000
1200 #define MT_WF_PHY_RX_CTRL1(_phy) MT_WF_PHY(0x2004 + ((_phy) << 16))
1201 #define MT_WF_PHY_RX_CTRL1_MT7916(_phy) MT_WF_PHY(0x2004 + ((_phy) << 20))
1202 #define MT_WF_PHY_RX_CTRL1_IPI_EN GENMASK(2, 0)
1205 #define MT_WF_PHY_RXTD12(_phy) MT_WF_PHY(0x8230 + ((_phy) << 16))
1206 #define MT_WF_PHY_RXTD12_MT7916(_phy) MT_WF_PHY(0x8230 + ((_phy) << 20))
1210 #define MT_WF_PHY_TPC_CTRL_STAT(_phy) MT_WF_PHY(0xe7a0 + ((_phy) << 16))
1211 #define MT_WF_PHY_TPC_CTRL_STAT_MT7916(_phy) MT_WF_PHY(0xe7a0 + ((_phy) << 20))
1214 #define MT_MCU_WM_CIRQ_BASE 0x89010000
1216 #define MT_MCU_WM_CIRQ_IRQ_MASK_CLR_ADDR MT_MCU_WM_CIRQ(0x80)
1217 #define MT_MCU_WM_CIRQ_IRQ_SOFT_ADDR MT_MCU_WM_CIRQ(0xc0)
1218 #define MT_MCU_WM_CIRQ_EINT_MASK_CLR_ADDR MT_MCU_WM_CIRQ(0x108)
1219 #define MT_MCU_WM_CIRQ_EINT_SOFT_ADDR MT_MCU_WM_CIRQ(0x118)