18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* Copyright(c) 2009-2010  Realtek Corporation.*/
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef __RTL8821AE_REG_H__
58c2ecf20Sopenharmony_ci#define __RTL8821AE_REG_H__
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#define TXPKT_BUF_SELECT			0x69
88c2ecf20Sopenharmony_ci#define RXPKT_BUF_SELECT			0xA5
98c2ecf20Sopenharmony_ci#define DISABLE_TRXPKT_BUF_ACCESS		0x0
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#define REG_SYS_ISO_CTRL			0x0000
128c2ecf20Sopenharmony_ci#define REG_SYS_FUNC_EN				0x0002
138c2ecf20Sopenharmony_ci#define REG_APS_FSMCO				0x0004
148c2ecf20Sopenharmony_ci#define REG_SYS_CLKR				0x0008
158c2ecf20Sopenharmony_ci#define REG_9346CR				0x000A
168c2ecf20Sopenharmony_ci#define REG_EE_VPD				0x000C
178c2ecf20Sopenharmony_ci#define REG_AFE_MISC				0x0010
188c2ecf20Sopenharmony_ci#define REG_SPS0_CTRL				0x0011
198c2ecf20Sopenharmony_ci#define REG_SPS_OCP_CFG				0x0018
208c2ecf20Sopenharmony_ci#define REG_RSV_CTRL				0x001C
218c2ecf20Sopenharmony_ci#define REG_RF_CTRL				0x001F
228c2ecf20Sopenharmony_ci#define REG_LDOA15_CTRL				0x0020
238c2ecf20Sopenharmony_ci#define REG_LDOV12D_CTRL			0x0021
248c2ecf20Sopenharmony_ci#define REG_LDOHCI12_CTRL			0x0022
258c2ecf20Sopenharmony_ci#define REG_LPLDO_CTRL				0x0023
268c2ecf20Sopenharmony_ci#define REG_AFE_XTAL_CTRL			0x0024
278c2ecf20Sopenharmony_ci /* 1.5v for 8188EE test chip, 1.4v for MP chip */
288c2ecf20Sopenharmony_ci#define REG_AFE_LDO_CTRL			0x0027
298c2ecf20Sopenharmony_ci#define REG_AFE_PLL_CTRL			0x0028
308c2ecf20Sopenharmony_ci#define REG_MAC_PHY_CTRL			0x002c
318c2ecf20Sopenharmony_ci#define REG_EFUSE_CTRL				0x0030
328c2ecf20Sopenharmony_ci#define REG_EFUSE_TEST				0x0034
338c2ecf20Sopenharmony_ci#define REG_PWR_DATA				0x0038
348c2ecf20Sopenharmony_ci#define REG_CAL_TIMER				0x003C
358c2ecf20Sopenharmony_ci#define REG_ACLK_MON				0x003E
368c2ecf20Sopenharmony_ci#define REG_GPIO_MUXCFG				0x0040
378c2ecf20Sopenharmony_ci#define REG_GPIO_IO_SEL				0x0042
388c2ecf20Sopenharmony_ci#define REG_MAC_PINMUX_CFG			0x0043
398c2ecf20Sopenharmony_ci#define REG_GPIO_PIN_CTRL			0x0044
408c2ecf20Sopenharmony_ci#define REG_GPIO_INTM				0x0048
418c2ecf20Sopenharmony_ci#define REG_LEDCFG0				0x004C
428c2ecf20Sopenharmony_ci#define REG_LEDCFG1				0x004D
438c2ecf20Sopenharmony_ci#define REG_LEDCFG2				0x004E
448c2ecf20Sopenharmony_ci#define REG_LEDCFG3				0x004F
458c2ecf20Sopenharmony_ci#define REG_FSIMR				0x0050
468c2ecf20Sopenharmony_ci#define REG_FSISR				0x0054
478c2ecf20Sopenharmony_ci#define REG_HSIMR				0x0058
488c2ecf20Sopenharmony_ci#define REG_HSISR				0x005c
498c2ecf20Sopenharmony_ci#define REG_GPIO_PIN_CTRL_2			0x0060
508c2ecf20Sopenharmony_ci#define REG_GPIO_IO_SEL_2			0x0062
518c2ecf20Sopenharmony_ci#define REG_MULTI_FUNC_CTRL			0x0068
528c2ecf20Sopenharmony_ci#define REG_GPIO_OUTPUT				0x006c
538c2ecf20Sopenharmony_ci#define REG_OPT_CTRL				0x0074
548c2ecf20Sopenharmony_ci#define REG_AFE_XTAL_CTRL_EXT			0x0078
558c2ecf20Sopenharmony_ci#define REG_XCK_OUT_CTRL			0x007c
568c2ecf20Sopenharmony_ci#define REG_MCUFWDL				0x0080
578c2ecf20Sopenharmony_ci#define REG_WOL_EVENT				0x0081
588c2ecf20Sopenharmony_ci#define REG_MCUTSTCFG				0x0084
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci#define REG_HIMR				0x00B0
618c2ecf20Sopenharmony_ci#define REG_HISR				0x00B4
628c2ecf20Sopenharmony_ci#define REG_HIMRE				0x00B8
638c2ecf20Sopenharmony_ci#define REG_HISRE				0x00BC
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci#define REG_PMC_DBG_CTRL2			0x00CC
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#define REG_EFUSE_ACCESS			0x00CF
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci#define REG_BIST_SCAN				0x00D0
708c2ecf20Sopenharmony_ci#define REG_BIST_RPT				0x00D4
718c2ecf20Sopenharmony_ci#define REG_BIST_ROM_RPT			0x00D8
728c2ecf20Sopenharmony_ci#define REG_USB_SIE_INTF			0x00E0
738c2ecf20Sopenharmony_ci#define REG_PCIE_MIO_INTF			0x00E4
748c2ecf20Sopenharmony_ci#define REG_PCIE_MIO_INTD			0x00E8
758c2ecf20Sopenharmony_ci#define REG_HPON_FSM				0x00EC
768c2ecf20Sopenharmony_ci#define REG_SYS_CFG				0x00F0
778c2ecf20Sopenharmony_ci#define REG_GPIO_OUTSTS				0x00F4
788c2ecf20Sopenharmony_ci#define REG_MAC_PHY_CTRL_NORMAL			0x00F8
798c2ecf20Sopenharmony_ci#define REG_SYS_CFG1				0x00FC
808c2ecf20Sopenharmony_ci#define REG_ROM_VERSION				0x00FD
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci#define REG_CR					0x0100
838c2ecf20Sopenharmony_ci#define REG_PBP					0x0104
848c2ecf20Sopenharmony_ci#define REG_PKT_BUFF_ACCESS_CTRL		0x0106
858c2ecf20Sopenharmony_ci#define REG_TRXDMA_CTRL				0x010C
868c2ecf20Sopenharmony_ci#define REG_TRXFF_BNDY				0x0114
878c2ecf20Sopenharmony_ci#define REG_TRXFF_STATUS			0x0118
888c2ecf20Sopenharmony_ci#define REG_RXFF_PTR				0x011C
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci#define REG_CPWM				0x012F
918c2ecf20Sopenharmony_ci#define REG_FWIMR				0x0130
928c2ecf20Sopenharmony_ci#define REG_FWISR				0x0134
938c2ecf20Sopenharmony_ci#define REG_FTISR				0x013C
948c2ecf20Sopenharmony_ci#define REG_PKTBUF_DBG_CTRL			0x0140
958c2ecf20Sopenharmony_ci#define REG_PKTBUF_DBG_DATA_L			0x0144
968c2ecf20Sopenharmony_ci#define REG_PKTBUF_DBG_DATA_H			0x0148
978c2ecf20Sopenharmony_ci#define REG_RXPKTBUF_CTRL			(REG_PKTBUF_DBG_CTRL+2)
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci#define REG_TC0_CTRL				0x0150
1008c2ecf20Sopenharmony_ci#define REG_TC1_CTRL				0x0154
1018c2ecf20Sopenharmony_ci#define REG_TC2_CTRL				0x0158
1028c2ecf20Sopenharmony_ci#define REG_TC3_CTRL				0x015C
1038c2ecf20Sopenharmony_ci#define REG_TC4_CTRL				0x0160
1048c2ecf20Sopenharmony_ci#define REG_TCUNIT_BASE				0x0164
1058c2ecf20Sopenharmony_ci#define REG_MBIST_START				0x0174
1068c2ecf20Sopenharmony_ci#define REG_MBIST_DONE				0x0178
1078c2ecf20Sopenharmony_ci#define REG_MBIST_FAIL				0x017C
1088c2ecf20Sopenharmony_ci#define REG_32K_CTRL				0x0194
1098c2ecf20Sopenharmony_ci#define REG_C2HEVT_MSG_NORMAL			0x01A0
1108c2ecf20Sopenharmony_ci#define REG_C2HEVT_CLEAR			0x01AF
1118c2ecf20Sopenharmony_ci#define REG_C2HEVT_MSG_TEST			0x01B8
1128c2ecf20Sopenharmony_ci#define REG_MCUTST_1				0x01c0
1138c2ecf20Sopenharmony_ci#define REG_MCUTST_WOWLAN			0x01C7
1148c2ecf20Sopenharmony_ci#define REG_FMETHR				0x01C8
1158c2ecf20Sopenharmony_ci#define REG_HMETFR				0x01CC
1168c2ecf20Sopenharmony_ci#define REG_HMEBOX_0				0x01D0
1178c2ecf20Sopenharmony_ci#define REG_HMEBOX_1				0x01D4
1188c2ecf20Sopenharmony_ci#define REG_HMEBOX_2				0x01D8
1198c2ecf20Sopenharmony_ci#define REG_HMEBOX_3				0x01DC
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci#define REG_LLT_INIT				0x01E0
1228c2ecf20Sopenharmony_ci#define REG_BB_ACCEESS_CTRL			0x01E8
1238c2ecf20Sopenharmony_ci#define REG_BB_ACCESS_DATA			0x01EC
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci#define REG_HMEBOX_EXT_0			0x01F0
1268c2ecf20Sopenharmony_ci#define REG_HMEBOX_EXT_1			0x01F4
1278c2ecf20Sopenharmony_ci#define REG_HMEBOX_EXT_2			0x01F8
1288c2ecf20Sopenharmony_ci#define REG_HMEBOX_EXT_3			0x01FC
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci#define REG_RQPN				0x0200
1318c2ecf20Sopenharmony_ci#define REG_FIFOPAGE				0x0204
1328c2ecf20Sopenharmony_ci#define REG_TDECTRL				0x0208
1338c2ecf20Sopenharmony_ci#define REG_TXDMA_OFFSET_CHK			0x020C
1348c2ecf20Sopenharmony_ci#define REG_TXDMA_STATUS			0x0210
1358c2ecf20Sopenharmony_ci#define REG_RQPN_NPQ				0x0214
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci#define REG_RXDMA_AGG_PG_TH			0x0280
1388c2ecf20Sopenharmony_ci /* FW shall update this register before FW write RXPKT_RELEASE_POLL to 1 */
1398c2ecf20Sopenharmony_ci#define REG_FW_UPD_RDPTR			0x0284
1408c2ecf20Sopenharmony_ci /* Control the RX DMA.*/
1418c2ecf20Sopenharmony_ci#define REG_RXDMA_CONTROL			0x0286
1428c2ecf20Sopenharmony_ci/* The number of packets in RXPKTBUF.	*/
1438c2ecf20Sopenharmony_ci#define REG_RXPKT_NUM				0x0287
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ci#define	REG_PCIE_CTRL_REG			0x0300
1468c2ecf20Sopenharmony_ci#define	REG_INT_MIG				0x0304
1478c2ecf20Sopenharmony_ci#define	REG_BCNQ_DESA				0x0308
1488c2ecf20Sopenharmony_ci#define	REG_HQ_DESA				0x0310
1498c2ecf20Sopenharmony_ci#define	REG_MGQ_DESA				0x0318
1508c2ecf20Sopenharmony_ci#define	REG_VOQ_DESA				0x0320
1518c2ecf20Sopenharmony_ci#define	REG_VIQ_DESA				0x0328
1528c2ecf20Sopenharmony_ci#define	REG_BEQ_DESA				0x0330
1538c2ecf20Sopenharmony_ci#define	REG_BKQ_DESA				0x0338
1548c2ecf20Sopenharmony_ci#define	REG_RX_DESA				0x0340
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ci#define	REG_DBI_WDATA				0x0348
1578c2ecf20Sopenharmony_ci#define	REG_DBI_RDATA				0x034C
1588c2ecf20Sopenharmony_ci#define	REG_DBI_CTRL				0x0350
1598c2ecf20Sopenharmony_ci#define	REG_DBI_ADDR				0x0350
1608c2ecf20Sopenharmony_ci#define	REG_DBI_FLAG				0x0352
1618c2ecf20Sopenharmony_ci#define	REG_MDIO_WDATA				0x0354
1628c2ecf20Sopenharmony_ci#define	REG_MDIO_RDATA				0x0356
1638c2ecf20Sopenharmony_ci#define	REG_MDIO_CTL				0x0358
1648c2ecf20Sopenharmony_ci#define	REG_DBG_SEL				0x0360
1658c2ecf20Sopenharmony_ci#define	REG_PCIE_HRPWM				0x0361
1668c2ecf20Sopenharmony_ci#define	REG_PCIE_HCPWM				0x0363
1678c2ecf20Sopenharmony_ci#define	REG_UART_CTRL				0x0364
1688c2ecf20Sopenharmony_ci#define	REG_WATCH_DOG				0x0368
1698c2ecf20Sopenharmony_ci#define	REG_UART_TX_DESA			0x0370
1708c2ecf20Sopenharmony_ci#define	REG_UART_RX_DESA			0x0378
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_ci#define	REG_HDAQ_DESA_NODEF			0x0000
1738c2ecf20Sopenharmony_ci#define	REG_CMDQ_DESA_NODEF			0x0000
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci#define REG_VOQ_INFORMATION			0x0400
1768c2ecf20Sopenharmony_ci#define REG_VIQ_INFORMATION			0x0404
1778c2ecf20Sopenharmony_ci#define REG_BEQ_INFORMATION			0x0408
1788c2ecf20Sopenharmony_ci#define REG_BKQ_INFORMATION			0x040C
1798c2ecf20Sopenharmony_ci#define REG_MGQ_INFORMATION			0x0410
1808c2ecf20Sopenharmony_ci#define REG_HGQ_INFORMATION			0x0414
1818c2ecf20Sopenharmony_ci#define REG_BCNQ_INFORMATION			0x0418
1828c2ecf20Sopenharmony_ci#define REG_TXPKT_EMPTY				0x041A
1838c2ecf20Sopenharmony_ci
1848c2ecf20Sopenharmony_ci#define REG_CPU_MGQ_INFORMATION			0x041C
1858c2ecf20Sopenharmony_ci#define REG_FWHW_TXQ_CTRL			0x0420
1868c2ecf20Sopenharmony_ci#define REG_HWSEQ_CTRL				0x0423
1878c2ecf20Sopenharmony_ci#define REG_TXPKTBUF_BCNQ_BDNY			0x0424
1888c2ecf20Sopenharmony_ci#define REG_TXPKTBUF_MGQ_BDNY			0x0425
1898c2ecf20Sopenharmony_ci#define REG_MULTI_BCNQ_EN			0x0426
1908c2ecf20Sopenharmony_ci#define REG_MULTI_BCNQ_OFFSET			0x0427
1918c2ecf20Sopenharmony_ci#define REG_SPEC_SIFS				0x0428
1928c2ecf20Sopenharmony_ci#define REG_RL					0x042A
1938c2ecf20Sopenharmony_ci#define REG_DARFRC				0x0430
1948c2ecf20Sopenharmony_ci#define REG_RARFRC				0x0438
1958c2ecf20Sopenharmony_ci#define REG_RRSR				0x0440
1968c2ecf20Sopenharmony_ci#define REG_ARFR0				0x0444
1978c2ecf20Sopenharmony_ci#define REG_ARFR1				0x044C
1988c2ecf20Sopenharmony_ci#define REG_CCK_CHECK				0x0454
1998c2ecf20Sopenharmony_ci#define REG_AMPDU_MAX_TIME			0x0456
2008c2ecf20Sopenharmony_ci#define REG_AGGLEN_LMT				0x0458
2018c2ecf20Sopenharmony_ci#define REG_AMPDU_MIN_SPACE			0x045C
2028c2ecf20Sopenharmony_ci#define REG_TXPKTBUF_WMAC_LBK_BF_HD		0x045D
2038c2ecf20Sopenharmony_ci#define REG_FAST_EDCA_CTRL			0x0460
2048c2ecf20Sopenharmony_ci#define REG_RD_RESP_PKT_TH			0x0463
2058c2ecf20Sopenharmony_ci#define REG_INIRTS_RATE_SEL			0x0480
2068c2ecf20Sopenharmony_ci#define REG_INIDATA_RATE_SEL			0x0484
2078c2ecf20Sopenharmony_ci#define REG_ARFR2				0x048C
2088c2ecf20Sopenharmony_ci#define REG_ARFR3				0x0494
2098c2ecf20Sopenharmony_ci#define REG_POWER_STATUS			0x04A4
2108c2ecf20Sopenharmony_ci#define REG_POWER_STAGE1			0x04B4
2118c2ecf20Sopenharmony_ci#define REG_POWER_STAGE2			0x04B8
2128c2ecf20Sopenharmony_ci#define REG_PKT_LIFE_TIME			0x04C0
2138c2ecf20Sopenharmony_ci#define REG_STBC_SETTING			0x04C4
2148c2ecf20Sopenharmony_ci#define REG_HT_SINGLE_AMPDU			0x04C7
2158c2ecf20Sopenharmony_ci#define REG_PROT_MODE_CTRL			0x04C8
2168c2ecf20Sopenharmony_ci#define REG_MAX_AGGR_NUM			0x04CA
2178c2ecf20Sopenharmony_ci#define REG_BAR_MODE_CTRL			0x04CC
2188c2ecf20Sopenharmony_ci#define REG_RA_TRY_RATE_AGG_LMT			0x04CF
2198c2ecf20Sopenharmony_ci#define REG_EARLY_MODE_CONTROL			0x04D0
2208c2ecf20Sopenharmony_ci#define REG_NQOS_SEQ				0x04DC
2218c2ecf20Sopenharmony_ci#define REG_QOS_SEQ				0x04DE
2228c2ecf20Sopenharmony_ci#define REG_NEED_CPU_HANDLE			0x04E0
2238c2ecf20Sopenharmony_ci#define REG_PKT_LOSE_RPT			0x04E1
2248c2ecf20Sopenharmony_ci#define REG_PTCL_ERR_STATUS			0x04E2
2258c2ecf20Sopenharmony_ci#define REG_TX_RPT_CTRL				0x04EC
2268c2ecf20Sopenharmony_ci#define REG_TX_RPT_TIME				0x04F0
2278c2ecf20Sopenharmony_ci#define REG_DUMMY				0x04FC
2288c2ecf20Sopenharmony_ci
2298c2ecf20Sopenharmony_ci#define REG_EDCA_VO_PARAM			0x0500
2308c2ecf20Sopenharmony_ci#define REG_EDCA_VI_PARAM			0x0504
2318c2ecf20Sopenharmony_ci#define REG_EDCA_BE_PARAM			0x0508
2328c2ecf20Sopenharmony_ci#define REG_EDCA_BK_PARAM			0x050C
2338c2ecf20Sopenharmony_ci#define REG_BCNTCFG				0x0510
2348c2ecf20Sopenharmony_ci#define REG_PIFS				0x0512
2358c2ecf20Sopenharmony_ci#define REG_RDG_PIFS				0x0513
2368c2ecf20Sopenharmony_ci#define REG_SIFS_CTX				0x0514
2378c2ecf20Sopenharmony_ci#define REG_SIFS_TRX				0x0516
2388c2ecf20Sopenharmony_ci#define REG_AGGR_BREAK_TIME			0x051A
2398c2ecf20Sopenharmony_ci#define REG_SLOT				0x051B
2408c2ecf20Sopenharmony_ci#define REG_TX_PTCL_CTRL			0x0520
2418c2ecf20Sopenharmony_ci#define REG_TXPAUSE				0x0522
2428c2ecf20Sopenharmony_ci#define REG_DIS_TXREQ_CLR			0x0523
2438c2ecf20Sopenharmony_ci#define REG_RD_CTRL				0x0524
2448c2ecf20Sopenharmony_ci#define REG_TBTT_PROHIBIT			0x0540
2458c2ecf20Sopenharmony_ci#define REG_RD_NAV_NXT				0x0544
2468c2ecf20Sopenharmony_ci#define REG_NAV_PROT_LEN			0x0546
2478c2ecf20Sopenharmony_ci#define REG_BCN_CTRL				0x0550
2488c2ecf20Sopenharmony_ci#define REG_MBID_NUM				0x0552
2498c2ecf20Sopenharmony_ci#define REG_DUAL_TSF_RST			0x0553
2508c2ecf20Sopenharmony_ci#define REG_BCN_INTERVAL			0x0554
2518c2ecf20Sopenharmony_ci#define REG_MBSSID_BCN_SPACE			0x0554
2528c2ecf20Sopenharmony_ci#define REG_DRVERLYINT				0x0558
2538c2ecf20Sopenharmony_ci#define REG_BCNDMATIM				0x0559
2548c2ecf20Sopenharmony_ci#define REG_ATIMWND				0x055A
2558c2ecf20Sopenharmony_ci#define REG_USTIME_TSF				0x055C
2568c2ecf20Sopenharmony_ci#define REG_BCN_MAX_ERR				0x055D
2578c2ecf20Sopenharmony_ci#define REG_RXTSF_OFFSET_CCK			0x055E
2588c2ecf20Sopenharmony_ci#define REG_RXTSF_OFFSET_OFDM			0x055F
2598c2ecf20Sopenharmony_ci#define REG_TSFTR				0x0560
2608c2ecf20Sopenharmony_ci#define REG_INIT_TSFTR				0x0564
2618c2ecf20Sopenharmony_ci#define REG_SECONDARY_CCA_CTRL			0x0577
2628c2ecf20Sopenharmony_ci#define REG_PSTIMER				0x0580
2638c2ecf20Sopenharmony_ci#define REG_TIMER0				0x0584
2648c2ecf20Sopenharmony_ci#define REG_TIMER1				0x0588
2658c2ecf20Sopenharmony_ci#define REG_ACMHWCTRL				0x05C0
2668c2ecf20Sopenharmony_ci#define REG_ACMRSTCTRL				0x05C1
2678c2ecf20Sopenharmony_ci#define REG_ACMAVG				0x05C2
2688c2ecf20Sopenharmony_ci#define REG_VO_ADMTIME				0x05C4
2698c2ecf20Sopenharmony_ci#define REG_VI_ADMTIME				0x05C6
2708c2ecf20Sopenharmony_ci#define REG_BE_ADMTIME				0x05C8
2718c2ecf20Sopenharmony_ci#define REG_EDCA_RANDOM_GEN			0x05CC
2728c2ecf20Sopenharmony_ci#define REG_NOA_DESC_SEL			0x05CF
2738c2ecf20Sopenharmony_ci#define REG_NOA_DESC_DURATION			0x05E0
2748c2ecf20Sopenharmony_ci#define REG_NOA_DESC_INTERVAL			0x05E4
2758c2ecf20Sopenharmony_ci#define REG_NOA_DESC_START			0x05E8
2768c2ecf20Sopenharmony_ci#define REG_NOA_DESC_COUNT			0x05EC
2778c2ecf20Sopenharmony_ci#define REG_SCH_TXCMD				0x05F8
2788c2ecf20Sopenharmony_ci
2798c2ecf20Sopenharmony_ci#define REG_APSD_CTRL				0x0600
2808c2ecf20Sopenharmony_ci#define REG_BWOPMODE				0x0603
2818c2ecf20Sopenharmony_ci#define REG_TCR					0x0604
2828c2ecf20Sopenharmony_ci#define REG_RCR					0x0608
2838c2ecf20Sopenharmony_ci#define REG_RX_PKT_LIMIT			0x060C
2848c2ecf20Sopenharmony_ci#define REG_RX_DLK_TIME				0x060D
2858c2ecf20Sopenharmony_ci#define REG_RX_DRVINFO_SZ			0x060F
2868c2ecf20Sopenharmony_ci
2878c2ecf20Sopenharmony_ci#define REG_MACID				0x0610
2888c2ecf20Sopenharmony_ci#define REG_BSSID				0x0618
2898c2ecf20Sopenharmony_ci#define REG_MAR					0x0620
2908c2ecf20Sopenharmony_ci#define REG_MBIDCAMCFG				0x0628
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_ci#define REG_USTIME_EDCA				0x0638
2938c2ecf20Sopenharmony_ci#define REG_MAC_SPEC_SIFS			0x063A
2948c2ecf20Sopenharmony_ci#define REG_RESP_SIFS_CCK			0x063C
2958c2ecf20Sopenharmony_ci#define REG_RESP_SIFS_OFDM			0x063E
2968c2ecf20Sopenharmony_ci#define REG_ACKTO				0x0640
2978c2ecf20Sopenharmony_ci#define REG_CTS2TO				0x0641
2988c2ecf20Sopenharmony_ci#define REG_EIFS				0x0642
2998c2ecf20Sopenharmony_ci
3008c2ecf20Sopenharmony_ci#define REG_NAV_CTRL				0x0650
3018c2ecf20Sopenharmony_ci#define REG_NAV_UPPER				0x0652
3028c2ecf20Sopenharmony_ci#define REG_BACAMCMD				0x0654
3038c2ecf20Sopenharmony_ci#define REG_BACAMCONTENT			0x0658
3048c2ecf20Sopenharmony_ci#define REG_LBDLY				0x0660
3058c2ecf20Sopenharmony_ci#define REG_FWDLY				0x0661
3068c2ecf20Sopenharmony_ci#define REG_RXERR_RPT				0x0664
3078c2ecf20Sopenharmony_ci#define REG_TRXPTCL_CTL				0x0668
3088c2ecf20Sopenharmony_ci
3098c2ecf20Sopenharmony_ci#define REG_CAMCMD				0x0670
3108c2ecf20Sopenharmony_ci#define REG_CAMWRITE				0x0674
3118c2ecf20Sopenharmony_ci#define REG_CAMREAD				0x0678
3128c2ecf20Sopenharmony_ci#define REG_CAMDBG				0x067C
3138c2ecf20Sopenharmony_ci#define REG_SECCFG				0x0680
3148c2ecf20Sopenharmony_ci
3158c2ecf20Sopenharmony_ci#define REG_WOW_CTRL				0x0690
3168c2ecf20Sopenharmony_ci#define REG_PSSTATUS				0x0691
3178c2ecf20Sopenharmony_ci#define REG_PS_RX_INFO				0x0692
3188c2ecf20Sopenharmony_ci#define REG_UAPSD_TID				0x0693
3198c2ecf20Sopenharmony_ci#define REG_LPNAV_CTRL				0x0694
3208c2ecf20Sopenharmony_ci#define REG_WKFMCAM_NUM				0x0698
3218c2ecf20Sopenharmony_ci#define REG_WKFMCAM_RWD				0x069C
3228c2ecf20Sopenharmony_ci#define REG_RXFLTMAP0				0x06A0
3238c2ecf20Sopenharmony_ci#define REG_RXFLTMAP1				0x06A2
3248c2ecf20Sopenharmony_ci#define REG_RXFLTMAP2				0x06A4
3258c2ecf20Sopenharmony_ci#define REG_BCN_PSR_RPT				0x06A8
3268c2ecf20Sopenharmony_ci#define REG_CALB32K_CTRL			0x06AC
3278c2ecf20Sopenharmony_ci#define REG_PKT_MON_CTRL			0x06B4
3288c2ecf20Sopenharmony_ci#define REG_BT_COEX_TABLE			0x06C0
3298c2ecf20Sopenharmony_ci#define REG_WMAC_RESP_TXINFO			0x06D8
3308c2ecf20Sopenharmony_ci
3318c2ecf20Sopenharmony_ci#define REG_USB_INFO				0xFE17
3328c2ecf20Sopenharmony_ci#define REG_USB_SPECIAL_OPTION			0xFE55
3338c2ecf20Sopenharmony_ci#define REG_USB_DMA_AGG_TO			0xFE5B
3348c2ecf20Sopenharmony_ci#define REG_USB_AGG_TO				0xFE5C
3358c2ecf20Sopenharmony_ci#define REG_USB_AGG_TH				0xFE5D
3368c2ecf20Sopenharmony_ci
3378c2ecf20Sopenharmony_ci#define REG_TEST_USB_TXQS			0xFE48
3388c2ecf20Sopenharmony_ci#define REG_TEST_SIE_VID			0xFE60
3398c2ecf20Sopenharmony_ci#define REG_TEST_SIE_PID			0xFE62
3408c2ecf20Sopenharmony_ci#define REG_TEST_SIE_OPTIONAL			0xFE64
3418c2ecf20Sopenharmony_ci#define REG_TEST_SIE_CHIRP_K			0xFE65
3428c2ecf20Sopenharmony_ci#define REG_TEST_SIE_PHY			0xFE66
3438c2ecf20Sopenharmony_ci#define REG_TEST_SIE_MAC_ADDR			0xFE70
3448c2ecf20Sopenharmony_ci#define REG_TEST_SIE_STRING			0xFE80
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_ci#define REG_NORMAL_SIE_VID			0xFE60
3478c2ecf20Sopenharmony_ci#define REG_NORMAL_SIE_PID			0xFE62
3488c2ecf20Sopenharmony_ci#define REG_NORMAL_SIE_OPTIONAL			0xFE64
3498c2ecf20Sopenharmony_ci#define REG_NORMAL_SIE_EP			0xFE65
3508c2ecf20Sopenharmony_ci#define REG_NORMAL_SIE_PHY			0xFE68
3518c2ecf20Sopenharmony_ci#define REG_NORMAL_SIE_MAC_ADDR			0xFE70
3528c2ecf20Sopenharmony_ci#define REG_NORMAL_SIE_STRING			0xFE80
3538c2ecf20Sopenharmony_ci
3548c2ecf20Sopenharmony_ci#define	CR9346					REG_9346CR
3558c2ecf20Sopenharmony_ci#define	MSR					(REG_CR + 2)
3568c2ecf20Sopenharmony_ci#define	ISR					REG_HISR
3578c2ecf20Sopenharmony_ci#define	TSFR					REG_TSFTR
3588c2ecf20Sopenharmony_ci
3598c2ecf20Sopenharmony_ci#define	MACIDR0					REG_MACID
3608c2ecf20Sopenharmony_ci#define	MACIDR4					(REG_MACID + 4)
3618c2ecf20Sopenharmony_ci
3628c2ecf20Sopenharmony_ci#define PBP					REG_PBP
3638c2ecf20Sopenharmony_ci
3648c2ecf20Sopenharmony_ci#define	IDR0					MACIDR0
3658c2ecf20Sopenharmony_ci#define	IDR4					MACIDR4
3668c2ecf20Sopenharmony_ci
3678c2ecf20Sopenharmony_ci#define	UNUSED_REGISTER				0x1BF
3688c2ecf20Sopenharmony_ci#define	DCAM					UNUSED_REGISTER
3698c2ecf20Sopenharmony_ci#define	PSR					UNUSED_REGISTER
3708c2ecf20Sopenharmony_ci#define BBADDR					UNUSED_REGISTER
3718c2ecf20Sopenharmony_ci#define	PHYDATAR				UNUSED_REGISTER
3728c2ecf20Sopenharmony_ci
3738c2ecf20Sopenharmony_ci#define	INVALID_BBRF_VALUE			0x12345678
3748c2ecf20Sopenharmony_ci
3758c2ecf20Sopenharmony_ci#define	MAX_MSS_DENSITY_2T			0x13
3768c2ecf20Sopenharmony_ci#define	MAX_MSS_DENSITY_1T			0x0A
3778c2ecf20Sopenharmony_ci
3788c2ecf20Sopenharmony_ci#define	CMDEEPROM_EN				BIT(5)
3798c2ecf20Sopenharmony_ci#define	CMDEEPROM_SEL				BIT(4)
3808c2ecf20Sopenharmony_ci#define	CMD9346CR_9356SEL			BIT(4)
3818c2ecf20Sopenharmony_ci#define	AUTOLOAD_EEPROM			(CMDEEPROM_EN|CMDEEPROM_SEL)
3828c2ecf20Sopenharmony_ci#define	AUTOLOAD_EFUSE			CMDEEPROM_EN
3838c2ecf20Sopenharmony_ci
3848c2ecf20Sopenharmony_ci#define	GPIOSEL_GPIO				0
3858c2ecf20Sopenharmony_ci#define	GPIOSEL_ENBT				BIT(5)
3868c2ecf20Sopenharmony_ci
3878c2ecf20Sopenharmony_ci#define	GPIO_IN				REG_GPIO_PIN_CTRL
3888c2ecf20Sopenharmony_ci#define	GPIO_OUT			(REG_GPIO_PIN_CTRL+1)
3898c2ecf20Sopenharmony_ci#define	GPIO_IO_SEL			(REG_GPIO_PIN_CTRL+2)
3908c2ecf20Sopenharmony_ci#define	GPIO_MOD			(REG_GPIO_PIN_CTRL+3)
3918c2ecf20Sopenharmony_ci
3928c2ecf20Sopenharmony_ci/*    8723/8188E Host System Interrupt Mask Register (offset 0x58, 32 byte) */
3938c2ecf20Sopenharmony_ci#define	HSIMR_GPIO12_0_INT_EN			BIT(0)
3948c2ecf20Sopenharmony_ci#define	HSIMR_SPS_OCP_INT_EN			BIT(5)
3958c2ecf20Sopenharmony_ci#define	HSIMR_RON_INT_EN			BIT(6)
3968c2ecf20Sopenharmony_ci#define	HSIMR_PDN_INT_EN			BIT(7)
3978c2ecf20Sopenharmony_ci#define	HSIMR_GPIO9_INT_EN			BIT(25)
3988c2ecf20Sopenharmony_ci
3998c2ecf20Sopenharmony_ci/* 8723/8188E Host System Interrupt Status Register (offset 0x5C, 32 byte) */
4008c2ecf20Sopenharmony_ci#define	HSISR_GPIO12_0_INT			BIT(0)
4018c2ecf20Sopenharmony_ci#define	HSISR_SPS_OCP_INT			BIT(5)
4028c2ecf20Sopenharmony_ci#define	HSISR_RON_INT_EN			BIT(6)
4038c2ecf20Sopenharmony_ci#define	HSISR_PDNINT				BIT(7)
4048c2ecf20Sopenharmony_ci#define	HSISR_GPIO9_INT				BIT(25)
4058c2ecf20Sopenharmony_ci
4068c2ecf20Sopenharmony_ci#define	MSR_NOLINK				0x00
4078c2ecf20Sopenharmony_ci#define	MSR_ADHOC				0x01
4088c2ecf20Sopenharmony_ci#define	MSR_INFRA				0x02
4098c2ecf20Sopenharmony_ci#define	MSR_AP					0x03
4108c2ecf20Sopenharmony_ci#define MSR_MASK				0x03
4118c2ecf20Sopenharmony_ci
4128c2ecf20Sopenharmony_ci#define	RRSR_RSC_OFFSET				21
4138c2ecf20Sopenharmony_ci#define	RRSR_SHORT_OFFSET			23
4148c2ecf20Sopenharmony_ci#define	RRSR_RSC_BW_40M				0x600000
4158c2ecf20Sopenharmony_ci#define	RRSR_RSC_UPSUBCHNL			0x400000
4168c2ecf20Sopenharmony_ci#define	RRSR_RSC_LOWSUBCHNL			0x200000
4178c2ecf20Sopenharmony_ci#define	RRSR_SHORT				0x800000
4188c2ecf20Sopenharmony_ci#define	RRSR_1M					BIT(0)
4198c2ecf20Sopenharmony_ci#define	RRSR_2M					BIT(1)
4208c2ecf20Sopenharmony_ci#define	RRSR_5_5M				BIT(2)
4218c2ecf20Sopenharmony_ci#define	RRSR_11M				BIT(3)
4228c2ecf20Sopenharmony_ci#define	RRSR_6M					BIT(4)
4238c2ecf20Sopenharmony_ci#define	RRSR_9M					BIT(5)
4248c2ecf20Sopenharmony_ci#define	RRSR_12M				BIT(6)
4258c2ecf20Sopenharmony_ci#define	RRSR_18M				BIT(7)
4268c2ecf20Sopenharmony_ci#define	RRSR_24M				BIT(8)
4278c2ecf20Sopenharmony_ci#define	RRSR_36M				BIT(9)
4288c2ecf20Sopenharmony_ci#define	RRSR_48M				BIT(10)
4298c2ecf20Sopenharmony_ci#define	RRSR_54M				BIT(11)
4308c2ecf20Sopenharmony_ci#define	RRSR_MCS0				BIT(12)
4318c2ecf20Sopenharmony_ci#define	RRSR_MCS1				BIT(13)
4328c2ecf20Sopenharmony_ci#define	RRSR_MCS2				BIT(14)
4338c2ecf20Sopenharmony_ci#define	RRSR_MCS3				BIT(15)
4348c2ecf20Sopenharmony_ci#define	RRSR_MCS4				BIT(16)
4358c2ecf20Sopenharmony_ci#define	RRSR_MCS5				BIT(17)
4368c2ecf20Sopenharmony_ci#define	RRSR_MCS6				BIT(18)
4378c2ecf20Sopenharmony_ci#define	RRSR_MCS7				BIT(19)
4388c2ecf20Sopenharmony_ci#define	BRSR_ACKSHORTPMB			BIT(23)
4398c2ecf20Sopenharmony_ci
4408c2ecf20Sopenharmony_ci#define	RATR_1M					0x00000001
4418c2ecf20Sopenharmony_ci#define	RATR_2M					0x00000002
4428c2ecf20Sopenharmony_ci#define	RATR_55M				0x00000004
4438c2ecf20Sopenharmony_ci#define	RATR_11M				0x00000008
4448c2ecf20Sopenharmony_ci#define	RATR_6M					0x00000010
4458c2ecf20Sopenharmony_ci#define	RATR_9M					0x00000020
4468c2ecf20Sopenharmony_ci#define	RATR_12M				0x00000040
4478c2ecf20Sopenharmony_ci#define	RATR_18M				0x00000080
4488c2ecf20Sopenharmony_ci#define	RATR_24M				0x00000100
4498c2ecf20Sopenharmony_ci#define	RATR_36M				0x00000200
4508c2ecf20Sopenharmony_ci#define	RATR_48M				0x00000400
4518c2ecf20Sopenharmony_ci#define	RATR_54M				0x00000800
4528c2ecf20Sopenharmony_ci#define	RATR_MCS0				0x00001000
4538c2ecf20Sopenharmony_ci#define	RATR_MCS1				0x00002000
4548c2ecf20Sopenharmony_ci#define	RATR_MCS2				0x00004000
4558c2ecf20Sopenharmony_ci#define	RATR_MCS3				0x00008000
4568c2ecf20Sopenharmony_ci#define	RATR_MCS4				0x00010000
4578c2ecf20Sopenharmony_ci#define	RATR_MCS5				0x00020000
4588c2ecf20Sopenharmony_ci#define	RATR_MCS6				0x00040000
4598c2ecf20Sopenharmony_ci#define	RATR_MCS7				0x00080000
4608c2ecf20Sopenharmony_ci#define	RATR_MCS8				0x00100000
4618c2ecf20Sopenharmony_ci#define	RATR_MCS9				0x00200000
4628c2ecf20Sopenharmony_ci#define	RATR_MCS10				0x00400000
4638c2ecf20Sopenharmony_ci#define	RATR_MCS11				0x00800000
4648c2ecf20Sopenharmony_ci#define	RATR_MCS12				0x01000000
4658c2ecf20Sopenharmony_ci#define	RATR_MCS13				0x02000000
4668c2ecf20Sopenharmony_ci#define	RATR_MCS14				0x04000000
4678c2ecf20Sopenharmony_ci#define	RATR_MCS15				0x08000000
4688c2ecf20Sopenharmony_ci
4698c2ecf20Sopenharmony_ci#define RATE_1M					BIT(0)
4708c2ecf20Sopenharmony_ci#define RATE_2M					BIT(1)
4718c2ecf20Sopenharmony_ci#define RATE_5_5M				BIT(2)
4728c2ecf20Sopenharmony_ci#define RATE_11M				BIT(3)
4738c2ecf20Sopenharmony_ci#define RATE_6M					BIT(4)
4748c2ecf20Sopenharmony_ci#define RATE_9M					BIT(5)
4758c2ecf20Sopenharmony_ci#define RATE_12M				BIT(6)
4768c2ecf20Sopenharmony_ci#define RATE_18M				BIT(7)
4778c2ecf20Sopenharmony_ci#define RATE_24M				BIT(8)
4788c2ecf20Sopenharmony_ci#define RATE_36M				BIT(9)
4798c2ecf20Sopenharmony_ci#define RATE_48M				BIT(10)
4808c2ecf20Sopenharmony_ci#define RATE_54M				BIT(11)
4818c2ecf20Sopenharmony_ci#define RATE_MCS0				BIT(12)
4828c2ecf20Sopenharmony_ci#define RATE_MCS1				BIT(13)
4838c2ecf20Sopenharmony_ci#define RATE_MCS2				BIT(14)
4848c2ecf20Sopenharmony_ci#define RATE_MCS3				BIT(15)
4858c2ecf20Sopenharmony_ci#define RATE_MCS4				BIT(16)
4868c2ecf20Sopenharmony_ci#define RATE_MCS5				BIT(17)
4878c2ecf20Sopenharmony_ci#define RATE_MCS6				BIT(18)
4888c2ecf20Sopenharmony_ci#define RATE_MCS7				BIT(19)
4898c2ecf20Sopenharmony_ci#define RATE_MCS8				BIT(20)
4908c2ecf20Sopenharmony_ci#define RATE_MCS9				BIT(21)
4918c2ecf20Sopenharmony_ci#define RATE_MCS10				BIT(22)
4928c2ecf20Sopenharmony_ci#define RATE_MCS11				BIT(23)
4938c2ecf20Sopenharmony_ci#define RATE_MCS12				BIT(24)
4948c2ecf20Sopenharmony_ci#define RATE_MCS13				BIT(25)
4958c2ecf20Sopenharmony_ci#define RATE_MCS14				BIT(26)
4968c2ecf20Sopenharmony_ci#define RATE_MCS15				BIT(27)
4978c2ecf20Sopenharmony_ci
4988c2ecf20Sopenharmony_ci#define	RATE_ALL_CCK		(RATR_1M | RATR_2M | RATR_55M | RATR_11M)
4998c2ecf20Sopenharmony_ci#define	RATE_ALL_OFDM_AG	(RATR_6M | RATR_9M | RATR_12M | RATR_18M |\
5008c2ecf20Sopenharmony_ci				RATR_24M | RATR_36M | RATR_48M | RATR_54M)
5018c2ecf20Sopenharmony_ci#define	RATE_ALL_OFDM_1SS	(RATR_MCS0 | RATR_MCS1 | RATR_MCS2 |\
5028c2ecf20Sopenharmony_ci				RATR_MCS3 | RATR_MCS4 | RATR_MCS5 |\
5038c2ecf20Sopenharmony_ci				RATR_MCS6 | RATR_MCS7)
5048c2ecf20Sopenharmony_ci#define	RATE_ALL_OFDM_2SS	(RATR_MCS8 | RATR_MCS9 | RATR_MCS10 |\
5058c2ecf20Sopenharmony_ci				RATR_MCS11 | RATR_MCS12 | RATR_MCS13 |\
5068c2ecf20Sopenharmony_ci				RATR_MCS14 | RATR_MCS15)
5078c2ecf20Sopenharmony_ci
5088c2ecf20Sopenharmony_ci#define	BW_OPMODE_20MHZ				BIT(2)
5098c2ecf20Sopenharmony_ci#define	BW_OPMODE_5G				BIT(1)
5108c2ecf20Sopenharmony_ci#define	BW_OPMODE_11J				BIT(0)
5118c2ecf20Sopenharmony_ci
5128c2ecf20Sopenharmony_ci#define	CAM_VALID				BIT(15)
5138c2ecf20Sopenharmony_ci#define	CAM_NOTVALID				0x0000
5148c2ecf20Sopenharmony_ci#define	CAM_USEDK				BIT(5)
5158c2ecf20Sopenharmony_ci
5168c2ecf20Sopenharmony_ci#define	CAM_NONE				0x0
5178c2ecf20Sopenharmony_ci#define	CAM_WEP40				0x01
5188c2ecf20Sopenharmony_ci#define	CAM_TKIP				0x02
5198c2ecf20Sopenharmony_ci#define	CAM_AES					0x04
5208c2ecf20Sopenharmony_ci#define	CAM_WEP104				0x05
5218c2ecf20Sopenharmony_ci
5228c2ecf20Sopenharmony_ci#define	TOTAL_CAM_ENTRY				32
5238c2ecf20Sopenharmony_ci#define	HALF_CAM_ENTRY				16
5248c2ecf20Sopenharmony_ci
5258c2ecf20Sopenharmony_ci#define	CAM_WRITE				BIT(16)
5268c2ecf20Sopenharmony_ci#define	CAM_READ				0x00000000
5278c2ecf20Sopenharmony_ci#define	CAM_POLLINIG				BIT(31)
5288c2ecf20Sopenharmony_ci
5298c2ecf20Sopenharmony_ci#define	SCR_USEDK				0x01
5308c2ecf20Sopenharmony_ci#define	SCR_TXSEC_ENABLE			0x02
5318c2ecf20Sopenharmony_ci#define	SCR_RXSEC_ENABLE			0x04
5328c2ecf20Sopenharmony_ci
5338c2ecf20Sopenharmony_ci#define	WOW_PMEN				BIT(0)
5348c2ecf20Sopenharmony_ci#define	WOW_WOMEN				BIT(1)
5358c2ecf20Sopenharmony_ci#define	WOW_MAGIC				BIT(2)
5368c2ecf20Sopenharmony_ci#define	WOW_UWF					BIT(3)
5378c2ecf20Sopenharmony_ci
5388c2ecf20Sopenharmony_ci/*********************************************
5398c2ecf20Sopenharmony_ci*       8188 IMR/ISR bits
5408c2ecf20Sopenharmony_ci**********************************************/
5418c2ecf20Sopenharmony_ci#define	IMR_DISABLED				0x0
5428c2ecf20Sopenharmony_ci/* IMR DW0(0x0060-0063) Bit 0-31 */
5438c2ecf20Sopenharmony_ci/* TXRPT interrupt when CCX bit of the packet is set	*/
5448c2ecf20Sopenharmony_ci#define	IMR_TXCCK				BIT(30)
5458c2ecf20Sopenharmony_ci/* Power Save Time Out Interrupt */
5468c2ecf20Sopenharmony_ci#define	IMR_PSTIMEOUT				BIT(29)
5478c2ecf20Sopenharmony_ci/* When GTIMER4 expires, this bit is set to 1	*/
5488c2ecf20Sopenharmony_ci#define	IMR_GTINT4				BIT(28)
5498c2ecf20Sopenharmony_ci/* When GTIMER3 expires, this bit is set to 1	*/
5508c2ecf20Sopenharmony_ci#define	IMR_GTINT3				BIT(27)
5518c2ecf20Sopenharmony_ci/* Transmit Beacon0 Error			*/
5528c2ecf20Sopenharmony_ci#define	IMR_TBDER				BIT(26)
5538c2ecf20Sopenharmony_ci/* Transmit Beacon0 OK			*/
5548c2ecf20Sopenharmony_ci#define	IMR_TBDOK				BIT(25)
5558c2ecf20Sopenharmony_ci/* TSF Timer BIT32 toggle indication interrupt		*/
5568c2ecf20Sopenharmony_ci#define	IMR_TSF_BIT32_TOGGLE			BIT(24)
5578c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 0			*/
5588c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT0				BIT(20)
5598c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK0			*/
5608c2ecf20Sopenharmony_ci#define	IMR_BCNDOK0				BIT(16)
5618c2ecf20Sopenharmony_ci/* HSISR Indicator (HSIMR & HSISR is true, this bit is set to 1) */
5628c2ecf20Sopenharmony_ci#define	IMR_HSISR_IND_ON_INT			BIT(15)
5638c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt Extension for Win7			*/
5648c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT_E				BIT(14)
5658c2ecf20Sopenharmony_ci/* CTWidnow End or ATIM Window End */
5668c2ecf20Sopenharmony_ci#define	IMR_ATIMEND				BIT(12)
5678c2ecf20Sopenharmony_ci/* HISR1 Indicator (HISR1 & HIMR1 is true, this bit is set to 1)*/
5688c2ecf20Sopenharmony_ci#define	IMR_HISR1_IND_INT			BIT(11)
5698c2ecf20Sopenharmony_ci/* CPU to Host Command INT Status, Write 1 clear	*/
5708c2ecf20Sopenharmony_ci#define	IMR_C2HCMD				BIT(10)
5718c2ecf20Sopenharmony_ci/* CPU power Mode exchange INT Status, Write 1 clear	*/
5728c2ecf20Sopenharmony_ci#define	IMR_CPWM2				BIT(9)
5738c2ecf20Sopenharmony_ci/* CPU power Mode exchange INT Status, Write 1 clear	*/
5748c2ecf20Sopenharmony_ci#define	IMR_CPWM				BIT(8)
5758c2ecf20Sopenharmony_ci/* High Queue DMA OK	*/
5768c2ecf20Sopenharmony_ci#define	IMR_HIGHDOK				BIT(7)
5778c2ecf20Sopenharmony_ci/* Management Queue DMA OK	*/
5788c2ecf20Sopenharmony_ci#define	IMR_MGNTDOK				BIT(6)
5798c2ecf20Sopenharmony_ci/* AC_BK DMA OK		*/
5808c2ecf20Sopenharmony_ci#define	IMR_BKDOK				BIT(5)
5818c2ecf20Sopenharmony_ci/* AC_BE DMA OK	*/
5828c2ecf20Sopenharmony_ci#define	IMR_BEDOK				BIT(4)
5838c2ecf20Sopenharmony_ci/* AC_VI DMA OK	*/
5848c2ecf20Sopenharmony_ci#define	IMR_VIDOK				BIT(3)
5858c2ecf20Sopenharmony_ci/* AC_VO DMA OK	*/
5868c2ecf20Sopenharmony_ci#define	IMR_VODOK				BIT(2)
5878c2ecf20Sopenharmony_ci/* Rx Descriptor Unavailable	*/
5888c2ecf20Sopenharmony_ci#define	IMR_RDU					BIT(1)
5898c2ecf20Sopenharmony_ci#define	IMR_ROK					BIT(0)	/* Receive DMA OK */
5908c2ecf20Sopenharmony_ci
5918c2ecf20Sopenharmony_ci/* IMR DW1(0x00B4-00B7) Bit 0-31 */
5928c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 7	*/
5938c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT7				BIT(27)
5948c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 6		*/
5958c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT6				BIT(26)
5968c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 5		*/
5978c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT5				BIT(25)
5988c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 4		*/
5998c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT4				BIT(24)
6008c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 3		*/
6018c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT3				BIT(23)
6028c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 2		*/
6038c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT2				BIT(22)
6048c2ecf20Sopenharmony_ci/* Beacon DMA Interrupt 1		*/
6058c2ecf20Sopenharmony_ci#define	IMR_BCNDMAINT1				BIT(21)
6068c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK Interrup 7 */
6078c2ecf20Sopenharmony_ci#define	IMR_BCNDOK7				BIT(20)
6088c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK Interrup 6 */
6098c2ecf20Sopenharmony_ci#define	IMR_BCNDOK6				BIT(19)
6108c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK Interrup 5 */
6118c2ecf20Sopenharmony_ci#define	IMR_BCNDOK5				BIT(18)
6128c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK Interrup 4 */
6138c2ecf20Sopenharmony_ci#define	IMR_BCNDOK4				BIT(17)
6148c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK Interrup 3 */
6158c2ecf20Sopenharmony_ci#define	IMR_BCNDOK3				BIT(16)
6168c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK Interrup 2 */
6178c2ecf20Sopenharmony_ci#define	IMR_BCNDOK2				BIT(15)
6188c2ecf20Sopenharmony_ci/* Beacon Queue DMA OK Interrup 1 */
6198c2ecf20Sopenharmony_ci#define	IMR_BCNDOK1				BIT(14)
6208c2ecf20Sopenharmony_ci/* ATIM Window End Extension for Win7 */
6218c2ecf20Sopenharmony_ci#define	IMR_ATIMEND_E				BIT(13)
6228c2ecf20Sopenharmony_ci/* Tx Error Flag Interrupt Status, write 1 clear. */
6238c2ecf20Sopenharmony_ci#define	IMR_TXERR				BIT(11)
6248c2ecf20Sopenharmony_ci/* Rx Error Flag INT Status, Write 1 clear */
6258c2ecf20Sopenharmony_ci#define	IMR_RXERR				BIT(10)
6268c2ecf20Sopenharmony_ci/* Transmit FIFO Overflow */
6278c2ecf20Sopenharmony_ci#define	IMR_TXFOVW				BIT(9)
6288c2ecf20Sopenharmony_ci/* Receive FIFO Overflow */
6298c2ecf20Sopenharmony_ci#define	IMR_RXFOVW				BIT(8)
6308c2ecf20Sopenharmony_ci
6318c2ecf20Sopenharmony_ci#define	HWSET_MAX_SIZE				512
6328c2ecf20Sopenharmony_ci#define   EFUSE_MAX_SECTION			64
6338c2ecf20Sopenharmony_ci#define   EFUSE_REAL_CONTENT_LEN		256
6348c2ecf20Sopenharmony_ci/* PG data exclude header, dummy 7 bytes frome CP test and reserved 1byte.*/
6358c2ecf20Sopenharmony_ci#define		EFUSE_OOB_PROTECT_BYTES		18
6368c2ecf20Sopenharmony_ci
6378c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_TSSI			0x0
6388c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_TXPOWERDIFF		0x0
6398c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_CRYSTALCAP		0x5
6408c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_BOARDTYPE		0x02
6418c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_TXPOWER			0x1010
6428c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_HT2T_TXPWR		0x10
6438c2ecf20Sopenharmony_ci
6448c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF	0x3
6458c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_THERMALMETER		0x18
6468c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_ANTTXPOWERDIFF		0x0
6478c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_TXPWDIFF_CRYSTALCAP	0x5
6488c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_TXPOWERLEVEL		0x22
6498c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_HT40_2SDIFF		0x0
6508c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_HT20_DIFF		2
6518c2ecf20Sopenharmony_ci#define	EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF	0x3
6528c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_HT40_PWRMAXOFFSET	0
6538c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_HT20_PWRMAXOFFSET	0
6548c2ecf20Sopenharmony_ci
6558c2ecf20Sopenharmony_ci#define RF_OPTION1				0x79
6568c2ecf20Sopenharmony_ci#define RF_OPTION2				0x7A
6578c2ecf20Sopenharmony_ci#define RF_OPTION3				0x7B
6588c2ecf20Sopenharmony_ci#define RF_OPTION4				0xC3
6598c2ecf20Sopenharmony_ci
6608c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_PID			0x1234
6618c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_VID			0x5678
6628c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_CUSTOMERID		0xAB
6638c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_SUBCUSTOMERID		0xCD
6648c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_VERSION			0
6658c2ecf20Sopenharmony_ci
6668c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_FCC			0x0
6678c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_IC			0x1
6688c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_ETSI		0x2
6698c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_SPAIN		0x3
6708c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_FRANCE		0x4
6718c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_MKK			0x5
6728c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_MKK1		0x6
6738c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_ISRAEL		0x7
6748c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_TELEC		0x8
6758c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_GLOBAL_DOMAIN	0x9
6768c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_WORLD_WIDE_13	0xA
6778c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_NCC			0XB
6788c2ecf20Sopenharmony_ci#define	EEPROM_CHANNEL_PLAN_BY_HW_MASK		0x80
6798c2ecf20Sopenharmony_ci
6808c2ecf20Sopenharmony_ci#define EEPROM_CID_DEFAULT			0x0
6818c2ecf20Sopenharmony_ci#define EEPROM_CID_TOSHIBA			0x4
6828c2ecf20Sopenharmony_ci#define	EEPROM_CID_CCX				0x10
6838c2ecf20Sopenharmony_ci#define	EEPROM_CID_QMI				0x0D
6848c2ecf20Sopenharmony_ci#define EEPROM_CID_WHQL				0xFE
6858c2ecf20Sopenharmony_ci
6868c2ecf20Sopenharmony_ci#define	RTL_EEPROM_ID				0x8129
6878c2ecf20Sopenharmony_ci
6888c2ecf20Sopenharmony_ci#define EEPROM_HPON				0x02
6898c2ecf20Sopenharmony_ci#define EEPROM_CLK				0x06
6908c2ecf20Sopenharmony_ci#define EEPROM_TESTR				0x08
6918c2ecf20Sopenharmony_ci
6928c2ecf20Sopenharmony_ci#define EEPROM_TXPOWERCCK			0x10
6938c2ecf20Sopenharmony_ci#define	EEPROM_TXPOWERHT40_1S			0x16
6948c2ecf20Sopenharmony_ci#define EEPROM_TXPOWERHT20DIFF			0x1B
6958c2ecf20Sopenharmony_ci#define EEPROM_TXPOWER_OFDMDIFF			0x1B
6968c2ecf20Sopenharmony_ci
6978c2ecf20Sopenharmony_ci#define	EEPROM_TX_PWR_INX			0x10
6988c2ecf20Sopenharmony_ci
6998c2ecf20Sopenharmony_ci#define	EEPROM_CHANNELPLAN			0XB8
7008c2ecf20Sopenharmony_ci#define	EEPROM_XTAL_8821AE			0XB9
7018c2ecf20Sopenharmony_ci#define	EEPROM_THERMAL_METER			0XBA
7028c2ecf20Sopenharmony_ci#define	EEPROM_IQK_LCK_88E			0XBB
7038c2ecf20Sopenharmony_ci
7048c2ecf20Sopenharmony_ci#define	EEPROM_RF_BOARD_OPTION			0xC1
7058c2ecf20Sopenharmony_ci#define	EEPROM_RF_FEATURE_OPTION_88E		0xC2
7068c2ecf20Sopenharmony_ci#define	EEPROM_RF_BT_SETTING			0xC3
7078c2ecf20Sopenharmony_ci#define	EEPROM_VERSION				0xC4
7088c2ecf20Sopenharmony_ci#define	EEPROM_CUSTOMER_ID			0xC5
7098c2ecf20Sopenharmony_ci#define	EEPROM_RF_ANTENNA_OPT_88E		0xC9
7108c2ecf20Sopenharmony_ci#define	EEPROM_RFE_OPTION			0xCA
7118c2ecf20Sopenharmony_ci
7128c2ecf20Sopenharmony_ci#define	EEPROM_MAC_ADDR				0xD0
7138c2ecf20Sopenharmony_ci#define EEPROM_VID				0xD6
7148c2ecf20Sopenharmony_ci#define EEPROM_DID				0xD8
7158c2ecf20Sopenharmony_ci#define EEPROM_SVID				0xDA
7168c2ecf20Sopenharmony_ci#define EEPROM_SMID				0xDC
7178c2ecf20Sopenharmony_ci
7188c2ecf20Sopenharmony_ci#define	STOPBECON				BIT(6)
7198c2ecf20Sopenharmony_ci#define	STOPHIGHT				BIT(5)
7208c2ecf20Sopenharmony_ci#define	STOPMGT					BIT(4)
7218c2ecf20Sopenharmony_ci#define	STOPVO					BIT(3)
7228c2ecf20Sopenharmony_ci#define	STOPVI					BIT(2)
7238c2ecf20Sopenharmony_ci#define	STOPBE					BIT(1)
7248c2ecf20Sopenharmony_ci#define	STOPBK					BIT(0)
7258c2ecf20Sopenharmony_ci
7268c2ecf20Sopenharmony_ci#define	RCR_APPFCS				BIT(31)
7278c2ecf20Sopenharmony_ci#define	RCR_APP_MIC				BIT(30)
7288c2ecf20Sopenharmony_ci#define	RCR_APP_ICV				BIT(29)
7298c2ecf20Sopenharmony_ci#define	RCR_APP_PHYST_RXFF			BIT(28)
7308c2ecf20Sopenharmony_ci#define	RCR_APP_BA_SSN				BIT(27)
7318c2ecf20Sopenharmony_ci#define	RCR_NONQOS_VHT				BIT(26)
7328c2ecf20Sopenharmony_ci#define	RCR_ENMBID				BIT(24)
7338c2ecf20Sopenharmony_ci#define	RCR_LSIGEN				BIT(23)
7348c2ecf20Sopenharmony_ci#define	RCR_MFBEN				BIT(22)
7358c2ecf20Sopenharmony_ci#define	RCR_HTC_LOC_CTRL			BIT(14)
7368c2ecf20Sopenharmony_ci#define	RCR_AMF					BIT(13)
7378c2ecf20Sopenharmony_ci#define	RCR_ACF					BIT(12)
7388c2ecf20Sopenharmony_ci#define	RCR_ADF					BIT(11)
7398c2ecf20Sopenharmony_ci#define	RCR_AICV				BIT(9)
7408c2ecf20Sopenharmony_ci#define	RCR_ACRC32				BIT(8)
7418c2ecf20Sopenharmony_ci#define	RCR_CBSSID_BCN				BIT(7)
7428c2ecf20Sopenharmony_ci#define	RCR_CBSSID_DATA				BIT(6)
7438c2ecf20Sopenharmony_ci#define	RCR_CBSSID				RCR_CBSSID_DATA
7448c2ecf20Sopenharmony_ci#define	RCR_APWRMGT				BIT(5)
7458c2ecf20Sopenharmony_ci#define	RCR_ADD3				BIT(4)
7468c2ecf20Sopenharmony_ci#define	RCR_AB					BIT(3)
7478c2ecf20Sopenharmony_ci#define	RCR_AM					BIT(2)
7488c2ecf20Sopenharmony_ci#define	RCR_APM					BIT(1)
7498c2ecf20Sopenharmony_ci#define	RCR_AAP					BIT(0)
7508c2ecf20Sopenharmony_ci#define	RCR_MXDMA_OFFSET			8
7518c2ecf20Sopenharmony_ci#define	RCR_FIFO_OFFSET				13
7528c2ecf20Sopenharmony_ci
7538c2ecf20Sopenharmony_ci#define RSV_CTRL				0x001C
7548c2ecf20Sopenharmony_ci#define RD_CTRL					0x0524
7558c2ecf20Sopenharmony_ci
7568c2ecf20Sopenharmony_ci#define REG_USB_INFO				0xFE17
7578c2ecf20Sopenharmony_ci#define REG_USB_SPECIAL_OPTION			0xFE55
7588c2ecf20Sopenharmony_ci#define REG_USB_DMA_AGG_TO			0xFE5B
7598c2ecf20Sopenharmony_ci#define REG_USB_AGG_TO				0xFE5C
7608c2ecf20Sopenharmony_ci#define REG_USB_AGG_TH				0xFE5D
7618c2ecf20Sopenharmony_ci
7628c2ecf20Sopenharmony_ci#define REG_USB_VID				0xFE60
7638c2ecf20Sopenharmony_ci#define REG_USB_PID				0xFE62
7648c2ecf20Sopenharmony_ci#define REG_USB_OPTIONAL			0xFE64
7658c2ecf20Sopenharmony_ci#define REG_USB_CHIRP_K				0xFE65
7668c2ecf20Sopenharmony_ci#define REG_USB_PHY				0xFE66
7678c2ecf20Sopenharmony_ci#define REG_USB_MAC_ADDR			0xFE70
7688c2ecf20Sopenharmony_ci#define REG_USB_HRPWM				0xFE58
7698c2ecf20Sopenharmony_ci#define REG_USB_HCPWM				0xFE57
7708c2ecf20Sopenharmony_ci
7718c2ecf20Sopenharmony_ci#define SW18_FPWM				BIT(3)
7728c2ecf20Sopenharmony_ci
7738c2ecf20Sopenharmony_ci#define ISO_MD2PP				BIT(0)
7748c2ecf20Sopenharmony_ci#define ISO_UA2USB				BIT(1)
7758c2ecf20Sopenharmony_ci#define ISO_UD2CORE				BIT(2)
7768c2ecf20Sopenharmony_ci#define ISO_PA2PCIE				BIT(3)
7778c2ecf20Sopenharmony_ci#define ISO_PD2CORE				BIT(4)
7788c2ecf20Sopenharmony_ci#define ISO_IP2MAC				BIT(5)
7798c2ecf20Sopenharmony_ci#define ISO_DIOP				BIT(6)
7808c2ecf20Sopenharmony_ci#define ISO_DIOE				BIT(7)
7818c2ecf20Sopenharmony_ci#define ISO_EB2CORE				BIT(8)
7828c2ecf20Sopenharmony_ci#define ISO_DIOR				BIT(9)
7838c2ecf20Sopenharmony_ci
7848c2ecf20Sopenharmony_ci#define PWC_EV25V				BIT(14)
7858c2ecf20Sopenharmony_ci#define PWC_EV12V				BIT(15)
7868c2ecf20Sopenharmony_ci
7878c2ecf20Sopenharmony_ci#define FEN_BBRSTB				BIT(0)
7888c2ecf20Sopenharmony_ci#define FEN_BB_GLB_RSTN				BIT(1)
7898c2ecf20Sopenharmony_ci#define FEN_USBA				BIT(2)
7908c2ecf20Sopenharmony_ci#define FEN_UPLL				BIT(3)
7918c2ecf20Sopenharmony_ci#define FEN_USBD				BIT(4)
7928c2ecf20Sopenharmony_ci#define FEN_DIO_PCIE				BIT(5)
7938c2ecf20Sopenharmony_ci#define FEN_PCIEA				BIT(6)
7948c2ecf20Sopenharmony_ci#define FEN_PPLL				BIT(7)
7958c2ecf20Sopenharmony_ci#define FEN_PCIED				BIT(8)
7968c2ecf20Sopenharmony_ci#define FEN_DIOE				BIT(9)
7978c2ecf20Sopenharmony_ci#define FEN_CPUEN				BIT(10)
7988c2ecf20Sopenharmony_ci#define FEN_DCORE				BIT(11)
7998c2ecf20Sopenharmony_ci#define FEN_ELDR				BIT(12)
8008c2ecf20Sopenharmony_ci#define FEN_DIO_RF				BIT(13)
8018c2ecf20Sopenharmony_ci#define FEN_HWPDN				BIT(14)
8028c2ecf20Sopenharmony_ci#define FEN_MREGEN				BIT(15)
8038c2ecf20Sopenharmony_ci
8048c2ecf20Sopenharmony_ci#define PFM_LDALL				BIT(0)
8058c2ecf20Sopenharmony_ci#define PFM_ALDN				BIT(1)
8068c2ecf20Sopenharmony_ci#define PFM_LDKP				BIT(2)
8078c2ecf20Sopenharmony_ci#define PFM_WOWL				BIT(3)
8088c2ecf20Sopenharmony_ci#define ENPDN					BIT(4)
8098c2ecf20Sopenharmony_ci#define PDN_PL					BIT(5)
8108c2ecf20Sopenharmony_ci#define APFM_ONMAC				BIT(8)
8118c2ecf20Sopenharmony_ci#define APFM_OFF				BIT(9)
8128c2ecf20Sopenharmony_ci#define APFM_RSM				BIT(10)
8138c2ecf20Sopenharmony_ci#define AFSM_HSUS				BIT(11)
8148c2ecf20Sopenharmony_ci#define AFSM_PCIE				BIT(12)
8158c2ecf20Sopenharmony_ci#define APDM_MAC				BIT(13)
8168c2ecf20Sopenharmony_ci#define APDM_HOST				BIT(14)
8178c2ecf20Sopenharmony_ci#define APDM_HPDN				BIT(15)
8188c2ecf20Sopenharmony_ci#define RDY_MACON				BIT(16)
8198c2ecf20Sopenharmony_ci#define SUS_HOST				BIT(17)
8208c2ecf20Sopenharmony_ci#define ROP_ALD					BIT(20)
8218c2ecf20Sopenharmony_ci#define ROP_PWR					BIT(21)
8228c2ecf20Sopenharmony_ci#define ROP_SPS					BIT(22)
8238c2ecf20Sopenharmony_ci#define SOP_MRST				BIT(25)
8248c2ecf20Sopenharmony_ci#define SOP_FUSE				BIT(26)
8258c2ecf20Sopenharmony_ci#define SOP_ABG					BIT(27)
8268c2ecf20Sopenharmony_ci#define SOP_AMB					BIT(28)
8278c2ecf20Sopenharmony_ci#define SOP_RCK					BIT(29)
8288c2ecf20Sopenharmony_ci#define SOP_A8M					BIT(30)
8298c2ecf20Sopenharmony_ci#define XOP_BTCK				BIT(31)
8308c2ecf20Sopenharmony_ci
8318c2ecf20Sopenharmony_ci#define ANAD16V_EN				BIT(0)
8328c2ecf20Sopenharmony_ci#define ANA8M					BIT(1)
8338c2ecf20Sopenharmony_ci#define MACSLP					BIT(4)
8348c2ecf20Sopenharmony_ci#define LOADER_CLK_EN				BIT(5)
8358c2ecf20Sopenharmony_ci#define _80M_SSC_DIS				BIT(7)
8368c2ecf20Sopenharmony_ci#define _80M_SSC_EN_HO				BIT(8)
8378c2ecf20Sopenharmony_ci#define PHY_SSC_RSTB				BIT(9)
8388c2ecf20Sopenharmony_ci#define SEC_CLK_EN				BIT(10)
8398c2ecf20Sopenharmony_ci#define MAC_CLK_EN				BIT(11)
8408c2ecf20Sopenharmony_ci#define SYS_CLK_EN				BIT(12)
8418c2ecf20Sopenharmony_ci#define RING_CLK_EN				BIT(13)
8428c2ecf20Sopenharmony_ci
8438c2ecf20Sopenharmony_ci#define	BOOT_FROM_EEPROM			BIT(4)
8448c2ecf20Sopenharmony_ci#define	EEPROM_EN				BIT(5)
8458c2ecf20Sopenharmony_ci
8468c2ecf20Sopenharmony_ci#define AFE_BGEN				BIT(0)
8478c2ecf20Sopenharmony_ci#define AFE_MBEN				BIT(1)
8488c2ecf20Sopenharmony_ci#define MAC_ID_EN				BIT(7)
8498c2ecf20Sopenharmony_ci
8508c2ecf20Sopenharmony_ci#define WLOCK_ALL				BIT(0)
8518c2ecf20Sopenharmony_ci#define WLOCK_00				BIT(1)
8528c2ecf20Sopenharmony_ci#define WLOCK_04				BIT(2)
8538c2ecf20Sopenharmony_ci#define WLOCK_08				BIT(3)
8548c2ecf20Sopenharmony_ci#define WLOCK_40				BIT(4)
8558c2ecf20Sopenharmony_ci#define R_DIS_PRST_0				BIT(5)
8568c2ecf20Sopenharmony_ci#define R_DIS_PRST_1				BIT(6)
8578c2ecf20Sopenharmony_ci#define LOCK_ALL_EN				BIT(7)
8588c2ecf20Sopenharmony_ci
8598c2ecf20Sopenharmony_ci#define RF_EN					BIT(0)
8608c2ecf20Sopenharmony_ci#define RF_RSTB					BIT(1)
8618c2ecf20Sopenharmony_ci#define RF_SDMRSTB				BIT(2)
8628c2ecf20Sopenharmony_ci
8638c2ecf20Sopenharmony_ci#define LDA15_EN				BIT(0)
8648c2ecf20Sopenharmony_ci#define LDA15_STBY				BIT(1)
8658c2ecf20Sopenharmony_ci#define LDA15_OBUF				BIT(2)
8668c2ecf20Sopenharmony_ci#define LDA15_REG_VOS				BIT(3)
8678c2ecf20Sopenharmony_ci#define _LDA15_VOADJ(x)				(((x) & 0x7) << 4)
8688c2ecf20Sopenharmony_ci
8698c2ecf20Sopenharmony_ci#define LDV12_EN				BIT(0)
8708c2ecf20Sopenharmony_ci#define LDV12_SDBY				BIT(1)
8718c2ecf20Sopenharmony_ci#define LPLDO_HSM				BIT(2)
8728c2ecf20Sopenharmony_ci#define LPLDO_LSM_DIS				BIT(3)
8738c2ecf20Sopenharmony_ci#define _LDV12_VADJ(x)				(((x) & 0xF) << 4)
8748c2ecf20Sopenharmony_ci
8758c2ecf20Sopenharmony_ci#define XTAL_EN					BIT(0)
8768c2ecf20Sopenharmony_ci#define XTAL_BSEL				BIT(1)
8778c2ecf20Sopenharmony_ci#define _XTAL_BOSC(x)				(((x) & 0x3) << 2)
8788c2ecf20Sopenharmony_ci#define _XTAL_CADJ(x)				(((x) & 0xF) << 4)
8798c2ecf20Sopenharmony_ci#define XTAL_GATE_USB				BIT(8)
8808c2ecf20Sopenharmony_ci#define _XTAL_USB_DRV(x)			(((x) & 0x3) << 9)
8818c2ecf20Sopenharmony_ci#define XTAL_GATE_AFE				BIT(11)
8828c2ecf20Sopenharmony_ci#define _XTAL_AFE_DRV(x)			(((x) & 0x3) << 12)
8838c2ecf20Sopenharmony_ci#define XTAL_RF_GATE				BIT(14)
8848c2ecf20Sopenharmony_ci#define _XTAL_RF_DRV(x)				(((x) & 0x3) << 15)
8858c2ecf20Sopenharmony_ci#define XTAL_GATE_DIG				BIT(17)
8868c2ecf20Sopenharmony_ci#define _XTAL_DIG_DRV(x)			(((x) & 0x3) << 18)
8878c2ecf20Sopenharmony_ci#define XTAL_BT_GATE				BIT(20)
8888c2ecf20Sopenharmony_ci#define _XTAL_BT_DRV(x)				(((x) & 0x3) << 21)
8898c2ecf20Sopenharmony_ci#define _XTAL_GPIO(x)				(((x) & 0x7) << 23)
8908c2ecf20Sopenharmony_ci
8918c2ecf20Sopenharmony_ci#define CKDLY_AFE				BIT(26)
8928c2ecf20Sopenharmony_ci#define CKDLY_USB				BIT(27)
8938c2ecf20Sopenharmony_ci#define CKDLY_DIG				BIT(28)
8948c2ecf20Sopenharmony_ci#define CKDLY_BT				BIT(29)
8958c2ecf20Sopenharmony_ci
8968c2ecf20Sopenharmony_ci#define APLL_EN					BIT(0)
8978c2ecf20Sopenharmony_ci#define APLL_320_EN				BIT(1)
8988c2ecf20Sopenharmony_ci#define APLL_FREF_SEL				BIT(2)
8998c2ecf20Sopenharmony_ci#define APLL_EDGE_SEL				BIT(3)
9008c2ecf20Sopenharmony_ci#define APLL_WDOGB				BIT(4)
9018c2ecf20Sopenharmony_ci#define APLL_LPFEN				BIT(5)
9028c2ecf20Sopenharmony_ci
9038c2ecf20Sopenharmony_ci#define APLL_REF_CLK_13MHZ			0x1
9048c2ecf20Sopenharmony_ci#define APLL_REF_CLK_19_2MHZ			0x2
9058c2ecf20Sopenharmony_ci#define APLL_REF_CLK_20MHZ			0x3
9068c2ecf20Sopenharmony_ci#define APLL_REF_CLK_25MHZ			0x4
9078c2ecf20Sopenharmony_ci#define APLL_REF_CLK_26MHZ			0x5
9088c2ecf20Sopenharmony_ci#define APLL_REF_CLK_38_4MHZ			0x6
9098c2ecf20Sopenharmony_ci#define APLL_REF_CLK_40MHZ			0x7
9108c2ecf20Sopenharmony_ci
9118c2ecf20Sopenharmony_ci#define APLL_320EN				BIT(14)
9128c2ecf20Sopenharmony_ci#define APLL_80EN				BIT(15)
9138c2ecf20Sopenharmony_ci#define APLL_1MEN				BIT(24)
9148c2ecf20Sopenharmony_ci
9158c2ecf20Sopenharmony_ci#define ALD_EN					BIT(18)
9168c2ecf20Sopenharmony_ci#define EF_PD					BIT(19)
9178c2ecf20Sopenharmony_ci#define EF_FLAG					BIT(31)
9188c2ecf20Sopenharmony_ci
9198c2ecf20Sopenharmony_ci#define EF_TRPT					BIT(7)
9208c2ecf20Sopenharmony_ci#define LDOE25_EN				BIT(31)
9218c2ecf20Sopenharmony_ci
9228c2ecf20Sopenharmony_ci#define RSM_EN					BIT(0)
9238c2ecf20Sopenharmony_ci#define TIMER_EN				BIT(4)
9248c2ecf20Sopenharmony_ci
9258c2ecf20Sopenharmony_ci#define TRSW0EN					BIT(2)
9268c2ecf20Sopenharmony_ci#define TRSW1EN					BIT(3)
9278c2ecf20Sopenharmony_ci#define EROM_EN					BIT(4)
9288c2ecf20Sopenharmony_ci#define ENBT					BIT(5)
9298c2ecf20Sopenharmony_ci#define ENUART					BIT(8)
9308c2ecf20Sopenharmony_ci#define UART_910				BIT(9)
9318c2ecf20Sopenharmony_ci#define ENPMAC					BIT(10)
9328c2ecf20Sopenharmony_ci#define SIC_SWRST				BIT(11)
9338c2ecf20Sopenharmony_ci#define ENSIC					BIT(12)
9348c2ecf20Sopenharmony_ci#define SIC_23					BIT(13)
9358c2ecf20Sopenharmony_ci#define ENHDP					BIT(14)
9368c2ecf20Sopenharmony_ci#define SIC_LBK					BIT(15)
9378c2ecf20Sopenharmony_ci
9388c2ecf20Sopenharmony_ci#define LED0PL					BIT(4)
9398c2ecf20Sopenharmony_ci#define LED1PL					BIT(12)
9408c2ecf20Sopenharmony_ci#define LED0DIS					BIT(7)
9418c2ecf20Sopenharmony_ci
9428c2ecf20Sopenharmony_ci#define MCUFWDL_EN				BIT(0)
9438c2ecf20Sopenharmony_ci#define MCUFWDL_RDY				BIT(1)
9448c2ecf20Sopenharmony_ci#define FWDL_CHKSUM_RPT				BIT(2)
9458c2ecf20Sopenharmony_ci#define MACINI_RDY				BIT(3)
9468c2ecf20Sopenharmony_ci#define BBINI_RDY				BIT(4)
9478c2ecf20Sopenharmony_ci#define RFINI_RDY				BIT(5)
9488c2ecf20Sopenharmony_ci#define WINTINI_RDY				BIT(6)
9498c2ecf20Sopenharmony_ci#define CPRST					BIT(23)
9508c2ecf20Sopenharmony_ci
9518c2ecf20Sopenharmony_ci#define XCLK_VLD				BIT(0)
9528c2ecf20Sopenharmony_ci#define ACLK_VLD				BIT(1)
9538c2ecf20Sopenharmony_ci#define UCLK_VLD				BIT(2)
9548c2ecf20Sopenharmony_ci#define PCLK_VLD				BIT(3)
9558c2ecf20Sopenharmony_ci#define PCIRSTB					BIT(4)
9568c2ecf20Sopenharmony_ci#define V15_VLD					BIT(5)
9578c2ecf20Sopenharmony_ci#define TRP_B15V_EN				BIT(7)
9588c2ecf20Sopenharmony_ci#define SIC_IDLE				BIT(8)
9598c2ecf20Sopenharmony_ci#define BD_MAC2					BIT(9)
9608c2ecf20Sopenharmony_ci#define BD_MAC1					BIT(10)
9618c2ecf20Sopenharmony_ci#define IC_MACPHY_MODE				BIT(11)
9628c2ecf20Sopenharmony_ci#define VENDOR_ID				BIT(19)
9638c2ecf20Sopenharmony_ci#define PAD_HWPD_IDN				BIT(22)
9648c2ecf20Sopenharmony_ci#define TRP_VAUX_EN				BIT(23)
9658c2ecf20Sopenharmony_ci#define TRP_BT_EN				BIT(24)
9668c2ecf20Sopenharmony_ci#define BD_PKG_SEL				BIT(25)
9678c2ecf20Sopenharmony_ci#define BD_HCI_SEL				BIT(26)
9688c2ecf20Sopenharmony_ci#define TYPE_ID					BIT(27)
9698c2ecf20Sopenharmony_ci
9708c2ecf20Sopenharmony_ci#define CHIP_VER_RTL_MASK			0xF000
9718c2ecf20Sopenharmony_ci#define CHIP_VER_RTL_SHIFT			12
9728c2ecf20Sopenharmony_ci
9738c2ecf20Sopenharmony_ci#define REG_LBMODE				(REG_CR + 3)
9748c2ecf20Sopenharmony_ci
9758c2ecf20Sopenharmony_ci#define HCI_TXDMA_EN				BIT(0)
9768c2ecf20Sopenharmony_ci#define HCI_RXDMA_EN				BIT(1)
9778c2ecf20Sopenharmony_ci#define TXDMA_EN				BIT(2)
9788c2ecf20Sopenharmony_ci#define RXDMA_EN				BIT(3)
9798c2ecf20Sopenharmony_ci#define PROTOCOL_EN				BIT(4)
9808c2ecf20Sopenharmony_ci#define SCHEDULE_EN				BIT(5)
9818c2ecf20Sopenharmony_ci#define MACTXEN					BIT(6)
9828c2ecf20Sopenharmony_ci#define MACRXEN					BIT(7)
9838c2ecf20Sopenharmony_ci#define ENSWBCN					BIT(8)
9848c2ecf20Sopenharmony_ci#define ENSEC					BIT(9)
9858c2ecf20Sopenharmony_ci
9868c2ecf20Sopenharmony_ci#define _NETTYPE(x)				(((x) & 0x3) << 16)
9878c2ecf20Sopenharmony_ci#define MASK_NETTYPE				0x30000
9888c2ecf20Sopenharmony_ci#define NT_NO_LINK				0x0
9898c2ecf20Sopenharmony_ci#define NT_LINK_AD_HOC				0x1
9908c2ecf20Sopenharmony_ci#define NT_LINK_AP				0x2
9918c2ecf20Sopenharmony_ci#define NT_AS_AP				0x3
9928c2ecf20Sopenharmony_ci
9938c2ecf20Sopenharmony_ci#define _LBMODE(x)				(((x) & 0xF) << 24)
9948c2ecf20Sopenharmony_ci#define MASK_LBMODE				0xF000000
9958c2ecf20Sopenharmony_ci#define LOOPBACK_NORMAL				0x0
9968c2ecf20Sopenharmony_ci#define LOOPBACK_IMMEDIATELY			0XB
9978c2ecf20Sopenharmony_ci#define LOOPBACK_MAC_DELAY			0x3
9988c2ecf20Sopenharmony_ci#define LOOPBACK_PHY				0x1
9998c2ecf20Sopenharmony_ci#define LOOPBACK_DMA				0x7
10008c2ecf20Sopenharmony_ci
10018c2ecf20Sopenharmony_ci#define GET_RX_PAGE_SIZE(value)		((value) & 0xF)
10028c2ecf20Sopenharmony_ci#define GET_TX_PAGE_SIZE(value)		(((value) & 0xF0) >> 4)
10038c2ecf20Sopenharmony_ci#define _PSRX_MASK				0xF
10048c2ecf20Sopenharmony_ci#define _PSTX_MASK				0xF0
10058c2ecf20Sopenharmony_ci#define _PSRX(x)				(x)
10068c2ecf20Sopenharmony_ci#define _PSTX(x)				((x) << 4)
10078c2ecf20Sopenharmony_ci
10088c2ecf20Sopenharmony_ci#define PBP_64					0x0
10098c2ecf20Sopenharmony_ci#define PBP_128					0x1
10108c2ecf20Sopenharmony_ci#define PBP_256					0x2
10118c2ecf20Sopenharmony_ci#define PBP_512					0x3
10128c2ecf20Sopenharmony_ci#define PBP_1024				0x4
10138c2ecf20Sopenharmony_ci
10148c2ecf20Sopenharmony_ci#define RXDMA_ARBBW_EN				BIT(0)
10158c2ecf20Sopenharmony_ci#define RXSHFT_EN				BIT(1)
10168c2ecf20Sopenharmony_ci#define RXDMA_AGG_EN				BIT(2)
10178c2ecf20Sopenharmony_ci#define QS_VO_QUEUE				BIT(8)
10188c2ecf20Sopenharmony_ci#define QS_VI_QUEUE				BIT(9)
10198c2ecf20Sopenharmony_ci#define QS_BE_QUEUE				BIT(10)
10208c2ecf20Sopenharmony_ci#define QS_BK_QUEUE				BIT(11)
10218c2ecf20Sopenharmony_ci#define QS_MANAGER_QUEUE			BIT(12)
10228c2ecf20Sopenharmony_ci#define QS_HIGH_QUEUE				BIT(13)
10238c2ecf20Sopenharmony_ci
10248c2ecf20Sopenharmony_ci#define HQSEL_VOQ				BIT(0)
10258c2ecf20Sopenharmony_ci#define HQSEL_VIQ				BIT(1)
10268c2ecf20Sopenharmony_ci#define HQSEL_BEQ				BIT(2)
10278c2ecf20Sopenharmony_ci#define HQSEL_BKQ				BIT(3)
10288c2ecf20Sopenharmony_ci#define HQSEL_MGTQ				BIT(4)
10298c2ecf20Sopenharmony_ci#define HQSEL_HIQ				BIT(5)
10308c2ecf20Sopenharmony_ci
10318c2ecf20Sopenharmony_ci#define _TXDMA_HIQ_MAP(x)			(((x)&0x3) << 14)
10328c2ecf20Sopenharmony_ci#define _TXDMA_MGQ_MAP(x)			(((x)&0x3) << 12)
10338c2ecf20Sopenharmony_ci#define _TXDMA_BKQ_MAP(x)			(((x)&0x3) << 10)
10348c2ecf20Sopenharmony_ci#define _TXDMA_BEQ_MAP(x)			(((x)&0x3) << 8)
10358c2ecf20Sopenharmony_ci#define _TXDMA_VIQ_MAP(x)			(((x)&0x3) << 6)
10368c2ecf20Sopenharmony_ci#define _TXDMA_VOQ_MAP(x)			(((x)&0x3) << 4)
10378c2ecf20Sopenharmony_ci
10388c2ecf20Sopenharmony_ci#define QUEUE_LOW				1
10398c2ecf20Sopenharmony_ci#define QUEUE_NORMAL				2
10408c2ecf20Sopenharmony_ci#define QUEUE_HIGH				3
10418c2ecf20Sopenharmony_ci
10428c2ecf20Sopenharmony_ci#define _LLT_NO_ACTIVE				0x0
10438c2ecf20Sopenharmony_ci#define _LLT_WRITE_ACCESS			0x1
10448c2ecf20Sopenharmony_ci#define _LLT_READ_ACCESS			0x2
10458c2ecf20Sopenharmony_ci
10468c2ecf20Sopenharmony_ci#define _LLT_INIT_DATA(x)			((x) & 0xFF)
10478c2ecf20Sopenharmony_ci#define _LLT_INIT_ADDR(x)			(((x) & 0xFF) << 8)
10488c2ecf20Sopenharmony_ci#define _LLT_OP(x)				(((x) & 0x3) << 30)
10498c2ecf20Sopenharmony_ci#define _LLT_OP_VALUE(x)			(((x) >> 30) & 0x3)
10508c2ecf20Sopenharmony_ci
10518c2ecf20Sopenharmony_ci#define BB_WRITE_READ_MASK			(BIT(31) | BIT(30))
10528c2ecf20Sopenharmony_ci#define BB_WRITE_EN				BIT(30)
10538c2ecf20Sopenharmony_ci#define BB_READ_EN				BIT(31)
10548c2ecf20Sopenharmony_ci
10558c2ecf20Sopenharmony_ci#define _HPQ(x)				((x) & 0xFF)
10568c2ecf20Sopenharmony_ci#define _LPQ(x)				(((x) & 0xFF) << 8)
10578c2ecf20Sopenharmony_ci#define _PUBQ(x)			(((x) & 0xFF) << 16)
10588c2ecf20Sopenharmony_ci#define _NPQ(x)				((x) & 0xFF)
10598c2ecf20Sopenharmony_ci
10608c2ecf20Sopenharmony_ci#define HPQ_PUBLIC_DIS				BIT(24)
10618c2ecf20Sopenharmony_ci#define LPQ_PUBLIC_DIS				BIT(25)
10628c2ecf20Sopenharmony_ci#define LD_RQPN					BIT(31)
10638c2ecf20Sopenharmony_ci
10648c2ecf20Sopenharmony_ci#define BCN_VALID				BIT(16)
10658c2ecf20Sopenharmony_ci#define BCN_HEAD(x)			(((x) & 0xFF) << 8)
10668c2ecf20Sopenharmony_ci#define	BCN_HEAD_MASK				0xFF00
10678c2ecf20Sopenharmony_ci
10688c2ecf20Sopenharmony_ci#define BLK_DESC_NUM_SHIFT			4
10698c2ecf20Sopenharmony_ci#define BLK_DESC_NUM_MASK			0xF
10708c2ecf20Sopenharmony_ci
10718c2ecf20Sopenharmony_ci#define DROP_DATA_EN				BIT(9)
10728c2ecf20Sopenharmony_ci
10738c2ecf20Sopenharmony_ci#define EN_AMPDU_RTY_NEW			BIT(7)
10748c2ecf20Sopenharmony_ci
10758c2ecf20Sopenharmony_ci#define _INIRTSMCS_SEL(x)			((x) & 0x3F)
10768c2ecf20Sopenharmony_ci
10778c2ecf20Sopenharmony_ci#define _SPEC_SIFS_CCK(x)			((x) & 0xFF)
10788c2ecf20Sopenharmony_ci#define _SPEC_SIFS_OFDM(x)			(((x) & 0xFF) << 8)
10798c2ecf20Sopenharmony_ci
10808c2ecf20Sopenharmony_ci#define RATE_REG_BITMAP_ALL			0xFFFFF
10818c2ecf20Sopenharmony_ci
10828c2ecf20Sopenharmony_ci#define _RRSC_BITMAP(x)				((x) & 0xFFFFF)
10838c2ecf20Sopenharmony_ci
10848c2ecf20Sopenharmony_ci#define _RRSR_RSC(x)				(((x) & 0x3) << 21)
10858c2ecf20Sopenharmony_ci#define RRSR_RSC_RESERVED			0x0
10868c2ecf20Sopenharmony_ci#define RRSR_RSC_UPPER_SUBCHANNEL		0x1
10878c2ecf20Sopenharmony_ci#define RRSR_RSC_LOWER_SUBCHANNEL		0x2
10888c2ecf20Sopenharmony_ci#define RRSR_RSC_DUPLICATE_MODE			0x3
10898c2ecf20Sopenharmony_ci
10908c2ecf20Sopenharmony_ci#define USE_SHORT_G1				BIT(20)
10918c2ecf20Sopenharmony_ci
10928c2ecf20Sopenharmony_ci#define _AGGLMT_MCS0(x)				((x) & 0xF)
10938c2ecf20Sopenharmony_ci#define _AGGLMT_MCS1(x)				(((x) & 0xF) << 4)
10948c2ecf20Sopenharmony_ci#define _AGGLMT_MCS2(x)				(((x) & 0xF) << 8)
10958c2ecf20Sopenharmony_ci#define _AGGLMT_MCS3(x)				(((x) & 0xF) << 12)
10968c2ecf20Sopenharmony_ci#define _AGGLMT_MCS4(x)				(((x) & 0xF) << 16)
10978c2ecf20Sopenharmony_ci#define _AGGLMT_MCS5(x)				(((x) & 0xF) << 20)
10988c2ecf20Sopenharmony_ci#define _AGGLMT_MCS6(x)				(((x) & 0xF) << 24)
10998c2ecf20Sopenharmony_ci#define _AGGLMT_MCS7(x)				(((x) & 0xF) << 28)
11008c2ecf20Sopenharmony_ci
11018c2ecf20Sopenharmony_ci#define	RETRY_LIMIT_SHORT_SHIFT		8
11028c2ecf20Sopenharmony_ci#define	RETRY_LIMIT_LONG_SHIFT		0
11038c2ecf20Sopenharmony_ci
11048c2ecf20Sopenharmony_ci#define _DARF_RC1(x)			((x) & 0x1F)
11058c2ecf20Sopenharmony_ci#define _DARF_RC2(x)			(((x) & 0x1F) << 8)
11068c2ecf20Sopenharmony_ci#define _DARF_RC3(x)			(((x) & 0x1F) << 16)
11078c2ecf20Sopenharmony_ci#define _DARF_RC4(x)			(((x) & 0x1F) << 24)
11088c2ecf20Sopenharmony_ci#define _DARF_RC5(x)			((x) & 0x1F)
11098c2ecf20Sopenharmony_ci#define _DARF_RC6(x)			(((x) & 0x1F) << 8)
11108c2ecf20Sopenharmony_ci#define _DARF_RC7(x)			(((x) & 0x1F) << 16)
11118c2ecf20Sopenharmony_ci#define _DARF_RC8(x)			(((x) & 0x1F) << 24)
11128c2ecf20Sopenharmony_ci
11138c2ecf20Sopenharmony_ci#define _RARF_RC1(x)			((x) & 0x1F)
11148c2ecf20Sopenharmony_ci#define _RARF_RC2(x)			(((x) & 0x1F) << 8)
11158c2ecf20Sopenharmony_ci#define _RARF_RC3(x)			(((x) & 0x1F) << 16)
11168c2ecf20Sopenharmony_ci#define _RARF_RC4(x)			(((x) & 0x1F) << 24)
11178c2ecf20Sopenharmony_ci#define _RARF_RC5(x)			((x) & 0x1F)
11188c2ecf20Sopenharmony_ci#define _RARF_RC6(x)			(((x) & 0x1F) << 8)
11198c2ecf20Sopenharmony_ci#define _RARF_RC7(x)			(((x) & 0x1F) << 16)
11208c2ecf20Sopenharmony_ci#define _RARF_RC8(x)			(((x) & 0x1F) << 24)
11218c2ecf20Sopenharmony_ci
11228c2ecf20Sopenharmony_ci#define AC_PARAM_TXOP_LIMIT_OFFSET	16
11238c2ecf20Sopenharmony_ci#define AC_PARAM_ECW_MAX_OFFSET		12
11248c2ecf20Sopenharmony_ci#define AC_PARAM_ECW_MIN_OFFSET		8
11258c2ecf20Sopenharmony_ci#define AC_PARAM_AIFS_OFFSET		0
11268c2ecf20Sopenharmony_ci
11278c2ecf20Sopenharmony_ci#define _AIFS(x)			(x)
11288c2ecf20Sopenharmony_ci#define _ECW_MAX_MIN(x)			((x) << 8)
11298c2ecf20Sopenharmony_ci#define _TXOP_LIMIT(x)			((x) << 16)
11308c2ecf20Sopenharmony_ci
11318c2ecf20Sopenharmony_ci#define _BCNIFS(x)			((x) & 0xFF)
11328c2ecf20Sopenharmony_ci#define _BCNECW(x)			((((x) & 0xF)) << 8)
11338c2ecf20Sopenharmony_ci
11348c2ecf20Sopenharmony_ci#define _LRL(x)				((x) & 0x3F)
11358c2ecf20Sopenharmony_ci#define _SRL(x)				(((x) & 0x3F) << 8)
11368c2ecf20Sopenharmony_ci
11378c2ecf20Sopenharmony_ci#define _SIFS_CCK_CTX(x)		((x) & 0xFF)
11388c2ecf20Sopenharmony_ci#define _SIFS_CCK_TRX(x)		(((x) & 0xFF) << 8)
11398c2ecf20Sopenharmony_ci
11408c2ecf20Sopenharmony_ci#define _SIFS_OFDM_CTX(x)		((x) & 0xFF)
11418c2ecf20Sopenharmony_ci#define _SIFS_OFDM_TRX(x)		(((x) & 0xFF) << 8)
11428c2ecf20Sopenharmony_ci
11438c2ecf20Sopenharmony_ci#define _TBTT_PROHIBIT_HOLD(x)		(((x) & 0xFF) << 8)
11448c2ecf20Sopenharmony_ci
11458c2ecf20Sopenharmony_ci#define DIS_EDCA_CNT_DWN		BIT(11)
11468c2ecf20Sopenharmony_ci
11478c2ecf20Sopenharmony_ci#define EN_MBSSID			BIT(1)
11488c2ecf20Sopenharmony_ci#define EN_TXBCN_RPT			BIT(2)
11498c2ecf20Sopenharmony_ci#define	EN_BCN_FUNCTION			BIT(3)
11508c2ecf20Sopenharmony_ci
11518c2ecf20Sopenharmony_ci#define TSFTR_RST			BIT(0)
11528c2ecf20Sopenharmony_ci#define TSFTR1_RST			BIT(1)
11538c2ecf20Sopenharmony_ci
11548c2ecf20Sopenharmony_ci#define STOP_BCNQ			BIT(6)
11558c2ecf20Sopenharmony_ci
11568c2ecf20Sopenharmony_ci#define	DIS_TSF_UDT0_NORMAL_CHIP	BIT(4)
11578c2ecf20Sopenharmony_ci#define	DIS_TSF_UDT0_TEST_CHIP		BIT(5)
11588c2ecf20Sopenharmony_ci
11598c2ecf20Sopenharmony_ci#define	ACMHW_HWEN			BIT(0)
11608c2ecf20Sopenharmony_ci#define	ACMHW_BEQEN			BIT(1)
11618c2ecf20Sopenharmony_ci#define	ACMHW_VIQEN			BIT(2)
11628c2ecf20Sopenharmony_ci#define	ACMHW_VOQEN			BIT(3)
11638c2ecf20Sopenharmony_ci#define	ACMHW_BEQSTATUS			BIT(4)
11648c2ecf20Sopenharmony_ci#define	ACMHW_VIQSTATUS			BIT(5)
11658c2ecf20Sopenharmony_ci#define	ACMHW_VOQSTATUS			BIT(6)
11668c2ecf20Sopenharmony_ci
11678c2ecf20Sopenharmony_ci#define APSDOFF				BIT(6)
11688c2ecf20Sopenharmony_ci#define APSDOFF_STATUS			BIT(7)
11698c2ecf20Sopenharmony_ci
11708c2ecf20Sopenharmony_ci#define BW_20MHZ			BIT(2)
11718c2ecf20Sopenharmony_ci
11728c2ecf20Sopenharmony_ci#define RATE_BITMAP_ALL			0xFFFFF
11738c2ecf20Sopenharmony_ci
11748c2ecf20Sopenharmony_ci#define RATE_RRSR_CCK_ONLY_1M		0xFFFF1
11758c2ecf20Sopenharmony_ci
11768c2ecf20Sopenharmony_ci#define TSFRST				BIT(0)
11778c2ecf20Sopenharmony_ci#define DIS_GCLK			BIT(1)
11788c2ecf20Sopenharmony_ci#define PAD_SEL				BIT(2)
11798c2ecf20Sopenharmony_ci#define PWR_ST				BIT(6)
11808c2ecf20Sopenharmony_ci#define PWRBIT_OW_EN			BIT(7)
11818c2ecf20Sopenharmony_ci#define ACRC				BIT(8)
11828c2ecf20Sopenharmony_ci#define CFENDFORM			BIT(9)
11838c2ecf20Sopenharmony_ci#define ICV				BIT(10)
11848c2ecf20Sopenharmony_ci
11858c2ecf20Sopenharmony_ci#define AAP				BIT(0)
11868c2ecf20Sopenharmony_ci#define APM				BIT(1)
11878c2ecf20Sopenharmony_ci#define AM				BIT(2)
11888c2ecf20Sopenharmony_ci#define AB				BIT(3)
11898c2ecf20Sopenharmony_ci#define ADD3				BIT(4)
11908c2ecf20Sopenharmony_ci#define APWRMGT				BIT(5)
11918c2ecf20Sopenharmony_ci#define CBSSID				BIT(6)
11928c2ecf20Sopenharmony_ci#define CBSSID_DATA			BIT(6)
11938c2ecf20Sopenharmony_ci#define CBSSID_BCN			BIT(7)
11948c2ecf20Sopenharmony_ci#define ACRC32				BIT(8)
11958c2ecf20Sopenharmony_ci#define AICV				BIT(9)
11968c2ecf20Sopenharmony_ci#define ADF				BIT(11)
11978c2ecf20Sopenharmony_ci#define ACF				BIT(12)
11988c2ecf20Sopenharmony_ci#define AMF				BIT(13)
11998c2ecf20Sopenharmony_ci#define HTC_LOC_CTRL			BIT(14)
12008c2ecf20Sopenharmony_ci#define UC_DATA_EN			BIT(16)
12018c2ecf20Sopenharmony_ci#define BM_DATA_EN			BIT(17)
12028c2ecf20Sopenharmony_ci#define MFBEN				BIT(22)
12038c2ecf20Sopenharmony_ci#define LSIGEN				BIT(23)
12048c2ecf20Sopenharmony_ci#define ENMBID				BIT(24)
12058c2ecf20Sopenharmony_ci#define APP_BASSN			BIT(27)
12068c2ecf20Sopenharmony_ci#define APP_PHYSTS			BIT(28)
12078c2ecf20Sopenharmony_ci#define APP_ICV				BIT(29)
12088c2ecf20Sopenharmony_ci#define APP_MIC				BIT(30)
12098c2ecf20Sopenharmony_ci#define APP_FCS				BIT(31)
12108c2ecf20Sopenharmony_ci
12118c2ecf20Sopenharmony_ci#define _MIN_SPACE(x)			((x) & 0x7)
12128c2ecf20Sopenharmony_ci#define _SHORT_GI_PADDING(x)		(((x) & 0x1F) << 3)
12138c2ecf20Sopenharmony_ci
12148c2ecf20Sopenharmony_ci#define RXERR_TYPE_OFDM_PPDU		0
12158c2ecf20Sopenharmony_ci#define RXERR_TYPE_OFDM_FALSE_ALARM	1
12168c2ecf20Sopenharmony_ci#define	RXERR_TYPE_OFDM_MPDU_OK		2
12178c2ecf20Sopenharmony_ci#define RXERR_TYPE_OFDM_MPDU_FAIL	3
12188c2ecf20Sopenharmony_ci#define RXERR_TYPE_CCK_PPDU		4
12198c2ecf20Sopenharmony_ci#define RXERR_TYPE_CCK_FALSE_ALARM	5
12208c2ecf20Sopenharmony_ci#define RXERR_TYPE_CCK_MPDU_OK		6
12218c2ecf20Sopenharmony_ci#define RXERR_TYPE_CCK_MPDU_FAIL	7
12228c2ecf20Sopenharmony_ci#define RXERR_TYPE_HT_PPDU		8
12238c2ecf20Sopenharmony_ci#define RXERR_TYPE_HT_FALSE_ALARM	9
12248c2ecf20Sopenharmony_ci#define RXERR_TYPE_HT_MPDU_TOTAL	10
12258c2ecf20Sopenharmony_ci#define RXERR_TYPE_HT_MPDU_OK		11
12268c2ecf20Sopenharmony_ci#define RXERR_TYPE_HT_MPDU_FAIL		12
12278c2ecf20Sopenharmony_ci#define RXERR_TYPE_RX_FULL_DROP		15
12288c2ecf20Sopenharmony_ci
12298c2ecf20Sopenharmony_ci#define RXERR_COUNTER_MASK		0xFFFFF
12308c2ecf20Sopenharmony_ci#define RXERR_RPT_RST			BIT(27)
12318c2ecf20Sopenharmony_ci#define _RXERR_RPT_SEL(type)		((type) << 28)
12328c2ecf20Sopenharmony_ci
12338c2ecf20Sopenharmony_ci#define	SCR_TXUSEDK			BIT(0)
12348c2ecf20Sopenharmony_ci#define	SCR_RXUSEDK			BIT(1)
12358c2ecf20Sopenharmony_ci#define	SCR_TXENCENABLE			BIT(2)
12368c2ecf20Sopenharmony_ci#define	SCR_RXDECENABLE			BIT(3)
12378c2ecf20Sopenharmony_ci#define	SCR_SKBYA2			BIT(4)
12388c2ecf20Sopenharmony_ci#define	SCR_NOSKMC			BIT(5)
12398c2ecf20Sopenharmony_ci#define SCR_TXBCUSEDK			BIT(6)
12408c2ecf20Sopenharmony_ci#define SCR_RXBCUSEDK			BIT(7)
12418c2ecf20Sopenharmony_ci
12428c2ecf20Sopenharmony_ci#define XCLK_VLD			BIT(0)
12438c2ecf20Sopenharmony_ci#define ACLK_VLD			BIT(1)
12448c2ecf20Sopenharmony_ci#define UCLK_VLD			BIT(2)
12458c2ecf20Sopenharmony_ci#define PCLK_VLD			BIT(3)
12468c2ecf20Sopenharmony_ci#define PCIRSTB				BIT(4)
12478c2ecf20Sopenharmony_ci#define V15_VLD				BIT(5)
12488c2ecf20Sopenharmony_ci#define TRP_B15V_EN			BIT(7)
12498c2ecf20Sopenharmony_ci#define SIC_IDLE			BIT(8)
12508c2ecf20Sopenharmony_ci#define BD_MAC2				BIT(9)
12518c2ecf20Sopenharmony_ci#define BD_MAC1				BIT(10)
12528c2ecf20Sopenharmony_ci#define IC_MACPHY_MODE			BIT(11)
12538c2ecf20Sopenharmony_ci#define BT_FUNC				BIT(16)
12548c2ecf20Sopenharmony_ci#define VENDOR_ID			BIT(19)
12558c2ecf20Sopenharmony_ci#define PAD_HWPD_IDN			BIT(22)
12568c2ecf20Sopenharmony_ci#define TRP_VAUX_EN			BIT(23)
12578c2ecf20Sopenharmony_ci#define TRP_BT_EN			BIT(24)
12588c2ecf20Sopenharmony_ci#define BD_PKG_SEL			BIT(25)
12598c2ecf20Sopenharmony_ci#define BD_HCI_SEL			BIT(26)
12608c2ecf20Sopenharmony_ci#define TYPE_ID				BIT(27)
12618c2ecf20Sopenharmony_ci
12628c2ecf20Sopenharmony_ci#define USB_IS_HIGH_SPEED		0
12638c2ecf20Sopenharmony_ci#define USB_IS_FULL_SPEED		1
12648c2ecf20Sopenharmony_ci#define USB_SPEED_MASK			BIT(5)
12658c2ecf20Sopenharmony_ci
12668c2ecf20Sopenharmony_ci#define USB_NORMAL_SIE_EP_MASK		0xF
12678c2ecf20Sopenharmony_ci#define USB_NORMAL_SIE_EP_SHIFT		4
12688c2ecf20Sopenharmony_ci
12698c2ecf20Sopenharmony_ci#define USB_TEST_EP_MASK		0x30
12708c2ecf20Sopenharmony_ci#define USB_TEST_EP_SHIFT		4
12718c2ecf20Sopenharmony_ci
12728c2ecf20Sopenharmony_ci#define USB_AGG_EN			BIT(3)
12738c2ecf20Sopenharmony_ci
12748c2ecf20Sopenharmony_ci#define MAC_ADDR_LEN			6
12758c2ecf20Sopenharmony_ci#define LAST_ENTRY_OF_TX_PKT_BUFFER	255
12768c2ecf20Sopenharmony_ci
12778c2ecf20Sopenharmony_ci#define POLLING_LLT_THRESHOLD		20
12788c2ecf20Sopenharmony_ci#define POLLING_READY_TIMEOUT_COUNT	3000
12798c2ecf20Sopenharmony_ci
12808c2ecf20Sopenharmony_ci#define	MAX_MSS_DENSITY_2T		0x13
12818c2ecf20Sopenharmony_ci#define	MAX_MSS_DENSITY_1T		0x0A
12828c2ecf20Sopenharmony_ci
12838c2ecf20Sopenharmony_ci#define EPROM_CMD_OPERATING_MODE_MASK	((1<<7)|(1<<6))
12848c2ecf20Sopenharmony_ci#define EPROM_CMD_CONFIG		0x3
12858c2ecf20Sopenharmony_ci#define EPROM_CMD_LOAD			1
12868c2ecf20Sopenharmony_ci
12878c2ecf20Sopenharmony_ci#define	HWSET_MAX_SIZE_92S		HWSET_MAX_SIZE
12888c2ecf20Sopenharmony_ci
12898c2ecf20Sopenharmony_ci#define	HAL_8192C_HW_GPIO_WPS_BIT	BIT(2)
12908c2ecf20Sopenharmony_ci
12918c2ecf20Sopenharmony_ci#define RA_LSSIWRITE_8821A		0xc90
12928c2ecf20Sopenharmony_ci#define RB_LSSIWRITE_8821A		0xe90
12938c2ecf20Sopenharmony_ci
12948c2ecf20Sopenharmony_ci#define	RA_PIREAD_8821A			0xd04
12958c2ecf20Sopenharmony_ci#define	RB_PIREAD_8821A			0xd44
12968c2ecf20Sopenharmony_ci#define	RA_SIREAD_8821A			0xd08
12978c2ecf20Sopenharmony_ci#define	RB_SIREAD_8821A			0xd48
12988c2ecf20Sopenharmony_ci
12998c2ecf20Sopenharmony_ci#define	RPMAC_RESET			0x100
13008c2ecf20Sopenharmony_ci#define	RPMAC_TXSTART			0x104
13018c2ecf20Sopenharmony_ci#define	RPMAC_TXLEGACYSIG		0x108
13028c2ecf20Sopenharmony_ci#define	RPMAC_TXHTSIG1			0x10c
13038c2ecf20Sopenharmony_ci#define	RPMAC_TXHTSIG2			0x110
13048c2ecf20Sopenharmony_ci#define	RPMAC_PHYDEBUG			0x114
13058c2ecf20Sopenharmony_ci#define	RPMAC_TXPACKETNUM		0x118
13068c2ecf20Sopenharmony_ci#define	RPMAC_TXIDLE			0x11c
13078c2ecf20Sopenharmony_ci#define	RPMAC_TXMACHEADER0		0x120
13088c2ecf20Sopenharmony_ci#define	RPMAC_TXMACHEADER1		0x124
13098c2ecf20Sopenharmony_ci#define	RPMAC_TXMACHEADER2		0x128
13108c2ecf20Sopenharmony_ci#define	RPMAC_TXMACHEADER3		0x12c
13118c2ecf20Sopenharmony_ci#define	RPMAC_TXMACHEADER4		0x130
13128c2ecf20Sopenharmony_ci#define	RPMAC_TXMACHEADER5		0x134
13138c2ecf20Sopenharmony_ci#define	RPMAC_TXDADATYPE		0x138
13148c2ecf20Sopenharmony_ci#define	RPMAC_TXRANDOMSEED		0x13c
13158c2ecf20Sopenharmony_ci#define	RPMAC_CCKPLCPPREAMBLE		0x140
13168c2ecf20Sopenharmony_ci#define	RPMAC_CCKPLCPHEADER		0x144
13178c2ecf20Sopenharmony_ci#define	RPMAC_CCKCRC16			0x148
13188c2ecf20Sopenharmony_ci#define	RPMAC_OFDMRXCRC32OK		0x170
13198c2ecf20Sopenharmony_ci#define	RPMAC_OFDMRXCRC32ER		0x174
13208c2ecf20Sopenharmony_ci#define	RPMAC_OFDMRXPARITYER		0x178
13218c2ecf20Sopenharmony_ci#define	RPMAC_OFDMRXCRC8ER		0x17c
13228c2ecf20Sopenharmony_ci#define	RPMAC_CCKCRXRC16ER		0x180
13238c2ecf20Sopenharmony_ci#define	RPMAC_CCKCRXRC32ER		0x184
13248c2ecf20Sopenharmony_ci#define	RPMAC_CCKCRXRC32OK		0x188
13258c2ecf20Sopenharmony_ci#define	RPMAC_TXSTATUS			0x18c
13268c2ecf20Sopenharmony_ci
13278c2ecf20Sopenharmony_ci#define	RFPGA0_RFMOD			0x800
13288c2ecf20Sopenharmony_ci
13298c2ecf20Sopenharmony_ci#define	RFPGA0_TXINFO			0x804
13308c2ecf20Sopenharmony_ci#define	RFPGA0_PSDFUNCTION		0x808
13318c2ecf20Sopenharmony_ci
13328c2ecf20Sopenharmony_ci#define	RFPGA0_TXGAINSTAGE		0x80c
13338c2ecf20Sopenharmony_ci
13348c2ecf20Sopenharmony_ci#define	RFPGA0_RFTIMING1		0x810
13358c2ecf20Sopenharmony_ci#define	RFPGA0_RFTIMING2		0x814
13368c2ecf20Sopenharmony_ci
13378c2ecf20Sopenharmony_ci#define	RFPGA0_XA_HSSIPARAMETER1	0x820
13388c2ecf20Sopenharmony_ci#define	RFPGA0_XA_HSSIPARAMETER2	0x824
13398c2ecf20Sopenharmony_ci#define	RFPGA0_XB_HSSIPARAMETER1	0x828
13408c2ecf20Sopenharmony_ci#define	RFPGA0_XB_HSSIPARAMETER2	0x82c
13418c2ecf20Sopenharmony_ci#define	RCCAONSEC			0x838
13428c2ecf20Sopenharmony_ci
13438c2ecf20Sopenharmony_ci#define	RFPGA0_XA_LSSIPARAMETER		0x840
13448c2ecf20Sopenharmony_ci#define	RFPGA0_XB_LSSIPARAMETER		0x844
13458c2ecf20Sopenharmony_ci#define	RL1PEAKTH			0x848
13468c2ecf20Sopenharmony_ci
13478c2ecf20Sopenharmony_ci#define	RFPGA0_RFWAKEUPPARAMETER	0x850
13488c2ecf20Sopenharmony_ci#define	RFPGA0_RFSLEEPUPPARAMETER	0x854
13498c2ecf20Sopenharmony_ci
13508c2ecf20Sopenharmony_ci#define	RFPGA0_XAB_SWITCHCONTROL	0x858
13518c2ecf20Sopenharmony_ci#define	RFPGA0_XCD_SWITCHCONTROL	0x85c
13528c2ecf20Sopenharmony_ci
13538c2ecf20Sopenharmony_ci#define	RFPGA0_XA_RFINTERFACEOE		0x860
13548c2ecf20Sopenharmony_ci#define RFC_AREA			0x860
13558c2ecf20Sopenharmony_ci#define	RFPGA0_XB_RFINTERFACEOE		0x864
13568c2ecf20Sopenharmony_ci
13578c2ecf20Sopenharmony_ci#define	RFPGA0_XAB_RFINTERFACESW	0x870
13588c2ecf20Sopenharmony_ci#define	RFPGA0_XCD_RFINTERFACESW	0x874
13598c2ecf20Sopenharmony_ci
13608c2ecf20Sopenharmony_ci#define	RFPGA0_XAB_RFPARAMETER		0x878
13618c2ecf20Sopenharmony_ci#define	RFPGA0_XCD_RFPARAMETER		0x87c
13628c2ecf20Sopenharmony_ci
13638c2ecf20Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER1		0x880
13648c2ecf20Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER2		0x884
13658c2ecf20Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER3		0x888
13668c2ecf20Sopenharmony_ci#define	RFPGA0_ANALOGPARAMETER4		0x88c
13678c2ecf20Sopenharmony_ci
13688c2ecf20Sopenharmony_ci#define	RFPGA0_XA_LSSIREADBACK		0x8a0
13698c2ecf20Sopenharmony_ci#define	RFPGA0_XB_LSSIREADBACK		0x8a4
13708c2ecf20Sopenharmony_ci#define	RFPGA0_XC_LSSIREADBACK		0x8a8
13718c2ecf20Sopenharmony_ci#define RRFMOD				0x8ac
13728c2ecf20Sopenharmony_ci#define	RHSSIREAD_8821AE		0x8b0
13738c2ecf20Sopenharmony_ci
13748c2ecf20Sopenharmony_ci#define	RFPGA0_PSDREPORT		0x8b4
13758c2ecf20Sopenharmony_ci#define	TRANSCEIVEA_HSPI_READBACK	0x8b8
13768c2ecf20Sopenharmony_ci#define	TRANSCEIVEB_HSPI_READBACK	0x8bc
13778c2ecf20Sopenharmony_ci#define RADC_BUF_CLK			0x8c4
13788c2ecf20Sopenharmony_ci#define	RFPGA0_XAB_RFINTERFACERB	0x8e0
13798c2ecf20Sopenharmony_ci#define	RFPGA0_XCD_RFINTERFACERB	0x8e4
13808c2ecf20Sopenharmony_ci
13818c2ecf20Sopenharmony_ci#define	RFPGA1_RFMOD			0x900
13828c2ecf20Sopenharmony_ci
13838c2ecf20Sopenharmony_ci#define	RFPGA1_TXBLOCK			0x904
13848c2ecf20Sopenharmony_ci#define	RFPGA1_DEBUGSELECT		0x908
13858c2ecf20Sopenharmony_ci#define	RFPGA1_TXINFO			0x90c
13868c2ecf20Sopenharmony_ci
13878c2ecf20Sopenharmony_ci#define	RCCK_SYSTEM			0xa00
13888c2ecf20Sopenharmony_ci#define	BCCK_SYSTEM			0x10
13898c2ecf20Sopenharmony_ci
13908c2ecf20Sopenharmony_ci#define	RCCK0_AFESETTING		0xa04
13918c2ecf20Sopenharmony_ci#define	RCCK0_CCA			0xa08
13928c2ecf20Sopenharmony_ci
13938c2ecf20Sopenharmony_ci#define	RCCK0_RXAGC1			0xa0c
13948c2ecf20Sopenharmony_ci#define	RCCK0_RXAGC2			0xa10
13958c2ecf20Sopenharmony_ci
13968c2ecf20Sopenharmony_ci#define	RCCK0_RXHP			0xa14
13978c2ecf20Sopenharmony_ci
13988c2ecf20Sopenharmony_ci#define	RCCK0_DSPPARAMETER1		0xa18
13998c2ecf20Sopenharmony_ci#define	RCCK0_DSPPARAMETER2		0xa1c
14008c2ecf20Sopenharmony_ci
14018c2ecf20Sopenharmony_ci#define	RCCK0_TXFILTER1			0xa20
14028c2ecf20Sopenharmony_ci#define	RCCK0_TXFILTER2			0xa24
14038c2ecf20Sopenharmony_ci#define	RCCK0_DEBUGPORT			0xa28
14048c2ecf20Sopenharmony_ci#define	RCCK0_FALSEALARMREPORT		0xa2c
14058c2ecf20Sopenharmony_ci#define	RCCK0_TRSSIREPORT		0xa50
14068c2ecf20Sopenharmony_ci#define	RCCK0_RXREPORT			0xa54
14078c2ecf20Sopenharmony_ci#define	RCCK0_FACOUNTERLOWER		0xa5c
14088c2ecf20Sopenharmony_ci#define	RCCK0_FACOUNTERUPPER		0xa58
14098c2ecf20Sopenharmony_ci#define	RCCK0_CCA_CNT			0xa60
14108c2ecf20Sopenharmony_ci
14118c2ecf20Sopenharmony_ci/* PageB(0XB00) */
14128c2ecf20Sopenharmony_ci#define	RPDP_ANTA			0xb00
14138c2ecf20Sopenharmony_ci#define	RPDP_ANTA_4			0xb04
14148c2ecf20Sopenharmony_ci#define	RPDP_ANTA_8			0xb08
14158c2ecf20Sopenharmony_ci#define	RPDP_ANTA_C			0xb0c
14168c2ecf20Sopenharmony_ci#define	RPDP_ANTA_10			0xb10
14178c2ecf20Sopenharmony_ci#define	RPDP_ANTA_14			0xb14
14188c2ecf20Sopenharmony_ci#define	RPDP_ANTA_18			0xb18
14198c2ecf20Sopenharmony_ci#define	RPDP_ANTA_1C			0xb1c
14208c2ecf20Sopenharmony_ci#define	RPDP_ANTA_20			0xb20
14218c2ecf20Sopenharmony_ci#define	RPDP_ANTA_24			0xb24
14228c2ecf20Sopenharmony_ci
14238c2ecf20Sopenharmony_ci#define	RCONFIG_PMPD_ANTA		0xb28
14248c2ecf20Sopenharmony_ci#define	RCONFIG_RAM64x16		0xb2c
14258c2ecf20Sopenharmony_ci
14268c2ecf20Sopenharmony_ci#define	RBNDA				0xb30
14278c2ecf20Sopenharmony_ci#define	RHSSIPAR			0xb34
14288c2ecf20Sopenharmony_ci
14298c2ecf20Sopenharmony_ci#define	RCONFIG_ANTA			0xb68
14308c2ecf20Sopenharmony_ci#define	RCONFIG_ANTB			0xb6c
14318c2ecf20Sopenharmony_ci
14328c2ecf20Sopenharmony_ci#define	RPDP_ANTB			0xb70
14338c2ecf20Sopenharmony_ci#define	RPDP_ANTB_4			0xb74
14348c2ecf20Sopenharmony_ci#define	RPDP_ANTB_8			0xb78
14358c2ecf20Sopenharmony_ci#define	RPDP_ANTB_C			0xb7c
14368c2ecf20Sopenharmony_ci#define	RPDP_ANTB_10			0xb80
14378c2ecf20Sopenharmony_ci#define	RPDP_ANTB_14			0xb84
14388c2ecf20Sopenharmony_ci#define	RPDP_ANTB_18			0xb88
14398c2ecf20Sopenharmony_ci#define	RPDP_ANTB_1C			0xb8c
14408c2ecf20Sopenharmony_ci#define	RPDP_ANTB_20			0xb90
14418c2ecf20Sopenharmony_ci#define	RPDP_ANTB_24			0xb94
14428c2ecf20Sopenharmony_ci
14438c2ecf20Sopenharmony_ci#define	RCONFIG_PMPD_ANTB		0xb98
14448c2ecf20Sopenharmony_ci
14458c2ecf20Sopenharmony_ci#define	RBNDB				0xba0
14468c2ecf20Sopenharmony_ci
14478c2ecf20Sopenharmony_ci#define	RAPK				0xbd8
14488c2ecf20Sopenharmony_ci#define	RPM_RX0_ANTA			0xbdc
14498c2ecf20Sopenharmony_ci#define	RPM_RX1_ANTA			0xbe0
14508c2ecf20Sopenharmony_ci#define	RPM_RX2_ANTA			0xbe4
14518c2ecf20Sopenharmony_ci#define	RPM_RX3_ANTA			0xbe8
14528c2ecf20Sopenharmony_ci#define	RPM_RX0_ANTB			0xbec
14538c2ecf20Sopenharmony_ci#define	RPM_RX1_ANTB			0xbf0
14548c2ecf20Sopenharmony_ci#define	RPM_RX2_ANTB			0xbf4
14558c2ecf20Sopenharmony_ci#define	RPM_RX3_ANTB			0xbf8
14568c2ecf20Sopenharmony_ci
14578c2ecf20Sopenharmony_ci/*RSSI Dump*/
14588c2ecf20Sopenharmony_ci#define		RA_RSSI_DUMP		0XBF0
14598c2ecf20Sopenharmony_ci#define		RB_RSSI_DUMP		0XBF1
14608c2ecf20Sopenharmony_ci#define		RS1_RX_EVM_DUMP		0XBF4
14618c2ecf20Sopenharmony_ci#define		RS2_RX_EVM_DUMP		0XBF5
14628c2ecf20Sopenharmony_ci#define		RA_RX_SNR_DUMP		0XBF6
14638c2ecf20Sopenharmony_ci#define		RB_RX_SNR_DUMP		0XBF7
14648c2ecf20Sopenharmony_ci#define		RA_CFO_SHORT_DUMP	0XBF8
14658c2ecf20Sopenharmony_ci#define		RB_CFO_SHORT_DUMP	0XBFA
14668c2ecf20Sopenharmony_ci#define		RA_CFO_LONG_DUMP	0XBEC
14678c2ecf20Sopenharmony_ci#define		RB_CFO_LONG_DUMP	0XBEE
14688c2ecf20Sopenharmony_ci
14698c2ecf20Sopenharmony_ci/*Page C*/
14708c2ecf20Sopenharmony_ci#define	ROFDM0_LSTF			0xc00
14718c2ecf20Sopenharmony_ci
14728c2ecf20Sopenharmony_ci#define	ROFDM0_TRXPATHENABLE		0xc04
14738c2ecf20Sopenharmony_ci#define	ROFDM0_TRMUXPAR			0xc08
14748c2ecf20Sopenharmony_ci#define	ROFDM0_TRSWISOLATION		0xc0c
14758c2ecf20Sopenharmony_ci
14768c2ecf20Sopenharmony_ci#define	ROFDM0_XARXAFE			0xc10
14778c2ecf20Sopenharmony_ci#define	ROFDM0_XARXIQIMBALANCE		0xc14
14788c2ecf20Sopenharmony_ci#define	ROFDM0_XBRXAFE			0xc18
14798c2ecf20Sopenharmony_ci#define	ROFDM0_XBRXIQIMBALANCE		0xc1c
14808c2ecf20Sopenharmony_ci#define	ROFDM0_XCRXAFE			0xc20
14818c2ecf20Sopenharmony_ci#define	ROFDM0_XCRXIQIMBANLANCE		0xc24
14828c2ecf20Sopenharmony_ci#define	ROFDM0_XDRXAFE			0xc28
14838c2ecf20Sopenharmony_ci#define	ROFDM0_XDRXIQIMBALANCE		0xc2c
14848c2ecf20Sopenharmony_ci
14858c2ecf20Sopenharmony_ci#define	ROFDM0_RXDETECTOR1		0xc30
14868c2ecf20Sopenharmony_ci#define	ROFDM0_RXDETECTOR2		0xc34
14878c2ecf20Sopenharmony_ci#define	ROFDM0_RXDETECTOR3		0xc38
14888c2ecf20Sopenharmony_ci#define	ROFDM0_RXDETECTOR4		0xc3c
14898c2ecf20Sopenharmony_ci
14908c2ecf20Sopenharmony_ci#define	ROFDM0_RXDSP			0xc40
14918c2ecf20Sopenharmony_ci#define	ROFDM0_CFOANDDAGC		0xc44
14928c2ecf20Sopenharmony_ci#define	ROFDM0_CCADROPTHRESHOLD		0xc48
14938c2ecf20Sopenharmony_ci#define	ROFDM0_ECCATHRESHOLD		0xc4c
14948c2ecf20Sopenharmony_ci
14958c2ecf20Sopenharmony_ci#define	ROFDM0_XAAGCCORE1		0xc50
14968c2ecf20Sopenharmony_ci#define	ROFDM0_XAAGCCORE2		0xc54
14978c2ecf20Sopenharmony_ci#define	ROFDM0_XBAGCCORE1		0xc58
14988c2ecf20Sopenharmony_ci#define	ROFDM0_XBAGCCORE2		0xc5c
14998c2ecf20Sopenharmony_ci#define	ROFDM0_XCAGCCORE1		0xc60
15008c2ecf20Sopenharmony_ci#define	ROFDM0_XCAGCCORE2		0xc64
15018c2ecf20Sopenharmony_ci#define	ROFDM0_XDAGCCORE1		0xc68
15028c2ecf20Sopenharmony_ci#define	ROFDM0_XDAGCCORE2		0xc6c
15038c2ecf20Sopenharmony_ci
15048c2ecf20Sopenharmony_ci#define	ROFDM0_AGCPARAMETER1		0xc70
15058c2ecf20Sopenharmony_ci#define	ROFDM0_AGCPARAMETER2		0xc74
15068c2ecf20Sopenharmony_ci#define	ROFDM0_AGCRSSITABLE		0xc78
15078c2ecf20Sopenharmony_ci#define	ROFDM0_HTSTFAGC			0xc7c
15088c2ecf20Sopenharmony_ci
15098c2ecf20Sopenharmony_ci#define	ROFDM0_XATXIQIMBALANCE		0xc80
15108c2ecf20Sopenharmony_ci#define	ROFDM0_XATXAFE			0xc84
15118c2ecf20Sopenharmony_ci#define	ROFDM0_XBTXIQIMBALANCE		0xc88
15128c2ecf20Sopenharmony_ci#define	ROFDM0_XBTXAFE			0xc8c
15138c2ecf20Sopenharmony_ci#define	ROFDM0_XCTXIQIMBALANCE		0xc90
15148c2ecf20Sopenharmony_ci#define	ROFDM0_XCTXAFE			0xc94
15158c2ecf20Sopenharmony_ci#define	ROFDM0_XDTXIQIMBALANCE		0xc98
15168c2ecf20Sopenharmony_ci#define	ROFDM0_XDTXAFE			0xc9c
15178c2ecf20Sopenharmony_ci
15188c2ecf20Sopenharmony_ci#define ROFDM0_RXIQEXTANTA		0xca0
15198c2ecf20Sopenharmony_ci#define	ROFDM0_TXCOEFF1			0xca4
15208c2ecf20Sopenharmony_ci#define	ROFDM0_TXCOEFF2			0xca8
15218c2ecf20Sopenharmony_ci#define	ROFDM0_TXCOEFF3			0xcac
15228c2ecf20Sopenharmony_ci#define	ROFDM0_TXCOEFF4			0xcb0
15238c2ecf20Sopenharmony_ci#define	ROFDM0_TXCOEFF5			0xcb4
15248c2ecf20Sopenharmony_ci#define	ROFDM0_TXCOEFF6			0xcb8
15258c2ecf20Sopenharmony_ci
15268c2ecf20Sopenharmony_ci/*Path_A RFE cotrol */
15278c2ecf20Sopenharmony_ci#define	RA_RFE_CTRL_8812		0xcb8
15288c2ecf20Sopenharmony_ci/*Path_B RFE control*/
15298c2ecf20Sopenharmony_ci#define	RB_RFE_CTRL_8812		0xeb8
15308c2ecf20Sopenharmony_ci
15318c2ecf20Sopenharmony_ci#define	ROFDM0_RXHPPARAMETER		0xce0
15328c2ecf20Sopenharmony_ci#define	ROFDM0_TXPSEUDONOISEWGT		0xce4
15338c2ecf20Sopenharmony_ci#define	ROFDM0_FRAMESYNC		0xcf0
15348c2ecf20Sopenharmony_ci#define	ROFDM0_DFSREPORT		0xcf4
15358c2ecf20Sopenharmony_ci
15368c2ecf20Sopenharmony_ci#define	ROFDM1_LSTF			0xd00
15378c2ecf20Sopenharmony_ci#define	ROFDM1_TRXPATHENABLE		0xd04
15388c2ecf20Sopenharmony_ci
15398c2ecf20Sopenharmony_ci#define	ROFDM1_CF0			0xd08
15408c2ecf20Sopenharmony_ci#define	ROFDM1_CSI1			0xd10
15418c2ecf20Sopenharmony_ci#define	ROFDM1_SBD			0xd14
15428c2ecf20Sopenharmony_ci#define	ROFDM1_CSI2			0xd18
15438c2ecf20Sopenharmony_ci#define	ROFDM1_CFOTRACKING		0xd2c
15448c2ecf20Sopenharmony_ci#define	ROFDM1_TRXMESAURE1		0xd34
15458c2ecf20Sopenharmony_ci#define	ROFDM1_INTFDET			0xd3c
15468c2ecf20Sopenharmony_ci#define	ROFDM1_PSEUDONOISESTATEAB	0xd50
15478c2ecf20Sopenharmony_ci#define	ROFDM1_PSEUDONOISESTATECD	0xd54
15488c2ecf20Sopenharmony_ci#define	ROFDM1_RXPSEUDONOISEWGT		0xd58
15498c2ecf20Sopenharmony_ci
15508c2ecf20Sopenharmony_ci#define	ROFDM_PHYCOUNTER1		0xda0
15518c2ecf20Sopenharmony_ci#define	ROFDM_PHYCOUNTER2		0xda4
15528c2ecf20Sopenharmony_ci#define	ROFDM_PHYCOUNTER3		0xda8
15538c2ecf20Sopenharmony_ci
15548c2ecf20Sopenharmony_ci#define	ROFDM_SHORTCFOAB		0xdac
15558c2ecf20Sopenharmony_ci#define	ROFDM_SHORTCFOCD		0xdb0
15568c2ecf20Sopenharmony_ci#define	ROFDM_LONGCFOAB			0xdb4
15578c2ecf20Sopenharmony_ci#define	ROFDM_LONGCFOCD			0xdb8
15588c2ecf20Sopenharmony_ci#define	ROFDM_TAILCF0AB			0xdbc
15598c2ecf20Sopenharmony_ci#define	ROFDM_TAILCF0CD			0xdc0
15608c2ecf20Sopenharmony_ci#define	ROFDM_PWMEASURE1		0xdc4
15618c2ecf20Sopenharmony_ci#define	ROFDM_PWMEASURE2		0xdc8
15628c2ecf20Sopenharmony_ci#define	ROFDM_BWREPORT			0xdcc
15638c2ecf20Sopenharmony_ci#define	ROFDM_AGCREPORT			0xdd0
15648c2ecf20Sopenharmony_ci#define	ROFDM_RXSNR			0xdd4
15658c2ecf20Sopenharmony_ci#define	ROFDM_RXEVMCSI			0xdd8
15668c2ecf20Sopenharmony_ci#define	ROFDM_SIGREPORT			0xddc
15678c2ecf20Sopenharmony_ci
15688c2ecf20Sopenharmony_ci#define RTXAGC_A_CCK11_CCK1		0xc20
15698c2ecf20Sopenharmony_ci#define RTXAGC_A_OFDM18_OFDM6		0xc24
15708c2ecf20Sopenharmony_ci#define RTXAGC_A_OFDM54_OFDM24		0xc28
15718c2ecf20Sopenharmony_ci#define RTXAGC_A_MCS03_MCS00		0xc2c
15728c2ecf20Sopenharmony_ci#define RTXAGC_A_MCS07_MCS04		0xc30
15738c2ecf20Sopenharmony_ci#define RTXAGC_A_MCS11_MCS08		0xc34
15748c2ecf20Sopenharmony_ci#define RTXAGC_A_MCS15_MCS12		0xc38
15758c2ecf20Sopenharmony_ci#define RTXAGC_A_NSS1INDEX3_NSS1INDEX0	0xc3c
15768c2ecf20Sopenharmony_ci#define	RTXAGC_A_NSS1INDEX7_NSS1INDEX4	0xc40
15778c2ecf20Sopenharmony_ci#define	RTXAGC_A_NSS2INDEX1_NSS1INDEX8	0xc44
15788c2ecf20Sopenharmony_ci#define	RTXAGC_A_NSS2INDEX5_NSS2INDEX2	0xc48
15798c2ecf20Sopenharmony_ci#define	RTXAGC_A_NSS2INDEX9_NSS2INDEX6	0xc4c
15808c2ecf20Sopenharmony_ci#define	RTXAGC_B_CCK11_CCK1		0xe20
15818c2ecf20Sopenharmony_ci#define	RTXAGC_B_OFDM18_OFDM6		0xe24
15828c2ecf20Sopenharmony_ci#define	RTXAGC_B_OFDM54_OFDM24		0xe28
15838c2ecf20Sopenharmony_ci#define	RTXAGC_B_MCS03_MCS00		0xe2c
15848c2ecf20Sopenharmony_ci#define	RTXAGC_B_MCS07_MCS04		0xe30
15858c2ecf20Sopenharmony_ci#define	RTXAGC_B_MCS11_MCS08		0xe34
15868c2ecf20Sopenharmony_ci#define	RTXAGC_B_MCS15_MCS12		0xe38
15878c2ecf20Sopenharmony_ci#define	RTXAGC_B_NSS1INDEX3_NSS1INDEX0	0xe3c
15888c2ecf20Sopenharmony_ci#define	RTXAGC_B_NSS1INDEX7_NSS1INDEX4	0xe40
15898c2ecf20Sopenharmony_ci#define	RTXAGC_B_NSS2INDEX1_NSS1INDEX8	0xe44
15908c2ecf20Sopenharmony_ci#define	RTXAGC_B_NSS2INDEX5_NSS2INDEX2	0xe48
15918c2ecf20Sopenharmony_ci#define	RTXAGC_B_NSS2INDEX9_NSS2INDEX6	0xe4c
15928c2ecf20Sopenharmony_ci
15938c2ecf20Sopenharmony_ci#define	RA_TXPWRTRAING			0xc54
15948c2ecf20Sopenharmony_ci#define	RB_TXPWRTRAING			0xe54
15958c2ecf20Sopenharmony_ci
15968c2ecf20Sopenharmony_ci#define	RFPGA0_IQK			0xe28
15978c2ecf20Sopenharmony_ci#define	RTX_IQK_TONE_A			0xe30
15988c2ecf20Sopenharmony_ci#define	RRX_IQK_TONE_A			0xe34
15998c2ecf20Sopenharmony_ci#define	RTX_IQK_PI_A			0xe38
16008c2ecf20Sopenharmony_ci#define	RRX_IQK_PI_A			0xe3c
16018c2ecf20Sopenharmony_ci
16028c2ecf20Sopenharmony_ci#define	RTX_IQK				0xe40
16038c2ecf20Sopenharmony_ci#define	RRX_IQK				0xe44
16048c2ecf20Sopenharmony_ci#define	RIQK_AGC_PTS			0xe48
16058c2ecf20Sopenharmony_ci#define	RIQK_AGC_RSP			0xe4c
16068c2ecf20Sopenharmony_ci#define	RTX_IQK_TONE_B			0xe50
16078c2ecf20Sopenharmony_ci#define	RRX_IQK_TONE_B			0xe54
16088c2ecf20Sopenharmony_ci#define	RTX_IQK_PI_B			0xe58
16098c2ecf20Sopenharmony_ci#define	RRX_IQK_PI_B			0xe5c
16108c2ecf20Sopenharmony_ci#define	RIQK_AGC_CONT			0xe60
16118c2ecf20Sopenharmony_ci
16128c2ecf20Sopenharmony_ci#define	RBLUE_TOOTH			0xe6c
16138c2ecf20Sopenharmony_ci#define	RRX_WAIT_CCA			0xe70
16148c2ecf20Sopenharmony_ci#define	RTX_CCK_RFON			0xe74
16158c2ecf20Sopenharmony_ci#define	RTX_CCK_BBON			0xe78
16168c2ecf20Sopenharmony_ci#define	RTX_OFDM_RFON			0xe7c
16178c2ecf20Sopenharmony_ci#define	RTX_OFDM_BBON			0xe80
16188c2ecf20Sopenharmony_ci#define	RTX_TO_RX			0xe84
16198c2ecf20Sopenharmony_ci#define	RTX_TO_TX			0xe88
16208c2ecf20Sopenharmony_ci#define	RRX_CCK				0xe8c
16218c2ecf20Sopenharmony_ci
16228c2ecf20Sopenharmony_ci#define	RTX_POWER_BEFORE_IQK_A		0xe94
16238c2ecf20Sopenharmony_ci#define	RTX_POWER_AFTER_IQK_A		0xe9c
16248c2ecf20Sopenharmony_ci
16258c2ecf20Sopenharmony_ci#define	RRX_POWER_BEFORE_IQK_A		0xea0
16268c2ecf20Sopenharmony_ci#define	RRX_POWER_BEFORE_IQK_A_2	0xea4
16278c2ecf20Sopenharmony_ci#define	RRX_POWER_AFTER_IQK_A		0xea8
16288c2ecf20Sopenharmony_ci#define	RRX_POWER_AFTER_IQK_A_2		0xeac
16298c2ecf20Sopenharmony_ci
16308c2ecf20Sopenharmony_ci#define	RTX_POWER_BEFORE_IQK_B		0xeb4
16318c2ecf20Sopenharmony_ci#define	RTX_POWER_AFTER_IQK_B		0xebc
16328c2ecf20Sopenharmony_ci
16338c2ecf20Sopenharmony_ci#define	RRX_POER_BEFORE_IQK_B		0xec0
16348c2ecf20Sopenharmony_ci#define	RRX_POER_BEFORE_IQK_B_2		0xec4
16358c2ecf20Sopenharmony_ci#define	RRX_POWER_AFTER_IQK_B		0xec8
16368c2ecf20Sopenharmony_ci#define	RRX_POWER_AFTER_IQK_B_2		0xecc
16378c2ecf20Sopenharmony_ci
16388c2ecf20Sopenharmony_ci#define	RRX_OFDM			0xed0
16398c2ecf20Sopenharmony_ci#define	RRX_WAIT_RIFS			0xed4
16408c2ecf20Sopenharmony_ci#define	RRX_TO_RX			0xed8
16418c2ecf20Sopenharmony_ci#define	RSTANDBY			0xedc
16428c2ecf20Sopenharmony_ci#define	RSLEEP				0xee0
16438c2ecf20Sopenharmony_ci#define	RPMPD_ANAEN			0xeec
16448c2ecf20Sopenharmony_ci
16458c2ecf20Sopenharmony_ci#define	RZEBRA1_HSSIENABLE		0x0
16468c2ecf20Sopenharmony_ci#define	RZEBRA1_TRXENABLE1		0x1
16478c2ecf20Sopenharmony_ci#define	RZEBRA1_TRXENABLE2		0x2
16488c2ecf20Sopenharmony_ci#define	RZEBRA1_AGC			0x4
16498c2ecf20Sopenharmony_ci#define	RZEBRA1_CHARGEPUMP		0x5
16508c2ecf20Sopenharmony_ci#define	RZEBRA1_CHANNEL			0x7
16518c2ecf20Sopenharmony_ci
16528c2ecf20Sopenharmony_ci#define	RZEBRA1_TXGAIN			0x8
16538c2ecf20Sopenharmony_ci#define	RZEBRA1_TXLPF			0x9
16548c2ecf20Sopenharmony_ci#define	RZEBRA1_RXLPF			0xb
16558c2ecf20Sopenharmony_ci#define	RZEBRA1_RXHPFCORNER		0xc
16568c2ecf20Sopenharmony_ci
16578c2ecf20Sopenharmony_ci#define	RGLOBALCTRL			0
16588c2ecf20Sopenharmony_ci#define	RRTL8256_TXLPF			19
16598c2ecf20Sopenharmony_ci#define	RRTL8256_RXLPF			11
16608c2ecf20Sopenharmony_ci#define	RRTL8258_TXLPF			0x11
16618c2ecf20Sopenharmony_ci#define	RRTL8258_RXLPF			0x13
16628c2ecf20Sopenharmony_ci#define	RRTL8258_RSSILPF		0xa
16638c2ecf20Sopenharmony_ci
16648c2ecf20Sopenharmony_ci#define	RF_AC				0x00
16658c2ecf20Sopenharmony_ci
16668c2ecf20Sopenharmony_ci#define	RF_IQADJ_G1			0x01
16678c2ecf20Sopenharmony_ci#define	RF_IQADJ_G2			0x02
16688c2ecf20Sopenharmony_ci#define	RF_POW_TRSW			0x05
16698c2ecf20Sopenharmony_ci
16708c2ecf20Sopenharmony_ci#define	RF_GAIN_RX			0x06
16718c2ecf20Sopenharmony_ci#define	RF_GAIN_TX			0x07
16728c2ecf20Sopenharmony_ci
16738c2ecf20Sopenharmony_ci#define	RF_TXM_IDAC			0x08
16748c2ecf20Sopenharmony_ci#define	RF_BS_IQGEN			0x0F
16758c2ecf20Sopenharmony_ci
16768c2ecf20Sopenharmony_ci#define	RF_MODE1			0x10
16778c2ecf20Sopenharmony_ci#define	RF_MODE2			0x11
16788c2ecf20Sopenharmony_ci
16798c2ecf20Sopenharmony_ci#define	RF_RX_AGC_HP			0x12
16808c2ecf20Sopenharmony_ci#define	RF_TX_AGC			0x13
16818c2ecf20Sopenharmony_ci#define	RF_BIAS				0x14
16828c2ecf20Sopenharmony_ci#define	RF_IPA				0x15
16838c2ecf20Sopenharmony_ci#define	RF_POW_ABILITY			0x17
16848c2ecf20Sopenharmony_ci#define	RF_MODE_AG			0x18
16858c2ecf20Sopenharmony_ci#define	RRFCHANNEL			0x18
16868c2ecf20Sopenharmony_ci#define	RF_CHNLBW			0x18
16878c2ecf20Sopenharmony_ci#define	RF_TOP				0x19
16888c2ecf20Sopenharmony_ci
16898c2ecf20Sopenharmony_ci#define	RF_RX_G1			0x1A
16908c2ecf20Sopenharmony_ci#define	RF_RX_G2			0x1B
16918c2ecf20Sopenharmony_ci
16928c2ecf20Sopenharmony_ci#define	RF_RX_BB2			0x1C
16938c2ecf20Sopenharmony_ci#define	RF_RX_BB1			0x1D
16948c2ecf20Sopenharmony_ci
16958c2ecf20Sopenharmony_ci#define	RF_RCK1				0x1E
16968c2ecf20Sopenharmony_ci#define	RF_RCK2				0x1F
16978c2ecf20Sopenharmony_ci
16988c2ecf20Sopenharmony_ci#define	RF_TX_G1			0x20
16998c2ecf20Sopenharmony_ci#define	RF_TX_G2			0x21
17008c2ecf20Sopenharmony_ci#define	RF_TX_G3			0x22
17018c2ecf20Sopenharmony_ci
17028c2ecf20Sopenharmony_ci#define	RF_TX_BB1			0x23
17038c2ecf20Sopenharmony_ci#define	RF_T_METER			0x24
17048c2ecf20Sopenharmony_ci#define	RF_T_METER_88E			0x42
17058c2ecf20Sopenharmony_ci#define  RF_T_METER_8812A		0x42
17068c2ecf20Sopenharmony_ci
17078c2ecf20Sopenharmony_ci#define	RF_SYN_G1			0x25
17088c2ecf20Sopenharmony_ci#define	RF_SYN_G2			0x26
17098c2ecf20Sopenharmony_ci#define	RF_SYN_G3			0x27
17108c2ecf20Sopenharmony_ci#define	RF_SYN_G4			0x28
17118c2ecf20Sopenharmony_ci#define	RF_SYN_G5			0x29
17128c2ecf20Sopenharmony_ci#define	RF_SYN_G6			0x2A
17138c2ecf20Sopenharmony_ci#define	RF_SYN_G7			0x2B
17148c2ecf20Sopenharmony_ci#define	RF_SYN_G8			0x2C
17158c2ecf20Sopenharmony_ci
17168c2ecf20Sopenharmony_ci#define	RF_RCK_OS			0x30
17178c2ecf20Sopenharmony_ci#define	RF_TXPA_G1			0x31
17188c2ecf20Sopenharmony_ci#define	RF_TXPA_G2			0x32
17198c2ecf20Sopenharmony_ci#define	RF_TXPA_G3			0x33
17208c2ecf20Sopenharmony_ci
17218c2ecf20Sopenharmony_ci#define	RF_TX_BIAS_A			0x35
17228c2ecf20Sopenharmony_ci#define	RF_TX_BIAS_D			0x36
17238c2ecf20Sopenharmony_ci#define	RF_LOBF_9			0x38
17248c2ecf20Sopenharmony_ci#define	RF_RXRF_A3			0x3C
17258c2ecf20Sopenharmony_ci#define	RF_TRSW				0x3F
17268c2ecf20Sopenharmony_ci
17278c2ecf20Sopenharmony_ci#define	RF_TXRF_A2			0x41
17288c2ecf20Sopenharmony_ci#define	RF_TXPA_G4			0x46
17298c2ecf20Sopenharmony_ci#define	RF_TXPA_A4			0x4B
17308c2ecf20Sopenharmony_ci
17318c2ecf20Sopenharmony_ci#define RF_APK				0x63
17328c2ecf20Sopenharmony_ci
17338c2ecf20Sopenharmony_ci#define	RF_WE_LUT			0xEF
17348c2ecf20Sopenharmony_ci
17358c2ecf20Sopenharmony_ci#define	BBBRESETB			0x100
17368c2ecf20Sopenharmony_ci#define	BGLOBALRESETB			0x200
17378c2ecf20Sopenharmony_ci#define	BOFDMTXSTART			0x4
17388c2ecf20Sopenharmony_ci#define	BCCKTXSTART			0x8
17398c2ecf20Sopenharmony_ci#define	BCRC32DEBUG			0x100
17408c2ecf20Sopenharmony_ci#define	BPMACLOOPBACK			0x10
17418c2ecf20Sopenharmony_ci#define	BTXLSIG				0xffffff
17428c2ecf20Sopenharmony_ci#define	BOFDMTXRATE			0xf
17438c2ecf20Sopenharmony_ci#define	BOFDMTXRESERVED			0x10
17448c2ecf20Sopenharmony_ci#define	BOFDMTXLENGTH			0x1ffe0
17458c2ecf20Sopenharmony_ci#define	BOFDMTXPARITY			0x20000
17468c2ecf20Sopenharmony_ci#define	BTXHTSIG1			0xffffff
17478c2ecf20Sopenharmony_ci#define	BTXHTMCSRATE			0x7f
17488c2ecf20Sopenharmony_ci#define	BTXHTBW				0x80
17498c2ecf20Sopenharmony_ci#define	BTXHTLENGTH			0xffff00
17508c2ecf20Sopenharmony_ci#define	BTXHTSIG2			0xffffff
17518c2ecf20Sopenharmony_ci#define	BTXHTSMOOTHING			0x1
17528c2ecf20Sopenharmony_ci#define	BTXHTSOUNDING			0x2
17538c2ecf20Sopenharmony_ci#define	BTXHTRESERVED			0x4
17548c2ecf20Sopenharmony_ci#define	BTXHTAGGREATION			0x8
17558c2ecf20Sopenharmony_ci#define	BTXHTSTBC			0x30
17568c2ecf20Sopenharmony_ci#define	BTXHTADVANCECODING		0x40
17578c2ecf20Sopenharmony_ci#define	BTXHTSHORTGI			0x80
17588c2ecf20Sopenharmony_ci#define	BTXHTNUMBERHT_LTF		0x300
17598c2ecf20Sopenharmony_ci#define	BTXHTCRC8			0x3fc00
17608c2ecf20Sopenharmony_ci#define	BCOUNTERRESET			0x10000
17618c2ecf20Sopenharmony_ci#define	BNUMOFOFDMTX			0xffff
17628c2ecf20Sopenharmony_ci#define	BNUMOFCCKTX			0xffff0000
17638c2ecf20Sopenharmony_ci#define	BTXIDLEINTERVAL			0xffff
17648c2ecf20Sopenharmony_ci#define	BOFDMSERVICE			0xffff0000
17658c2ecf20Sopenharmony_ci#define	BTXMACHEADER			0xffffffff
17668c2ecf20Sopenharmony_ci#define	BTXDATAINIT			0xff
17678c2ecf20Sopenharmony_ci#define	BTXHTMODE			0x100
17688c2ecf20Sopenharmony_ci#define	BTXDATATYPE			0x30000
17698c2ecf20Sopenharmony_ci#define	BTXRANDOMSEED			0xffffffff
17708c2ecf20Sopenharmony_ci#define	BCCKTXPREAMBLE			0x1
17718c2ecf20Sopenharmony_ci#define	BCCKTXSFD			0xffff0000
17728c2ecf20Sopenharmony_ci#define	BCCKTXSIG			0xff
17738c2ecf20Sopenharmony_ci#define	BCCKTXSERVICE			0xff00
17748c2ecf20Sopenharmony_ci#define	BCCKLENGTHEXT			0x8000
17758c2ecf20Sopenharmony_ci#define	BCCKTXLENGHT			0xffff0000
17768c2ecf20Sopenharmony_ci#define	BCCKTXCRC16			0xffff
17778c2ecf20Sopenharmony_ci#define	BCCKTXSTATUS			0x1
17788c2ecf20Sopenharmony_ci#define	BOFDMTXSTATUS			0x2
17798c2ecf20Sopenharmony_ci#define IS_BB_REG_OFFSET_92S(__offset)	\
17808c2ecf20Sopenharmony_ci	((__offset >= 0x800) && (__offset <= 0xfff))
17818c2ecf20Sopenharmony_ci
17828c2ecf20Sopenharmony_ci#define	BRFMOD				0x1
17838c2ecf20Sopenharmony_ci#define	BJAPANMODE			0x2
17848c2ecf20Sopenharmony_ci#define	BCCKTXSC			0x30
17858c2ecf20Sopenharmony_ci/* Block & Path enable*/
17868c2ecf20Sopenharmony_ci#define ROFDMCCKEN			0x808
17878c2ecf20Sopenharmony_ci#define	BCCKEN				0x10000000
17888c2ecf20Sopenharmony_ci#define	BOFDMEN				0x20000000
17898c2ecf20Sopenharmony_ci/* Rx antenna*/
17908c2ecf20Sopenharmony_ci#define	RRXPATH				0x808
17918c2ecf20Sopenharmony_ci#define	BRXPATH				0xff
17928c2ecf20Sopenharmony_ci/* Tx antenna*/
17938c2ecf20Sopenharmony_ci#define	RTXPATH				0x80c
17948c2ecf20Sopenharmony_ci#define	BTXPATH				0x0fffffff
17958c2ecf20Sopenharmony_ci/* for cck rx path selection*/
17968c2ecf20Sopenharmony_ci#define	RCCK_RX				0xa04
17978c2ecf20Sopenharmony_ci#define	BCCK_RX				0x0c000000
17988c2ecf20Sopenharmony_ci/* Use LSIG for VHT length*/
17998c2ecf20Sopenharmony_ci#define	RVHTLEN_USE_LSIG		0x8c3
18008c2ecf20Sopenharmony_ci
18018c2ecf20Sopenharmony_ci#define	BOFDMRXADCPHASE			0x10000
18028c2ecf20Sopenharmony_ci#define	BOFDMTXDACPHASE			0x40000
18038c2ecf20Sopenharmony_ci#define	BXATXAGC			0x3f
18048c2ecf20Sopenharmony_ci
18058c2ecf20Sopenharmony_ci#define	BXBTXAGC			0xf00
18068c2ecf20Sopenharmony_ci#define	BXCTXAGC			0xf000
18078c2ecf20Sopenharmony_ci#define	BXDTXAGC			0xf0000
18088c2ecf20Sopenharmony_ci
18098c2ecf20Sopenharmony_ci#define	BPASTART			0xf0000000
18108c2ecf20Sopenharmony_ci#define	BTRSTART			0x00f00000
18118c2ecf20Sopenharmony_ci#define	BRFSTART			0x0000f000
18128c2ecf20Sopenharmony_ci#define	BBBSTART			0x000000f0
18138c2ecf20Sopenharmony_ci#define	BBBCCKSTART			0x0000000f
18148c2ecf20Sopenharmony_ci#define	BPAEND				0xf
18158c2ecf20Sopenharmony_ci#define	BTREND				0x0f000000
18168c2ecf20Sopenharmony_ci#define	BRFEND				0x000f0000
18178c2ecf20Sopenharmony_ci#define	BCCAMASK			0x000000f0
18188c2ecf20Sopenharmony_ci#define	BR2RCCAMASK			0x00000f00
18198c2ecf20Sopenharmony_ci#define	BHSSI_R2TDELAY			0xf8000000
18208c2ecf20Sopenharmony_ci#define	BHSSI_T2RDELAY			0xf80000
18218c2ecf20Sopenharmony_ci#define	BCONTXHSSI			0x400
18228c2ecf20Sopenharmony_ci#define	BIGFROMCCK			0x200
18238c2ecf20Sopenharmony_ci#define	BAGCADDRESS			0x3f
18248c2ecf20Sopenharmony_ci#define	BRXHPTX				0x7000
18258c2ecf20Sopenharmony_ci#define	BRXHP2RX			0x38000
18268c2ecf20Sopenharmony_ci#define	BRXHPCCKINI			0xc0000
18278c2ecf20Sopenharmony_ci#define	BAGCTXCODE			0xc00000
18288c2ecf20Sopenharmony_ci#define	BAGCRXCODE			0x300000
18298c2ecf20Sopenharmony_ci
18308c2ecf20Sopenharmony_ci#define	B3WIREDATALENGTH		0x800
18318c2ecf20Sopenharmony_ci#define	B3WIREADDREAALENGTH		0x400
18328c2ecf20Sopenharmony_ci
18338c2ecf20Sopenharmony_ci#define	B3WIRERFPOWERDOWN		0x1
18348c2ecf20Sopenharmony_ci#define	B5GPAPEPOLARITY			0x40000000
18358c2ecf20Sopenharmony_ci#define	B2GPAPEPOLARITY			0x80000000
18368c2ecf20Sopenharmony_ci#define	BRFSW_TXDEFAULTANT		0x3
18378c2ecf20Sopenharmony_ci#define	BRFSW_TXOPTIONANT		0x30
18388c2ecf20Sopenharmony_ci#define	BRFSW_RXDEFAULTANT		0x300
18398c2ecf20Sopenharmony_ci#define	BRFSW_RXOPTIONANT		0x3000
18408c2ecf20Sopenharmony_ci#define	BRFSI_3WIREDATA			0x1
18418c2ecf20Sopenharmony_ci#define	BRFSI_3WIRECLOCK		0x2
18428c2ecf20Sopenharmony_ci#define	BRFSI_3WIRELOAD			0x4
18438c2ecf20Sopenharmony_ci#define	BRFSI_3WIRERW			0x8
18448c2ecf20Sopenharmony_ci#define	BRFSI_3WIRE			0xf
18458c2ecf20Sopenharmony_ci
18468c2ecf20Sopenharmony_ci#define	BRFSI_RFENV			0x10
18478c2ecf20Sopenharmony_ci
18488c2ecf20Sopenharmony_ci#define	BRFSI_TRSW			0x20
18498c2ecf20Sopenharmony_ci#define	BRFSI_TRSWB			0x40
18508c2ecf20Sopenharmony_ci#define	BRFSI_ANTSW			0x100
18518c2ecf20Sopenharmony_ci#define	BRFSI_ANTSWB			0x200
18528c2ecf20Sopenharmony_ci#define	BRFSI_PAPE			0x400
18538c2ecf20Sopenharmony_ci#define	BRFSI_PAPE5G			0x800
18548c2ecf20Sopenharmony_ci#define	BBANDSELECT			0x1
18558c2ecf20Sopenharmony_ci#define	BHTSIG2_GI			0x80
18568c2ecf20Sopenharmony_ci#define	BHTSIG2_SMOOTHING		0x01
18578c2ecf20Sopenharmony_ci#define	BHTSIG2_SOUNDING		0x02
18588c2ecf20Sopenharmony_ci#define	BHTSIG2_AGGREATON		0x08
18598c2ecf20Sopenharmony_ci#define	BHTSIG2_STBC			0x30
18608c2ecf20Sopenharmony_ci#define	BHTSIG2_ADVCODING		0x40
18618c2ecf20Sopenharmony_ci#define	BHTSIG2_NUMOFHTLTF		0x300
18628c2ecf20Sopenharmony_ci#define	BHTSIG2_CRC8			0x3fc
18638c2ecf20Sopenharmony_ci#define	BHTSIG1_MCS			0x7f
18648c2ecf20Sopenharmony_ci#define	BHTSIG1_BANDWIDTH		0x80
18658c2ecf20Sopenharmony_ci#define	BHTSIG1_HTLENGTH		0xffff
18668c2ecf20Sopenharmony_ci#define	BLSIG_RATE			0xf
18678c2ecf20Sopenharmony_ci#define	BLSIG_RESERVED			0x10
18688c2ecf20Sopenharmony_ci#define	BLSIG_LENGTH			0x1fffe
18698c2ecf20Sopenharmony_ci#define	BLSIG_PARITY			0x20
18708c2ecf20Sopenharmony_ci#define	BCCKRXPHASE			0x4
18718c2ecf20Sopenharmony_ci
18728c2ecf20Sopenharmony_ci#define	BLSSIREADADDRESS		0x7f800000
18738c2ecf20Sopenharmony_ci#define	BLSSIREADEDGE			0x80000000
18748c2ecf20Sopenharmony_ci
18758c2ecf20Sopenharmony_ci#define	BLSSIREADBACKDATA		0xfffff
18768c2ecf20Sopenharmony_ci
18778c2ecf20Sopenharmony_ci#define	BLSSIREADOKFLAG			0x1000
18788c2ecf20Sopenharmony_ci#define	BCCKSAMPLERATE			0x8
18798c2ecf20Sopenharmony_ci#define	BREGULATOR0STANDBY		0x1
18808c2ecf20Sopenharmony_ci#define	BREGULATORPLLSTANDBY		0x2
18818c2ecf20Sopenharmony_ci#define	BREGULATOR1STANDBY		0x4
18828c2ecf20Sopenharmony_ci#define	BPLLPOWERUP			0x8
18838c2ecf20Sopenharmony_ci#define	BDPLLPOWERUP			0x10
18848c2ecf20Sopenharmony_ci#define	BDA10POWERUP			0x20
18858c2ecf20Sopenharmony_ci#define	BAD7POWERUP			0x200
18868c2ecf20Sopenharmony_ci#define	BDA6POWERUP			0x2000
18878c2ecf20Sopenharmony_ci#define	BXTALPOWERUP			0x4000
18888c2ecf20Sopenharmony_ci#define	B40MDCLKPOWERUP			0x8000
18898c2ecf20Sopenharmony_ci#define	BDA6DEBUGMODE			0x20000
18908c2ecf20Sopenharmony_ci#define	BDA6SWING			0x380000
18918c2ecf20Sopenharmony_ci
18928c2ecf20Sopenharmony_ci#define	BADCLKPHASE			0x4000000
18938c2ecf20Sopenharmony_ci#define	B80MCLKDELAY			0x18000000
18948c2ecf20Sopenharmony_ci#define	BAFEWATCHDOGENABLE		0x20000000
18958c2ecf20Sopenharmony_ci
18968c2ecf20Sopenharmony_ci#define	BXTALCAP01			0xc0000000
18978c2ecf20Sopenharmony_ci#define	BXTALCAP23			0x3
18988c2ecf20Sopenharmony_ci#define	BXTALCAP92X			0x0f000000
18998c2ecf20Sopenharmony_ci#define BXTALCAP			0x0f000000
19008c2ecf20Sopenharmony_ci
19018c2ecf20Sopenharmony_ci#define	BINTDIFCLKENABLE		0x400
19028c2ecf20Sopenharmony_ci#define	BEXTSIGCLKENABLE		0x800
19038c2ecf20Sopenharmony_ci#define	BBANDGAP_MBIAS_POWERUP		0x10000
19048c2ecf20Sopenharmony_ci#define	BAD11SH_GAIN			0xc0000
19058c2ecf20Sopenharmony_ci#define	BAD11NPUT_RANGE			0x700000
19068c2ecf20Sopenharmony_ci#define	BAD110P_CURRENT			0x3800000
19078c2ecf20Sopenharmony_ci#define	BLPATH_LOOPBACK			0x4000000
19088c2ecf20Sopenharmony_ci#define	BQPATH_LOOPBACK			0x8000000
19098c2ecf20Sopenharmony_ci#define	BAFE_LOOPBACK			0x10000000
19108c2ecf20Sopenharmony_ci#define	BDA10_SWING			0x7e0
19118c2ecf20Sopenharmony_ci#define	BDA10_REVERSE			0x800
19128c2ecf20Sopenharmony_ci#define	BDA_CLK_SOURCE			0x1000
19138c2ecf20Sopenharmony_ci#define	BDA7INPUT_RANGE			0x6000
19148c2ecf20Sopenharmony_ci#define	BDA7_GAIN			0x38000
19158c2ecf20Sopenharmony_ci#define	BDA7OUTPUT_CM_MODE		0x40000
19168c2ecf20Sopenharmony_ci#define	BDA7INPUT_CM_MODE		0x380000
19178c2ecf20Sopenharmony_ci#define	BDA7CURRENT			0xc00000
19188c2ecf20Sopenharmony_ci#define	BREGULATOR_ADJUST		0x7000000
19198c2ecf20Sopenharmony_ci#define	BAD11POWERUP_ATTX		0x1
19208c2ecf20Sopenharmony_ci#define	BDA10PS_ATTX			0x10
19218c2ecf20Sopenharmony_ci#define	BAD11POWERUP_ATRX		0x100
19228c2ecf20Sopenharmony_ci#define	BDA10PS_ATRX			0x1000
19238c2ecf20Sopenharmony_ci#define	BCCKRX_AGC_FORMAT		0x200
19248c2ecf20Sopenharmony_ci#define	BPSDFFT_SAMPLE_POINT		0xc000
19258c2ecf20Sopenharmony_ci#define	BPSD_AVERAGE_NUM		0x3000
19268c2ecf20Sopenharmony_ci#define	BIQPATH_CONTROL			0xc00
19278c2ecf20Sopenharmony_ci#define	BPSD_FREQ			0x3ff
19288c2ecf20Sopenharmony_ci#define	BPSD_ANTENNA_PATH		0x30
19298c2ecf20Sopenharmony_ci#define	BPSD_IQ_SWITCH			0x40
19308c2ecf20Sopenharmony_ci#define	BPSD_RX_TRIGGER			0x400000
19318c2ecf20Sopenharmony_ci#define	BPSD_TX_TRIGGER			0x80000000
19328c2ecf20Sopenharmony_ci#define	BPSD_SINE_TONE_SCALE		0x7f000000
19338c2ecf20Sopenharmony_ci#define	BPSD_REPORT			0xffff
19348c2ecf20Sopenharmony_ci
19358c2ecf20Sopenharmony_ci#define	BOFDM_TXSC			0x30000000
19368c2ecf20Sopenharmony_ci#define	BCCK_TXON			0x1
19378c2ecf20Sopenharmony_ci#define	BOFDM_TXON			0x2
19388c2ecf20Sopenharmony_ci#define	BDEBUG_PAGE			0xfff
19398c2ecf20Sopenharmony_ci#define	BDEBUG_ITEM			0xff
19408c2ecf20Sopenharmony_ci#define	BANTL				0x10
19418c2ecf20Sopenharmony_ci#define	BANT_NONHT			0x100
19428c2ecf20Sopenharmony_ci#define	BANT_HT1			0x1000
19438c2ecf20Sopenharmony_ci#define	BANT_HT2			0x10000
19448c2ecf20Sopenharmony_ci#define	BANT_HT1S1			0x100000
19458c2ecf20Sopenharmony_ci#define	BANT_NONHTS1			0x1000000
19468c2ecf20Sopenharmony_ci
19478c2ecf20Sopenharmony_ci#define	BCCK_BBMODE			0x3
19488c2ecf20Sopenharmony_ci#define	BCCK_TXPOWERSAVING		0x80
19498c2ecf20Sopenharmony_ci#define	BCCK_RXPOWERSAVING		0x40
19508c2ecf20Sopenharmony_ci
19518c2ecf20Sopenharmony_ci#define	BCCK_SIDEBAND			0x10
19528c2ecf20Sopenharmony_ci
19538c2ecf20Sopenharmony_ci#define	BCCK_SCRAMBLE			0x8
19548c2ecf20Sopenharmony_ci#define	BCCK_ANTDIVERSITY		0x8000
19558c2ecf20Sopenharmony_ci#define	BCCK_CARRIER_RECOVERY		0x4000
19568c2ecf20Sopenharmony_ci#define	BCCK_TXRATE			0x3000
19578c2ecf20Sopenharmony_ci#define	BCCK_DCCANCEL			0x0800
19588c2ecf20Sopenharmony_ci#define	BCCK_ISICANCEL			0x0400
19598c2ecf20Sopenharmony_ci#define	BCCK_MATCH_FILTER		0x0200
19608c2ecf20Sopenharmony_ci#define	BCCK_EQUALIZER			0x0100
19618c2ecf20Sopenharmony_ci#define	BCCK_PREAMBLE_DETECT		0x800000
19628c2ecf20Sopenharmony_ci#define	BCCK_FAST_FALSECCA		0x400000
19638c2ecf20Sopenharmony_ci#define	BCCK_CH_ESTSTART		0x300000
19648c2ecf20Sopenharmony_ci#define	BCCK_CCA_COUNT			0x080000
19658c2ecf20Sopenharmony_ci#define	BCCK_CS_LIM			0x070000
19668c2ecf20Sopenharmony_ci#define	BCCK_BIST_MODE			0x80000000
19678c2ecf20Sopenharmony_ci#define	BCCK_CCAMASK			0x40000000
19688c2ecf20Sopenharmony_ci#define	BCCK_TX_DAC_PHASE		0x4
19698c2ecf20Sopenharmony_ci#define	BCCK_RX_ADC_PHASE		0x20000000
19708c2ecf20Sopenharmony_ci#define	BCCKR_CP_MODE			0x0100
19718c2ecf20Sopenharmony_ci#define	BCCK_TXDC_OFFSET		0xf0
19728c2ecf20Sopenharmony_ci#define	BCCK_RXDC_OFFSET		0xf
19738c2ecf20Sopenharmony_ci#define	BCCK_CCA_MODE			0xc000
19748c2ecf20Sopenharmony_ci#define	BCCK_FALSECS_LIM		0x3f00
19758c2ecf20Sopenharmony_ci#define	BCCK_CS_RATIO			0xc00000
19768c2ecf20Sopenharmony_ci#define	BCCK_CORGBIT_SEL		0x300000
19778c2ecf20Sopenharmony_ci#define	BCCK_PD_LIM			0x0f0000
19788c2ecf20Sopenharmony_ci#define	BCCK_NEWCCA			0x80000000
19798c2ecf20Sopenharmony_ci#define	BCCK_RXHP_OF_IG			0x8000
19808c2ecf20Sopenharmony_ci#define	BCCK_RXIG			0x7f00
19818c2ecf20Sopenharmony_ci#define	BCCK_LNA_POLARITY		0x800000
19828c2ecf20Sopenharmony_ci#define	BCCK_RX1ST_BAIN			0x7f0000
19838c2ecf20Sopenharmony_ci#define	BCCK_RF_EXTEND			0x20000000
19848c2ecf20Sopenharmony_ci#define	BCCK_RXAGC_SATLEVEL		0x1f000000
19858c2ecf20Sopenharmony_ci#define	BCCK_RXAGC_SATCOUNT		0xe0
19868c2ecf20Sopenharmony_ci#define	BCCKRXRFSETTLE			0x1f
19878c2ecf20Sopenharmony_ci#define	BCCK_FIXED_RXAGC		0x8000
19888c2ecf20Sopenharmony_ci#define	BCCK_ANTENNA_POLARITY		0x2000
19898c2ecf20Sopenharmony_ci#define	BCCK_TXFILTER_TYPE		0x0c00
19908c2ecf20Sopenharmony_ci#define	BCCK_RXAGC_REPORTTYPE		0x0300
19918c2ecf20Sopenharmony_ci#define	BCCK_RXDAGC_EN			0x80000000
19928c2ecf20Sopenharmony_ci#define	BCCK_RXDAGC_PERIOD		0x20000000
19938c2ecf20Sopenharmony_ci#define	BCCK_RXDAGC_SATLEVEL		0x1f000000
19948c2ecf20Sopenharmony_ci#define	BCCK_TIMING_RECOVERY		0x800000
19958c2ecf20Sopenharmony_ci#define	BCCK_TXC0			0x3f0000
19968c2ecf20Sopenharmony_ci#define	BCCK_TXC1			0x3f000000
19978c2ecf20Sopenharmony_ci#define	BCCK_TXC2			0x3f
19988c2ecf20Sopenharmony_ci#define	BCCK_TXC3			0x3f00
19998c2ecf20Sopenharmony_ci#define	BCCK_TXC4			0x3f0000
20008c2ecf20Sopenharmony_ci#define	BCCK_TXC5			0x3f000000
20018c2ecf20Sopenharmony_ci#define	BCCK_TXC6			0x3f
20028c2ecf20Sopenharmony_ci#define	BCCK_TXC7			0x3f00
20038c2ecf20Sopenharmony_ci#define	BCCK_DEBUGPORT			0xff0000
20048c2ecf20Sopenharmony_ci#define	BCCK_DAC_DEBUG			0x0f000000
20058c2ecf20Sopenharmony_ci#define	BCCK_FALSEALARM_ENABLE		0x8000
20068c2ecf20Sopenharmony_ci#define	BCCK_FALSEALARM_READ		0x4000
20078c2ecf20Sopenharmony_ci#define	BCCK_TRSSI			0x7f
20088c2ecf20Sopenharmony_ci#define	BCCK_RXAGC_REPORT		0xfe
20098c2ecf20Sopenharmony_ci#define	BCCK_RXREPORT_ANTSEL		0x80000000
20108c2ecf20Sopenharmony_ci#define	BCCK_RXREPORT_MFOFF		0x40000000
20118c2ecf20Sopenharmony_ci#define	BCCK_RXREPORT_SQLOSS		0x20000000
20128c2ecf20Sopenharmony_ci#define	BCCK_RXREPORT_PKTLOSS		0x10000000
20138c2ecf20Sopenharmony_ci#define	BCCK_RXREPORT_LOCKEDBIT		0x08000000
20148c2ecf20Sopenharmony_ci#define	BCCK_RXREPORT_RATEERROR		0x04000000
20158c2ecf20Sopenharmony_ci#define	BCCK_RXREPORT_RXRATE		0x03000000
20168c2ecf20Sopenharmony_ci#define	BCCK_RXFA_COUNTER_LOWER		0xff
20178c2ecf20Sopenharmony_ci#define	BCCK_RXFA_COUNTER_UPPER		0xff000000
20188c2ecf20Sopenharmony_ci#define	BCCK_RXHPAGC_START		0xe000
20198c2ecf20Sopenharmony_ci#define	BCCK_RXHPAGC_FINAL		0x1c00
20208c2ecf20Sopenharmony_ci#define	BCCK_RXFALSEALARM_ENABLE	0x8000
20218c2ecf20Sopenharmony_ci#define	BCCK_FACOUNTER_FREEZE		0x4000
20228c2ecf20Sopenharmony_ci#define	BCCK_TXPATH_SEL			0x10000000
20238c2ecf20Sopenharmony_ci#define	BCCK_DEFAULT_RXPATH		0xc000000
20248c2ecf20Sopenharmony_ci#define	BCCK_OPTION_RXPATH		0x3000000
20258c2ecf20Sopenharmony_ci
20268c2ecf20Sopenharmony_ci#define	BNUM_OFSTF			0x3
20278c2ecf20Sopenharmony_ci#define	BSHIFT_L			0xc0
20288c2ecf20Sopenharmony_ci#define	BGI_TH				0xc
20298c2ecf20Sopenharmony_ci#define	BRXPATH_A			0x1
20308c2ecf20Sopenharmony_ci#define	BRXPATH_B			0x2
20318c2ecf20Sopenharmony_ci#define	BRXPATH_C			0x4
20328c2ecf20Sopenharmony_ci#define	BRXPATH_D			0x8
20338c2ecf20Sopenharmony_ci#define	BTXPATH_A			0x1
20348c2ecf20Sopenharmony_ci#define	BTXPATH_B			0x2
20358c2ecf20Sopenharmony_ci#define	BTXPATH_C			0x4
20368c2ecf20Sopenharmony_ci#define	BTXPATH_D			0x8
20378c2ecf20Sopenharmony_ci#define	BTRSSI_FREQ			0x200
20388c2ecf20Sopenharmony_ci#define	BADC_BACKOFF			0x3000
20398c2ecf20Sopenharmony_ci#define	BDFIR_BACKOFF			0xc000
20408c2ecf20Sopenharmony_ci#define	BTRSSI_LATCH_PHASE		0x10000
20418c2ecf20Sopenharmony_ci#define	BRX_LDC_OFFSET			0xff
20428c2ecf20Sopenharmony_ci#define	BRX_QDC_OFFSET			0xff00
20438c2ecf20Sopenharmony_ci#define	BRX_DFIR_MODE			0x1800000
20448c2ecf20Sopenharmony_ci#define	BRX_DCNF_TYPE			0xe000000
20458c2ecf20Sopenharmony_ci#define	BRXIQIMB_A			0x3ff
20468c2ecf20Sopenharmony_ci#define	BRXIQIMB_B			0xfc00
20478c2ecf20Sopenharmony_ci#define	BRXIQIMB_C			0x3f0000
20488c2ecf20Sopenharmony_ci#define	BRXIQIMB_D			0xffc00000
20498c2ecf20Sopenharmony_ci#define	BDC_DC_NOTCH			0x60000
20508c2ecf20Sopenharmony_ci#define	BRXNB_NOTCH			0x1f000000
20518c2ecf20Sopenharmony_ci#define	BPD_TH				0xf
20528c2ecf20Sopenharmony_ci#define	BPD_TH_OPT2			0xc000
20538c2ecf20Sopenharmony_ci#define	BPWED_TH			0x700
20548c2ecf20Sopenharmony_ci#define	BIFMF_WIN_L			0x800
20558c2ecf20Sopenharmony_ci#define	BPD_OPTION			0x1000
20568c2ecf20Sopenharmony_ci#define	BMF_WIN_L			0xe000
20578c2ecf20Sopenharmony_ci#define	BBW_SEARCH_L			0x30000
20588c2ecf20Sopenharmony_ci#define	BWIN_ENH_L			0xc0000
20598c2ecf20Sopenharmony_ci#define	BBW_TH				0x700000
20608c2ecf20Sopenharmony_ci#define	BED_TH2				0x3800000
20618c2ecf20Sopenharmony_ci#define	BBW_OPTION			0x4000000
20628c2ecf20Sopenharmony_ci#define	BRADIO_TH			0x18000000
20638c2ecf20Sopenharmony_ci#define	BWINDOW_L			0xe0000000
20648c2ecf20Sopenharmony_ci#define	BSBD_OPTION			0x1
20658c2ecf20Sopenharmony_ci#define	BFRAME_TH			0x1c
20668c2ecf20Sopenharmony_ci#define	BFS_OPTION			0x60
20678c2ecf20Sopenharmony_ci#define	BDC_SLOPE_CHECK			0x80
20688c2ecf20Sopenharmony_ci#define	BFGUARD_COUNTER_DC_L		0xe00
20698c2ecf20Sopenharmony_ci#define	BFRAME_WEIGHT_SHORT		0x7000
20708c2ecf20Sopenharmony_ci#define	BSUB_TUNE			0xe00000
20718c2ecf20Sopenharmony_ci#define	BFRAME_DC_LENGTH		0xe000000
20728c2ecf20Sopenharmony_ci#define	BSBD_START_OFFSET		0x30000000
20738c2ecf20Sopenharmony_ci#define	BFRAME_TH_2			0x7
20748c2ecf20Sopenharmony_ci#define	BFRAME_GI2_TH			0x38
20758c2ecf20Sopenharmony_ci#define	BGI2_SYNC_EN			0x40
20768c2ecf20Sopenharmony_ci#define	BSARCH_SHORT_EARLY		0x300
20778c2ecf20Sopenharmony_ci#define	BSARCH_SHORT_LATE		0xc00
20788c2ecf20Sopenharmony_ci#define	BSARCH_GI2_LATE			0x70000
20798c2ecf20Sopenharmony_ci#define	BCFOANTSUM			0x1
20808c2ecf20Sopenharmony_ci#define	BCFOACC				0x2
20818c2ecf20Sopenharmony_ci#define	BCFOSTARTOFFSET			0xc
20828c2ecf20Sopenharmony_ci#define	BCFOLOOPBACK			0x70
20838c2ecf20Sopenharmony_ci#define	BCFOSUMWEIGHT			0x80
20848c2ecf20Sopenharmony_ci#define	BDAGCENABLE			0x10000
20858c2ecf20Sopenharmony_ci#define	BTXIQIMB_A			0x3ff
20868c2ecf20Sopenharmony_ci#define	BTXIQIMB_b			0xfc00
20878c2ecf20Sopenharmony_ci#define	BTXIQIMB_C			0x3f0000
20888c2ecf20Sopenharmony_ci#define	BTXIQIMB_D			0xffc00000
20898c2ecf20Sopenharmony_ci#define	BTXIDCOFFSET			0xff
20908c2ecf20Sopenharmony_ci#define	BTXIQDCOFFSET			0xff00
20918c2ecf20Sopenharmony_ci#define	BTXDFIRMODE			0x10000
20928c2ecf20Sopenharmony_ci#define	BTXPESUDO_NOISEON		0x4000000
20938c2ecf20Sopenharmony_ci#define	BTXPESUDO_NOISE_A		0xff
20948c2ecf20Sopenharmony_ci#define	BTXPESUDO_NOISE_B		0xff00
20958c2ecf20Sopenharmony_ci#define	BTXPESUDO_NOISE_C		0xff0000
20968c2ecf20Sopenharmony_ci#define	BTXPESUDO_NOISE_D		0xff000000
20978c2ecf20Sopenharmony_ci#define	BCCA_DROPOPTION			0x20000
20988c2ecf20Sopenharmony_ci#define	BCCA_DROPTHRES			0xfff00000
20998c2ecf20Sopenharmony_ci#define	BEDCCA_H			0xf
21008c2ecf20Sopenharmony_ci#define	BEDCCA_L			0xf0
21018c2ecf20Sopenharmony_ci#define	BLAMBDA_ED			0x300
21028c2ecf20Sopenharmony_ci#define	BRX_INITIALGAIN			0x7f
21038c2ecf20Sopenharmony_ci#define	BRX_ANTDIV_EN			0x80
21048c2ecf20Sopenharmony_ci#define	BRX_AGC_ADDRESS_FOR_LNA		0x7f00
21058c2ecf20Sopenharmony_ci#define	BRX_HIGHPOWER_FLOW		0x8000
21068c2ecf20Sopenharmony_ci#define	BRX_AGC_FREEZE_THRES		0xc0000
21078c2ecf20Sopenharmony_ci#define	BRX_FREEZESTEP_AGC1		0x300000
21088c2ecf20Sopenharmony_ci#define	BRX_FREEZESTEP_AGC2		0xc00000
21098c2ecf20Sopenharmony_ci#define	BRX_FREEZESTEP_AGC3		0x3000000
21108c2ecf20Sopenharmony_ci#define	BRX_FREEZESTEP_AGC0		0xc000000
21118c2ecf20Sopenharmony_ci#define	BRXRSSI_CMP_EN			0x10000000
21128c2ecf20Sopenharmony_ci#define	BRXQUICK_AGCEN			0x20000000
21138c2ecf20Sopenharmony_ci#define	BRXAGC_FREEZE_THRES_MODE	0x40000000
21148c2ecf20Sopenharmony_ci#define	BRX_OVERFLOW_CHECKTYPE		0x80000000
21158c2ecf20Sopenharmony_ci#define	BRX_AGCSHIFT			0x7f
21168c2ecf20Sopenharmony_ci#define	BTRSW_TRI_ONLY			0x80
21178c2ecf20Sopenharmony_ci#define	BPOWER_THRES			0x300
21188c2ecf20Sopenharmony_ci#define	BRXAGC_EN			0x1
21198c2ecf20Sopenharmony_ci#define	BRXAGC_TOGETHER_EN		0x2
21208c2ecf20Sopenharmony_ci#define	BRXAGC_MIN			0x4
21218c2ecf20Sopenharmony_ci#define	BRXHP_INI			0x7
21228c2ecf20Sopenharmony_ci#define	BRXHP_TRLNA			0x70
21238c2ecf20Sopenharmony_ci#define	BRXHP_RSSI			0x700
21248c2ecf20Sopenharmony_ci#define	BRXHP_BBP1			0x7000
21258c2ecf20Sopenharmony_ci#define	BRXHP_BBP2			0x70000
21268c2ecf20Sopenharmony_ci#define	BRXHP_BBP3			0x700000
21278c2ecf20Sopenharmony_ci#define	BRSSI_H				0x7f0000
21288c2ecf20Sopenharmony_ci#define	BRSSI_GEN			0x7f000000
21298c2ecf20Sopenharmony_ci#define	BRXSETTLE_TRSW			0x7
21308c2ecf20Sopenharmony_ci#define	BRXSETTLE_LNA			0x38
21318c2ecf20Sopenharmony_ci#define	BRXSETTLE_RSSI			0x1c0
21328c2ecf20Sopenharmony_ci#define	BRXSETTLE_BBP			0xe00
21338c2ecf20Sopenharmony_ci#define	BRXSETTLE_RXHP			0x7000
21348c2ecf20Sopenharmony_ci#define	BRXSETTLE_ANTSW_RSSI		0x38000
21358c2ecf20Sopenharmony_ci#define	BRXSETTLE_ANTSW			0xc0000
21368c2ecf20Sopenharmony_ci#define	BRXPROCESS_TIME_DAGC		0x300000
21378c2ecf20Sopenharmony_ci#define	BRXSETTLE_HSSI			0x400000
21388c2ecf20Sopenharmony_ci#define	BRXPROCESS_TIME_BBPPW		0x800000
21398c2ecf20Sopenharmony_ci#define	BRXANTENNA_POWER_SHIFT		0x3000000
21408c2ecf20Sopenharmony_ci#define	BRSSI_TABLE_SELECT		0xc000000
21418c2ecf20Sopenharmony_ci#define	BRXHP_FINAL			0x7000000
21428c2ecf20Sopenharmony_ci#define	BRXHPSETTLE_BBP			0x7
21438c2ecf20Sopenharmony_ci#define	BRXHTSETTLE_HSSI		0x8
21448c2ecf20Sopenharmony_ci#define	BRXHTSETTLE_RXHP		0x70
21458c2ecf20Sopenharmony_ci#define	BRXHTSETTLE_BBPPW		0x80
21468c2ecf20Sopenharmony_ci#define	BRXHTSETTLE_IDLE		0x300
21478c2ecf20Sopenharmony_ci#define	BRXHTSETTLE_RESERVED		0x1c00
21488c2ecf20Sopenharmony_ci#define	BRXHT_RXHP_EN			0x8000
21498c2ecf20Sopenharmony_ci#define	BRXAGC_FREEZE_THRES		0x30000
21508c2ecf20Sopenharmony_ci#define	BRXAGC_TOGETHEREN		0x40000
21518c2ecf20Sopenharmony_ci#define	BRXHTAGC_MIN			0x80000
21528c2ecf20Sopenharmony_ci#define	BRXHTAGC_EN			0x100000
21538c2ecf20Sopenharmony_ci#define	BRXHTDAGC_EN			0x200000
21548c2ecf20Sopenharmony_ci#define	BRXHT_RXHP_BBP			0x1c00000
21558c2ecf20Sopenharmony_ci#define	BRXHT_RXHP_FINAL		0xe0000000
21568c2ecf20Sopenharmony_ci#define	BRXPW_RADIO_TH			0x3
21578c2ecf20Sopenharmony_ci#define	BRXPW_RADIO_EN			0x4
21588c2ecf20Sopenharmony_ci#define	BRXMF_HOLD			0x3800
21598c2ecf20Sopenharmony_ci#define	BRXPD_DELAY_TH1			0x38
21608c2ecf20Sopenharmony_ci#define	BRXPD_DELAY_TH2			0x1c0
21618c2ecf20Sopenharmony_ci#define	BRXPD_DC_COUNT_MAX		0x600
21628c2ecf20Sopenharmony_ci#define	BRXPD_DELAY_TH			0x8000
21638c2ecf20Sopenharmony_ci#define	BRXPROCESS_DELAY		0xf0000
21648c2ecf20Sopenharmony_ci#define	BRXSEARCHRANGE_GI2_EARLY	0x700000
21658c2ecf20Sopenharmony_ci#define	BRXFRAME_FUARD_COUNTER_L	0x3800000
21668c2ecf20Sopenharmony_ci#define	BRXSGI_GUARD_L			0xc000000
21678c2ecf20Sopenharmony_ci#define	BRXSGI_SEARCH_L			0x30000000
21688c2ecf20Sopenharmony_ci#define	BRXSGI_TH			0xc0000000
21698c2ecf20Sopenharmony_ci#define	BDFSCNT0			0xff
21708c2ecf20Sopenharmony_ci#define	BDFSCNT1			0xff00
21718c2ecf20Sopenharmony_ci#define	BDFSFLAG			0xf0000
21728c2ecf20Sopenharmony_ci#define	BMF_WEIGHT_SUM			0x300000
21738c2ecf20Sopenharmony_ci#define	BMINIDX_TH			0x7f000000
21748c2ecf20Sopenharmony_ci#define	BDAFORMAT			0x40000
21758c2ecf20Sopenharmony_ci#define	BTXCH_EMU_ENABLE		0x01000000
21768c2ecf20Sopenharmony_ci#define	BTRSW_ISOLATION_A		0x7f
21778c2ecf20Sopenharmony_ci#define	BTRSW_ISOLATION_B		0x7f00
21788c2ecf20Sopenharmony_ci#define	BTRSW_ISOLATION_C		0x7f0000
21798c2ecf20Sopenharmony_ci#define	BTRSW_ISOLATION_D		0x7f000000
21808c2ecf20Sopenharmony_ci#define	BEXT_LNA_GAIN			0x7c00
21818c2ecf20Sopenharmony_ci
21828c2ecf20Sopenharmony_ci#define	BSTBC_EN			0x4
21838c2ecf20Sopenharmony_ci#define	BANTENNA_MAPPING		0x10
21848c2ecf20Sopenharmony_ci#define	BNSS				0x20
21858c2ecf20Sopenharmony_ci#define	BCFO_ANTSUM_ID			0x200
21868c2ecf20Sopenharmony_ci#define	BPHY_COUNTER_RESET		0x8000000
21878c2ecf20Sopenharmony_ci#define	BCFO_REPORT_GET			0x4000000
21888c2ecf20Sopenharmony_ci#define	BOFDM_CONTINUE_TX		0x10000000
21898c2ecf20Sopenharmony_ci#define	BOFDM_SINGLE_CARRIER		0x20000000
21908c2ecf20Sopenharmony_ci#define	BOFDM_SINGLE_TONE		0x40000000
21918c2ecf20Sopenharmony_ci#define	BHT_DETECT			0x100
21928c2ecf20Sopenharmony_ci#define	BCFOEN				0x10000
21938c2ecf20Sopenharmony_ci#define	BCFOVALUE			0xfff00000
21948c2ecf20Sopenharmony_ci#define	BSIGTONE_RE			0x3f
21958c2ecf20Sopenharmony_ci#define	BSIGTONE_IM			0x7f00
21968c2ecf20Sopenharmony_ci#define	BCOUNTER_CCA			0xffff
21978c2ecf20Sopenharmony_ci#define	BCOUNTER_PARITYFAIL		0xffff0000
21988c2ecf20Sopenharmony_ci#define	BCOUNTER_RATEILLEGAL		0xffff
21998c2ecf20Sopenharmony_ci#define	BCOUNTER_CRC8FAIL		0xffff0000
22008c2ecf20Sopenharmony_ci#define	BCOUNTER_MCSNOSUPPORT		0xffff
22018c2ecf20Sopenharmony_ci#define	BCOUNTER_FASTSYNC		0xffff
22028c2ecf20Sopenharmony_ci#define	BSHORTCFO			0xfff
22038c2ecf20Sopenharmony_ci#define	BSHORTCFOT_LENGTH		12
22048c2ecf20Sopenharmony_ci#define	BSHORTCFOF_LENGTH		11
22058c2ecf20Sopenharmony_ci#define	BLONGCFO			0x7ff
22068c2ecf20Sopenharmony_ci#define	BLONGCFOT_LENGTH		11
22078c2ecf20Sopenharmony_ci#define	BLONGCFOF_LENGTH		11
22088c2ecf20Sopenharmony_ci#define	BTAILCFO			0x1fff
22098c2ecf20Sopenharmony_ci#define	BTAILCFOT_LENGTH		13
22108c2ecf20Sopenharmony_ci#define	BTAILCFOF_LENGTH		12
22118c2ecf20Sopenharmony_ci#define	BNOISE_EN_PWDB			0xffff
22128c2ecf20Sopenharmony_ci#define	BCC_POWER_DB			0xffff0000
22138c2ecf20Sopenharmony_ci#define	BMOISE_PWDB			0xffff
22148c2ecf20Sopenharmony_ci#define	BPOWERMEAST_LENGTH		10
22158c2ecf20Sopenharmony_ci#define	BPOWERMEASF_LENGTH		3
22168c2ecf20Sopenharmony_ci#define	BRX_HT_BW			0x1
22178c2ecf20Sopenharmony_ci#define	BRXSC				0x6
22188c2ecf20Sopenharmony_ci#define	BRX_HT				0x8
22198c2ecf20Sopenharmony_ci#define	BNB_INTF_DET_ON			0x1
22208c2ecf20Sopenharmony_ci#define	BINTF_WIN_LEN_CFG		0x30
22218c2ecf20Sopenharmony_ci#define	BNB_INTF_TH_CFG			0x1c0
22228c2ecf20Sopenharmony_ci#define	BRFGAIN				0x3f
22238c2ecf20Sopenharmony_ci#define	BTABLESEL			0x40
22248c2ecf20Sopenharmony_ci#define	BTRSW				0x80
22258c2ecf20Sopenharmony_ci#define	BRXSNR_A			0xff
22268c2ecf20Sopenharmony_ci#define	BRXSNR_B			0xff00
22278c2ecf20Sopenharmony_ci#define	BRXSNR_C			0xff0000
22288c2ecf20Sopenharmony_ci#define	BRXSNR_D			0xff000000
22298c2ecf20Sopenharmony_ci#define	BSNR_EVMT_LENGTH		8
22308c2ecf20Sopenharmony_ci#define	BSNR_EVMF_LENGTH		1
22318c2ecf20Sopenharmony_ci#define	BCSI1ST				0xff
22328c2ecf20Sopenharmony_ci#define	BCSI2ND				0xff00
22338c2ecf20Sopenharmony_ci#define	BRXEVM1ST			0xff0000
22348c2ecf20Sopenharmony_ci#define	BRXEVM2ND			0xff000000
22358c2ecf20Sopenharmony_ci#define	BSIGEVM				0xff
22368c2ecf20Sopenharmony_ci#define	BPWDB				0xff00
22378c2ecf20Sopenharmony_ci#define	BSGIEN				0x10000
22388c2ecf20Sopenharmony_ci
22398c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA1			0xf
22408c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA2			0xf0
22418c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA3			0xf00
22428c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA4			0xf000
22438c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA5			0xf0000
22448c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA6			0xf0000
22458c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA7			0xf00000
22468c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA8			0xf000000
22478c2ecf20Sopenharmony_ci#define	BSFACTOR_QMA9			0xf0000000
22488c2ecf20Sopenharmony_ci#define	BCSI_SCHEME			0x100000
22498c2ecf20Sopenharmony_ci
22508c2ecf20Sopenharmony_ci#define	BNOISE_LVL_TOP_SET		0x3
22518c2ecf20Sopenharmony_ci#define	BCHSMOOTH			0x4
22528c2ecf20Sopenharmony_ci#define	BCHSMOOTH_CFG1			0x38
22538c2ecf20Sopenharmony_ci#define	BCHSMOOTH_CFG2			0x1c0
22548c2ecf20Sopenharmony_ci#define	BCHSMOOTH_CFG3			0xe00
22558c2ecf20Sopenharmony_ci#define	BCHSMOOTH_CFG4			0x7000
22568c2ecf20Sopenharmony_ci#define	BMRCMODE			0x800000
22578c2ecf20Sopenharmony_ci#define	BTHEVMCFG			0x7000000
22588c2ecf20Sopenharmony_ci
22598c2ecf20Sopenharmony_ci#define	BLOOP_FIT_TYPE			0x1
22608c2ecf20Sopenharmony_ci#define	BUPD_CFO			0x40
22618c2ecf20Sopenharmony_ci#define	BUPD_CFO_OFFDATA		0x80
22628c2ecf20Sopenharmony_ci#define	BADV_UPD_CFO			0x100
22638c2ecf20Sopenharmony_ci#define	BADV_TIME_CTRL			0x800
22648c2ecf20Sopenharmony_ci#define	BUPD_CLKO			0x1000
22658c2ecf20Sopenharmony_ci#define	BFC				0x6000
22668c2ecf20Sopenharmony_ci#define	BTRACKING_MODE			0x8000
22678c2ecf20Sopenharmony_ci#define	BPHCMP_ENABLE			0x10000
22688c2ecf20Sopenharmony_ci#define	BUPD_CLKO_LTF			0x20000
22698c2ecf20Sopenharmony_ci#define	BCOM_CH_CFO			0x40000
22708c2ecf20Sopenharmony_ci#define	BCSI_ESTI_MODE			0x80000
22718c2ecf20Sopenharmony_ci#define	BADV_UPD_EQZ			0x100000
22728c2ecf20Sopenharmony_ci#define	BUCHCFG				0x7000000
22738c2ecf20Sopenharmony_ci#define	BUPDEQZ				0x8000000
22748c2ecf20Sopenharmony_ci
22758c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISE_ON		0x20000000
22768c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISE_A		0xff
22778c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISE_B		0xff00
22788c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISE_C		0xff0000
22798c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISE_D		0xff000000
22808c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISESTATE_A		0xffff
22818c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISESTATE_B		0xffff0000
22828c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISESTATE_C		0xffff
22838c2ecf20Sopenharmony_ci#define	BRX_PESUDO_NOISESTATE_D		0xffff0000
22848c2ecf20Sopenharmony_ci
22858c2ecf20Sopenharmony_ci#define	BZEBRA1_HSSIENABLE		0x8
22868c2ecf20Sopenharmony_ci#define	BZEBRA1_TRXCONTROL		0xc00
22878c2ecf20Sopenharmony_ci#define	BZEBRA1_TRXGAINSETTING		0x07f
22888c2ecf20Sopenharmony_ci#define	BZEBRA1_RXCOUNTER		0xc00
22898c2ecf20Sopenharmony_ci#define	BZEBRA1_TXCHANGEPUMP		0x38
22908c2ecf20Sopenharmony_ci#define	BZEBRA1_RXCHANGEPUMP		0x7
22918c2ecf20Sopenharmony_ci#define	BZEBRA1_CHANNEL_NUM		0xf80
22928c2ecf20Sopenharmony_ci#define	BZEBRA1_TXLPFBW			0x400
22938c2ecf20Sopenharmony_ci#define	BZEBRA1_RXLPFBW			0x600
22948c2ecf20Sopenharmony_ci
22958c2ecf20Sopenharmony_ci#define	BRTL8256REG_MODE_CTRL1		0x100
22968c2ecf20Sopenharmony_ci#define	BRTL8256REG_MODE_CTRL0		0x40
22978c2ecf20Sopenharmony_ci#define	BRTL8256REG_TXLPFBW		0x18
22988c2ecf20Sopenharmony_ci#define	BRTL8256REG_RXLPFBW		0x600
22998c2ecf20Sopenharmony_ci
23008c2ecf20Sopenharmony_ci#define	BRTL8258_TXLPFBW		0xc
23018c2ecf20Sopenharmony_ci#define	BRTL8258_RXLPFBW		0xc00
23028c2ecf20Sopenharmony_ci#define	BRTL8258_RSSILPFBW		0xc0
23038c2ecf20Sopenharmony_ci
23048c2ecf20Sopenharmony_ci#define	BBYTE0				0x1
23058c2ecf20Sopenharmony_ci#define	BBYTE1				0x2
23068c2ecf20Sopenharmony_ci#define	BBYTE2				0x4
23078c2ecf20Sopenharmony_ci#define	BBYTE3				0x8
23088c2ecf20Sopenharmony_ci#define	BWORD0				0x3
23098c2ecf20Sopenharmony_ci#define	BWORD1				0xc
23108c2ecf20Sopenharmony_ci#define	BWORD				0xf
23118c2ecf20Sopenharmony_ci
23128c2ecf20Sopenharmony_ci#define	MASKBYTE0			0xff
23138c2ecf20Sopenharmony_ci#define	MASKBYTE1			0xff00
23148c2ecf20Sopenharmony_ci#define	MASKBYTE2			0xff0000
23158c2ecf20Sopenharmony_ci#define	MASKBYTE3			0xff000000
23168c2ecf20Sopenharmony_ci#define	MASKHWORD			0xffff0000
23178c2ecf20Sopenharmony_ci#define	MASKLWORD			0x0000ffff
23188c2ecf20Sopenharmony_ci#define	MASKDWORD			0xffffffff
23198c2ecf20Sopenharmony_ci#define	MASK12BITS			0xfff
23208c2ecf20Sopenharmony_ci#define	MASKH4BITS			0xf0000000
23218c2ecf20Sopenharmony_ci#define MASKOFDM_D			0xffc00000
23228c2ecf20Sopenharmony_ci#define	MASKCCK				0x3f3f3f3f
23238c2ecf20Sopenharmony_ci
23248c2ecf20Sopenharmony_ci#define	MASK4BITS			0x0f
23258c2ecf20Sopenharmony_ci#define	MASK20BITS			0xfffff
23268c2ecf20Sopenharmony_ci#define RFREG_OFFSET_MASK		0xfffff
23278c2ecf20Sopenharmony_ci
23288c2ecf20Sopenharmony_ci#define	BENABLE				0x1
23298c2ecf20Sopenharmony_ci#define	BDISABLE			0x0
23308c2ecf20Sopenharmony_ci
23318c2ecf20Sopenharmony_ci#define	LEFT_ANTENNA			0x0
23328c2ecf20Sopenharmony_ci#define	RIGHT_ANTENNA			0x1
23338c2ecf20Sopenharmony_ci
23348c2ecf20Sopenharmony_ci#define	TCHECK_TXSTATUS			500
23358c2ecf20Sopenharmony_ci#define	TUPDATE_RXCOUNTER		100
23368c2ecf20Sopenharmony_ci
23378c2ecf20Sopenharmony_ci#define	REG_UN_used_register		0x01bf
23388c2ecf20Sopenharmony_ci
23398c2ecf20Sopenharmony_ci/* Path_A RFE cotrol pinmux*/
23408c2ecf20Sopenharmony_ci#define		RA_RFE_PINMUX		0xcb0
23418c2ecf20Sopenharmony_ci/* Path_B RFE control pinmux*/
23428c2ecf20Sopenharmony_ci#define		RB_RFE_PINMUX		0xeb0
23438c2ecf20Sopenharmony_ci
23448c2ecf20Sopenharmony_ci#define		RA_RFE_INV		0xcb4
23458c2ecf20Sopenharmony_ci#define		RB_RFE_INV		0xeb4
23468c2ecf20Sopenharmony_ci
23478c2ecf20Sopenharmony_ci/* RXIQC */
23488c2ecf20Sopenharmony_ci/*RxIQ imblance matrix coeff. A & B*/
23498c2ecf20Sopenharmony_ci#define RA_RXIQC_AB			0xc10
23508c2ecf20Sopenharmony_ci/*RxIQ imblance matrix coeff. C & D*/
23518c2ecf20Sopenharmony_ci#define	RA_RXIQC_CD			0xc14
23528c2ecf20Sopenharmony_ci/* Pah_A TX scaling factor*/
23538c2ecf20Sopenharmony_ci#define	RA_TXSCALE			0xc1c
23548c2ecf20Sopenharmony_ci/* Path_B TX scaling factor*/
23558c2ecf20Sopenharmony_ci#define	RB_TXSCALE			0xe1c
23568c2ecf20Sopenharmony_ci/*RxIQ imblance matrix coeff. A & B*/
23578c2ecf20Sopenharmony_ci#define	RB_RXIQC_AB			0xe10
23588c2ecf20Sopenharmony_ci/*RxIQ imblance matrix coeff. C & D*/
23598c2ecf20Sopenharmony_ci#define	RB_RXIQC_CD			0xe14
23608c2ecf20Sopenharmony_ci/*bit mask for IQC matrix element A & C*/
23618c2ecf20Sopenharmony_ci#define	RXIQC_AC			0x02ff
23628c2ecf20Sopenharmony_ci /*bit mask for IQC matrix element A & C*/
23638c2ecf20Sopenharmony_ci#define	RXIQC_BD			0x02ff0000
23648c2ecf20Sopenharmony_ci
23658c2ecf20Sopenharmony_ci/* 2 EFUSE_TEST (For RTL8723 partially) */
23668c2ecf20Sopenharmony_ci#define EFUSE_SEL(x)			(((x) & 0x3) << 8)
23678c2ecf20Sopenharmony_ci#define EFUSE_SEL_MASK			0x300
23688c2ecf20Sopenharmony_ci#define EFUSE_WIFI_SEL_0		0x0
23698c2ecf20Sopenharmony_ci
23708c2ecf20Sopenharmony_ci/*REG_MULTI_FUNC_CTRL(For RTL8723 Only)*/
23718c2ecf20Sopenharmony_ci/* Enable GPIO[9] as WiFi HW PDn source*/
23728c2ecf20Sopenharmony_ci#define	WL_HWPDN_EN			BIT(0)
23738c2ecf20Sopenharmony_ci/* WiFi HW PDn polarity control*/
23748c2ecf20Sopenharmony_ci#define	WL_HWPDN_SL			BIT(1)
23758c2ecf20Sopenharmony_ci/* WiFi function enable */
23768c2ecf20Sopenharmony_ci#define	WL_FUNC_EN			BIT(2)
23778c2ecf20Sopenharmony_ci/* Enable GPIO[9] as WiFi RF HW PDn source */
23788c2ecf20Sopenharmony_ci#define	WL_HWROF_EN			BIT(3)
23798c2ecf20Sopenharmony_ci/* Enable GPIO[11] as BT HW PDn source */
23808c2ecf20Sopenharmony_ci#define	BT_HWPDN_EN			BIT(16)
23818c2ecf20Sopenharmony_ci/* BT HW PDn polarity control */
23828c2ecf20Sopenharmony_ci#define	BT_HWPDN_SL			BIT(17)
23838c2ecf20Sopenharmony_ci/* BT function enable */
23848c2ecf20Sopenharmony_ci#define	BT_FUNC_EN			BIT(18)
23858c2ecf20Sopenharmony_ci/* Enable GPIO[11] as BT/GPS RF HW PDn source */
23868c2ecf20Sopenharmony_ci#define	BT_HWROF_EN			BIT(19)
23878c2ecf20Sopenharmony_ci/* Enable GPIO[10] as GPS HW PDn source */
23888c2ecf20Sopenharmony_ci#define	GPS_HWPDN_EN			BIT(20)
23898c2ecf20Sopenharmony_ci/* GPS HW PDn polarity control */
23908c2ecf20Sopenharmony_ci#define	GPS_HWPDN_SL			BIT(21)
23918c2ecf20Sopenharmony_ci/* GPS function enable */
23928c2ecf20Sopenharmony_ci#define	GPS_FUNC_EN			BIT(22)
23938c2ecf20Sopenharmony_ci
23948c2ecf20Sopenharmony_ci#define	BMASKBYTE0			0xff
23958c2ecf20Sopenharmony_ci#define	BMASKBYTE1			0xff00
23968c2ecf20Sopenharmony_ci#define	BMASKBYTE2			0xff0000
23978c2ecf20Sopenharmony_ci#define	BMASKBYTE3			0xff000000
23988c2ecf20Sopenharmony_ci#define	BMASKHWORD			0xffff0000
23998c2ecf20Sopenharmony_ci#define	BMASKLWORD			0x0000ffff
24008c2ecf20Sopenharmony_ci#define	BMASKDWORD			0xffffffff
24018c2ecf20Sopenharmony_ci#define	BMASK12BITS			0xfff
24028c2ecf20Sopenharmony_ci#define	BMASKH4BITS			0xf0000000
24038c2ecf20Sopenharmony_ci#define BMASKOFDM_D			0xffc00000
24048c2ecf20Sopenharmony_ci#define	BMASKCCK			0x3f3f3f3f
24058c2ecf20Sopenharmony_ci#define BMASKRFEINV			0x3ff00000
24068c2ecf20Sopenharmony_ci
24078c2ecf20Sopenharmony_ci#define BRFREGOFFSETMASK		0xfffff
24088c2ecf20Sopenharmony_ci
24098c2ecf20Sopenharmony_ci#define	ODM_REG_CCK_RPT_FORMAT_11AC	0x804
24108c2ecf20Sopenharmony_ci#define	ODM_REG_BB_RX_PATH_11AC		0x808
24118c2ecf20Sopenharmony_ci/*PAGE 9*/
24128c2ecf20Sopenharmony_ci#define	ODM_REG_OFDM_FA_RST_11AC	0x9A4
24138c2ecf20Sopenharmony_ci/*PAGE A*/
24148c2ecf20Sopenharmony_ci#define	ODM_REG_CCK_CCA_11AC		0xA0A
24158c2ecf20Sopenharmony_ci#define	ODM_REG_CCK_FA_RST_11AC		0xA2C
24168c2ecf20Sopenharmony_ci#define	ODM_REG_CCK_FA_11AC		0xA5C
24178c2ecf20Sopenharmony_ci/*PAGE C*/
24188c2ecf20Sopenharmony_ci#define	ODM_REG_IGI_A_11AC		0xC50
24198c2ecf20Sopenharmony_ci/*PAGE E*/
24208c2ecf20Sopenharmony_ci#define	ODM_REG_IGI_B_11AC		0xE50
24218c2ecf20Sopenharmony_ci/*PAGE F*/
24228c2ecf20Sopenharmony_ci#define	ODM_REG_OFDM_FA_11AC		0xF48
24238c2ecf20Sopenharmony_ci
24248c2ecf20Sopenharmony_ci/* 2 MAC REG LIST */
24258c2ecf20Sopenharmony_ci
24268c2ecf20Sopenharmony_ci/* DIG Related */
24278c2ecf20Sopenharmony_ci#define	ODM_BIT_IGI_11AC		0xFFFFFFFF
24288c2ecf20Sopenharmony_ci#define	ODM_BIT_CCK_RPT_FORMAT_11AC	BIT16
24298c2ecf20Sopenharmony_ci#define	ODM_BIT_BB_RX_PATH_11AC		0xF
24308c2ecf20Sopenharmony_ci
24318c2ecf20Sopenharmony_cienum AGGRE_SIZE {
24328c2ecf20Sopenharmony_ci	HT_AGG_SIZE_8K = 0,
24338c2ecf20Sopenharmony_ci	HT_AGG_SIZE_16K = 1,
24348c2ecf20Sopenharmony_ci	HT_AGG_SIZE_32K = 2,
24358c2ecf20Sopenharmony_ci	HT_AGG_SIZE_64K = 3,
24368c2ecf20Sopenharmony_ci	VHT_AGG_SIZE_128K = 4,
24378c2ecf20Sopenharmony_ci	VHT_AGG_SIZE_256K = 5,
24388c2ecf20Sopenharmony_ci	VHT_AGG_SIZE_512K = 6,
24398c2ecf20Sopenharmony_ci	VHT_AGG_SIZE_1024K = 7,
24408c2ecf20Sopenharmony_ci};
24418c2ecf20Sopenharmony_ci
24428c2ecf20Sopenharmony_ci#define REG_AMPDU_MAX_LENGTH_8812	0x0458
24438c2ecf20Sopenharmony_ci
24448c2ecf20Sopenharmony_ci#endif
2445