linux/drivers/net/wireless/mediatek/mt76/mt7615/regs.h

/* SPDX-License-Identifier: ISC */
/* Copyright (C) 2019 MediaTek Inc. */

#ifndef __MT7615_REGS_H
#define __MT7615_REGS_H

enum mt7615_reg_base {};

#define MT_HW_INFO_BASE
#define MT_HW_INFO(ofs)
#define MT_HW_REV
#define MT_HW_CHIPID
#define MT_TOP_STRAP_STA
#define MT_TOP_3NSS

#define MT_TOP_OFF_RSV
#define MT_TOP_OFF_RSV_FW_STATE

#define MT_TOP_MISC2
#define MT_TOP_MISC2_FW_STATE

#define MT7663_TOP_MISC2_FW_STATE
#define MT_TOP_MISC2_FW_PWR_ON

#define MT_MCU_BASE
#define MT_MCU(ofs)

#define MT_MCU_PCIE_REMAP_1
#define MT_MCU_PCIE_REMAP_1_OFFSET
#define MT_MCU_PCIE_REMAP_1_BASE
#define MT_PCIE_REMAP_BASE_1

#define MT_MCU_PCIE_REMAP_2
#define MT_MCU_PCIE_REMAP_2_OFFSET
#define MT_MCU_PCIE_REMAP_2_BASE
#define MT_PCIE_REMAP_BASE_2

#define MT_MCU_CIRQ_BASE
#define MT_MCU_CIRQ(ofs)

#define MT_MCU_CIRQ_IRQ_SEL(n)

#define MT_HIF(ofs)
#define MT_HIF_RST
#define MT_HIF_LOGIC_RST_N

#define MT_PDMA_SLP_PROT
#define MT_PDMA_AXI_SLPPROT_ENABLE
#define MT_PDMA_AXI_SLPPROT_RDY

#define MT_PDMA_BUSY_STATUS
#define MT_PDMA_TX_IDX_BUSY
#define MT_PDMA_BUSY_IDX

#define MT_WPDMA_TX_RING0_CTRL0
#define MT_WPDMA_TX_RING0_CTRL1

#define MT7663_MCU_PCIE_REMAP_2_OFFSET
#define MT7663_MCU_PCIE_REMAP_2_BASE

#define MT_HIF2_BASE
#define MT_HIF2(ofs)
#define MT_PCIE_IRQ_ENABLE
#define MT_PCIE_DOORBELL_PUSH

#define MT_CFG_LPCR_HOST
#define MT_CFG_LPCR_HOST_FW_OWN
#define MT_CFG_LPCR_HOST_DRV_OWN

#define MT_MCU2HOST_INT_STATUS
#define MT_MCU2HOST_INT_ENABLE

#define MT7663_MCU_INT_EVENT
#define MT_MCU_INT_EVENT
#define MT_MCU_INT_EVENT_PDMA_STOPPED
#define MT_MCU_INT_EVENT_PDMA_INIT
#define MT_MCU_INT_EVENT_SER_TRIGGER
#define MT_MCU_INT_EVENT_RESET_DONE

#define MT_INT_SOURCE_CSR
#define MT_INT_MASK_CSR
#define MT_DELAY_INT_CFG

#define MT_INT_RX_DONE(_n)
#define MT_INT_RX_DONE_ALL
#define MT_INT_TX_DONE_ALL
#define MT_INT_TX_DONE(_n)
#define MT7663_INT_MCU_CMD
#define MT_INT_MCU_CMD

#define MT_WPDMA_GLO_CFG
#define MT_WPDMA_GLO_CFG_TX_DMA_EN
#define MT_WPDMA_GLO_CFG_TX_DMA_BUSY
#define MT_WPDMA_GLO_CFG_RX_DMA_EN
#define MT_WPDMA_GLO_CFG_RX_DMA_BUSY
#define MT_WPDMA_GLO_CFG_DMA_BURST_SIZE
#define MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE
#define MT_WPDMA_GLO_CFG_BIG_ENDIAN
#define MT_WPDMA_GLO_CFG_TX_BT_SIZE_BIT0
#define MT_WPDMA_GLO_CFG_BYPASS_TX_SCH
#define MT_WPDMA_GLO_CFG_MULTI_DMA_EN
#define MT_WPDMA_GLO_CFG_FIFO_LITTLE_ENDIAN
#define MT_WPDMA_GLO_CFG_TX_BT_SIZE_BIT21
#define MT_WPDMA_GLO_CFG_SW_RESET
#define MT_WPDMA_GLO_CFG_FIRST_TOKEN_ONLY
#define MT_WPDMA_GLO_CFG_OMIT_TX_INFO

