162306a36Sopenharmony_ci/* SPDX-License-Identifier: ISC */
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci#ifndef __MT7603_REGS_H
462306a36Sopenharmony_ci#define __MT7603_REGS_H
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#define MT_HW_REV			0x1000
762306a36Sopenharmony_ci#define MT_HW_CHIPID			0x1008
862306a36Sopenharmony_ci#define MT_TOP_MISC2			0x1134
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#define MT_MCU_BASE			0x2000
1162306a36Sopenharmony_ci#define MT_MCU(ofs)			(MT_MCU_BASE + (ofs))
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define MT_MCU_PCIE_REMAP_1		MT_MCU(0x500)
1462306a36Sopenharmony_ci#define MT_MCU_PCIE_REMAP_1_OFFSET	GENMASK(17, 0)
1562306a36Sopenharmony_ci#define MT_MCU_PCIE_REMAP_1_BASE	GENMASK(31, 18)
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#define MT_MCU_PCIE_REMAP_2		MT_MCU(0x504)
1862306a36Sopenharmony_ci#define MT_MCU_PCIE_REMAP_2_OFFSET	GENMASK(18, 0)
1962306a36Sopenharmony_ci#define MT_MCU_PCIE_REMAP_2_BASE	GENMASK(31, 19)
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#define MT_HIF_BASE			0x4000
2262306a36Sopenharmony_ci#define MT_HIF(ofs)			(MT_HIF_BASE + (ofs))
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define MT_INT_SOURCE_CSR		MT_HIF(0x200)
2562306a36Sopenharmony_ci#define MT_INT_MASK_CSR			MT_HIF(0x204)
2662306a36Sopenharmony_ci#define MT_DELAY_INT_CFG		MT_HIF(0x210)
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci#define MT_INT_RX_DONE(_n)		BIT(_n)
2962306a36Sopenharmony_ci#define MT_INT_RX_DONE_ALL		GENMASK(1, 0)
3062306a36Sopenharmony_ci#define MT_INT_TX_DONE_ALL		GENMASK(19, 4)
3162306a36Sopenharmony_ci#define MT_INT_TX_DONE(_n)		BIT((_n) + 4)
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci#define MT_INT_RX_COHERENT		BIT(20)
3462306a36Sopenharmony_ci#define MT_INT_TX_COHERENT		BIT(21)
3562306a36Sopenharmony_ci#define MT_INT_MAC_IRQ3			BIT(27)
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#define MT_INT_MCU_CMD			BIT(30)
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG		MT_HIF(0x208)
4062306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_TX_DMA_EN	BIT(0)
4162306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_TX_DMA_BUSY	BIT(1)
4262306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_RX_DMA_EN	BIT(2)
4362306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_RX_DMA_BUSY	BIT(3)
4462306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_DMA_BURST_SIZE	GENMASK(5, 4)
4562306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE	BIT(6)
4662306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_BIG_ENDIAN	BIT(7)
4762306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_HDR_SEG_LEN	GENMASK(15, 8)
4862306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_SW_RESET	BIT(24)
4962306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_FORCE_TX_EOF	BIT(25)
5062306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_CLK_GATE_DIS	BIT(30)
5162306a36Sopenharmony_ci#define MT_WPDMA_GLO_CFG_RX_2B_OFFSET	BIT(31)
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci#define MT_WPDMA_RST_IDX		MT_HIF(0x20c)
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci#define MT_WPDMA_DEBUG			MT_HIF(0x244)
5662306a36Sopenharmony_ci#define MT_WPDMA_DEBUG_VALUE		GENMASK(17, 0)
5762306a36Sopenharmony_ci#define MT_WPDMA_DEBUG_SEL		BIT(27)
5862306a36Sopenharmony_ci#define MT_WPDMA_DEBUG_IDX		GENMASK(31, 28)
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci#define MT_TX_RING_BASE			MT_HIF(0x300)
6162306a36Sopenharmony_ci#define MT_RX_RING_BASE			MT_HIF(0x400)
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci#define MT_TXTIME_THRESH_BASE		MT_HIF(0x500)
6462306a36Sopenharmony_ci#define MT_TXTIME_THRESH(n)		(MT_TXTIME_THRESH_BASE + ((n) * 4))
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci#define MT_PAGE_COUNT_BASE		MT_HIF(0x540)
6762306a36Sopenharmony_ci#define MT_PAGE_COUNT(n)		(MT_PAGE_COUNT_BASE + ((n) * 4))
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci#define MT_SCH_1			MT_HIF(0x588)
7062306a36Sopenharmony_ci#define MT_SCH_2			MT_HIF(0x58c)
7162306a36Sopenharmony_ci#define MT_SCH_3			MT_HIF(0x590)
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci#define MT_SCH_4			MT_HIF(0x594)
7462306a36Sopenharmony_ci#define MT_SCH_4_FORCE_QID		GENMASK(4, 0)
7562306a36Sopenharmony_ci#define MT_SCH_4_BYPASS			BIT(5)
7662306a36Sopenharmony_ci#define MT_SCH_4_RESET			BIT(8)
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci#define MT_GROUP_THRESH_BASE		MT_HIF(0x598)
7962306a36Sopenharmony_ci#define MT_GROUP_THRESH(n)		(MT_GROUP_THRESH_BASE + ((n) * 4))
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci#define MT_QUEUE_PRIORITY_1		MT_HIF(0x580)
8262306a36Sopenharmony_ci#define MT_QUEUE_PRIORITY_2		MT_HIF(0x584)
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ci#define MT_BMAP_0			MT_HIF(0x5b0)
8562306a36Sopenharmony_ci#define MT_BMAP_1			MT_HIF(0x5b4)
8662306a36Sopenharmony_ci#define MT_BMAP_2			MT_HIF(0x5b8)
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci#define MT_HIGH_PRIORITY_1		MT_HIF(0x5bc)
8962306a36Sopenharmony_ci#define MT_HIGH_PRIORITY_2		MT_HIF(0x5c0)
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci#define MT_PRIORITY_MASK		MT_HIF(0x5c4)
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci#define MT_RSV_MAX_THRESH		MT_HIF(0x5c8)
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ci#define MT_PSE_BASE			0x8000
9662306a36Sopenharmony_ci#define MT_PSE(ofs)			(MT_PSE_BASE + (ofs))
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci#define MT_MCU_DEBUG_RESET		MT_PSE(0x16c)
9962306a36Sopenharmony_ci#define MT_MCU_DEBUG_RESET_PSE		BIT(0)
10062306a36Sopenharmony_ci#define MT_MCU_DEBUG_RESET_PSE_S	BIT(1)
10162306a36Sopenharmony_ci#define MT_MCU_DEBUG_RESET_QUEUES	GENMASK(6, 2)
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci#define MT_PSE_FC_P0			MT_PSE(0x120)
10462306a36Sopenharmony_ci#define MT_PSE_FC_P0_MIN_RESERVE	GENMASK(11, 0)
10562306a36Sopenharmony_ci#define MT_PSE_FC_P0_MAX_QUOTA		GENMASK(27, 16)
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ci#define MT_PSE_FRP			MT_PSE(0x138)
10862306a36Sopenharmony_ci#define MT_PSE_FRP_P0			GENMASK(2, 0)
10962306a36Sopenharmony_ci#define MT_PSE_FRP_P1			GENMASK(5, 3)
11062306a36Sopenharmony_ci#define MT_PSE_FRP_P2_RQ0		GENMASK(8, 6)
11162306a36Sopenharmony_ci#define MT_PSE_FRP_P2_RQ1		GENMASK(11, 9)
11262306a36Sopenharmony_ci#define MT_PSE_FRP_P2_RQ2		GENMASK(14, 12)
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci#define MT_FC_RSV_COUNT_0		MT_PSE(0x13c)
11562306a36Sopenharmony_ci#define MT_FC_RSV_COUNT_0_P0		GENMASK(11, 0)
11662306a36Sopenharmony_ci#define MT_FC_RSV_COUNT_0_P1		GENMASK(27, 16)
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ci#define MT_FC_SP2_Q0Q1			MT_PSE(0x14c)
11962306a36Sopenharmony_ci#define MT_FC_SP2_Q0Q1_SRC_COUNT_Q0	GENMASK(11, 0)
12062306a36Sopenharmony_ci#define MT_FC_SP2_Q0Q1_SRC_COUNT_Q1	GENMASK(27, 16)
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci#define MT_PSE_FW_SHARED		MT_PSE(0x17c)
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci#define MT_PSE_RTA			MT_PSE(0x194)
12562306a36Sopenharmony_ci#define MT_PSE_RTA_QUEUE_ID		GENMASK(4, 0)
12662306a36Sopenharmony_ci#define MT_PSE_RTA_PORT_ID		GENMASK(6, 5)
12762306a36Sopenharmony_ci#define MT_PSE_RTA_REDIRECT_EN		BIT(7)
12862306a36Sopenharmony_ci#define MT_PSE_RTA_TAG_ID		GENMASK(15, 8)
12962306a36Sopenharmony_ci#define MT_PSE_RTA_WRITE		BIT(16)
13062306a36Sopenharmony_ci#define MT_PSE_RTA_BUSY			BIT(31)
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci#define MT_WF_PHY_BASE			0x10000
13362306a36Sopenharmony_ci#define MT_WF_PHY_OFFSET		0x1000
13462306a36Sopenharmony_ci#define MT_WF_PHY(ofs)			(MT_WF_PHY_BASE + (ofs))
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ci#define MT_AGC_BASE			MT_WF_PHY(0x500)
13762306a36Sopenharmony_ci#define MT_AGC(n)			(MT_AGC_BASE + ((n) * 4))
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci#define MT_AGC1_BASE			MT_WF_PHY(0x1500)
14062306a36Sopenharmony_ci#define MT_AGC1(n)			(MT_AGC1_BASE + ((n) * 4))
14162306a36Sopenharmony_ci
14262306a36Sopenharmony_ci#define MT_AGC_41_RSSI_0		GENMASK(23, 16)
14362306a36Sopenharmony_ci#define MT_AGC_41_RSSI_1		GENMASK(7, 0)
14462306a36Sopenharmony_ci
14562306a36Sopenharmony_ci#define MT_RXTD_BASE			MT_WF_PHY(0x600)
14662306a36Sopenharmony_ci#define MT_RXTD(n)			(MT_RXTD_BASE + ((n) * 4))
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ci#define MT_RXTD_6_ACI_TH		GENMASK(4, 0)
14962306a36Sopenharmony_ci#define MT_RXTD_6_CCAED_TH		GENMASK(14, 8)
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci#define MT_RXTD_8_LOWER_SIGNAL		GENMASK(5, 0)
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci#define MT_RXTD_13_ACI_TH_EN		BIT(0)
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci#define MT_WF_PHY_CR_TSSI_BASE		MT_WF_PHY(0xd00)
15662306a36Sopenharmony_ci#define MT_WF_PHY_CR_TSSI(phy, n)	(MT_WF_PHY_CR_TSSI_BASE +	\
15762306a36Sopenharmony_ci					 ((phy) * MT_WF_PHY_OFFSET) +	\
15862306a36Sopenharmony_ci					 ((n) * 4))
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ci#define MT_PHYCTRL_BASE			MT_WF_PHY(0x4100)
16162306a36Sopenharmony_ci#define MT_PHYCTRL(n)			(MT_PHYCTRL_BASE + ((n) * 4))
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ci#define MT_PHYCTRL_2_STATUS_RESET	BIT(6)
16462306a36Sopenharmony_ci#define MT_PHYCTRL_2_STATUS_EN		BIT(7)
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ci#define MT_PHYCTRL_STAT_PD		MT_PHYCTRL(3)
16762306a36Sopenharmony_ci#define MT_PHYCTRL_STAT_PD_OFDM		GENMASK(31, 16)
16862306a36Sopenharmony_ci#define MT_PHYCTRL_STAT_PD_CCK		GENMASK(15, 0)
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ci#define MT_PHYCTRL_STAT_MDRDY		MT_PHYCTRL(8)
17162306a36Sopenharmony_ci#define MT_PHYCTRL_STAT_MDRDY_OFDM	GENMASK(31, 16)
17262306a36Sopenharmony_ci#define MT_PHYCTRL_STAT_MDRDY_CCK	GENMASK(15, 0)
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ci#define MT_WF_AGG_BASE			0x21200
17562306a36Sopenharmony_ci#define MT_WF_AGG(ofs)			(MT_WF_AGG_BASE + (ofs))
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci#define MT_AGG_ARCR			MT_WF_AGG(0x010)
17862306a36Sopenharmony_ci#define MT_AGG_ARCR_INIT_RATE1		BIT(0)
17962306a36Sopenharmony_ci#define MT_AGG_ARCR_FB_SGI_DISABLE	BIT(1)
18062306a36Sopenharmony_ci#define MT_AGG_ARCR_RATE8_DOWN_WRAP	BIT(2)
18162306a36Sopenharmony_ci#define MT_AGG_ARCR_RTS_RATE_THR	GENMASK(12, 8)
18262306a36Sopenharmony_ci#define MT_AGG_ARCR_RATE_DOWN_RATIO	GENMASK(17, 16)
18362306a36Sopenharmony_ci#define MT_AGG_ARCR_RATE_DOWN_RATIO_EN	BIT(19)
18462306a36Sopenharmony_ci#define MT_AGG_ARCR_RATE_UP_EXTRA_TH	GENMASK(22, 20)
18562306a36Sopenharmony_ci#define MT_AGG_ARCR_SPE_DIS_TH		GENMASK(27, 24)
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ci#define MT_AGG_ARUCR			MT_WF_AGG(0x014)
18862306a36Sopenharmony_ci#define MT_AGG_ARDCR			MT_WF_AGG(0x018)
18962306a36Sopenharmony_ci#define MT_AGG_ARxCR_LIMIT_SHIFT(_n)	(4 * (_n))
19062306a36Sopenharmony_ci#define MT_AGG_ARxCR_LIMIT(_n)		GENMASK(2 + \
19162306a36Sopenharmony_ci						MT_AGG_ARxCR_LIMIT_SHIFT(_n), \
19262306a36Sopenharmony_ci						MT_AGG_ARxCR_LIMIT_SHIFT(_n))
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ci#define MT_AGG_LIMIT			MT_WF_AGG(0x040)
19562306a36Sopenharmony_ci#define MT_AGG_LIMIT_1			MT_WF_AGG(0x044)
19662306a36Sopenharmony_ci#define MT_AGG_LIMIT_AC(_n)		GENMASK(((_n) + 1) * 8 - 1, (_n) * 8)
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ci#define MT_AGG_BA_SIZE_LIMIT_0		MT_WF_AGG(0x048)
19962306a36Sopenharmony_ci#define MT_AGG_BA_SIZE_LIMIT_1		MT_WF_AGG(0x04c)
20062306a36Sopenharmony_ci#define MT_AGG_BA_SIZE_LIMIT_SHIFT	8
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ci#define MT_AGG_PCR			MT_WF_AGG(0x050)
20362306a36Sopenharmony_ci#define MT_AGG_PCR_MM			BIT(16)
20462306a36Sopenharmony_ci#define MT_AGG_PCR_GF			BIT(17)
20562306a36Sopenharmony_ci#define MT_AGG_PCR_BW40			BIT(18)
20662306a36Sopenharmony_ci#define MT_AGG_PCR_RIFS			BIT(19)
20762306a36Sopenharmony_ci#define MT_AGG_PCR_BW80			BIT(20)
20862306a36Sopenharmony_ci#define MT_AGG_PCR_BW160		BIT(21)
20962306a36Sopenharmony_ci#define MT_AGG_PCR_ERP			BIT(22)
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_ci#define MT_AGG_PCR_RTS			MT_WF_AGG(0x054)
21262306a36Sopenharmony_ci#define MT_AGG_PCR_RTS_THR		GENMASK(19, 0)
21362306a36Sopenharmony_ci#define MT_AGG_PCR_RTS_PKT_THR		GENMASK(31, 25)
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ci#define MT_AGG_ASRCR			MT_WF_AGG(0x060)
21662306a36Sopenharmony_ci#define MT_AGG_ASRCR_RANGE(val, n)	(((val) >> ((n) << 3)) & GENMASK(5, 0))
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ci#define MT_AGG_CONTROL			MT_WF_AGG(0x070)
21962306a36Sopenharmony_ci#define MT_AGG_CONTROL_NO_BA_RULE	BIT(0)
22062306a36Sopenharmony_ci#define MT_AGG_CONTROL_NO_BA_AR_RULE	BIT(1)
22162306a36Sopenharmony_ci#define MT_AGG_CONTROL_CFEND_SPE_EN	BIT(3)
22262306a36Sopenharmony_ci#define MT_AGG_CONTROL_CFEND_RATE	GENMASK(15, 4)
22362306a36Sopenharmony_ci#define MT_AGG_CONTROL_BAR_SPE_EN	BIT(19)
22462306a36Sopenharmony_ci#define MT_AGG_CONTROL_BAR_RATE		GENMASK(31, 20)
22562306a36Sopenharmony_ci
22662306a36Sopenharmony_ci#define MT_AGG_TMP			MT_WF_AGG(0x0d8)
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ci#define MT_AGG_BWCR			MT_WF_AGG(0x0ec)
22962306a36Sopenharmony_ci#define MT_AGG_BWCR_BW			GENMASK(3, 2)
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ci#define MT_AGG_RETRY_CONTROL		MT_WF_AGG(0x0f4)
23262306a36Sopenharmony_ci#define MT_AGG_RETRY_CONTROL_RTS_LIMIT	GENMASK(11, 7)
23362306a36Sopenharmony_ci#define MT_AGG_RETRY_CONTROL_BAR_LIMIT	GENMASK(15, 12)
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ci#define MT_WF_DMA_BASE			0x21c00
23662306a36Sopenharmony_ci#define MT_WF_DMA(ofs)			(MT_WF_DMA_BASE + (ofs))
23762306a36Sopenharmony_ci
23862306a36Sopenharmony_ci#define MT_DMA_DCR0			MT_WF_DMA(0x000)
23962306a36Sopenharmony_ci#define MT_DMA_DCR0_MAX_RX_LEN		GENMASK(15, 0)
24062306a36Sopenharmony_ci#define MT_DMA_DCR0_DAMSDU		BIT(16)
24162306a36Sopenharmony_ci#define MT_DMA_DCR0_RX_VEC_DROP		BIT(17)
24262306a36Sopenharmony_ci
24362306a36Sopenharmony_ci#define MT_DMA_DCR1			MT_WF_DMA(0x004)
24462306a36Sopenharmony_ci
24562306a36Sopenharmony_ci#define MT_DMA_FQCR0			MT_WF_DMA(0x008)
24662306a36Sopenharmony_ci#define MT_DMA_FQCR0_TARGET_WCID	GENMASK(7, 0)
24762306a36Sopenharmony_ci#define MT_DMA_FQCR0_TARGET_BSS		GENMASK(13, 8)
24862306a36Sopenharmony_ci#define MT_DMA_FQCR0_TARGET_QID		GENMASK(20, 16)
24962306a36Sopenharmony_ci#define MT_DMA_FQCR0_DEST_PORT_ID	GENMASK(23, 22)
25062306a36Sopenharmony_ci#define MT_DMA_FQCR0_DEST_QUEUE_ID	GENMASK(28, 24)
25162306a36Sopenharmony_ci#define MT_DMA_FQCR0_MODE		BIT(29)
25262306a36Sopenharmony_ci#define MT_DMA_FQCR0_STATUS		BIT(30)
25362306a36Sopenharmony_ci#define MT_DMA_FQCR0_BUSY		BIT(31)
25462306a36Sopenharmony_ci
25562306a36Sopenharmony_ci#define MT_DMA_RCFR0			MT_WF_DMA(0x070)
25662306a36Sopenharmony_ci#define MT_DMA_VCFR0			MT_WF_DMA(0x07c)
25762306a36Sopenharmony_ci
25862306a36Sopenharmony_ci#define MT_DMA_TCFR0			MT_WF_DMA(0x080)
25962306a36Sopenharmony_ci#define MT_DMA_TCFR1			MT_WF_DMA(0x084)
26062306a36Sopenharmony_ci#define MT_DMA_TCFR_TXS_AGGR_TIMEOUT	GENMASK(27, 16)
26162306a36Sopenharmony_ci#define MT_DMA_TCFR_TXS_QUEUE		BIT(14)
26262306a36Sopenharmony_ci#define MT_DMA_TCFR_TXS_AGGR_COUNT	GENMASK(12, 8)
26362306a36Sopenharmony_ci#define MT_DMA_TCFR_TXS_BIT_MAP		GENMASK(6, 0)
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ci#define MT_DMA_TMCFR0			MT_WF_DMA(0x088)
26662306a36Sopenharmony_ci
26762306a36Sopenharmony_ci#define MT_WF_ARB_BASE			0x21400
26862306a36Sopenharmony_ci#define MT_WF_ARB(ofs)			(MT_WF_ARB_BASE + (ofs))
26962306a36Sopenharmony_ci
27062306a36Sopenharmony_ci#define MT_WMM_AIFSN			MT_WF_ARB(0x020)
27162306a36Sopenharmony_ci#define MT_WMM_AIFSN_MASK		GENMASK(3, 0)
27262306a36Sopenharmony_ci#define MT_WMM_AIFSN_SHIFT(_n)		((_n) * 4)
27362306a36Sopenharmony_ci
27462306a36Sopenharmony_ci#define MT_WMM_CWMAX_BASE		MT_WF_ARB(0x028)
27562306a36Sopenharmony_ci#define MT_WMM_CWMAX(_n)		(MT_WMM_CWMAX_BASE + (((_n) / 2) << 2))
27662306a36Sopenharmony_ci#define MT_WMM_CWMAX_SHIFT(_n)		(((_n) & 1) * 16)
27762306a36Sopenharmony_ci#define MT_WMM_CWMAX_MASK		GENMASK(15, 0)
27862306a36Sopenharmony_ci
27962306a36Sopenharmony_ci#define MT_WMM_CWMIN			MT_WF_ARB(0x040)
28062306a36Sopenharmony_ci#define MT_WMM_CWMIN_MASK		GENMASK(7, 0)
28162306a36Sopenharmony_ci#define MT_WMM_CWMIN_SHIFT(_n)		((_n) * 8)
28262306a36Sopenharmony_ci
28362306a36Sopenharmony_ci#define MT_WF_ARB_RQCR			MT_WF_ARB(0x070)
28462306a36Sopenharmony_ci#define MT_WF_ARB_RQCR_RX_START		BIT(0)
28562306a36Sopenharmony_ci#define MT_WF_ARB_RQCR_RXV_START	BIT(4)
28662306a36Sopenharmony_ci#define MT_WF_ARB_RQCR_RXV_R_EN		BIT(7)
28762306a36Sopenharmony_ci#define MT_WF_ARB_RQCR_RXV_T_EN		BIT(8)
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci#define MT_ARB_SCR			MT_WF_ARB(0x080)
29062306a36Sopenharmony_ci#define MT_ARB_SCR_BCNQ_OPMODE_MASK	GENMASK(1, 0)
29162306a36Sopenharmony_ci#define MT_ARB_SCR_BCNQ_OPMODE_SHIFT(n)	((n) * 2)
29262306a36Sopenharmony_ci#define MT_ARB_SCR_TX_DISABLE		BIT(8)
29362306a36Sopenharmony_ci#define MT_ARB_SCR_RX_DISABLE		BIT(9)
29462306a36Sopenharmony_ci#define MT_ARB_SCR_BCNQ_EMPTY_SKIP	BIT(28)
29562306a36Sopenharmony_ci#define MT_ARB_SCR_TTTT_BTIM_PRIO	BIT(29)
29662306a36Sopenharmony_ci#define MT_ARB_SCR_TBTT_BCN_PRIO	BIT(30)
29762306a36Sopenharmony_ci#define MT_ARB_SCR_TBTT_BCAST_PRIO	BIT(31)
29862306a36Sopenharmony_ci
29962306a36Sopenharmony_cienum {
30062306a36Sopenharmony_ci	MT_BCNQ_OPMODE_STA =	0,
30162306a36Sopenharmony_ci	MT_BCNQ_OPMODE_AP =	1,
30262306a36Sopenharmony_ci	MT_BCNQ_OPMODE_ADHOC =	2,
30362306a36Sopenharmony_ci};
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_ci#define MT_WF_ARB_TX_START_0		MT_WF_ARB(0x100)
30662306a36Sopenharmony_ci#define MT_WF_ARB_TX_START_1		MT_WF_ARB(0x104)
30762306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_0		MT_WF_ARB(0x108)
30862306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_1		MT_WF_ARB(0x10c)
30962306a36Sopenharmony_ci#define MT_WF_ARB_TX_STOP_0		MT_WF_ARB(0x110)
31062306a36Sopenharmony_ci#define MT_WF_ARB_TX_STOP_1		MT_WF_ARB(0x114)
31162306a36Sopenharmony_ci
31262306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_AC0		BIT(0)
31362306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_AC1		BIT(5)
31462306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_AC2		BIT(10)
31562306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_AC3		BIT(16)
31662306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_AC4		BIT(21)
31762306a36Sopenharmony_ci#define MT_WF_ARB_TX_FLUSH_AC5		BIT(26)
31862306a36Sopenharmony_ci
31962306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START		MT_WF_ARB(0x118)
32062306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_BSSn(n)	BIT(0 + (n))
32162306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_T_PRE_TTTT	BIT(10)
32262306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_T_TTTT	BIT(11)
32362306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_T_PRE_TBTT	BIT(12)
32462306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_T_TBTT	BIT(13)
32562306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_T_SLOT_IDLE	BIT(14)
32662306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_T_TX_START	BIT(15)
32762306a36Sopenharmony_ci#define MT_WF_ARB_BCN_START_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
32862306a36Sopenharmony_ci
32962306a36Sopenharmony_ci#define MT_WF_ARB_BCN_FLUSH		MT_WF_ARB(0x11c)
33062306a36Sopenharmony_ci#define MT_WF_ARB_BCN_FLUSH_BSSn(n)	BIT(0 + (n))
33162306a36Sopenharmony_ci#define MT_WF_ARB_BCN_FLUSH_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
33262306a36Sopenharmony_ci
33362306a36Sopenharmony_ci#define MT_WF_ARB_CAB_START		MT_WF_ARB(0x120)
33462306a36Sopenharmony_ci#define MT_WF_ARB_CAB_START_BSSn(n)	BIT(0 + (n))
33562306a36Sopenharmony_ci#define MT_WF_ARB_CAB_START_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
33662306a36Sopenharmony_ci
33762306a36Sopenharmony_ci#define MT_WF_ARB_CAB_FLUSH		MT_WF_ARB(0x124)
33862306a36Sopenharmony_ci#define MT_WF_ARB_CAB_FLUSH_BSSn(n)	BIT(0 + (n))
33962306a36Sopenharmony_ci#define MT_WF_ARB_CAB_FLUSH_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
34062306a36Sopenharmony_ci
34162306a36Sopenharmony_ci#define MT_WF_ARB_CAB_COUNT(n)		MT_WF_ARB(0x128 + (n) * 4)
34262306a36Sopenharmony_ci#define MT_WF_ARB_CAB_COUNT_SHIFT	4
34362306a36Sopenharmony_ci#define MT_WF_ARB_CAB_COUNT_MASK	GENMASK(3, 0)
34462306a36Sopenharmony_ci#define MT_WF_ARB_CAB_COUNT_B0_REG(n)	MT_WF_ARB_CAB_COUNT(((n) > 12 ? 2 : \
34562306a36Sopenharmony_ci							     ((n) > 4 ? 1 : 0)))
34662306a36Sopenharmony_ci#define MT_WF_ARB_CAB_COUNT_B0_SHIFT(n)	(((n) > 12 ? (n) - 12 : \
34762306a36Sopenharmony_ci					 ((n) > 4 ? (n) - 4 : \
34862306a36Sopenharmony_ci					  (n) ? (n) + 3 : 0)) * 4)
34962306a36Sopenharmony_ci
35062306a36Sopenharmony_ci#define MT_TX_ABORT			MT_WF_ARB(0x134)
35162306a36Sopenharmony_ci#define MT_TX_ABORT_EN			BIT(0)
35262306a36Sopenharmony_ci#define MT_TX_ABORT_WCID		GENMASK(15, 8)
35362306a36Sopenharmony_ci
35462306a36Sopenharmony_ci#define MT_WF_TMAC_BASE			0x21600
35562306a36Sopenharmony_ci#define MT_WF_TMAC(ofs)			(MT_WF_TMAC_BASE + (ofs))
35662306a36Sopenharmony_ci
35762306a36Sopenharmony_ci#define MT_TMAC_TCR			MT_WF_TMAC(0x000)
35862306a36Sopenharmony_ci#define MT_TMAC_TCR_BLINK_SEL		GENMASK(7, 6)
35962306a36Sopenharmony_ci#define MT_TMAC_TCR_PRE_RTS_GUARD	GENMASK(11, 8)
36062306a36Sopenharmony_ci#define MT_TMAC_TCR_PRE_RTS_SEC_IDLE	GENMASK(13, 12)
36162306a36Sopenharmony_ci#define MT_TMAC_TCR_RTS_SIGTA		BIT(14)
36262306a36Sopenharmony_ci#define MT_TMAC_TCR_LDPC_OFS		BIT(15)
36362306a36Sopenharmony_ci#define MT_TMAC_TCR_TX_STREAMS		GENMASK(17, 16)
36462306a36Sopenharmony_ci#define MT_TMAC_TCR_SCH_IDLE_SEL	GENMASK(19, 18)
36562306a36Sopenharmony_ci#define MT_TMAC_TCR_SCH_DET_PER_IOD	BIT(20)
36662306a36Sopenharmony_ci#define MT_TMAC_TCR_DCH_DET_DISABLE	BIT(21)
36762306a36Sopenharmony_ci#define MT_TMAC_TCR_TX_RIFS		BIT(22)
36862306a36Sopenharmony_ci#define MT_TMAC_TCR_RX_RIFS_MODE	BIT(23)
36962306a36Sopenharmony_ci#define MT_TMAC_TCR_TXOP_TBTT_CTL	BIT(24)
37062306a36Sopenharmony_ci#define MT_TMAC_TCR_TBTT_TX_STOP_CTL	BIT(25)
37162306a36Sopenharmony_ci#define MT_TMAC_TCR_TXOP_BURST_STOP	BIT(26)
37262306a36Sopenharmony_ci#define MT_TMAC_TCR_RDG_RA_MODE		BIT(27)
37362306a36Sopenharmony_ci#define MT_TMAC_TCR_RDG_RESP		BIT(29)
37462306a36Sopenharmony_ci#define MT_TMAC_TCR_RDG_NO_PENDING	BIT(30)
37562306a36Sopenharmony_ci#define MT_TMAC_TCR_SMOOTHING		BIT(31)
37662306a36Sopenharmony_ci
37762306a36Sopenharmony_ci#define MT_WMM_TXOP_BASE		MT_WF_TMAC(0x010)
37862306a36Sopenharmony_ci#define MT_WMM_TXOP(_n)			(MT_WMM_TXOP_BASE + \
37962306a36Sopenharmony_ci					 ((((_n) / 2) ^ 0x1) << 2))
38062306a36Sopenharmony_ci#define MT_WMM_TXOP_SHIFT(_n)		(((_n) & 1) * 16)
38162306a36Sopenharmony_ci#define MT_WMM_TXOP_MASK		GENMASK(15, 0)
38262306a36Sopenharmony_ci
38362306a36Sopenharmony_ci#define MT_TIMEOUT_CCK			MT_WF_TMAC(0x090)
38462306a36Sopenharmony_ci#define MT_TIMEOUT_OFDM			MT_WF_TMAC(0x094)
38562306a36Sopenharmony_ci#define MT_TIMEOUT_VAL_PLCP		GENMASK(15, 0)
38662306a36Sopenharmony_ci#define MT_TIMEOUT_VAL_CCA		GENMASK(31, 16)
38762306a36Sopenharmony_ci
38862306a36Sopenharmony_ci#define MT_TXREQ			MT_WF_TMAC(0x09c)
38962306a36Sopenharmony_ci#define MT_TXREQ_CCA_SRC_SEL		GENMASK(31, 30)
39062306a36Sopenharmony_ci
39162306a36Sopenharmony_ci#define MT_RXREQ			MT_WF_TMAC(0x0a0)
39262306a36Sopenharmony_ci#define MT_RXREQ_DELAY			GENMASK(8, 0)
39362306a36Sopenharmony_ci
39462306a36Sopenharmony_ci#define MT_IFS				MT_WF_TMAC(0x0a4)
39562306a36Sopenharmony_ci#define MT_IFS_EIFS			GENMASK(8, 0)
39662306a36Sopenharmony_ci#define MT_IFS_RIFS			GENMASK(14, 10)
39762306a36Sopenharmony_ci#define MT_IFS_SIFS			GENMASK(22, 16)
39862306a36Sopenharmony_ci#define MT_IFS_SLOT			GENMASK(30, 24)
39962306a36Sopenharmony_ci
40062306a36Sopenharmony_ci#define MT_TMAC_PCR			MT_WF_TMAC(0x0b4)
40162306a36Sopenharmony_ci#define MT_TMAC_PCR_RATE		GENMASK(8, 0)
40262306a36Sopenharmony_ci#define MT_TMAC_PCR_RATE_FIXED		BIT(15)
40362306a36Sopenharmony_ci#define MT_TMAC_PCR_ANT_ID		GENMASK(21, 16)
40462306a36Sopenharmony_ci#define MT_TMAC_PCR_ANT_ID_SEL		BIT(22)
40562306a36Sopenharmony_ci#define MT_TMAC_PCR_SPE_EN		BIT(23)
40662306a36Sopenharmony_ci#define MT_TMAC_PCR_ANT_PRI		GENMASK(26, 24)
40762306a36Sopenharmony_ci#define MT_TMAC_PCR_ANT_PRI_SEL		GENMASK(27)
40862306a36Sopenharmony_ci
40962306a36Sopenharmony_ci#define MT_WF_RMAC_BASE			0x21800
41062306a36Sopenharmony_ci#define MT_WF_RMAC(ofs)			(MT_WF_RMAC_BASE + (ofs))
41162306a36Sopenharmony_ci
41262306a36Sopenharmony_ci#define MT_WF_RFCR			MT_WF_RMAC(0x000)
41362306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_STBC_MULTI	BIT(0)
41462306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_FCSFAIL		BIT(1)
41562306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_VERSION		BIT(3)
41662306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_PROBEREQ	BIT(4)
41762306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_MCAST		BIT(5)
41862306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_BCAST		BIT(6)
41962306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_MCAST_FILTERED	BIT(7)
42062306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_A3_MAC		BIT(8)
42162306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_A3_BSSID	BIT(9)
42262306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_A2_BSSID	BIT(10)
42362306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_OTHER_BEACON	BIT(11)
42462306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_FRAME_REPORT	BIT(12)
42562306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_CTL_RSV		BIT(13)
42662306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_CTS		BIT(14)
42762306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_RTS		BIT(15)
42862306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_DUPLICATE	BIT(16)
42962306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_OTHER_BSS	BIT(17)
43062306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_OTHER_UC	BIT(18)
43162306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_OTHER_TIM	BIT(19)
43262306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_NDPA		BIT(20)
43362306a36Sopenharmony_ci#define MT_WF_RFCR_DROP_UNWANTED_CTL	BIT(21)
43462306a36Sopenharmony_ci
43562306a36Sopenharmony_ci#define MT_BSSID0(idx)			MT_WF_RMAC(0x004 + (idx) * 8)
43662306a36Sopenharmony_ci#define MT_BSSID1(idx)			MT_WF_RMAC(0x008 + (idx) * 8)
43762306a36Sopenharmony_ci#define MT_BSSID1_VALID			BIT(16)
43862306a36Sopenharmony_ci
43962306a36Sopenharmony_ci#define MT_MAC_ADDR0(idx)		MT_WF_RMAC(0x024 + (idx) * 8)
44062306a36Sopenharmony_ci#define MT_MAC_ADDR1(idx)		MT_WF_RMAC(0x028 + (idx) * 8)
44162306a36Sopenharmony_ci#define MT_MAC_ADDR1_ADDR		GENMASK(15, 0)
44262306a36Sopenharmony_ci#define MT_MAC_ADDR1_VALID		BIT(16)
44362306a36Sopenharmony_ci
44462306a36Sopenharmony_ci#define MT_BA_CONTROL_0			MT_WF_RMAC(0x068)
44562306a36Sopenharmony_ci#define MT_BA_CONTROL_1			MT_WF_RMAC(0x06c)
44662306a36Sopenharmony_ci#define MT_BA_CONTROL_1_ADDR		GENMASK(15, 0)
44762306a36Sopenharmony_ci#define MT_BA_CONTROL_1_TID		GENMASK(19, 16)
44862306a36Sopenharmony_ci#define MT_BA_CONTROL_1_IGNORE_TID	BIT(20)
44962306a36Sopenharmony_ci#define MT_BA_CONTROL_1_IGNORE_ALL	BIT(21)
45062306a36Sopenharmony_ci#define MT_BA_CONTROL_1_RESET		BIT(22)
45162306a36Sopenharmony_ci
45262306a36Sopenharmony_ci#define MT_WF_RMACDR			MT_WF_RMAC(0x078)
45362306a36Sopenharmony_ci#define MT_WF_RMACDR_TSF_PROBERSP_DIS	BIT(0)
45462306a36Sopenharmony_ci#define MT_WF_RMACDR_TSF_TIM		BIT(4)
45562306a36Sopenharmony_ci#define MT_WF_RMACDR_MBSSID_MASK	GENMASK(25, 24)
45662306a36Sopenharmony_ci#define MT_WF_RMACDR_CHECK_HTC_BY_RATE	BIT(26)
45762306a36Sopenharmony_ci#define MT_WF_RMACDR_MAXLEN_20BIT	BIT(30)
45862306a36Sopenharmony_ci
45962306a36Sopenharmony_ci#define MT_WF_RMAC_RMCR			MT_WF_RMAC(0x080)
46062306a36Sopenharmony_ci#define MT_WF_RMAC_RMCR_SMPS_MODE	GENMASK(21, 20)
46162306a36Sopenharmony_ci#define MT_WF_RMAC_RMCR_RX_STREAMS	GENMASK(24, 22)
46262306a36Sopenharmony_ci#define MT_WF_RMAC_RMCR_SMPS_RTS	BIT(25)
46362306a36Sopenharmony_ci
46462306a36Sopenharmony_ci#define MT_WF_RMAC_CH_FREQ		MT_WF_RMAC(0x090)
46562306a36Sopenharmony_ci#define MT_WF_RMAC_MAXMINLEN		MT_WF_RMAC(0x098)
46662306a36Sopenharmony_ci#define MT_WF_RFCR1			MT_WF_RMAC(0x0a4)
46762306a36Sopenharmony_ci#define MT_WF_RMAC_TMR_PA		MT_WF_RMAC(0x0e0)
46862306a36Sopenharmony_ci
46962306a36Sopenharmony_ci#define MT_WF_SEC_BASE			0x21a00
47062306a36Sopenharmony_ci#define MT_WF_SEC(ofs)			(MT_WF_SEC_BASE + (ofs))
47162306a36Sopenharmony_ci
47262306a36Sopenharmony_ci#define MT_WF_CFG_OFF_BASE		0x21e00
47362306a36Sopenharmony_ci#define MT_WF_CFG_OFF(ofs)		(MT_WF_CFG_OFF_BASE + (ofs))
47462306a36Sopenharmony_ci#define MT_WF_CFG_OFF_WOCCR		MT_WF_CFG_OFF(0x004)
47562306a36Sopenharmony_ci#define MT_WF_CFG_OFF_WOCCR_TMAC_GC_DIS	BIT(4)
47662306a36Sopenharmony_ci
47762306a36Sopenharmony_ci#define MT_SEC_SCR			MT_WF_SEC(0x004)
47862306a36Sopenharmony_ci#define MT_SEC_SCR_MASK_ORDER		GENMASK(1, 0)
47962306a36Sopenharmony_ci
48062306a36Sopenharmony_ci#define MT_WTBL_OFF_BASE		0x23000
48162306a36Sopenharmony_ci#define MT_WTBL_OFF(n)			(MT_WTBL_OFF_BASE + (n))
48262306a36Sopenharmony_ci
48362306a36Sopenharmony_ci#define MT_WTBL_UPDATE			MT_WTBL_OFF(0x000)
48462306a36Sopenharmony_ci#define MT_WTBL_UPDATE_WLAN_IDX		GENMASK(7, 0)
48562306a36Sopenharmony_ci#define MT_WTBL_UPDATE_WTBL2		BIT(11)
48662306a36Sopenharmony_ci#define MT_WTBL_UPDATE_ADM_COUNT_CLEAR	BIT(12)
48762306a36Sopenharmony_ci#define MT_WTBL_UPDATE_RATE_UPDATE	BIT(13)
48862306a36Sopenharmony_ci#define MT_WTBL_UPDATE_TX_COUNT_CLEAR	BIT(14)
48962306a36Sopenharmony_ci#define MT_WTBL_UPDATE_RX_COUNT_CLEAR	BIT(15)
49062306a36Sopenharmony_ci#define MT_WTBL_UPDATE_BUSY		BIT(16)
49162306a36Sopenharmony_ci
49262306a36Sopenharmony_ci#define MT_WTBL_RMVTCR			MT_WTBL_OFF(0x008)
49362306a36Sopenharmony_ci#define MT_WTBL_RMVTCR_RX_MV_MODE	BIT(23)
49462306a36Sopenharmony_ci
49562306a36Sopenharmony_ci#define MT_LPON_BASE			0x24000
49662306a36Sopenharmony_ci#define MT_LPON(n)			(MT_LPON_BASE + (n))
49762306a36Sopenharmony_ci
49862306a36Sopenharmony_ci#define MT_LPON_T0CR			MT_LPON(0x010)
49962306a36Sopenharmony_ci#define MT_LPON_T0CR_MODE		GENMASK(1, 0)
50062306a36Sopenharmony_ci
50162306a36Sopenharmony_ci#define MT_LPON_UTTR0			MT_LPON(0x018)
50262306a36Sopenharmony_ci#define MT_LPON_UTTR1			MT_LPON(0x01c)
50362306a36Sopenharmony_ci
50462306a36Sopenharmony_ci#define MT_LPON_BTEIR			MT_LPON(0x020)
50562306a36Sopenharmony_ci#define MT_LPON_BTEIR_MBSS_MODE		GENMASK(31, 29)
50662306a36Sopenharmony_ci
50762306a36Sopenharmony_ci#define MT_PRE_TBTT			MT_LPON(0x030)
50862306a36Sopenharmony_ci#define MT_PRE_TBTT_MASK		GENMASK(7, 0)
50962306a36Sopenharmony_ci#define MT_PRE_TBTT_SHIFT		8
51062306a36Sopenharmony_ci
51162306a36Sopenharmony_ci#define MT_TBTT				MT_LPON(0x034)
51262306a36Sopenharmony_ci#define MT_TBTT_PERIOD			GENMASK(15, 0)
51362306a36Sopenharmony_ci#define MT_TBTT_DTIM_PERIOD		GENMASK(23, 16)
51462306a36Sopenharmony_ci#define MT_TBTT_TBTT_WAKE_PERIOD	GENMASK(27, 24)
51562306a36Sopenharmony_ci#define MT_TBTT_DTIM_WAKE_PERIOD	GENMASK(30, 28)
51662306a36Sopenharmony_ci#define MT_TBTT_CAL_ENABLE		BIT(31)
51762306a36Sopenharmony_ci
51862306a36Sopenharmony_ci#define MT_TBTT_TIMER_CFG		MT_LPON(0x05c)
51962306a36Sopenharmony_ci
52062306a36Sopenharmony_ci#define MT_LPON_SBTOR(n)		MT_LPON(0x0a0)
52162306a36Sopenharmony_ci#define MT_LPON_SBTOR_SUB_BSS_EN	BIT(29)
52262306a36Sopenharmony_ci#define MT_LPON_SBTOR_TIME_OFFSET	GENMASK(19, 0)
52362306a36Sopenharmony_ci
52462306a36Sopenharmony_ci#define MT_INT_WAKEUP_BASE		0x24400
52562306a36Sopenharmony_ci#define MT_INT_WAKEUP(n)		(MT_INT_WAKEUP_BASE + (n))
52662306a36Sopenharmony_ci
52762306a36Sopenharmony_ci#define MT_HW_INT_STATUS(n)		MT_INT_WAKEUP(0x3c + (n) * 8)
52862306a36Sopenharmony_ci#define MT_HW_INT_MASK(n)		MT_INT_WAKEUP(0x40 + (n) * 8)
52962306a36Sopenharmony_ci
53062306a36Sopenharmony_ci#define MT_HW_INT3_TBTT0		BIT(15)
53162306a36Sopenharmony_ci#define MT_HW_INT3_PRE_TBTT0		BIT(31)
53262306a36Sopenharmony_ci
53362306a36Sopenharmony_ci#define MT_WTBL1_BASE			0x28000
53462306a36Sopenharmony_ci
53562306a36Sopenharmony_ci#define MT_WTBL_ON_BASE			(MT_WTBL1_BASE + 0x2000)
53662306a36Sopenharmony_ci#define MT_WTBL_ON(_n)			(MT_WTBL_ON_BASE + (_n))
53762306a36Sopenharmony_ci
53862306a36Sopenharmony_ci#define MT_WTBL_RIUCR0			MT_WTBL_ON(0x200)
53962306a36Sopenharmony_ci
54062306a36Sopenharmony_ci#define MT_WTBL_RIUCR1			MT_WTBL_ON(0x204)
54162306a36Sopenharmony_ci#define MT_WTBL_RIUCR1_RATE0		GENMASK(11, 0)
54262306a36Sopenharmony_ci#define MT_WTBL_RIUCR1_RATE1		GENMASK(23, 12)
54362306a36Sopenharmony_ci#define MT_WTBL_RIUCR1_RATE2_LO		GENMASK(31, 24)
54462306a36Sopenharmony_ci
54562306a36Sopenharmony_ci#define MT_WTBL_RIUCR2			MT_WTBL_ON(0x208)
54662306a36Sopenharmony_ci#define MT_WTBL_RIUCR2_RATE2_HI		GENMASK(3, 0)
54762306a36Sopenharmony_ci#define MT_WTBL_RIUCR2_RATE3		GENMASK(15, 4)
54862306a36Sopenharmony_ci#define MT_WTBL_RIUCR2_RATE4		GENMASK(27, 16)
54962306a36Sopenharmony_ci#define MT_WTBL_RIUCR2_RATE5_LO		GENMASK(31, 28)
55062306a36Sopenharmony_ci
55162306a36Sopenharmony_ci#define MT_WTBL_RIUCR3			MT_WTBL_ON(0x20c)
55262306a36Sopenharmony_ci#define MT_WTBL_RIUCR3_RATE5_HI		GENMASK(7, 0)
55362306a36Sopenharmony_ci#define MT_WTBL_RIUCR3_RATE6		GENMASK(19, 8)
55462306a36Sopenharmony_ci#define MT_WTBL_RIUCR3_RATE7		GENMASK(31, 20)
55562306a36Sopenharmony_ci
55662306a36Sopenharmony_ci#define MT_MIB_BASE			0x2c000
55762306a36Sopenharmony_ci#define MT_MIB(_n)			(MT_MIB_BASE + (_n))
55862306a36Sopenharmony_ci
55962306a36Sopenharmony_ci#define MT_MIB_CTL			MT_MIB(0x00)
56062306a36Sopenharmony_ci#define MT_MIB_CTL_PSCCA_TIME		GENMASK(13, 11)
56162306a36Sopenharmony_ci#define MT_MIB_CTL_CCA_NAV_TX		GENMASK(16, 14)
56262306a36Sopenharmony_ci#define MT_MIB_CTL_ED_TIME		GENMASK(30, 28)
56362306a36Sopenharmony_ci#define MT_MIB_CTL_READ_CLR_DIS		BIT(31)
56462306a36Sopenharmony_ci
56562306a36Sopenharmony_ci#define MT_MIB_STAT(_n)			MT_MIB(0x08 + (_n) * 4)
56662306a36Sopenharmony_ci
56762306a36Sopenharmony_ci#define MT_MIB_STAT_CCA			MT_MIB_STAT(9)
56862306a36Sopenharmony_ci#define MT_MIB_STAT_CCA_MASK		GENMASK(23, 0)
56962306a36Sopenharmony_ci
57062306a36Sopenharmony_ci#define MT_MIB_STAT_PSCCA		MT_MIB_STAT(16)
57162306a36Sopenharmony_ci#define MT_MIB_STAT_PSCCA_MASK		GENMASK(23, 0)
57262306a36Sopenharmony_ci
57362306a36Sopenharmony_ci#define MT_TX_AGG_CNT(n)		MT_MIB(0xa8 + ((n) << 2))
57462306a36Sopenharmony_ci
57562306a36Sopenharmony_ci#define MT_MIB_STAT_ED			MT_MIB_STAT(18)
57662306a36Sopenharmony_ci#define MT_MIB_STAT_ED_MASK		GENMASK(23, 0)
57762306a36Sopenharmony_ci
57862306a36Sopenharmony_ci#define MT_PCIE_REMAP_BASE_1		0x40000
57962306a36Sopenharmony_ci#define MT_PCIE_REMAP_BASE_2		0x80000
58062306a36Sopenharmony_ci
58162306a36Sopenharmony_ci#define MT_TX_HW_QUEUE_MGMT		4
58262306a36Sopenharmony_ci#define MT_TX_HW_QUEUE_MCU		5
58362306a36Sopenharmony_ci#define MT_TX_HW_QUEUE_BCN		7
58462306a36Sopenharmony_ci#define MT_TX_HW_QUEUE_BMC		8
58562306a36Sopenharmony_ci
58662306a36Sopenharmony_ci#define MT_LED_BASE_PHYS		0x80024000
58762306a36Sopenharmony_ci#define MT_LED_PHYS(_n)			(MT_LED_BASE_PHYS + (_n))
58862306a36Sopenharmony_ci
58962306a36Sopenharmony_ci#define MT_LED_CTRL			MT_LED_PHYS(0x00)
59062306a36Sopenharmony_ci
59162306a36Sopenharmony_ci#define MT_LED_CTRL_REPLAY(_n)		BIT(0 + (8 * (_n)))
59262306a36Sopenharmony_ci#define MT_LED_CTRL_POLARITY(_n)	BIT(1 + (8 * (_n)))
59362306a36Sopenharmony_ci#define MT_LED_CTRL_TX_BLINK_MODE(_n)	BIT(2 + (8 * (_n)))
59462306a36Sopenharmony_ci#define MT_LED_CTRL_TX_MANUAL_BLINK(_n)	BIT(3 + (8 * (_n)))
59562306a36Sopenharmony_ci#define MT_LED_CTRL_TX_OVER_BLINK(_n)	BIT(5 + (8 * (_n)))
59662306a36Sopenharmony_ci#define MT_LED_CTRL_KICK(_n)		BIT(7 + (8 * (_n)))
59762306a36Sopenharmony_ci
59862306a36Sopenharmony_ci#define MT_LED_STATUS_0(_n)		MT_LED_PHYS(0x10 + ((_n) * 8))
59962306a36Sopenharmony_ci#define MT_LED_STATUS_1(_n)		MT_LED_PHYS(0x14 + ((_n) * 8))
60062306a36Sopenharmony_ci#define MT_LED_STATUS_OFF		GENMASK(31, 24)
60162306a36Sopenharmony_ci#define MT_LED_STATUS_ON		GENMASK(23, 16)
60262306a36Sopenharmony_ci#define MT_LED_STATUS_DURATION		GENMASK(15, 0)
60362306a36Sopenharmony_ci
60462306a36Sopenharmony_ci#define MT_CLIENT_BASE_PHYS_ADDR	0x800c0000
60562306a36Sopenharmony_ci
60662306a36Sopenharmony_ci#define MT_CLIENT_TMAC_INFO_TEMPLATE	0x040
60762306a36Sopenharmony_ci
60862306a36Sopenharmony_ci#define MT_CLIENT_STATUS		0x06c
60962306a36Sopenharmony_ci
61062306a36Sopenharmony_ci#define MT_CLIENT_RESET_TX		0x070
61162306a36Sopenharmony_ci#define MT_CLIENT_RESET_TX_R_E_1	BIT(16)
61262306a36Sopenharmony_ci#define MT_CLIENT_RESET_TX_R_E_2	BIT(17)
61362306a36Sopenharmony_ci#define MT_CLIENT_RESET_TX_R_E_1_S	BIT(20)
61462306a36Sopenharmony_ci#define MT_CLIENT_RESET_TX_R_E_2_S	BIT(21)
61562306a36Sopenharmony_ci
61662306a36Sopenharmony_ci#define MT_EFUSE_BASE			0x81070000
61762306a36Sopenharmony_ci
61862306a36Sopenharmony_ci#define MT_EFUSE_BASE_CTRL		0x000
61962306a36Sopenharmony_ci#define MT_EFUSE_BASE_CTRL_EMPTY	BIT(30)
62062306a36Sopenharmony_ci
62162306a36Sopenharmony_ci#define MT_EFUSE_CTRL			0x008
62262306a36Sopenharmony_ci#define MT_EFUSE_CTRL_AOUT		GENMASK(5, 0)
62362306a36Sopenharmony_ci#define MT_EFUSE_CTRL_MODE		GENMASK(7, 6)
62462306a36Sopenharmony_ci#define MT_EFUSE_CTRL_LDO_OFF_TIME	GENMASK(13, 8)
62562306a36Sopenharmony_ci#define MT_EFUSE_CTRL_LDO_ON_TIME	GENMASK(15, 14)
62662306a36Sopenharmony_ci#define MT_EFUSE_CTRL_AIN		GENMASK(25, 16)
62762306a36Sopenharmony_ci#define MT_EFUSE_CTRL_VALID		BIT(29)
62862306a36Sopenharmony_ci#define MT_EFUSE_CTRL_KICK		BIT(30)
62962306a36Sopenharmony_ci#define MT_EFUSE_CTRL_SEL		BIT(31)
63062306a36Sopenharmony_ci
63162306a36Sopenharmony_ci#define MT_EFUSE_WDATA(_i)		(0x010 + ((_i) * 4))
63262306a36Sopenharmony_ci#define MT_EFUSE_RDATA(_i)		(0x030 + ((_i) * 4))
63362306a36Sopenharmony_ci
63462306a36Sopenharmony_ci#define MT_CLIENT_RXINF			0x068
63562306a36Sopenharmony_ci#define MT_CLIENT_RXINF_RXSH_GROUPS	GENMASK(2, 0)
63662306a36Sopenharmony_ci
63762306a36Sopenharmony_ci#define MT_PSE_BASE_PHYS_ADDR		0xa0000000
63862306a36Sopenharmony_ci
63962306a36Sopenharmony_ci#define MT_PSE_WTBL_2_PHYS_ADDR		0xa5000000
64062306a36Sopenharmony_ci
64162306a36Sopenharmony_ci#define MT_WTBL1_SIZE			(8 * 4)
64262306a36Sopenharmony_ci#define MT_WTBL2_SIZE			(16 * 4)
64362306a36Sopenharmony_ci#define MT_WTBL3_OFFSET			(MT7603_WTBL_SIZE * MT_WTBL2_SIZE)
64462306a36Sopenharmony_ci#define MT_WTBL3_SIZE			(16 * 4)
64562306a36Sopenharmony_ci#define MT_WTBL4_OFFSET			(MT7603_WTBL_SIZE * MT_WTBL3_SIZE + \
64662306a36Sopenharmony_ci					 MT_WTBL3_OFFSET)
64762306a36Sopenharmony_ci#define MT_WTBL4_SIZE			(8 * 4)
64862306a36Sopenharmony_ci
64962306a36Sopenharmony_ci#define MT_WTBL1_W0_ADDR_HI		GENMASK(15, 0)
65062306a36Sopenharmony_ci#define MT_WTBL1_W0_MUAR_IDX		GENMASK(21, 16)
65162306a36Sopenharmony_ci#define MT_WTBL1_W0_RX_CHECK_A1		BIT(22)
65262306a36Sopenharmony_ci#define MT_WTBL1_W0_KEY_IDX		GENMASK(24, 23)
65362306a36Sopenharmony_ci#define MT_WTBL1_W0_RX_CHECK_KEY_IDX	BIT(25)
65462306a36Sopenharmony_ci#define MT_WTBL1_W0_RX_KEY_VALID	BIT(26)
65562306a36Sopenharmony_ci#define MT_WTBL1_W0_RX_IK_VALID		BIT(27)
65662306a36Sopenharmony_ci#define MT_WTBL1_W0_RX_VALID		BIT(28)
65762306a36Sopenharmony_ci#define MT_WTBL1_W0_RX_CHECK_A2		BIT(29)
65862306a36Sopenharmony_ci#define MT_WTBL1_W0_RX_DATA_VALID	BIT(30)
65962306a36Sopenharmony_ci#define MT_WTBL1_W0_WRITE_BURST		BIT(31)
66062306a36Sopenharmony_ci
66162306a36Sopenharmony_ci#define MT_WTBL1_W1_ADDR_LO		GENMASK(31, 0)
66262306a36Sopenharmony_ci
66362306a36Sopenharmony_ci#define MT_WTBL1_W2_MPDU_DENSITY	GENMASK(2, 0)
66462306a36Sopenharmony_ci#define MT_WTBL1_W2_KEY_TYPE		GENMASK(6, 3)
66562306a36Sopenharmony_ci#define MT_WTBL1_W2_EVEN_PN		BIT(7)
66662306a36Sopenharmony_ci#define MT_WTBL1_W2_TO_DS		BIT(8)
66762306a36Sopenharmony_ci#define MT_WTBL1_W2_FROM_DS		BIT(9)
66862306a36Sopenharmony_ci#define MT_WTBL1_W2_HEADER_TRANS	BIT(10)
66962306a36Sopenharmony_ci#define MT_WTBL1_W2_AMPDU_FACTOR	GENMASK(13, 11)
67062306a36Sopenharmony_ci#define MT_WTBL1_W2_PWR_MGMT		BIT(14)
67162306a36Sopenharmony_ci#define MT_WTBL1_W2_RDG			BIT(15)
67262306a36Sopenharmony_ci#define MT_WTBL1_W2_RTS			BIT(16)
67362306a36Sopenharmony_ci#define MT_WTBL1_W2_CFACK		BIT(17)
67462306a36Sopenharmony_ci#define MT_WTBL1_W2_RDG_BA		BIT(18)
67562306a36Sopenharmony_ci#define MT_WTBL1_W2_SMPS		BIT(19)
67662306a36Sopenharmony_ci#define MT_WTBL1_W2_TXS_BAF_REPORT	BIT(20)
67762306a36Sopenharmony_ci#define MT_WTBL1_W2_DYN_BW		BIT(21)
67862306a36Sopenharmony_ci#define MT_WTBL1_W2_LDPC		BIT(22)
67962306a36Sopenharmony_ci#define MT_WTBL1_W2_ITXBF		BIT(23)
68062306a36Sopenharmony_ci#define MT_WTBL1_W2_ETXBF		BIT(24)
68162306a36Sopenharmony_ci#define MT_WTBL1_W2_TXOP_PS		BIT(25)
68262306a36Sopenharmony_ci#define MT_WTBL1_W2_MESH		BIT(26)
68362306a36Sopenharmony_ci#define MT_WTBL1_W2_QOS			BIT(27)
68462306a36Sopenharmony_ci#define MT_WTBL1_W2_HT			BIT(28)
68562306a36Sopenharmony_ci#define MT_WTBL1_W2_VHT			BIT(29)
68662306a36Sopenharmony_ci#define MT_WTBL1_W2_ADMISSION_CONTROL	BIT(30)
68762306a36Sopenharmony_ci#define MT_WTBL1_W2_GROUP_ID		BIT(31)
68862306a36Sopenharmony_ci
68962306a36Sopenharmony_ci#define MT_WTBL1_W3_WTBL2_FRAME_ID	GENMASK(10, 0)
69062306a36Sopenharmony_ci#define MT_WTBL1_W3_WTBL2_ENTRY_ID	GENMASK(15, 11)
69162306a36Sopenharmony_ci#define MT_WTBL1_W3_WTBL4_FRAME_ID	GENMASK(26, 16)
69262306a36Sopenharmony_ci#define MT_WTBL1_W3_CHECK_PER		BIT(27)
69362306a36Sopenharmony_ci#define MT_WTBL1_W3_KEEP_I_PSM		BIT(28)
69462306a36Sopenharmony_ci#define MT_WTBL1_W3_I_PSM		BIT(29)
69562306a36Sopenharmony_ci#define MT_WTBL1_W3_POWER_SAVE		BIT(30)
69662306a36Sopenharmony_ci#define MT_WTBL1_W3_SKIP_TX		BIT(31)
69762306a36Sopenharmony_ci
69862306a36Sopenharmony_ci#define MT_WTBL1_W4_WTBL3_FRAME_ID	GENMASK(10, 0)
69962306a36Sopenharmony_ci#define MT_WTBL1_W4_WTBL3_ENTRY_ID	GENMASK(16, 11)
70062306a36Sopenharmony_ci#define MT_WTBL1_W4_WTBL4_ENTRY_ID	GENMASK(22, 17)
70162306a36Sopenharmony_ci#define MT_WTBL1_W4_PARTIAL_AID		GENMASK(31, 23)
70262306a36Sopenharmony_ci
70362306a36Sopenharmony_ci#define MT_WTBL2_W0_PN_LO		GENMASK(31, 0)
70462306a36Sopenharmony_ci
70562306a36Sopenharmony_ci#define MT_WTBL2_W1_PN_HI		GENMASK(15, 0)
70662306a36Sopenharmony_ci#define MT_WTBL2_W1_NON_QOS_SEQNO	GENMASK(27, 16)
70762306a36Sopenharmony_ci
70862306a36Sopenharmony_ci#define MT_WTBL2_W2_TID0_SN		GENMASK(11, 0)
70962306a36Sopenharmony_ci#define MT_WTBL2_W2_TID1_SN		GENMASK(23, 12)
71062306a36Sopenharmony_ci#define MT_WTBL2_W2_TID2_SN_LO		GENMASK(31, 24)
71162306a36Sopenharmony_ci
71262306a36Sopenharmony_ci#define MT_WTBL2_W3_TID2_SN_HI		GENMASK(3, 0)
71362306a36Sopenharmony_ci#define MT_WTBL2_W3_TID3_SN		GENMASK(15, 4)
71462306a36Sopenharmony_ci#define MT_WTBL2_W3_TID4_SN		GENMASK(27, 16)
71562306a36Sopenharmony_ci#define MT_WTBL2_W3_TID5_SN_LO		GENMASK(31, 28)
71662306a36Sopenharmony_ci
71762306a36Sopenharmony_ci#define MT_WTBL2_W4_TID5_SN_HI		GENMASK(7, 0)
71862306a36Sopenharmony_ci#define MT_WTBL2_W4_TID6_SN		GENMASK(19, 8)
71962306a36Sopenharmony_ci#define MT_WTBL2_W4_TID7_SN		GENMASK(31, 20)
72062306a36Sopenharmony_ci
72162306a36Sopenharmony_ci#define MT_WTBL2_W5_TX_COUNT_RATE1	GENMASK(15, 0)
72262306a36Sopenharmony_ci#define MT_WTBL2_W5_FAIL_COUNT_RATE1	GENAMSK(31, 16)
72362306a36Sopenharmony_ci
72462306a36Sopenharmony_ci#define MT_WTBL2_W6_TX_COUNT_RATE2	GENMASK(7, 0)
72562306a36Sopenharmony_ci#define MT_WTBL2_W6_TX_COUNT_RATE3	GENMASK(15, 8)
72662306a36Sopenharmony_ci#define MT_WTBL2_W6_TX_COUNT_RATE4	GENMASK(23, 16)
72762306a36Sopenharmony_ci#define MT_WTBL2_W6_TX_COUNT_RATE5	GENMASK(31, 24)
72862306a36Sopenharmony_ci
72962306a36Sopenharmony_ci#define MT_WTBL2_W7_TX_COUNT_CUR_BW	GENMASK(15, 0)
73062306a36Sopenharmony_ci#define MT_WTBL2_W7_FAIL_COUNT_CUR_BW	GENMASK(31, 16)
73162306a36Sopenharmony_ci
73262306a36Sopenharmony_ci#define MT_WTBL2_W8_TX_COUNT_OTHER_BW	GENMASK(15, 0)
73362306a36Sopenharmony_ci#define MT_WTBL2_W8_FAIL_COUNT_OTHER_BW	GENMASK(31, 16)
73462306a36Sopenharmony_ci
73562306a36Sopenharmony_ci#define MT_WTBL2_W9_POWER_OFFSET	GENMASK(4, 0)
73662306a36Sopenharmony_ci#define MT_WTBL2_W9_SPATIAL_EXT		BIT(5)
73762306a36Sopenharmony_ci#define MT_WTBL2_W9_ANT_PRIORITY	GENMASK(8, 6)
73862306a36Sopenharmony_ci#define MT_WTBL2_W9_CC_BW_SEL		GENMASK(10, 9)
73962306a36Sopenharmony_ci#define MT_WTBL2_W9_CHANGE_BW_RATE	GENMASK(13, 11)
74062306a36Sopenharmony_ci#define MT_WTBL2_W9_BW_CAP		GENMASK(15, 14)
74162306a36Sopenharmony_ci#define MT_WTBL2_W9_SHORT_GI_20		BIT(16)
74262306a36Sopenharmony_ci#define MT_WTBL2_W9_SHORT_GI_40		BIT(17)
74362306a36Sopenharmony_ci#define MT_WTBL2_W9_SHORT_GI_80		BIT(18)
74462306a36Sopenharmony_ci#define MT_WTBL2_W9_SHORT_GI_160	BIT(19)
74562306a36Sopenharmony_ci#define MT_WTBL2_W9_MPDU_FAIL_COUNT	GENMASK(25, 23)
74662306a36Sopenharmony_ci#define MT_WTBL2_W9_MPDU_OK_COUNT	GENMASK(28, 26)
74762306a36Sopenharmony_ci#define MT_WTBL2_W9_RATE_IDX		GENMASK(31, 29)
74862306a36Sopenharmony_ci
74962306a36Sopenharmony_ci#define MT_WTBL2_W10_RATE1		GENMASK(11, 0)
75062306a36Sopenharmony_ci#define MT_WTBL2_W10_RATE2		GENMASK(23, 12)
75162306a36Sopenharmony_ci#define MT_WTBL2_W10_RATE3_LO		GENMASK(31, 24)
75262306a36Sopenharmony_ci
75362306a36Sopenharmony_ci#define MT_WTBL2_W11_RATE3_HI		GENMASK(3, 0)
75462306a36Sopenharmony_ci#define MT_WTBL2_W11_RATE4		GENMASK(15, 4)
75562306a36Sopenharmony_ci#define MT_WTBL2_W11_RATE5		GENMASK(27, 16)
75662306a36Sopenharmony_ci#define MT_WTBL2_W11_RATE6_LO		GENMASK(31, 28)
75762306a36Sopenharmony_ci
75862306a36Sopenharmony_ci#define MT_WTBL2_W12_RATE6_HI		GENMASK(7, 0)
75962306a36Sopenharmony_ci#define MT_WTBL2_W12_RATE7		GENMASK(19, 8)
76062306a36Sopenharmony_ci#define MT_WTBL2_W12_RATE8		GENMASK(31, 20)
76162306a36Sopenharmony_ci
76262306a36Sopenharmony_ci#define MT_WTBL2_W13_AVG_RCPI0		GENMASK(7, 0)
76362306a36Sopenharmony_ci#define MT_WTBL2_W13_AVG_RCPI1		GENMASK(15, 8)
76462306a36Sopenharmony_ci#define MT_WTBL2_W13_AVG_RCPI2		GENAMSK(23, 16)
76562306a36Sopenharmony_ci
76662306a36Sopenharmony_ci#define MT_WTBL2_W14_CC_NOISE_1S	GENMASK(6, 0)
76762306a36Sopenharmony_ci#define MT_WTBL2_W14_CC_NOISE_2S	GENMASK(13, 7)
76862306a36Sopenharmony_ci#define MT_WTBL2_W14_CC_NOISE_3S	GENMASK(20, 14)
76962306a36Sopenharmony_ci#define MT_WTBL2_W14_CHAN_EST_RMS	GENMASK(24, 21)
77062306a36Sopenharmony_ci#define MT_WTBL2_W14_CC_NOISE_SEL	BIT(15)
77162306a36Sopenharmony_ci#define MT_WTBL2_W14_ANT_SEL		GENMASK(31, 26)
77262306a36Sopenharmony_ci
77362306a36Sopenharmony_ci#define MT_WTBL2_W15_BA_WIN_SIZE	GENMASK(2, 0)
77462306a36Sopenharmony_ci#define MT_WTBL2_W15_BA_WIN_SIZE_SHIFT	3
77562306a36Sopenharmony_ci#define MT_WTBL2_W15_BA_EN_TIDS		GENMASK(31, 24)
77662306a36Sopenharmony_ci
77762306a36Sopenharmony_ci#define MT_WTBL1_OR			(MT_WTBL1_BASE + 0x2300)
77862306a36Sopenharmony_ci#define MT_WTBL1_OR_PSM_WRITE		BIT(31)
77962306a36Sopenharmony_ci
78062306a36Sopenharmony_ci#endif
781