#define MT_WPDMA_RST_IDX

#define MT_WPDMA_MEM_RNG_ERR

#define MT_MCU_CMD
#define MT_MCU_CMD_CLEAR_FW_OWN
#define MT_MCU_CMD_STOP_PDMA_FW_RELOAD
#define MT_MCU_CMD_STOP_PDMA
#define MT_MCU_CMD_RESET_DONE
#define MT_MCU_CMD_RECOVERY_DONE
#define MT_MCU_CMD_NORMAL_STATE
#define MT_MCU_CMD_LMAC_ERROR
#define MT_MCU_CMD_PSE_ERROR
#define MT_MCU_CMD_PLE_ERROR
#define MT_MCU_CMD_PDMA_ERROR
#define MT_MCU_CMD_PCIE_ERROR
#define MT_MCU_CMD_ERROR_MASK
#define MT7663_MCU_CMD_ERROR_MASK

#define MT_TX_RING_BASE
#define MT_RX_RING_BASE

#define MT_WPDMA_GLO_CFG1
#define MT_WPDMA_TX_PRE_CFG
#define MT_WPDMA_RX_PRE_CFG
#define MT_WPDMA_ABT_CFG
#define MT_WPDMA_ABT_CFG1

#define MT_CSR(ofs)
#define MT_CONN_HIF_ON_LPCTL

#define MT_PLE(ofs)

#define MT_PLE_PG_HIF0_GROUP
#define MT_HIF0_MIN_QUOTA
#define MT_PLE_FL_Q0_CTRL
#define MT_PLE_FL_Q1_CTRL
#define MT_PLE_FL_Q2_CTRL
#define MT_PLE_FL_Q3_CTRL

#define MT_PLE_AC_QEMPTY(ac, n)

#define MT_PSE(ofs)
#define MT_PSE_PG_HIF0_GROUP
#define MT_HIF0_MIN_QUOTA
#define MT_PSE_PG_HIF1_GROUP
#define MT_HIF1_MIN_QUOTA
#define MT_PSE_QUEUE_EMPTY
#define MT_HIF_0_EMPTY_MASK
#define MT_HIF_1_EMPTY_MASK
#define MT_HIF_ALL_EMPTY_MASK
#define MT_PSE_PG_INFO
#define MT_PSE_SRC_CNT

#define MT_PP(ofs)
#define MT_PP_TXDWCNT
#define MT_PP_TXDWCNT_TX0_ADD_DW_CNT
#define MT_PP_TXDWCNT_TX1_ADD_DW_CNT

#define MT_WF_PHY_BASE
#define MT_WF_PHY(ofs)

#define MT_WF_PHY_WF2_RFCTRL0(n)
#define MT_WF_PHY_WF2_RFCTRL0_LPBCN_EN

#define MT_WF_PHY_R0_PHYMUX_5(_phy)
#define MT7663_WF_PHY_R0_PHYMUX_5

#define MT_WF_PHY_R0_PHYCTRL_STS0(_phy)
#define MT_WF_PHYCTRL_STAT_PD_OFDM
#define MT_WF_PHYCTRL_STAT_PD_CCK

#define MT7663_WF_PHY_R0_PHYCTRL_STS0(_phy)

#define MT_WF_PHY_R0_PHYCTRL_STS5(_phy)
#define MT_WF_PHYCTRL_STAT_MDRDY_OFDM
#define MT_WF_PHYCTRL_STAT_MDRDY_CCK

#define MT7663_WF_PHY_R0_PHYCTRL_STS5(_phy)

#define MT_WF_PHY_GID_TAB_VLD(_phy, i)
#define MT7663_WF_PHY_GID_TAB_VLD(_phy, i)
#define MT_WF_PHY_GID_TAB_POS(_phy, i)
#define MT7663_WF_PHY_GID_TAB_POS(_phy, i)

#define MT_WF_PHY_MIN_PRI_PWR(_phy)
#define MT_WF_PHY_PD_OFDM_MASK(_phy)
#define MT_WF_PHY_PD_OFDM(_phy, v)
#define MT_WF_PHY_PD_BLK(_phy)

#define MT7663_WF_PHY_MIN_PRI_PWR(_phy)

#define MT_WF_PHY_RXTD_BASE
#define MT_WF_PHY_RXTD(_n)

#define MT7663_WF_PHY_RXTD(_n)

#define MT_WF_PHY_RXTD_CCK_PD(_phy)
#define MT_WF_PHY_PD_CCK_MASK(_phy)
#define MT_WF_PHY_PD_CCK(_phy, v)

#define MT7663_WF_PHY_RXTD_CCK_PD(_phy)

#define MT_WF_PHY_RXTD2_BASE
#define MT_WF_PHY_RXTD2(_n)

#define MT_WF_PHY_RFINTF3_0(_n)
#define MT_WF_PHY_RFINTF3_0_ANT

#define MT_WF_CFG_BASE
#define MT_WF_CFG(ofs)

#define MT_CFG_CCR
#define MT_CFG_CCR_MAC_D1_1X_GC_EN
#define MT_CFG_CCR_MAC_D0_1X_GC_EN
#define MT_CFG_CCR_MAC_D1_2X_GC_EN
#define MT_CFG_CCR_MAC_D0_2X_GC_EN

#define MT_WF_AGG_BASE
#define MT_WF_AGG(ofs)

#define MT_AGG_ARCR
#define MT_AGG_ARCR_INIT_RATE1
#define MT_AGG_ARCR_RTS_RATE_THR
#define MT_AGG_ARCR_RATE_DOWN_RATIO
#define MT_AGG_ARCR_RATE_DOWN_RATIO_EN
#define MT_AGG_ARCR_RATE_UP_EXTRA_TH

#define MT_AGG_ARUCR(_band)
#define MT_AGG_ARDCR(_band)
#define MT_AGG_ARxCR_LIMIT_SHIFT(_n)
#define MT_AGG_ARxCR_LIMIT(_n)

#define MT_AGG_ASRCR0
#define MT_AGG_ASRCR1
#define MT_AGG_ASRCR_RANGE(val, n)

#define MT_AGG_ACR(_band)
#define MT_AGG_ACR_NO_BA_RULE
#define MT_AGG_ACR_NO_BA_AR_RULE
#define MT_AGG_ACR_PKT_TIME_EN
#define MT_AGG_ACR_CFEND_RATE
#define MT_AGG_ACR_BAR_RATE

#define MT_AGG_SCR
#define MT_AGG_SCR_NLNAV_MID_PTEC_DIS

#define MT_WF_ARB_BASE
#define MT_WF_ARB(ofs)

#define MT_ARB_RQCR
#define MT_ARB_RQCR_RX_START
#define MT_ARB_RQCR_RXV_START
#define MT_ARB_RQCR_RXV_R_EN
#define MT_ARB_RQCR_RXV_T_EN
#define MT_ARB_RQCR_BAND_SHIFT

#define MT_ARB_SCR
#define MT_ARB_SCR_TX0_DISABLE
#define MT_ARB_SCR_RX0_DISABLE
#define MT_ARB_SCR_TX1_DISABLE
#define MT_ARB_SCR_RX1_DISABLE

#define MT_WF_TMAC_BASE
#define MT_WF_TMAC(ofs)

#define MT_TMAC_CDTR
#define MT_TMAC_ODTR
#define MT_TIMEOUT_VAL_PLCP
#define MT_TIMEOUT_VAL_CCA

#define MT_TMAC_TRCR(_band)
#define MT_TMAC_TRCR_CCA_SEL
#define MT_TMAC_TRCR_SEC_CCA_SEL

#define MT_TMAC_ICR(_band)
#define MT_IFS_EIFS
#define MT_IFS_RIFS
#define MT_IFS_SIFS
#define MT_IFS_SLOT

#define MT_TMAC_CTCR0
#define MT_TMAC_CTCR0_INS_DDLMT_REFTIME
#define MT_TMAC_CTCR0_INS_DDLMT_DENSITY
#define MT_TMAC_CTCR0_INS_DDLMT_EN
#define MT_TMAC_CTCR0_INS_DDLMT_VHT_SMPDU_EN

#define MT_WF_RMAC_BASE
#define MT_WF_RMAC(ofs)

#define MT_WF_RFCR(_band)
#define MT_WF_RFCR_DROP_STBC_MULTI
#define MT_WF_RFCR_DROP_FCSFAIL
#define MT_WF_RFCR_DROP_VERSION
#define MT_WF_RFCR_DROP_PROBEREQ
#define MT_WF_RFCR_DROP_MCAST
#define MT_WF_RFCR_DROP_BCAST
#define MT_WF_RFCR_DROP_MCAST_FILTERED
#define MT_WF_RFCR_DROP_A3_MAC
#define MT_WF_RFCR_DROP_A3_BSSID
#define MT_WF_RFCR_DROP_A2_BSSID
#define MT_WF_RFCR_DROP_OTHER_BEACON
#define MT_WF_RFCR_DROP_FRAME_REPORT
#define MT_WF_RFCR_DROP_CTL_RSV
#define MT_WF_RFCR_DROP_CTS
#define MT_WF_RFCR_DROP_RTS
#define MT_WF_RFCR_DROP_DUPLICATE
#define MT_WF_RFCR_DROP_OTHER_BSS
#define MT_WF_RFCR_DROP_OTHER_UC
#define MT_WF_RFCR_DROP_OTHER_TIM
#define MT_WF_RFCR_DROP_NDPA
#define MT_WF_RFCR_DROP_UNWANTED_CTL

#define MT_WF_RMAC_MORE(_band)
#define MT_WF_RMAC_MORE_MUAR_MODE

#define MT_WF_RFCR1(_band)
#define MT_WF_RFCR1_DROP_ACK
#define MT_WF_RFCR1_DROP_BF_POLL
#define MT_WF_RFCR1_DROP_BA
#define MT_WF_RFCR1_DROP_CFEND
#define MT_WF_RFCR1_DROP_CFACK

#define MT_CHFREQ(_band)

#define MT_WF_RMAC_MAR0
#define MT_WF_RMAC_MAR1
#define MT_WF_RMAC_MAR1_ADDR
#define MT_WF_RMAC_MAR1_START
#define MT_WF_RMAC_MAR1_WRITE
#define MT_WF_RMAC_MAR1_IDX
#define MT_WF_RMAC_MAR1_GROUP

#define MT_WF_RMAC_MIB_TIME0
#define MT_WF_RMAC_MIB_RXTIME_CLR
#define MT_WF_RMAC_MIB_RXTIME_EN

#define MT_WF_RMAC_MIB_AIRTIME0

#define MT_WF_RMAC_MIB_TIME5
#define MT_WF_RMAC_MIB_TIME6
#define MT_MIB_OBSSTIME_MASK

#define MT_WF_DMA_BASE
#define MT_WF_DMA(ofs)

#define MT_DMA_DCR0
#define MT_DMA_DCR0_MAX_RX_LEN
#define MT_DMA_DCR0_DAMSDU_EN
#define MT_DMA_DCR0_RX_VEC_DROP
#define MT_DMA_DCR0_RX_HDR_TRANS_EN

#define MT_DMA_RCFR0(_band)
#define MT_DMA_RCFR0_MCU_RX_MGMT
#define MT_DMA_RCFR0_MCU_RX_CTL_NON_BAR
#define MT_DMA_RCFR0_MCU_RX_CTL_BAR
#define MT_DMA_RCFR0_MCU_RX_TDLS
#define MT_DMA_RCFR0_MCU_RX_BYPASS
#define MT_DMA_RCFR0_RX_DROPPED_UCAST
#define MT_DMA_RCFR0_RX_DROPPED_MCAST

#define MT_WF_PF_BASE
#define MT_WF_PF(ofs)

#define MT_WF_PFCR
#define MT_WF_PFCR_TDLS_EN

#define MT_WTBL_BASE(dev)
#define MT_WTBL_ENTRY_SIZE

#define MT_WTBL_OFF_BASE
#define MT_WTBL_OFF(n)

#define MT_WTBL_W0_KEY_IDX
#define MT_WTBL_W0_RX_KEY_VALID
#define MT_WTBL_W0_RX_IK_VALID

#define MT_WTBL_W2_KEY_TYPE

#define MT_WTBL_UPDATE
#define MT_WTBL_UPDATE_WLAN_IDX
#define MT_WTBL_UPDATE_RXINFO_UPDATE
#define MT_WTBL_UPDATE_ADM_COUNT_CLEAR
#define MT_WTBL_UPDATE_RATE_UPDATE
#define MT_WTBL_UPDATE_TX_COUNT_CLEAR
#define MT_WTBL_UPDATE_BUSY

#define MT_TOP_MISC(ofs)
#define MT_CONN_ON_MISC
#define MT_TOP_MISC2_FW_N9_RDY

#define MT_WTBL_ON_BASE
#define MT_WTBL_ON(_n)

#define MT_WTBL_RICR0
#define MT_WTBL_RICR1

#define MT_WTBL_RIUCR0

#define MT_WTBL_RIUCR1
#define MT_WTBL_RIUCR1_RATE0
#define MT_WTBL_RIUCR1_RATE1
#define MT_WTBL_RIUCR1_RATE2_LO

#define MT_WTBL_RIUCR2
#define MT_WTBL_RIUCR2_RATE2_HI
#define MT_WTBL_RIUCR2_RATE3
#define MT_WTBL_RIUCR2_RATE4
#define MT_WTBL_RIUCR2_RATE5_LO

#define MT_WTBL_RIUCR3
#define MT_WTBL_RIUCR3_RATE5_HI
#define MT_WTBL_RIUCR3_RATE6
#define MT_WTBL_RIUCR3_RATE7

#define MT_WTBL_W3_RTS

#define MT_WTBL_W5_CHANGE_BW_RATE
#define MT_WTBL_W5_SHORT_GI_20
#define MT_WTBL_W5_SHORT_GI_40
#define MT_WTBL_W5_SHORT_GI_80
#define MT_WTBL_W5_SHORT_GI_160
#define MT_WTBL_W5_BW_CAP
#define MT_WTBL_W5_MPDU_FAIL_COUNT
#define MT_WTBL_W5_MPDU_OK_COUNT
#define MT_WTBL_W5_RATE_IDX

#define MT_WTBL_W27_CC_BW_SEL

#define MT_LPON(_n)

#define MT_LPON_TCR0(_n)
#define MT_LPON_TCR2(_n)
#define MT_LPON_TCR_MODE
#define MT_LPON_TCR_READ
#define MT_LPON_TCR_WRITE
#define MT_LPON_TCR_ADJUST

#define MT_LPON_UTTR0
#define MT_LPON_UTTR1

#define MT_WF_MIB_BASE
#define MT_WF_MIB(_band, ofs)

#define MT_WF_MIB_SCR0
#define MT_MIB_SCR0_AGG_CNT_RANGE_EN

#define MT_MIB_M0_MISC_CR(_band)

#define MT_MIB_SDR3(_band)
#define MT_MIB_SDR3_FCS_ERR_MASK

#define MT_MIB_SDR9(_band)
#define MT_MIB_SDR9_BUSY_MASK

#define MT_MIB_SDR14(_band)
#define MT_MIB_AMPDU_MPDU_COUNT

#define MT_MIB_SDR15(_band)
#define MT_MIB_AMPDU_ACK_COUNT

#define MT_MIB_SDR16(_band)
#define MT_MIB_SDR16_BUSY_MASK

#define MT_MIB_SDR36(_band)
#define MT_MIB_SDR36_TXTIME_MASK
#define MT_MIB_SDR37(_band)
#define MT_MIB_SDR37_RXTIME_MASK

#define MT_MIB_MB_SDR0(_band, n)
#define MT_MIB_RTS_RETRIES_COUNT_MASK
#define MT_MIB_RTS_COUNT_MASK

#define MT_MIB_MB_SDR1(_band, n)
#define MT_MIB_BA_MISS_COUNT_MASK
#define MT_MIB_ACK_FAIL_COUNT_MASK

#define MT_MIB_ARNG(n)

#define MT_TX_AGG_CNT(_band, n)

#define MT_DMA_SHDL(ofs)

#define MT_DMASHDL_BASE
#define MT_DMASHDL_OPTIONAL
#define MT_DMASHDL_PAGE

#define MT_DMASHDL_REFILL

#define MT_DMASHDL_PKT_MAX_SIZE
#define MT_DMASHDL_PKT_MAX_SIZE_PLE
#define MT_DMASHDL_PKT_MAX_SIZE_PSE

#define MT_DMASHDL_GROUP_QUOTA(_n)
#define MT_DMASHDL_GROUP_QUOTA_MIN
#define MT_DMASHDL_GROUP_QUOTA_MAX

#define MT_DMASHDL_SCHED_SET0
#define MT_DMASHDL_SCHED_SET1

#define MT_DMASHDL_Q_MAP(_n)
#define MT_DMASHDL_Q_MAP_MASK
#define MT_DMASHDL_Q_MAP_SHIFT(_n)

#define MT_LED_BASE_PHYS
#define MT_LED_PHYS(_n)

#define MT_LED_CTRL

#define MT_LED_CTRL_REPLAY(_n)
#define MT_LED_CTRL_POLARITY(_n)
#define MT_LED_CTRL_TX_BLINK_MODE(_n)
#define MT_LED_CTRL_TX_MANUAL_BLINK(_n)
#define MT_LED_CTRL_BAND(_n)
#define MT_LED_CTRL_TX_OVER_BLINK(_n)
#define MT_LED_CTRL_KICK(_n)

#define MT_LED_STATUS_0(_n)
#define MT_LED_STATUS_1(_n)
#define MT_LED_STATUS_OFF
#define MT_LED_STATUS_ON
#define MT_LED_STATUS_DURATION

#define MT_PDMA_BUSY
#define MT_PDMA_TX_BUSY
#define MT_PDMA_RX_BUSY

#define MT_EFUSE_BASE
#define MT_EFUSE_BASE_CTRL
#define MT_EFUSE_BASE_CTRL_EMPTY

#define MT_EFUSE_CTRL
#define MT_EFUSE_CTRL_AOUT
#define MT_EFUSE_CTRL_MODE
#define MT_EFUSE_CTRL_LDO_OFF_TIME
#define MT_EFUSE_CTRL_LDO_ON_TIME
#define MT_EFUSE_CTRL_AIN
#define MT_EFUSE_CTRL_VALID
#define MT_EFUSE_CTRL_KICK
#define MT_EFUSE_CTRL_SEL

#define MT_EFUSE_WDATA(_i)
#define MT_EFUSE_RDATA(_i)

/* INFRACFG host register range on MT7622 */
#define MT_INFRACFG_MISC
#define MT_INFRACFG_MISC_AP2CONN_WAKE

#define MT_UMAC_BASE
#define MT_UMAC(ofs)
#define MT_UDMA_TX_QSEL
#define MT_FW_DL_EN

#define MT_UDMA_WLCFG_1
#define MT_WL_RX_AGG_PKT_LMT
#define MT_WL_TX_TMOUT_LMT

#define MT_UDMA_WLCFG_0
#define MT_WL_RX_AGG_TO
#define MT_WL_RX_AGG_LMT
#define MT_WL_TX_TMOUT_FUNC_EN
#define MT_WL_TX_DPH_CHK_EN
#define MT_WL_RX_MPSZ_PAD0
#define MT_WL_RX_FLUSH
#define MT_TICK_1US_EN
#define MT_WL_RX_AGG_EN
#define MT_WL_RX_EN
#define MT_WL_TX_EN
#define MT_WL_RX_BUSY
#define MT_WL_TX_BUSY

#define MT_MCU_PTA_BASE
#define MT_MCU_PTA(_n)

#define MT_ANT_SWITCH_CON(_n)
#define MT_ANT_SWITCH_CON_MODE(_n)
#define MT_ANT_SWITCH_CON_MODE1(_n)

#endif