162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* Copyright(c) 2009-2010 Realtek Corporation.*/ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef __RTL8821AE_REG_H__ 562306a36Sopenharmony_ci#define __RTL8821AE_REG_H__ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#define TXPKT_BUF_SELECT 0x69 862306a36Sopenharmony_ci#define RXPKT_BUF_SELECT 0xA5 962306a36Sopenharmony_ci#define DISABLE_TRXPKT_BUF_ACCESS 0x0 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define REG_SYS_ISO_CTRL 0x0000 1262306a36Sopenharmony_ci#define REG_SYS_FUNC_EN 0x0002 1362306a36Sopenharmony_ci#define REG_APS_FSMCO 0x0004 1462306a36Sopenharmony_ci#define REG_SYS_CLKR 0x0008 1562306a36Sopenharmony_ci#define REG_9346CR 0x000A 1662306a36Sopenharmony_ci#define REG_EE_VPD 0x000C 1762306a36Sopenharmony_ci#define REG_AFE_MISC 0x0010 1862306a36Sopenharmony_ci#define REG_SPS0_CTRL 0x0011 1962306a36Sopenharmony_ci#define REG_SPS_OCP_CFG 0x0018 2062306a36Sopenharmony_ci#define REG_RSV_CTRL 0x001C 2162306a36Sopenharmony_ci#define REG_RF_CTRL 0x001F 2262306a36Sopenharmony_ci#define REG_LDOA15_CTRL 0x0020 2362306a36Sopenharmony_ci#define REG_LDOV12D_CTRL 0x0021 2462306a36Sopenharmony_ci#define REG_LDOHCI12_CTRL 0x0022 2562306a36Sopenharmony_ci#define REG_LPLDO_CTRL 0x0023 2662306a36Sopenharmony_ci#define REG_AFE_XTAL_CTRL 0x0024 2762306a36Sopenharmony_ci /* 1.5v for 8188EE test chip, 1.4v for MP chip */ 2862306a36Sopenharmony_ci#define REG_AFE_LDO_CTRL 0x0027 2962306a36Sopenharmony_ci#define REG_AFE_PLL_CTRL 0x0028 3062306a36Sopenharmony_ci#define REG_MAC_PHY_CTRL 0x002c 3162306a36Sopenharmony_ci#define REG_EFUSE_CTRL 0x0030 3262306a36Sopenharmony_ci#define REG_EFUSE_TEST 0x0034 3362306a36Sopenharmony_ci#define REG_PWR_DATA 0x0038 3462306a36Sopenharmony_ci#define REG_CAL_TIMER 0x003C 3562306a36Sopenharmony_ci#define REG_ACLK_MON 0x003E 3662306a36Sopenharmony_ci#define REG_GPIO_MUXCFG 0x0040 3762306a36Sopenharmony_ci#define REG_GPIO_IO_SEL 0x0042 3862306a36Sopenharmony_ci#define REG_MAC_PINMUX_CFG 0x0043 3962306a36Sopenharmony_ci#define REG_GPIO_PIN_CTRL 0x0044 4062306a36Sopenharmony_ci#define REG_GPIO_INTM 0x0048 4162306a36Sopenharmony_ci#define REG_LEDCFG0 0x004C 4262306a36Sopenharmony_ci#define REG_LEDCFG1 0x004D 4362306a36Sopenharmony_ci#define REG_LEDCFG2 0x004E 4462306a36Sopenharmony_ci#define REG_LEDCFG3 0x004F 4562306a36Sopenharmony_ci#define REG_FSIMR 0x0050 4662306a36Sopenharmony_ci#define REG_FSISR 0x0054 4762306a36Sopenharmony_ci#define REG_HSIMR 0x0058 4862306a36Sopenharmony_ci#define REG_HSISR 0x005c 4962306a36Sopenharmony_ci#define REG_GPIO_PIN_CTRL_2 0x0060 5062306a36Sopenharmony_ci#define REG_GPIO_IO_SEL_2 0x0062 5162306a36Sopenharmony_ci#define REG_MULTI_FUNC_CTRL 0x0068 5262306a36Sopenharmony_ci#define REG_GPIO_OUTPUT 0x006c 5362306a36Sopenharmony_ci#define REG_OPT_CTRL 0x0074 5462306a36Sopenharmony_ci#define REG_AFE_XTAL_CTRL_EXT 0x0078 5562306a36Sopenharmony_ci#define REG_XCK_OUT_CTRL 0x007c 5662306a36Sopenharmony_ci#define REG_MCUFWDL 0x0080 5762306a36Sopenharmony_ci#define REG_WOL_EVENT 0x0081 5862306a36Sopenharmony_ci#define REG_MCUTSTCFG 0x0084 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci#define REG_HIMR 0x00B0 6162306a36Sopenharmony_ci#define REG_HISR 0x00B4 6262306a36Sopenharmony_ci#define REG_HIMRE 0x00B8 6362306a36Sopenharmony_ci#define REG_HISRE 0x00BC 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci#define REG_PMC_DBG_CTRL2 0x00CC 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#define REG_EFUSE_ACCESS 0x00CF 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci#define REG_BIST_SCAN 0x00D0 7062306a36Sopenharmony_ci#define REG_BIST_RPT 0x00D4 7162306a36Sopenharmony_ci#define REG_BIST_ROM_RPT 0x00D8 7262306a36Sopenharmony_ci#define REG_USB_SIE_INTF 0x00E0 7362306a36Sopenharmony_ci#define REG_PCIE_MIO_INTF 0x00E4 7462306a36Sopenharmony_ci#define REG_PCIE_MIO_INTD 0x00E8 7562306a36Sopenharmony_ci#define REG_HPON_FSM 0x00EC 7662306a36Sopenharmony_ci#define REG_SYS_CFG 0x00F0 7762306a36Sopenharmony_ci#define REG_GPIO_OUTSTS 0x00F4 7862306a36Sopenharmony_ci#define REG_MAC_PHY_CTRL_NORMAL 0x00F8 7962306a36Sopenharmony_ci#define REG_SYS_CFG1 0x00FC 8062306a36Sopenharmony_ci#define REG_ROM_VERSION 0x00FD 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci#define REG_CR 0x0100 8362306a36Sopenharmony_ci#define REG_PBP 0x0104 8462306a36Sopenharmony_ci#define REG_PKT_BUFF_ACCESS_CTRL 0x0106 8562306a36Sopenharmony_ci#define REG_TRXDMA_CTRL 0x010C 8662306a36Sopenharmony_ci#define REG_TRXFF_BNDY 0x0114 8762306a36Sopenharmony_ci#define REG_TRXFF_STATUS 0x0118 8862306a36Sopenharmony_ci#define REG_RXFF_PTR 0x011C 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci#define REG_CPWM 0x012F 9162306a36Sopenharmony_ci#define REG_FWIMR 0x0130 9262306a36Sopenharmony_ci#define REG_FWISR 0x0134 9362306a36Sopenharmony_ci#define REG_FTISR 0x013C 9462306a36Sopenharmony_ci#define REG_PKTBUF_DBG_CTRL 0x0140 9562306a36Sopenharmony_ci#define REG_PKTBUF_DBG_DATA_L 0x0144 9662306a36Sopenharmony_ci#define REG_PKTBUF_DBG_DATA_H 0x0148 9762306a36Sopenharmony_ci#define REG_RXPKTBUF_CTRL (REG_PKTBUF_DBG_CTRL+2) 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci#define REG_TC0_CTRL 0x0150 10062306a36Sopenharmony_ci#define REG_TC1_CTRL 0x0154 10162306a36Sopenharmony_ci#define REG_TC2_CTRL 0x0158 10262306a36Sopenharmony_ci#define REG_TC3_CTRL 0x015C 10362306a36Sopenharmony_ci#define REG_TC4_CTRL 0x0160 10462306a36Sopenharmony_ci#define REG_TCUNIT_BASE 0x0164 10562306a36Sopenharmony_ci#define REG_MBIST_START 0x0174 10662306a36Sopenharmony_ci#define REG_MBIST_DONE 0x0178 10762306a36Sopenharmony_ci#define REG_MBIST_FAIL 0x017C 10862306a36Sopenharmony_ci#define REG_32K_CTRL 0x0194 10962306a36Sopenharmony_ci#define REG_C2HEVT_MSG_NORMAL 0x01A0 11062306a36Sopenharmony_ci#define REG_C2HEVT_CLEAR 0x01AF 11162306a36Sopenharmony_ci#define REG_C2HEVT_MSG_TEST 0x01B8 11262306a36Sopenharmony_ci#define REG_MCUTST_1 0x01c0 11362306a36Sopenharmony_ci#define REG_MCUTST_WOWLAN 0x01C7 11462306a36Sopenharmony_ci#define REG_FMETHR 0x01C8 11562306a36Sopenharmony_ci#define REG_HMETFR 0x01CC 11662306a36Sopenharmony_ci#define REG_HMEBOX_0 0x01D0 11762306a36Sopenharmony_ci#define REG_HMEBOX_1 0x01D4 11862306a36Sopenharmony_ci#define REG_HMEBOX_2 0x01D8 11962306a36Sopenharmony_ci#define REG_HMEBOX_3 0x01DC 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci#define REG_LLT_INIT 0x01E0 12262306a36Sopenharmony_ci#define REG_BB_ACCEESS_CTRL 0x01E8 12362306a36Sopenharmony_ci#define REG_BB_ACCESS_DATA 0x01EC 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci#define REG_HMEBOX_EXT_0 0x01F0 12662306a36Sopenharmony_ci#define REG_HMEBOX_EXT_1 0x01F4 12762306a36Sopenharmony_ci#define REG_HMEBOX_EXT_2 0x01F8 12862306a36Sopenharmony_ci#define REG_HMEBOX_EXT_3 0x01FC 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci#define REG_RQPN 0x0200 13162306a36Sopenharmony_ci#define REG_FIFOPAGE 0x0204 13262306a36Sopenharmony_ci#define REG_TDECTRL 0x0208 13362306a36Sopenharmony_ci#define REG_TXDMA_OFFSET_CHK 0x020C 13462306a36Sopenharmony_ci#define REG_TXDMA_STATUS 0x0210 13562306a36Sopenharmony_ci#define REG_RQPN_NPQ 0x0214 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci#define REG_RXDMA_AGG_PG_TH 0x0280 13862306a36Sopenharmony_ci /* FW shall update this register before FW write RXPKT_RELEASE_POLL to 1 */ 13962306a36Sopenharmony_ci#define REG_FW_UPD_RDPTR 0x0284 14062306a36Sopenharmony_ci /* Control the RX DMA.*/ 14162306a36Sopenharmony_ci#define REG_RXDMA_CONTROL 0x0286 14262306a36Sopenharmony_ci/* The number of packets in RXPKTBUF. */ 14362306a36Sopenharmony_ci#define REG_RXPKT_NUM 0x0287 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci#define REG_PCIE_CTRL_REG 0x0300 14662306a36Sopenharmony_ci#define REG_INT_MIG 0x0304 14762306a36Sopenharmony_ci#define REG_BCNQ_DESA 0x0308 14862306a36Sopenharmony_ci#define REG_HQ_DESA 0x0310 14962306a36Sopenharmony_ci#define REG_MGQ_DESA 0x0318 15062306a36Sopenharmony_ci#define REG_VOQ_DESA 0x0320 15162306a36Sopenharmony_ci#define REG_VIQ_DESA 0x0328 15262306a36Sopenharmony_ci#define REG_BEQ_DESA 0x0330 15362306a36Sopenharmony_ci#define REG_BKQ_DESA 0x0338 15462306a36Sopenharmony_ci#define REG_RX_DESA 0x0340 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci#define REG_DBI_WDATA 0x0348 15762306a36Sopenharmony_ci#define REG_DBI_RDATA 0x034C 15862306a36Sopenharmony_ci#define REG_DBI_CTRL 0x0350 15962306a36Sopenharmony_ci#define REG_DBI_ADDR 0x0350 16062306a36Sopenharmony_ci#define REG_DBI_FLAG 0x0352 16162306a36Sopenharmony_ci#define REG_MDIO_WDATA 0x0354 16262306a36Sopenharmony_ci#define REG_MDIO_RDATA 0x0356 16362306a36Sopenharmony_ci#define REG_MDIO_CTL 0x0358 16462306a36Sopenharmony_ci#define REG_DBG_SEL 0x0360 16562306a36Sopenharmony_ci#define REG_PCIE_HRPWM 0x0361 16662306a36Sopenharmony_ci#define REG_PCIE_HCPWM 0x0363 16762306a36Sopenharmony_ci#define REG_UART_CTRL 0x0364 16862306a36Sopenharmony_ci#define REG_WATCH_DOG 0x0368 16962306a36Sopenharmony_ci#define REG_UART_TX_DESA 0x0370 17062306a36Sopenharmony_ci#define REG_UART_RX_DESA 0x0378 17162306a36Sopenharmony_ci 17262306a36Sopenharmony_ci#define REG_HDAQ_DESA_NODEF 0x0000 17362306a36Sopenharmony_ci#define REG_CMDQ_DESA_NODEF 0x0000 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci#define REG_VOQ_INFORMATION 0x0400 17662306a36Sopenharmony_ci#define REG_VIQ_INFORMATION 0x0404 17762306a36Sopenharmony_ci#define REG_BEQ_INFORMATION 0x0408 17862306a36Sopenharmony_ci#define REG_BKQ_INFORMATION 0x040C 17962306a36Sopenharmony_ci#define REG_MGQ_INFORMATION 0x0410 18062306a36Sopenharmony_ci#define REG_HGQ_INFORMATION 0x0414 18162306a36Sopenharmony_ci#define REG_BCNQ_INFORMATION 0x0418 18262306a36Sopenharmony_ci#define REG_TXPKT_EMPTY 0x041A 18362306a36Sopenharmony_ci 18462306a36Sopenharmony_ci#define REG_CPU_MGQ_INFORMATION 0x041C 18562306a36Sopenharmony_ci#define REG_FWHW_TXQ_CTRL 0x0420 18662306a36Sopenharmony_ci#define REG_HWSEQ_CTRL 0x0423 18762306a36Sopenharmony_ci#define REG_TXPKTBUF_BCNQ_BDNY 0x0424 18862306a36Sopenharmony_ci#define REG_TXPKTBUF_MGQ_BDNY 0x0425 18962306a36Sopenharmony_ci#define REG_MULTI_BCNQ_EN 0x0426 19062306a36Sopenharmony_ci#define REG_MULTI_BCNQ_OFFSET 0x0427 19162306a36Sopenharmony_ci#define REG_SPEC_SIFS 0x0428 19262306a36Sopenharmony_ci#define REG_RL 0x042A 19362306a36Sopenharmony_ci#define REG_DARFRC 0x0430 19462306a36Sopenharmony_ci#define REG_RARFRC 0x0438 19562306a36Sopenharmony_ci#define REG_RRSR 0x0440 19662306a36Sopenharmony_ci#define REG_ARFR0 0x0444 19762306a36Sopenharmony_ci#define REG_ARFR1 0x044C 19862306a36Sopenharmony_ci#define REG_CCK_CHECK 0x0454 19962306a36Sopenharmony_ci#define REG_AMPDU_MAX_TIME 0x0456 20062306a36Sopenharmony_ci#define REG_AGGLEN_LMT 0x0458 20162306a36Sopenharmony_ci#define REG_AMPDU_MIN_SPACE 0x045C 20262306a36Sopenharmony_ci#define REG_TXPKTBUF_WMAC_LBK_BF_HD 0x045D 20362306a36Sopenharmony_ci#define REG_FAST_EDCA_CTRL 0x0460 20462306a36Sopenharmony_ci#define REG_RD_RESP_PKT_TH 0x0463 20562306a36Sopenharmony_ci#define REG_INIRTS_RATE_SEL 0x0480 20662306a36Sopenharmony_ci#define REG_INIDATA_RATE_SEL 0x0484 20762306a36Sopenharmony_ci#define REG_ARFR2 0x048C 20862306a36Sopenharmony_ci#define REG_ARFR3 0x0494 20962306a36Sopenharmony_ci#define REG_POWER_STATUS 0x04A4 21062306a36Sopenharmony_ci#define REG_POWER_STAGE1 0x04B4 21162306a36Sopenharmony_ci#define REG_POWER_STAGE2 0x04B8 21262306a36Sopenharmony_ci#define REG_PKT_LIFE_TIME 0x04C0 21362306a36Sopenharmony_ci#define REG_STBC_SETTING 0x04C4 21462306a36Sopenharmony_ci#define REG_HT_SINGLE_AMPDU 0x04C7 21562306a36Sopenharmony_ci#define REG_PROT_MODE_CTRL 0x04C8 21662306a36Sopenharmony_ci#define REG_MAX_AGGR_NUM 0x04CA 21762306a36Sopenharmony_ci#define REG_BAR_MODE_CTRL 0x04CC 21862306a36Sopenharmony_ci#define REG_RA_TRY_RATE_AGG_LMT 0x04CF 21962306a36Sopenharmony_ci#define REG_EARLY_MODE_CONTROL 0x04D0 22062306a36Sopenharmony_ci#define REG_NQOS_SEQ 0x04DC 22162306a36Sopenharmony_ci#define REG_QOS_SEQ 0x04DE 22262306a36Sopenharmony_ci#define REG_NEED_CPU_HANDLE 0x04E0 22362306a36Sopenharmony_ci#define REG_PKT_LOSE_RPT 0x04E1 22462306a36Sopenharmony_ci#define REG_PTCL_ERR_STATUS 0x04E2 22562306a36Sopenharmony_ci#define REG_TX_RPT_CTRL 0x04EC 22662306a36Sopenharmony_ci#define REG_TX_RPT_TIME 0x04F0 22762306a36Sopenharmony_ci#define REG_DUMMY 0x04FC 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ci#define REG_EDCA_VO_PARAM 0x0500 23062306a36Sopenharmony_ci#define REG_EDCA_VI_PARAM 0x0504 23162306a36Sopenharmony_ci#define REG_EDCA_BE_PARAM 0x0508 23262306a36Sopenharmony_ci#define REG_EDCA_BK_PARAM 0x050C 23362306a36Sopenharmony_ci#define REG_BCNTCFG 0x0510 23462306a36Sopenharmony_ci#define REG_PIFS 0x0512 23562306a36Sopenharmony_ci#define REG_RDG_PIFS 0x0513 23662306a36Sopenharmony_ci#define REG_SIFS_CTX 0x0514 23762306a36Sopenharmony_ci#define REG_SIFS_TRX 0x0516 23862306a36Sopenharmony_ci#define REG_AGGR_BREAK_TIME 0x051A 23962306a36Sopenharmony_ci#define REG_SLOT 0x051B 24062306a36Sopenharmony_ci#define REG_TX_PTCL_CTRL 0x0520 24162306a36Sopenharmony_ci#define REG_TXPAUSE 0x0522 24262306a36Sopenharmony_ci#define REG_DIS_TXREQ_CLR 0x0523 24362306a36Sopenharmony_ci#define REG_RD_CTRL 0x0524 24462306a36Sopenharmony_ci#define REG_TBTT_PROHIBIT 0x0540 24562306a36Sopenharmony_ci#define REG_RD_NAV_NXT 0x0544 24662306a36Sopenharmony_ci#define REG_NAV_PROT_LEN 0x0546 24762306a36Sopenharmony_ci#define REG_BCN_CTRL 0x0550 24862306a36Sopenharmony_ci#define REG_MBID_NUM 0x0552 24962306a36Sopenharmony_ci#define REG_DUAL_TSF_RST 0x0553 25062306a36Sopenharmony_ci#define REG_BCN_INTERVAL 0x0554 25162306a36Sopenharmony_ci#define REG_MBSSID_BCN_SPACE 0x0554 25262306a36Sopenharmony_ci#define REG_DRVERLYINT 0x0558 25362306a36Sopenharmony_ci#define REG_BCNDMATIM 0x0559 25462306a36Sopenharmony_ci#define REG_ATIMWND 0x055A 25562306a36Sopenharmony_ci#define REG_USTIME_TSF 0x055C 25662306a36Sopenharmony_ci#define REG_BCN_MAX_ERR 0x055D 25762306a36Sopenharmony_ci#define REG_RXTSF_OFFSET_CCK 0x055E 25862306a36Sopenharmony_ci#define REG_RXTSF_OFFSET_OFDM 0x055F 25962306a36Sopenharmony_ci#define REG_TSFTR 0x0560 26062306a36Sopenharmony_ci#define REG_INIT_TSFTR 0x0564 26162306a36Sopenharmony_ci#define REG_SECONDARY_CCA_CTRL 0x0577 26262306a36Sopenharmony_ci#define REG_PSTIMER 0x0580 26362306a36Sopenharmony_ci#define REG_TIMER0 0x0584 26462306a36Sopenharmony_ci#define REG_TIMER1 0x0588 26562306a36Sopenharmony_ci#define REG_ACMHWCTRL 0x05C0 26662306a36Sopenharmony_ci#define REG_ACMRSTCTRL 0x05C1 26762306a36Sopenharmony_ci#define REG_ACMAVG 0x05C2 26862306a36Sopenharmony_ci#define REG_VO_ADMTIME 0x05C4 26962306a36Sopenharmony_ci#define REG_VI_ADMTIME 0x05C6 27062306a36Sopenharmony_ci#define REG_BE_ADMTIME 0x05C8 27162306a36Sopenharmony_ci#define REG_EDCA_RANDOM_GEN 0x05CC 27262306a36Sopenharmony_ci#define REG_NOA_DESC_SEL 0x05CF 27362306a36Sopenharmony_ci#define REG_NOA_DESC_DURATION 0x05E0 27462306a36Sopenharmony_ci#define REG_NOA_DESC_INTERVAL 0x05E4 27562306a36Sopenharmony_ci#define REG_NOA_DESC_START 0x05E8 27662306a36Sopenharmony_ci#define REG_NOA_DESC_COUNT 0x05EC 27762306a36Sopenharmony_ci#define REG_SCH_TXCMD 0x05F8 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci#define REG_APSD_CTRL 0x0600 28062306a36Sopenharmony_ci#define REG_BWOPMODE 0x0603 28162306a36Sopenharmony_ci#define REG_TCR 0x0604 28262306a36Sopenharmony_ci#define REG_RCR 0x0608 28362306a36Sopenharmony_ci#define REG_RX_PKT_LIMIT 0x060C 28462306a36Sopenharmony_ci#define REG_RX_DLK_TIME 0x060D 28562306a36Sopenharmony_ci#define REG_RX_DRVINFO_SZ 0x060F 28662306a36Sopenharmony_ci 28762306a36Sopenharmony_ci#define REG_MACID 0x0610 28862306a36Sopenharmony_ci#define REG_BSSID 0x0618 28962306a36Sopenharmony_ci#define REG_MAR 0x0620 29062306a36Sopenharmony_ci#define REG_MBIDCAMCFG 0x0628 29162306a36Sopenharmony_ci 29262306a36Sopenharmony_ci#define REG_USTIME_EDCA 0x0638 29362306a36Sopenharmony_ci#define REG_MAC_SPEC_SIFS 0x063A 29462306a36Sopenharmony_ci#define REG_RESP_SIFS_CCK 0x063C 29562306a36Sopenharmony_ci#define REG_RESP_SIFS_OFDM 0x063E 29662306a36Sopenharmony_ci#define REG_ACKTO 0x0640 29762306a36Sopenharmony_ci#define REG_CTS2TO 0x0641 29862306a36Sopenharmony_ci#define REG_EIFS 0x0642 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci#define REG_NAV_CTRL 0x0650 30162306a36Sopenharmony_ci#define REG_NAV_UPPER 0x0652 30262306a36Sopenharmony_ci#define REG_BACAMCMD 0x0654 30362306a36Sopenharmony_ci#define REG_BACAMCONTENT 0x0658 30462306a36Sopenharmony_ci#define REG_LBDLY 0x0660 30562306a36Sopenharmony_ci#define REG_FWDLY 0x0661 30662306a36Sopenharmony_ci#define REG_RXERR_RPT 0x0664 30762306a36Sopenharmony_ci#define REG_TRXPTCL_CTL 0x0668 30862306a36Sopenharmony_ci 30962306a36Sopenharmony_ci#define REG_CAMCMD 0x0670 31062306a36Sopenharmony_ci#define REG_CAMWRITE 0x0674 31162306a36Sopenharmony_ci#define REG_CAMREAD 0x0678 31262306a36Sopenharmony_ci#define REG_CAMDBG 0x067C 31362306a36Sopenharmony_ci#define REG_SECCFG 0x0680 31462306a36Sopenharmony_ci 31562306a36Sopenharmony_ci#define REG_WOW_CTRL 0x0690 31662306a36Sopenharmony_ci#define REG_PSSTATUS 0x0691 31762306a36Sopenharmony_ci#define REG_PS_RX_INFO 0x0692 31862306a36Sopenharmony_ci#define REG_UAPSD_TID 0x0693 31962306a36Sopenharmony_ci#define REG_LPNAV_CTRL 0x0694 32062306a36Sopenharmony_ci#define REG_WKFMCAM_NUM 0x0698 32162306a36Sopenharmony_ci#define REG_WKFMCAM_RWD 0x069C 32262306a36Sopenharmony_ci#define REG_RXFLTMAP0 0x06A0 32362306a36Sopenharmony_ci#define REG_RXFLTMAP1 0x06A2 32462306a36Sopenharmony_ci#define REG_RXFLTMAP2 0x06A4 32562306a36Sopenharmony_ci#define REG_BCN_PSR_RPT 0x06A8 32662306a36Sopenharmony_ci#define REG_CALB32K_CTRL 0x06AC 32762306a36Sopenharmony_ci#define REG_PKT_MON_CTRL 0x06B4 32862306a36Sopenharmony_ci#define REG_BT_COEX_TABLE 0x06C0 32962306a36Sopenharmony_ci#define REG_WMAC_RESP_TXINFO 0x06D8 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ci#define REG_USB_INFO 0xFE17 33262306a36Sopenharmony_ci#define REG_USB_SPECIAL_OPTION 0xFE55 33362306a36Sopenharmony_ci#define REG_USB_DMA_AGG_TO 0xFE5B 33462306a36Sopenharmony_ci#define REG_USB_AGG_TO 0xFE5C 33562306a36Sopenharmony_ci#define REG_USB_AGG_TH 0xFE5D 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_ci#define REG_TEST_USB_TXQS 0xFE48 33862306a36Sopenharmony_ci#define REG_TEST_SIE_VID 0xFE60 33962306a36Sopenharmony_ci#define REG_TEST_SIE_PID 0xFE62 34062306a36Sopenharmony_ci#define REG_TEST_SIE_OPTIONAL 0xFE64 34162306a36Sopenharmony_ci#define REG_TEST_SIE_CHIRP_K 0xFE65 34262306a36Sopenharmony_ci#define REG_TEST_SIE_PHY 0xFE66 34362306a36Sopenharmony_ci#define REG_TEST_SIE_MAC_ADDR 0xFE70 34462306a36Sopenharmony_ci#define REG_TEST_SIE_STRING 0xFE80 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci#define REG_NORMAL_SIE_VID 0xFE60 34762306a36Sopenharmony_ci#define REG_NORMAL_SIE_PID 0xFE62 34862306a36Sopenharmony_ci#define REG_NORMAL_SIE_OPTIONAL 0xFE64 34962306a36Sopenharmony_ci#define REG_NORMAL_SIE_EP 0xFE65 35062306a36Sopenharmony_ci#define REG_NORMAL_SIE_PHY 0xFE68 35162306a36Sopenharmony_ci#define REG_NORMAL_SIE_MAC_ADDR 0xFE70 35262306a36Sopenharmony_ci#define REG_NORMAL_SIE_STRING 0xFE80 35362306a36Sopenharmony_ci 35462306a36Sopenharmony_ci#define CR9346 REG_9346CR 35562306a36Sopenharmony_ci#define MSR (REG_CR + 2) 35662306a36Sopenharmony_ci#define ISR REG_HISR 35762306a36Sopenharmony_ci#define TSFR REG_TSFTR 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_ci#define MACIDR0 REG_MACID 36062306a36Sopenharmony_ci#define MACIDR4 (REG_MACID + 4) 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_ci#define PBP REG_PBP 36362306a36Sopenharmony_ci 36462306a36Sopenharmony_ci#define IDR0 MACIDR0 36562306a36Sopenharmony_ci#define IDR4 MACIDR4 36662306a36Sopenharmony_ci 36762306a36Sopenharmony_ci#define UNUSED_REGISTER 0x1BF 36862306a36Sopenharmony_ci#define DCAM UNUSED_REGISTER 36962306a36Sopenharmony_ci#define PSR UNUSED_REGISTER 37062306a36Sopenharmony_ci#define BBADDR UNUSED_REGISTER 37162306a36Sopenharmony_ci#define PHYDATAR UNUSED_REGISTER 37262306a36Sopenharmony_ci 37362306a36Sopenharmony_ci#define INVALID_BBRF_VALUE 0x12345678 37462306a36Sopenharmony_ci 37562306a36Sopenharmony_ci#define MAX_MSS_DENSITY_2T 0x13 37662306a36Sopenharmony_ci#define MAX_MSS_DENSITY_1T 0x0A 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ci#define CMDEEPROM_EN BIT(5) 37962306a36Sopenharmony_ci#define CMDEEPROM_SEL BIT(4) 38062306a36Sopenharmony_ci#define CMD9346CR_9356SEL BIT(4) 38162306a36Sopenharmony_ci#define AUTOLOAD_EEPROM (CMDEEPROM_EN|CMDEEPROM_SEL) 38262306a36Sopenharmony_ci#define AUTOLOAD_EFUSE CMDEEPROM_EN 38362306a36Sopenharmony_ci 38462306a36Sopenharmony_ci#define GPIOSEL_GPIO 0 38562306a36Sopenharmony_ci#define GPIOSEL_ENBT BIT(5) 38662306a36Sopenharmony_ci 38762306a36Sopenharmony_ci#define GPIO_IN REG_GPIO_PIN_CTRL 38862306a36Sopenharmony_ci#define GPIO_OUT (REG_GPIO_PIN_CTRL+1) 38962306a36Sopenharmony_ci#define GPIO_IO_SEL (REG_GPIO_PIN_CTRL+2) 39062306a36Sopenharmony_ci#define GPIO_MOD (REG_GPIO_PIN_CTRL+3) 39162306a36Sopenharmony_ci 39262306a36Sopenharmony_ci/* 8723/8188E Host System Interrupt Mask Register (offset 0x58, 32 byte) */ 39362306a36Sopenharmony_ci#define HSIMR_GPIO12_0_INT_EN BIT(0) 39462306a36Sopenharmony_ci#define HSIMR_SPS_OCP_INT_EN BIT(5) 39562306a36Sopenharmony_ci#define HSIMR_RON_INT_EN BIT(6) 39662306a36Sopenharmony_ci#define HSIMR_PDN_INT_EN BIT(7) 39762306a36Sopenharmony_ci#define HSIMR_GPIO9_INT_EN BIT(25) 39862306a36Sopenharmony_ci 39962306a36Sopenharmony_ci/* 8723/8188E Host System Interrupt Status Register (offset 0x5C, 32 byte) */ 40062306a36Sopenharmony_ci#define HSISR_GPIO12_0_INT BIT(0) 40162306a36Sopenharmony_ci#define HSISR_SPS_OCP_INT BIT(5) 40262306a36Sopenharmony_ci#define HSISR_RON_INT_EN BIT(6) 40362306a36Sopenharmony_ci#define HSISR_PDNINT BIT(7) 40462306a36Sopenharmony_ci#define HSISR_GPIO9_INT BIT(25) 40562306a36Sopenharmony_ci 40662306a36Sopenharmony_ci#define MSR_NOLINK 0x00 40762306a36Sopenharmony_ci#define MSR_ADHOC 0x01 40862306a36Sopenharmony_ci#define MSR_INFRA 0x02 40962306a36Sopenharmony_ci#define MSR_AP 0x03 41062306a36Sopenharmony_ci#define MSR_MASK 0x03 41162306a36Sopenharmony_ci 41262306a36Sopenharmony_ci#define RRSR_RSC_OFFSET 21 41362306a36Sopenharmony_ci#define RRSR_SHORT_OFFSET 23 41462306a36Sopenharmony_ci#define RRSR_RSC_BW_40M 0x600000 41562306a36Sopenharmony_ci#define RRSR_RSC_UPSUBCHNL 0x400000 41662306a36Sopenharmony_ci#define RRSR_RSC_LOWSUBCHNL 0x200000 41762306a36Sopenharmony_ci#define RRSR_SHORT 0x800000 41862306a36Sopenharmony_ci#define RRSR_1M BIT(0) 41962306a36Sopenharmony_ci#define RRSR_2M BIT(1) 42062306a36Sopenharmony_ci#define RRSR_5_5M BIT(2) 42162306a36Sopenharmony_ci#define RRSR_11M BIT(3) 42262306a36Sopenharmony_ci#define RRSR_6M BIT(4) 42362306a36Sopenharmony_ci#define RRSR_9M BIT(5) 42462306a36Sopenharmony_ci#define RRSR_12M BIT(6) 42562306a36Sopenharmony_ci#define RRSR_18M BIT(7) 42662306a36Sopenharmony_ci#define RRSR_24M BIT(8) 42762306a36Sopenharmony_ci#define RRSR_36M BIT(9) 42862306a36Sopenharmony_ci#define RRSR_48M BIT(10) 42962306a36Sopenharmony_ci#define RRSR_54M BIT(11) 43062306a36Sopenharmony_ci#define RRSR_MCS0 BIT(12) 43162306a36Sopenharmony_ci#define RRSR_MCS1 BIT(13) 43262306a36Sopenharmony_ci#define RRSR_MCS2 BIT(14) 43362306a36Sopenharmony_ci#define RRSR_MCS3 BIT(15) 43462306a36Sopenharmony_ci#define RRSR_MCS4 BIT(16) 43562306a36Sopenharmony_ci#define RRSR_MCS5 BIT(17) 43662306a36Sopenharmony_ci#define RRSR_MCS6 BIT(18) 43762306a36Sopenharmony_ci#define RRSR_MCS7 BIT(19) 43862306a36Sopenharmony_ci#define BRSR_ACKSHORTPMB BIT(23) 43962306a36Sopenharmony_ci 44062306a36Sopenharmony_ci#define RATR_1M 0x00000001 44162306a36Sopenharmony_ci#define RATR_2M 0x00000002 44262306a36Sopenharmony_ci#define RATR_55M 0x00000004 44362306a36Sopenharmony_ci#define RATR_11M 0x00000008 44462306a36Sopenharmony_ci#define RATR_6M 0x00000010 44562306a36Sopenharmony_ci#define RATR_9M 0x00000020 44662306a36Sopenharmony_ci#define RATR_12M 0x00000040 44762306a36Sopenharmony_ci#define RATR_18M 0x00000080 44862306a36Sopenharmony_ci#define RATR_24M 0x00000100 44962306a36Sopenharmony_ci#define RATR_36M 0x00000200 45062306a36Sopenharmony_ci#define RATR_48M 0x00000400 45162306a36Sopenharmony_ci#define RATR_54M 0x00000800 45262306a36Sopenharmony_ci#define RATR_MCS0 0x00001000 45362306a36Sopenharmony_ci#define RATR_MCS1 0x00002000 45462306a36Sopenharmony_ci#define RATR_MCS2 0x00004000 45562306a36Sopenharmony_ci#define RATR_MCS3 0x00008000 45662306a36Sopenharmony_ci#define RATR_MCS4 0x00010000 45762306a36Sopenharmony_ci#define RATR_MCS5 0x00020000 45862306a36Sopenharmony_ci#define RATR_MCS6 0x00040000 45962306a36Sopenharmony_ci#define RATR_MCS7 0x00080000 46062306a36Sopenharmony_ci#define RATR_MCS8 0x00100000 46162306a36Sopenharmony_ci#define RATR_MCS9 0x00200000 46262306a36Sopenharmony_ci#define RATR_MCS10 0x00400000 46362306a36Sopenharmony_ci#define RATR_MCS11 0x00800000 46462306a36Sopenharmony_ci#define RATR_MCS12 0x01000000 46562306a36Sopenharmony_ci#define RATR_MCS13 0x02000000 46662306a36Sopenharmony_ci#define RATR_MCS14 0x04000000 46762306a36Sopenharmony_ci#define RATR_MCS15 0x08000000 46862306a36Sopenharmony_ci 46962306a36Sopenharmony_ci#define RATE_1M BIT(0) 47062306a36Sopenharmony_ci#define RATE_2M BIT(1) 47162306a36Sopenharmony_ci#define RATE_5_5M BIT(2) 47262306a36Sopenharmony_ci#define RATE_11M BIT(3) 47362306a36Sopenharmony_ci#define RATE_6M BIT(4) 47462306a36Sopenharmony_ci#define RATE_9M BIT(5) 47562306a36Sopenharmony_ci#define RATE_12M BIT(6) 47662306a36Sopenharmony_ci#define RATE_18M BIT(7) 47762306a36Sopenharmony_ci#define RATE_24M BIT(8) 47862306a36Sopenharmony_ci#define RATE_36M BIT(9) 47962306a36Sopenharmony_ci#define RATE_48M BIT(10) 48062306a36Sopenharmony_ci#define RATE_54M BIT(11) 48162306a36Sopenharmony_ci#define RATE_MCS0 BIT(12) 48262306a36Sopenharmony_ci#define RATE_MCS1 BIT(13) 48362306a36Sopenharmony_ci#define RATE_MCS2 BIT(14) 48462306a36Sopenharmony_ci#define RATE_MCS3 BIT(15) 48562306a36Sopenharmony_ci#define RATE_MCS4 BIT(16) 48662306a36Sopenharmony_ci#define RATE_MCS5 BIT(17) 48762306a36Sopenharmony_ci#define RATE_MCS6 BIT(18) 48862306a36Sopenharmony_ci#define RATE_MCS7 BIT(19) 48962306a36Sopenharmony_ci#define RATE_MCS8 BIT(20) 49062306a36Sopenharmony_ci#define RATE_MCS9 BIT(21) 49162306a36Sopenharmony_ci#define RATE_MCS10 BIT(22) 49262306a36Sopenharmony_ci#define RATE_MCS11 BIT(23) 49362306a36Sopenharmony_ci#define RATE_MCS12 BIT(24) 49462306a36Sopenharmony_ci#define RATE_MCS13 BIT(25) 49562306a36Sopenharmony_ci#define RATE_MCS14 BIT(26) 49662306a36Sopenharmony_ci#define RATE_MCS15 BIT(27) 49762306a36Sopenharmony_ci 49862306a36Sopenharmony_ci#define RATE_ALL_CCK (RATR_1M | RATR_2M | RATR_55M | RATR_11M) 49962306a36Sopenharmony_ci#define RATE_ALL_OFDM_AG (RATR_6M | RATR_9M | RATR_12M | RATR_18M |\ 50062306a36Sopenharmony_ci RATR_24M | RATR_36M | RATR_48M | RATR_54M) 50162306a36Sopenharmony_ci#define RATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | RATR_MCS2 |\ 50262306a36Sopenharmony_ci RATR_MCS3 | RATR_MCS4 | RATR_MCS5 |\ 50362306a36Sopenharmony_ci RATR_MCS6 | RATR_MCS7) 50462306a36Sopenharmony_ci#define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 |\ 50562306a36Sopenharmony_ci RATR_MCS11 | RATR_MCS12 | RATR_MCS13 |\ 50662306a36Sopenharmony_ci RATR_MCS14 | RATR_MCS15) 50762306a36Sopenharmony_ci 50862306a36Sopenharmony_ci#define BW_OPMODE_20MHZ BIT(2) 50962306a36Sopenharmony_ci#define BW_OPMODE_5G BIT(1) 51062306a36Sopenharmony_ci#define BW_OPMODE_11J BIT(0) 51162306a36Sopenharmony_ci 51262306a36Sopenharmony_ci#define CAM_VALID BIT(15) 51362306a36Sopenharmony_ci#define CAM_NOTVALID 0x0000 51462306a36Sopenharmony_ci#define CAM_USEDK BIT(5) 51562306a36Sopenharmony_ci 51662306a36Sopenharmony_ci#define CAM_NONE 0x0 51762306a36Sopenharmony_ci#define CAM_WEP40 0x01 51862306a36Sopenharmony_ci#define CAM_TKIP 0x02 51962306a36Sopenharmony_ci#define CAM_AES 0x04 52062306a36Sopenharmony_ci#define CAM_WEP104 0x05 52162306a36Sopenharmony_ci 52262306a36Sopenharmony_ci#define TOTAL_CAM_ENTRY 32 52362306a36Sopenharmony_ci#define HALF_CAM_ENTRY 16 52462306a36Sopenharmony_ci 52562306a36Sopenharmony_ci#define CAM_WRITE BIT(16) 52662306a36Sopenharmony_ci#define CAM_READ 0x00000000 52762306a36Sopenharmony_ci#define CAM_POLLINIG BIT(31) 52862306a36Sopenharmony_ci 52962306a36Sopenharmony_ci#define SCR_USEDK 0x01 53062306a36Sopenharmony_ci#define SCR_TXSEC_ENABLE 0x02 53162306a36Sopenharmony_ci#define SCR_RXSEC_ENABLE 0x04 53262306a36Sopenharmony_ci 53362306a36Sopenharmony_ci#define WOW_PMEN BIT(0) 53462306a36Sopenharmony_ci#define WOW_WOMEN BIT(1) 53562306a36Sopenharmony_ci#define WOW_MAGIC BIT(2) 53662306a36Sopenharmony_ci#define WOW_UWF BIT(3) 53762306a36Sopenharmony_ci 53862306a36Sopenharmony_ci/********************************************* 53962306a36Sopenharmony_ci* 8188 IMR/ISR bits 54062306a36Sopenharmony_ci**********************************************/ 54162306a36Sopenharmony_ci#define IMR_DISABLED 0x0 54262306a36Sopenharmony_ci/* IMR DW0(0x0060-0063) Bit 0-31 */ 54362306a36Sopenharmony_ci/* TXRPT interrupt when CCX bit of the packet is set */ 54462306a36Sopenharmony_ci#define IMR_TXCCK BIT(30) 54562306a36Sopenharmony_ci/* Power Save Time Out Interrupt */ 54662306a36Sopenharmony_ci#define IMR_PSTIMEOUT BIT(29) 54762306a36Sopenharmony_ci/* When GTIMER4 expires, this bit is set to 1 */ 54862306a36Sopenharmony_ci#define IMR_GTINT4 BIT(28) 54962306a36Sopenharmony_ci/* When GTIMER3 expires, this bit is set to 1 */ 55062306a36Sopenharmony_ci#define IMR_GTINT3 BIT(27) 55162306a36Sopenharmony_ci/* Transmit Beacon0 Error */ 55262306a36Sopenharmony_ci#define IMR_TBDER BIT(26) 55362306a36Sopenharmony_ci/* Transmit Beacon0 OK */ 55462306a36Sopenharmony_ci#define IMR_TBDOK BIT(25) 55562306a36Sopenharmony_ci/* TSF Timer BIT32 toggle indication interrupt */ 55662306a36Sopenharmony_ci#define IMR_TSF_BIT32_TOGGLE BIT(24) 55762306a36Sopenharmony_ci/* Beacon DMA Interrupt 0 */ 55862306a36Sopenharmony_ci#define IMR_BCNDMAINT0 BIT(20) 55962306a36Sopenharmony_ci/* Beacon Queue DMA OK0 */ 56062306a36Sopenharmony_ci#define IMR_BCNDOK0 BIT(16) 56162306a36Sopenharmony_ci/* HSISR Indicator (HSIMR & HSISR is true, this bit is set to 1) */ 56262306a36Sopenharmony_ci#define IMR_HSISR_IND_ON_INT BIT(15) 56362306a36Sopenharmony_ci/* Beacon DMA Interrupt Extension for Win7 */ 56462306a36Sopenharmony_ci#define IMR_BCNDMAINT_E BIT(14) 56562306a36Sopenharmony_ci/* CTWidnow End or ATIM Window End */ 56662306a36Sopenharmony_ci#define IMR_ATIMEND BIT(12) 56762306a36Sopenharmony_ci/* HISR1 Indicator (HISR1 & HIMR1 is true, this bit is set to 1)*/ 56862306a36Sopenharmony_ci#define IMR_HISR1_IND_INT BIT(11) 56962306a36Sopenharmony_ci/* CPU to Host Command INT Status, Write 1 clear */ 57062306a36Sopenharmony_ci#define IMR_C2HCMD BIT(10) 57162306a36Sopenharmony_ci/* CPU power Mode exchange INT Status, Write 1 clear */ 57262306a36Sopenharmony_ci#define IMR_CPWM2 BIT(9) 57362306a36Sopenharmony_ci/* CPU power Mode exchange INT Status, Write 1 clear */ 57462306a36Sopenharmony_ci#define IMR_CPWM BIT(8) 57562306a36Sopenharmony_ci/* High Queue DMA OK */ 57662306a36Sopenharmony_ci#define IMR_HIGHDOK BIT(7) 57762306a36Sopenharmony_ci/* Management Queue DMA OK */ 57862306a36Sopenharmony_ci#define IMR_MGNTDOK BIT(6) 57962306a36Sopenharmony_ci/* AC_BK DMA OK */ 58062306a36Sopenharmony_ci#define IMR_BKDOK BIT(5) 58162306a36Sopenharmony_ci/* AC_BE DMA OK */ 58262306a36Sopenharmony_ci#define IMR_BEDOK BIT(4) 58362306a36Sopenharmony_ci/* AC_VI DMA OK */ 58462306a36Sopenharmony_ci#define IMR_VIDOK BIT(3) 58562306a36Sopenharmony_ci/* AC_VO DMA OK */ 58662306a36Sopenharmony_ci#define IMR_VODOK BIT(2) 58762306a36Sopenharmony_ci/* Rx Descriptor Unavailable */ 58862306a36Sopenharmony_ci#define IMR_RDU BIT(1) 58962306a36Sopenharmony_ci#define IMR_ROK BIT(0) /* Receive DMA OK */ 59062306a36Sopenharmony_ci 59162306a36Sopenharmony_ci/* IMR DW1(0x00B4-00B7) Bit 0-31 */ 59262306a36Sopenharmony_ci/* Beacon DMA Interrupt 7 */ 59362306a36Sopenharmony_ci#define IMR_BCNDMAINT7 BIT(27) 59462306a36Sopenharmony_ci/* Beacon DMA Interrupt 6 */ 59562306a36Sopenharmony_ci#define IMR_BCNDMAINT6 BIT(26) 59662306a36Sopenharmony_ci/* Beacon DMA Interrupt 5 */ 59762306a36Sopenharmony_ci#define IMR_BCNDMAINT5 BIT(25) 59862306a36Sopenharmony_ci/* Beacon DMA Interrupt 4 */ 59962306a36Sopenharmony_ci#define IMR_BCNDMAINT4 BIT(24) 60062306a36Sopenharmony_ci/* Beacon DMA Interrupt 3 */ 60162306a36Sopenharmony_ci#define IMR_BCNDMAINT3 BIT(23) 60262306a36Sopenharmony_ci/* Beacon DMA Interrupt 2 */ 60362306a36Sopenharmony_ci#define IMR_BCNDMAINT2 BIT(22) 60462306a36Sopenharmony_ci/* Beacon DMA Interrupt 1 */ 60562306a36Sopenharmony_ci#define IMR_BCNDMAINT1 BIT(21) 60662306a36Sopenharmony_ci/* Beacon Queue DMA OK Interrup 7 */ 60762306a36Sopenharmony_ci#define IMR_BCNDOK7 BIT(20) 60862306a36Sopenharmony_ci/* Beacon Queue DMA OK Interrup 6 */ 60962306a36Sopenharmony_ci#define IMR_BCNDOK6 BIT(19) 61062306a36Sopenharmony_ci/* Beacon Queue DMA OK Interrup 5 */ 61162306a36Sopenharmony_ci#define IMR_BCNDOK5 BIT(18) 61262306a36Sopenharmony_ci/* Beacon Queue DMA OK Interrup 4 */ 61362306a36Sopenharmony_ci#define IMR_BCNDOK4 BIT(17) 61462306a36Sopenharmony_ci/* Beacon Queue DMA OK Interrup 3 */ 61562306a36Sopenharmony_ci#define IMR_BCNDOK3 BIT(16) 61662306a36Sopenharmony_ci/* Beacon Queue DMA OK Interrup 2 */ 61762306a36Sopenharmony_ci#define IMR_BCNDOK2 BIT(15) 61862306a36Sopenharmony_ci/* Beacon Queue DMA OK Interrup 1 */ 61962306a36Sopenharmony_ci#define IMR_BCNDOK1 BIT(14) 62062306a36Sopenharmony_ci/* ATIM Window End Extension for Win7 */ 62162306a36Sopenharmony_ci#define IMR_ATIMEND_E BIT(13) 62262306a36Sopenharmony_ci/* Tx Error Flag Interrupt Status, write 1 clear. */ 62362306a36Sopenharmony_ci#define IMR_TXERR BIT(11) 62462306a36Sopenharmony_ci/* Rx Error Flag INT Status, Write 1 clear */ 62562306a36Sopenharmony_ci#define IMR_RXERR BIT(10) 62662306a36Sopenharmony_ci/* Transmit FIFO Overflow */ 62762306a36Sopenharmony_ci#define IMR_TXFOVW BIT(9) 62862306a36Sopenharmony_ci/* Receive FIFO Overflow */ 62962306a36Sopenharmony_ci#define IMR_RXFOVW BIT(8) 63062306a36Sopenharmony_ci 63162306a36Sopenharmony_ci#define HWSET_MAX_SIZE 512 63262306a36Sopenharmony_ci#define EFUSE_MAX_SECTION 64 63362306a36Sopenharmony_ci#define EFUSE_REAL_CONTENT_LEN 256 63462306a36Sopenharmony_ci/* PG data exclude header, dummy 7 bytes frome CP test and reserved 1byte.*/ 63562306a36Sopenharmony_ci#define EFUSE_OOB_PROTECT_BYTES 18 63662306a36Sopenharmony_ci 63762306a36Sopenharmony_ci#define EEPROM_DEFAULT_TSSI 0x0 63862306a36Sopenharmony_ci#define EEPROM_DEFAULT_TXPOWERDIFF 0x0 63962306a36Sopenharmony_ci#define EEPROM_DEFAULT_CRYSTALCAP 0x5 64062306a36Sopenharmony_ci#define EEPROM_DEFAULT_BOARDTYPE 0x02 64162306a36Sopenharmony_ci#define EEPROM_DEFAULT_TXPOWER 0x1010 64262306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT2T_TXPWR 0x10 64362306a36Sopenharmony_ci 64462306a36Sopenharmony_ci#define EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF 0x3 64562306a36Sopenharmony_ci#define EEPROM_DEFAULT_THERMALMETER 0x18 64662306a36Sopenharmony_ci#define EEPROM_DEFAULT_ANTTXPOWERDIFF 0x0 64762306a36Sopenharmony_ci#define EEPROM_DEFAULT_TXPWDIFF_CRYSTALCAP 0x5 64862306a36Sopenharmony_ci#define EEPROM_DEFAULT_TXPOWERLEVEL 0x22 64962306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT40_2SDIFF 0x0 65062306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT20_DIFF 2 65162306a36Sopenharmony_ci#define EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF 0x3 65262306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT40_PWRMAXOFFSET 0 65362306a36Sopenharmony_ci#define EEPROM_DEFAULT_HT20_PWRMAXOFFSET 0 65462306a36Sopenharmony_ci 65562306a36Sopenharmony_ci#define RF_OPTION1 0x79 65662306a36Sopenharmony_ci#define RF_OPTION2 0x7A 65762306a36Sopenharmony_ci#define RF_OPTION3 0x7B 65862306a36Sopenharmony_ci#define RF_OPTION4 0xC3 65962306a36Sopenharmony_ci 66062306a36Sopenharmony_ci#define EEPROM_DEFAULT_PID 0x1234 66162306a36Sopenharmony_ci#define EEPROM_DEFAULT_VID 0x5678 66262306a36Sopenharmony_ci#define EEPROM_DEFAULT_CUSTOMERID 0xAB 66362306a36Sopenharmony_ci#define EEPROM_DEFAULT_SUBCUSTOMERID 0xCD 66462306a36Sopenharmony_ci#define EEPROM_DEFAULT_VERSION 0 66562306a36Sopenharmony_ci 66662306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_FCC 0x0 66762306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_IC 0x1 66862306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_ETSI 0x2 66962306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_SPAIN 0x3 67062306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_FRANCE 0x4 67162306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_MKK 0x5 67262306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_MKK1 0x6 67362306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_ISRAEL 0x7 67462306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_TELEC 0x8 67562306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_GLOBAL_DOMAIN 0x9 67662306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_WORLD_WIDE_13 0xA 67762306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_NCC 0XB 67862306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_BY_HW_MASK 0x80 67962306a36Sopenharmony_ci 68062306a36Sopenharmony_ci#define EEPROM_CID_DEFAULT 0x0 68162306a36Sopenharmony_ci#define EEPROM_CID_TOSHIBA 0x4 68262306a36Sopenharmony_ci#define EEPROM_CID_CCX 0x10 68362306a36Sopenharmony_ci#define EEPROM_CID_QMI 0x0D 68462306a36Sopenharmony_ci#define EEPROM_CID_WHQL 0xFE 68562306a36Sopenharmony_ci 68662306a36Sopenharmony_ci#define RTL_EEPROM_ID 0x8129 68762306a36Sopenharmony_ci 68862306a36Sopenharmony_ci#define EEPROM_HPON 0x02 68962306a36Sopenharmony_ci#define EEPROM_CLK 0x06 69062306a36Sopenharmony_ci#define EEPROM_TESTR 0x08 69162306a36Sopenharmony_ci 69262306a36Sopenharmony_ci#define EEPROM_TXPOWERCCK 0x10 69362306a36Sopenharmony_ci#define EEPROM_TXPOWERHT40_1S 0x16 69462306a36Sopenharmony_ci#define EEPROM_TXPOWERHT20DIFF 0x1B 69562306a36Sopenharmony_ci#define EEPROM_TXPOWER_OFDMDIFF 0x1B 69662306a36Sopenharmony_ci 69762306a36Sopenharmony_ci#define EEPROM_TX_PWR_INX 0x10 69862306a36Sopenharmony_ci 69962306a36Sopenharmony_ci#define EEPROM_CHANNELPLAN 0XB8 70062306a36Sopenharmony_ci#define EEPROM_XTAL_8821AE 0XB9 70162306a36Sopenharmony_ci#define EEPROM_THERMAL_METER 0XBA 70262306a36Sopenharmony_ci#define EEPROM_IQK_LCK_88E 0XBB 70362306a36Sopenharmony_ci 70462306a36Sopenharmony_ci#define EEPROM_RF_BOARD_OPTION 0xC1 70562306a36Sopenharmony_ci#define EEPROM_RF_FEATURE_OPTION_88E 0xC2 70662306a36Sopenharmony_ci#define EEPROM_RF_BT_SETTING 0xC3 70762306a36Sopenharmony_ci#define EEPROM_VERSION 0xC4 70862306a36Sopenharmony_ci#define EEPROM_CUSTOMER_ID 0xC5 70962306a36Sopenharmony_ci#define EEPROM_RF_ANTENNA_OPT_88E 0xC9 71062306a36Sopenharmony_ci#define EEPROM_RFE_OPTION 0xCA 71162306a36Sopenharmony_ci 71262306a36Sopenharmony_ci#define EEPROM_MAC_ADDR 0xD0 71362306a36Sopenharmony_ci#define EEPROM_VID 0xD6 71462306a36Sopenharmony_ci#define EEPROM_DID 0xD8 71562306a36Sopenharmony_ci#define EEPROM_SVID 0xDA 71662306a36Sopenharmony_ci#define EEPROM_SMID 0xDC 71762306a36Sopenharmony_ci 71862306a36Sopenharmony_ci#define STOPBECON BIT(6) 71962306a36Sopenharmony_ci#define STOPHIGHT BIT(5) 72062306a36Sopenharmony_ci#define STOPMGT BIT(4) 72162306a36Sopenharmony_ci#define STOPVO BIT(3) 72262306a36Sopenharmony_ci#define STOPVI BIT(2) 72362306a36Sopenharmony_ci#define STOPBE BIT(1) 72462306a36Sopenharmony_ci#define STOPBK BIT(0) 72562306a36Sopenharmony_ci 72662306a36Sopenharmony_ci#define RCR_APPFCS BIT(31) 72762306a36Sopenharmony_ci#define RCR_APP_MIC BIT(30) 72862306a36Sopenharmony_ci#define RCR_APP_ICV BIT(29) 72962306a36Sopenharmony_ci#define RCR_APP_PHYST_RXFF BIT(28) 73062306a36Sopenharmony_ci#define RCR_APP_BA_SSN BIT(27) 73162306a36Sopenharmony_ci#define RCR_NONQOS_VHT BIT(26) 73262306a36Sopenharmony_ci#define RCR_ENMBID BIT(24) 73362306a36Sopenharmony_ci#define RCR_LSIGEN BIT(23) 73462306a36Sopenharmony_ci#define RCR_MFBEN BIT(22) 73562306a36Sopenharmony_ci#define RCR_HTC_LOC_CTRL BIT(14) 73662306a36Sopenharmony_ci#define RCR_AMF BIT(13) 73762306a36Sopenharmony_ci#define RCR_ACF BIT(12) 73862306a36Sopenharmony_ci#define RCR_ADF BIT(11) 73962306a36Sopenharmony_ci#define RCR_AICV BIT(9) 74062306a36Sopenharmony_ci#define RCR_ACRC32 BIT(8) 74162306a36Sopenharmony_ci#define RCR_CBSSID_BCN BIT(7) 74262306a36Sopenharmony_ci#define RCR_CBSSID_DATA BIT(6) 74362306a36Sopenharmony_ci#define RCR_CBSSID RCR_CBSSID_DATA 74462306a36Sopenharmony_ci#define RCR_APWRMGT BIT(5) 74562306a36Sopenharmony_ci#define RCR_ADD3 BIT(4) 74662306a36Sopenharmony_ci#define RCR_AB BIT(3) 74762306a36Sopenharmony_ci#define RCR_AM BIT(2) 74862306a36Sopenharmony_ci#define RCR_APM BIT(1) 74962306a36Sopenharmony_ci#define RCR_AAP BIT(0) 75062306a36Sopenharmony_ci#define RCR_MXDMA_OFFSET 8 75162306a36Sopenharmony_ci#define RCR_FIFO_OFFSET 13 75262306a36Sopenharmony_ci 75362306a36Sopenharmony_ci#define RSV_CTRL 0x001C 75462306a36Sopenharmony_ci#define RD_CTRL 0x0524 75562306a36Sopenharmony_ci 75662306a36Sopenharmony_ci#define REG_USB_INFO 0xFE17 75762306a36Sopenharmony_ci#define REG_USB_SPECIAL_OPTION 0xFE55 75862306a36Sopenharmony_ci#define REG_USB_DMA_AGG_TO 0xFE5B 75962306a36Sopenharmony_ci#define REG_USB_AGG_TO 0xFE5C 76062306a36Sopenharmony_ci#define REG_USB_AGG_TH 0xFE5D 76162306a36Sopenharmony_ci 76262306a36Sopenharmony_ci#define REG_USB_VID 0xFE60 76362306a36Sopenharmony_ci#define REG_USB_PID 0xFE62 76462306a36Sopenharmony_ci#define REG_USB_OPTIONAL 0xFE64 76562306a36Sopenharmony_ci#define REG_USB_CHIRP_K 0xFE65 76662306a36Sopenharmony_ci#define REG_USB_PHY 0xFE66 76762306a36Sopenharmony_ci#define REG_USB_MAC_ADDR 0xFE70 76862306a36Sopenharmony_ci#define REG_USB_HRPWM 0xFE58 76962306a36Sopenharmony_ci#define REG_USB_HCPWM 0xFE57 77062306a36Sopenharmony_ci 77162306a36Sopenharmony_ci#define SW18_FPWM BIT(3) 77262306a36Sopenharmony_ci 77362306a36Sopenharmony_ci#define ISO_MD2PP BIT(0) 77462306a36Sopenharmony_ci#define ISO_UA2USB BIT(1) 77562306a36Sopenharmony_ci#define ISO_UD2CORE BIT(2) 77662306a36Sopenharmony_ci#define ISO_PA2PCIE BIT(3) 77762306a36Sopenharmony_ci#define ISO_PD2CORE BIT(4) 77862306a36Sopenharmony_ci#define ISO_IP2MAC BIT(5) 77962306a36Sopenharmony_ci#define ISO_DIOP BIT(6) 78062306a36Sopenharmony_ci#define ISO_DIOE BIT(7) 78162306a36Sopenharmony_ci#define ISO_EB2CORE BIT(8) 78262306a36Sopenharmony_ci#define ISO_DIOR BIT(9) 78362306a36Sopenharmony_ci 78462306a36Sopenharmony_ci#define PWC_EV25V BIT(14) 78562306a36Sopenharmony_ci#define PWC_EV12V BIT(15) 78662306a36Sopenharmony_ci 78762306a36Sopenharmony_ci#define FEN_BBRSTB BIT(0) 78862306a36Sopenharmony_ci#define FEN_BB_GLB_RSTN BIT(1) 78962306a36Sopenharmony_ci#define FEN_USBA BIT(2) 79062306a36Sopenharmony_ci#define FEN_UPLL BIT(3) 79162306a36Sopenharmony_ci#define FEN_USBD BIT(4) 79262306a36Sopenharmony_ci#define FEN_DIO_PCIE BIT(5) 79362306a36Sopenharmony_ci#define FEN_PCIEA BIT(6) 79462306a36Sopenharmony_ci#define FEN_PPLL BIT(7) 79562306a36Sopenharmony_ci#define FEN_PCIED BIT(8) 79662306a36Sopenharmony_ci#define FEN_DIOE BIT(9) 79762306a36Sopenharmony_ci#define FEN_CPUEN BIT(10) 79862306a36Sopenharmony_ci#define FEN_DCORE BIT(11) 79962306a36Sopenharmony_ci#define FEN_ELDR BIT(12) 80062306a36Sopenharmony_ci#define FEN_DIO_RF BIT(13) 80162306a36Sopenharmony_ci#define FEN_HWPDN BIT(14) 80262306a36Sopenharmony_ci#define FEN_MREGEN BIT(15) 80362306a36Sopenharmony_ci 80462306a36Sopenharmony_ci#define PFM_LDALL BIT(0) 80562306a36Sopenharmony_ci#define PFM_ALDN BIT(1) 80662306a36Sopenharmony_ci#define PFM_LDKP BIT(2) 80762306a36Sopenharmony_ci#define PFM_WOWL BIT(3) 80862306a36Sopenharmony_ci#define ENPDN BIT(4) 80962306a36Sopenharmony_ci#define PDN_PL BIT(5) 81062306a36Sopenharmony_ci#define APFM_ONMAC BIT(8) 81162306a36Sopenharmony_ci#define APFM_OFF BIT(9) 81262306a36Sopenharmony_ci#define APFM_RSM BIT(10) 81362306a36Sopenharmony_ci#define AFSM_HSUS BIT(11) 81462306a36Sopenharmony_ci#define AFSM_PCIE BIT(12) 81562306a36Sopenharmony_ci#define APDM_MAC BIT(13) 81662306a36Sopenharmony_ci#define APDM_HOST BIT(14) 81762306a36Sopenharmony_ci#define APDM_HPDN BIT(15) 81862306a36Sopenharmony_ci#define RDY_MACON BIT(16) 81962306a36Sopenharmony_ci#define SUS_HOST BIT(17) 82062306a36Sopenharmony_ci#define ROP_ALD BIT(20) 82162306a36Sopenharmony_ci#define ROP_PWR BIT(21) 82262306a36Sopenharmony_ci#define ROP_SPS BIT(22) 82362306a36Sopenharmony_ci#define SOP_MRST BIT(25) 82462306a36Sopenharmony_ci#define SOP_FUSE BIT(26) 82562306a36Sopenharmony_ci#define SOP_ABG BIT(27) 82662306a36Sopenharmony_ci#define SOP_AMB BIT(28) 82762306a36Sopenharmony_ci#define SOP_RCK BIT(29) 82862306a36Sopenharmony_ci#define SOP_A8M BIT(30) 82962306a36Sopenharmony_ci#define XOP_BTCK BIT(31) 83062306a36Sopenharmony_ci 83162306a36Sopenharmony_ci#define ANAD16V_EN BIT(0) 83262306a36Sopenharmony_ci#define ANA8M BIT(1) 83362306a36Sopenharmony_ci#define MACSLP BIT(4) 83462306a36Sopenharmony_ci#define LOADER_CLK_EN BIT(5) 83562306a36Sopenharmony_ci#define _80M_SSC_DIS BIT(7) 83662306a36Sopenharmony_ci#define _80M_SSC_EN_HO BIT(8) 83762306a36Sopenharmony_ci#define PHY_SSC_RSTB BIT(9) 83862306a36Sopenharmony_ci#define SEC_CLK_EN BIT(10) 83962306a36Sopenharmony_ci#define MAC_CLK_EN BIT(11) 84062306a36Sopenharmony_ci#define SYS_CLK_EN BIT(12) 84162306a36Sopenharmony_ci#define RING_CLK_EN BIT(13) 84262306a36Sopenharmony_ci 84362306a36Sopenharmony_ci#define BOOT_FROM_EEPROM BIT(4) 84462306a36Sopenharmony_ci#define EEPROM_EN BIT(5) 84562306a36Sopenharmony_ci 84662306a36Sopenharmony_ci#define AFE_BGEN BIT(0) 84762306a36Sopenharmony_ci#define AFE_MBEN BIT(1) 84862306a36Sopenharmony_ci#define MAC_ID_EN BIT(7) 84962306a36Sopenharmony_ci 85062306a36Sopenharmony_ci#define WLOCK_ALL BIT(0) 85162306a36Sopenharmony_ci#define WLOCK_00 BIT(1) 85262306a36Sopenharmony_ci#define WLOCK_04 BIT(2) 85362306a36Sopenharmony_ci#define WLOCK_08 BIT(3) 85462306a36Sopenharmony_ci#define WLOCK_40 BIT(4) 85562306a36Sopenharmony_ci#define R_DIS_PRST_0 BIT(5) 85662306a36Sopenharmony_ci#define R_DIS_PRST_1 BIT(6) 85762306a36Sopenharmony_ci#define LOCK_ALL_EN BIT(7) 85862306a36Sopenharmony_ci 85962306a36Sopenharmony_ci#define RF_EN BIT(0) 86062306a36Sopenharmony_ci#define RF_RSTB BIT(1) 86162306a36Sopenharmony_ci#define RF_SDMRSTB BIT(2) 86262306a36Sopenharmony_ci 86362306a36Sopenharmony_ci#define LDA15_EN BIT(0) 86462306a36Sopenharmony_ci#define LDA15_STBY BIT(1) 86562306a36Sopenharmony_ci#define LDA15_OBUF BIT(2) 86662306a36Sopenharmony_ci#define LDA15_REG_VOS BIT(3) 86762306a36Sopenharmony_ci#define _LDA15_VOADJ(x) (((x) & 0x7) << 4) 86862306a36Sopenharmony_ci 86962306a36Sopenharmony_ci#define LDV12_EN BIT(0) 87062306a36Sopenharmony_ci#define LDV12_SDBY BIT(1) 87162306a36Sopenharmony_ci#define LPLDO_HSM BIT(2) 87262306a36Sopenharmony_ci#define LPLDO_LSM_DIS BIT(3) 87362306a36Sopenharmony_ci#define _LDV12_VADJ(x) (((x) & 0xF) << 4) 87462306a36Sopenharmony_ci 87562306a36Sopenharmony_ci#define XTAL_EN BIT(0) 87662306a36Sopenharmony_ci#define XTAL_BSEL BIT(1) 87762306a36Sopenharmony_ci#define _XTAL_BOSC(x) (((x) & 0x3) << 2) 87862306a36Sopenharmony_ci#define _XTAL_CADJ(x) (((x) & 0xF) << 4) 87962306a36Sopenharmony_ci#define XTAL_GATE_USB BIT(8) 88062306a36Sopenharmony_ci#define _XTAL_USB_DRV(x) (((x) & 0x3) << 9) 88162306a36Sopenharmony_ci#define XTAL_GATE_AFE BIT(11) 88262306a36Sopenharmony_ci#define _XTAL_AFE_DRV(x) (((x) & 0x3) << 12) 88362306a36Sopenharmony_ci#define XTAL_RF_GATE BIT(14) 88462306a36Sopenharmony_ci#define _XTAL_RF_DRV(x) (((x) & 0x3) << 15) 88562306a36Sopenharmony_ci#define XTAL_GATE_DIG BIT(17) 88662306a36Sopenharmony_ci#define _XTAL_DIG_DRV(x) (((x) & 0x3) << 18) 88762306a36Sopenharmony_ci#define XTAL_BT_GATE BIT(20) 88862306a36Sopenharmony_ci#define _XTAL_BT_DRV(x) (((x) & 0x3) << 21) 88962306a36Sopenharmony_ci#define _XTAL_GPIO(x) (((x) & 0x7) << 23) 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_ci#define CKDLY_AFE BIT(26) 89262306a36Sopenharmony_ci#define CKDLY_USB BIT(27) 89362306a36Sopenharmony_ci#define CKDLY_DIG BIT(28) 89462306a36Sopenharmony_ci#define CKDLY_BT BIT(29) 89562306a36Sopenharmony_ci 89662306a36Sopenharmony_ci#define APLL_EN BIT(0) 89762306a36Sopenharmony_ci#define APLL_320_EN BIT(1) 89862306a36Sopenharmony_ci#define APLL_FREF_SEL BIT(2) 89962306a36Sopenharmony_ci#define APLL_EDGE_SEL BIT(3) 90062306a36Sopenharmony_ci#define APLL_WDOGB BIT(4) 90162306a36Sopenharmony_ci#define APLL_LPFEN BIT(5) 90262306a36Sopenharmony_ci 90362306a36Sopenharmony_ci#define APLL_REF_CLK_13MHZ 0x1 90462306a36Sopenharmony_ci#define APLL_REF_CLK_19_2MHZ 0x2 90562306a36Sopenharmony_ci#define APLL_REF_CLK_20MHZ 0x3 90662306a36Sopenharmony_ci#define APLL_REF_CLK_25MHZ 0x4 90762306a36Sopenharmony_ci#define APLL_REF_CLK_26MHZ 0x5 90862306a36Sopenharmony_ci#define APLL_REF_CLK_38_4MHZ 0x6 90962306a36Sopenharmony_ci#define APLL_REF_CLK_40MHZ 0x7 91062306a36Sopenharmony_ci 91162306a36Sopenharmony_ci#define APLL_320EN BIT(14) 91262306a36Sopenharmony_ci#define APLL_80EN BIT(15) 91362306a36Sopenharmony_ci#define APLL_1MEN BIT(24) 91462306a36Sopenharmony_ci 91562306a36Sopenharmony_ci#define ALD_EN BIT(18) 91662306a36Sopenharmony_ci#define EF_PD BIT(19) 91762306a36Sopenharmony_ci#define EF_FLAG BIT(31) 91862306a36Sopenharmony_ci 91962306a36Sopenharmony_ci#define EF_TRPT BIT(7) 92062306a36Sopenharmony_ci#define LDOE25_EN BIT(31) 92162306a36Sopenharmony_ci 92262306a36Sopenharmony_ci#define RSM_EN BIT(0) 92362306a36Sopenharmony_ci#define TIMER_EN BIT(4) 92462306a36Sopenharmony_ci 92562306a36Sopenharmony_ci#define TRSW0EN BIT(2) 92662306a36Sopenharmony_ci#define TRSW1EN BIT(3) 92762306a36Sopenharmony_ci#define EROM_EN BIT(4) 92862306a36Sopenharmony_ci#define ENBT BIT(5) 92962306a36Sopenharmony_ci#define ENUART BIT(8) 93062306a36Sopenharmony_ci#define UART_910 BIT(9) 93162306a36Sopenharmony_ci#define ENPMAC BIT(10) 93262306a36Sopenharmony_ci#define SIC_SWRST BIT(11) 93362306a36Sopenharmony_ci#define ENSIC BIT(12) 93462306a36Sopenharmony_ci#define SIC_23 BIT(13) 93562306a36Sopenharmony_ci#define ENHDP BIT(14) 93662306a36Sopenharmony_ci#define SIC_LBK BIT(15) 93762306a36Sopenharmony_ci 93862306a36Sopenharmony_ci#define LED0PL BIT(4) 93962306a36Sopenharmony_ci#define LED1PL BIT(12) 94062306a36Sopenharmony_ci#define LED0DIS BIT(7) 94162306a36Sopenharmony_ci 94262306a36Sopenharmony_ci#define MCUFWDL_EN BIT(0) 94362306a36Sopenharmony_ci#define MCUFWDL_RDY BIT(1) 94462306a36Sopenharmony_ci#define FWDL_CHKSUM_RPT BIT(2) 94562306a36Sopenharmony_ci#define MACINI_RDY BIT(3) 94662306a36Sopenharmony_ci#define BBINI_RDY BIT(4) 94762306a36Sopenharmony_ci#define RFINI_RDY BIT(5) 94862306a36Sopenharmony_ci#define WINTINI_RDY BIT(6) 94962306a36Sopenharmony_ci#define CPRST BIT(23) 95062306a36Sopenharmony_ci 95162306a36Sopenharmony_ci#define XCLK_VLD BIT(0) 95262306a36Sopenharmony_ci#define ACLK_VLD BIT(1) 95362306a36Sopenharmony_ci#define UCLK_VLD BIT(2) 95462306a36Sopenharmony_ci#define PCLK_VLD BIT(3) 95562306a36Sopenharmony_ci#define PCIRSTB BIT(4) 95662306a36Sopenharmony_ci#define V15_VLD BIT(5) 95762306a36Sopenharmony_ci#define TRP_B15V_EN BIT(7) 95862306a36Sopenharmony_ci#define SIC_IDLE BIT(8) 95962306a36Sopenharmony_ci#define BD_MAC2 BIT(9) 96062306a36Sopenharmony_ci#define BD_MAC1 BIT(10) 96162306a36Sopenharmony_ci#define IC_MACPHY_MODE BIT(11) 96262306a36Sopenharmony_ci#define VENDOR_ID BIT(19) 96362306a36Sopenharmony_ci#define PAD_HWPD_IDN BIT(22) 96462306a36Sopenharmony_ci#define TRP_VAUX_EN BIT(23) 96562306a36Sopenharmony_ci#define TRP_BT_EN BIT(24) 96662306a36Sopenharmony_ci#define BD_PKG_SEL BIT(25) 96762306a36Sopenharmony_ci#define BD_HCI_SEL BIT(26) 96862306a36Sopenharmony_ci#define TYPE_ID BIT(27) 96962306a36Sopenharmony_ci 97062306a36Sopenharmony_ci#define CHIP_VER_RTL_MASK 0xF000 97162306a36Sopenharmony_ci#define CHIP_VER_RTL_SHIFT 12 97262306a36Sopenharmony_ci 97362306a36Sopenharmony_ci#define REG_LBMODE (REG_CR + 3) 97462306a36Sopenharmony_ci 97562306a36Sopenharmony_ci#define HCI_TXDMA_EN BIT(0) 97662306a36Sopenharmony_ci#define HCI_RXDMA_EN BIT(1) 97762306a36Sopenharmony_ci#define TXDMA_EN BIT(2) 97862306a36Sopenharmony_ci#define RXDMA_EN BIT(3) 97962306a36Sopenharmony_ci#define PROTOCOL_EN BIT(4) 98062306a36Sopenharmony_ci#define SCHEDULE_EN BIT(5) 98162306a36Sopenharmony_ci#define MACTXEN BIT(6) 98262306a36Sopenharmony_ci#define MACRXEN BIT(7) 98362306a36Sopenharmony_ci#define ENSWBCN BIT(8) 98462306a36Sopenharmony_ci#define ENSEC BIT(9) 98562306a36Sopenharmony_ci 98662306a36Sopenharmony_ci#define _NETTYPE(x) (((x) & 0x3) << 16) 98762306a36Sopenharmony_ci#define MASK_NETTYPE 0x30000 98862306a36Sopenharmony_ci#define NT_NO_LINK 0x0 98962306a36Sopenharmony_ci#define NT_LINK_AD_HOC 0x1 99062306a36Sopenharmony_ci#define NT_LINK_AP 0x2 99162306a36Sopenharmony_ci#define NT_AS_AP 0x3 99262306a36Sopenharmony_ci 99362306a36Sopenharmony_ci#define _LBMODE(x) (((x) & 0xF) << 24) 99462306a36Sopenharmony_ci#define MASK_LBMODE 0xF000000 99562306a36Sopenharmony_ci#define LOOPBACK_NORMAL 0x0 99662306a36Sopenharmony_ci#define LOOPBACK_IMMEDIATELY 0XB 99762306a36Sopenharmony_ci#define LOOPBACK_MAC_DELAY 0x3 99862306a36Sopenharmony_ci#define LOOPBACK_PHY 0x1 99962306a36Sopenharmony_ci#define LOOPBACK_DMA 0x7 100062306a36Sopenharmony_ci 100162306a36Sopenharmony_ci#define GET_RX_PAGE_SIZE(value) ((value) & 0xF) 100262306a36Sopenharmony_ci#define GET_TX_PAGE_SIZE(value) (((value) & 0xF0) >> 4) 100362306a36Sopenharmony_ci#define _PSRX_MASK 0xF 100462306a36Sopenharmony_ci#define _PSTX_MASK 0xF0 100562306a36Sopenharmony_ci#define _PSRX(x) (x) 100662306a36Sopenharmony_ci#define _PSTX(x) ((x) << 4) 100762306a36Sopenharmony_ci 100862306a36Sopenharmony_ci#define PBP_64 0x0 100962306a36Sopenharmony_ci#define PBP_128 0x1 101062306a36Sopenharmony_ci#define PBP_256 0x2 101162306a36Sopenharmony_ci#define PBP_512 0x3 101262306a36Sopenharmony_ci#define PBP_1024 0x4 101362306a36Sopenharmony_ci 101462306a36Sopenharmony_ci#define RXDMA_ARBBW_EN BIT(0) 101562306a36Sopenharmony_ci#define RXSHFT_EN BIT(1) 101662306a36Sopenharmony_ci#define RXDMA_AGG_EN BIT(2) 101762306a36Sopenharmony_ci#define QS_VO_QUEUE BIT(8) 101862306a36Sopenharmony_ci#define QS_VI_QUEUE BIT(9) 101962306a36Sopenharmony_ci#define QS_BE_QUEUE BIT(10) 102062306a36Sopenharmony_ci#define QS_BK_QUEUE BIT(11) 102162306a36Sopenharmony_ci#define QS_MANAGER_QUEUE BIT(12) 102262306a36Sopenharmony_ci#define QS_HIGH_QUEUE BIT(13) 102362306a36Sopenharmony_ci 102462306a36Sopenharmony_ci#define HQSEL_VOQ BIT(0) 102562306a36Sopenharmony_ci#define HQSEL_VIQ BIT(1) 102662306a36Sopenharmony_ci#define HQSEL_BEQ BIT(2) 102762306a36Sopenharmony_ci#define HQSEL_BKQ BIT(3) 102862306a36Sopenharmony_ci#define HQSEL_MGTQ BIT(4) 102962306a36Sopenharmony_ci#define HQSEL_HIQ BIT(5) 103062306a36Sopenharmony_ci 103162306a36Sopenharmony_ci#define _TXDMA_HIQ_MAP(x) (((x)&0x3) << 14) 103262306a36Sopenharmony_ci#define _TXDMA_MGQ_MAP(x) (((x)&0x3) << 12) 103362306a36Sopenharmony_ci#define _TXDMA_BKQ_MAP(x) (((x)&0x3) << 10) 103462306a36Sopenharmony_ci#define _TXDMA_BEQ_MAP(x) (((x)&0x3) << 8) 103562306a36Sopenharmony_ci#define _TXDMA_VIQ_MAP(x) (((x)&0x3) << 6) 103662306a36Sopenharmony_ci#define _TXDMA_VOQ_MAP(x) (((x)&0x3) << 4) 103762306a36Sopenharmony_ci 103862306a36Sopenharmony_ci#define QUEUE_LOW 1 103962306a36Sopenharmony_ci#define QUEUE_NORMAL 2 104062306a36Sopenharmony_ci#define QUEUE_HIGH 3 104162306a36Sopenharmony_ci 104262306a36Sopenharmony_ci#define _LLT_NO_ACTIVE 0x0 104362306a36Sopenharmony_ci#define _LLT_WRITE_ACCESS 0x1 104462306a36Sopenharmony_ci#define _LLT_READ_ACCESS 0x2 104562306a36Sopenharmony_ci 104662306a36Sopenharmony_ci#define _LLT_INIT_DATA(x) ((x) & 0xFF) 104762306a36Sopenharmony_ci#define _LLT_INIT_ADDR(x) (((x) & 0xFF) << 8) 104862306a36Sopenharmony_ci#define _LLT_OP(x) (((x) & 0x3) << 30) 104962306a36Sopenharmony_ci#define _LLT_OP_VALUE(x) (((x) >> 30) & 0x3) 105062306a36Sopenharmony_ci 105162306a36Sopenharmony_ci#define BB_WRITE_READ_MASK (BIT(31) | BIT(30)) 105262306a36Sopenharmony_ci#define BB_WRITE_EN BIT(30) 105362306a36Sopenharmony_ci#define BB_READ_EN BIT(31) 105462306a36Sopenharmony_ci 105562306a36Sopenharmony_ci#define _HPQ(x) ((x) & 0xFF) 105662306a36Sopenharmony_ci#define _LPQ(x) (((x) & 0xFF) << 8) 105762306a36Sopenharmony_ci#define _PUBQ(x) (((x) & 0xFF) << 16) 105862306a36Sopenharmony_ci#define _NPQ(x) ((x) & 0xFF) 105962306a36Sopenharmony_ci 106062306a36Sopenharmony_ci#define HPQ_PUBLIC_DIS BIT(24) 106162306a36Sopenharmony_ci#define LPQ_PUBLIC_DIS BIT(25) 106262306a36Sopenharmony_ci#define LD_RQPN BIT(31) 106362306a36Sopenharmony_ci 106462306a36Sopenharmony_ci#define BCN_VALID BIT(16) 106562306a36Sopenharmony_ci#define BCN_HEAD(x) (((x) & 0xFF) << 8) 106662306a36Sopenharmony_ci#define BCN_HEAD_MASK 0xFF00 106762306a36Sopenharmony_ci 106862306a36Sopenharmony_ci#define BLK_DESC_NUM_SHIFT 4 106962306a36Sopenharmony_ci#define BLK_DESC_NUM_MASK 0xF 107062306a36Sopenharmony_ci 107162306a36Sopenharmony_ci#define DROP_DATA_EN BIT(9) 107262306a36Sopenharmony_ci 107362306a36Sopenharmony_ci#define EN_AMPDU_RTY_NEW BIT(7) 107462306a36Sopenharmony_ci 107562306a36Sopenharmony_ci#define _INIRTSMCS_SEL(x) ((x) & 0x3F) 107662306a36Sopenharmony_ci 107762306a36Sopenharmony_ci#define _SPEC_SIFS_CCK(x) ((x) & 0xFF) 107862306a36Sopenharmony_ci#define _SPEC_SIFS_OFDM(x) (((x) & 0xFF) << 8) 107962306a36Sopenharmony_ci 108062306a36Sopenharmony_ci#define RATE_REG_BITMAP_ALL 0xFFFFF 108162306a36Sopenharmony_ci 108262306a36Sopenharmony_ci#define _RRSC_BITMAP(x) ((x) & 0xFFFFF) 108362306a36Sopenharmony_ci 108462306a36Sopenharmony_ci#define _RRSR_RSC(x) (((x) & 0x3) << 21) 108562306a36Sopenharmony_ci#define RRSR_RSC_RESERVED 0x0 108662306a36Sopenharmony_ci#define RRSR_RSC_UPPER_SUBCHANNEL 0x1 108762306a36Sopenharmony_ci#define RRSR_RSC_LOWER_SUBCHANNEL 0x2 108862306a36Sopenharmony_ci#define RRSR_RSC_DUPLICATE_MODE 0x3 108962306a36Sopenharmony_ci 109062306a36Sopenharmony_ci#define USE_SHORT_G1 BIT(20) 109162306a36Sopenharmony_ci 109262306a36Sopenharmony_ci#define _AGGLMT_MCS0(x) ((x) & 0xF) 109362306a36Sopenharmony_ci#define _AGGLMT_MCS1(x) (((x) & 0xF) << 4) 109462306a36Sopenharmony_ci#define _AGGLMT_MCS2(x) (((x) & 0xF) << 8) 109562306a36Sopenharmony_ci#define _AGGLMT_MCS3(x) (((x) & 0xF) << 12) 109662306a36Sopenharmony_ci#define _AGGLMT_MCS4(x) (((x) & 0xF) << 16) 109762306a36Sopenharmony_ci#define _AGGLMT_MCS5(x) (((x) & 0xF) << 20) 109862306a36Sopenharmony_ci#define _AGGLMT_MCS6(x) (((x) & 0xF) << 24) 109962306a36Sopenharmony_ci#define _AGGLMT_MCS7(x) (((x) & 0xF) << 28) 110062306a36Sopenharmony_ci 110162306a36Sopenharmony_ci#define RETRY_LIMIT_SHORT_SHIFT 8 110262306a36Sopenharmony_ci#define RETRY_LIMIT_LONG_SHIFT 0 110362306a36Sopenharmony_ci 110462306a36Sopenharmony_ci#define _DARF_RC1(x) ((x) & 0x1F) 110562306a36Sopenharmony_ci#define _DARF_RC2(x) (((x) & 0x1F) << 8) 110662306a36Sopenharmony_ci#define _DARF_RC3(x) (((x) & 0x1F) << 16) 110762306a36Sopenharmony_ci#define _DARF_RC4(x) (((x) & 0x1F) << 24) 110862306a36Sopenharmony_ci#define _DARF_RC5(x) ((x) & 0x1F) 110962306a36Sopenharmony_ci#define _DARF_RC6(x) (((x) & 0x1F) << 8) 111062306a36Sopenharmony_ci#define _DARF_RC7(x) (((x) & 0x1F) << 16) 111162306a36Sopenharmony_ci#define _DARF_RC8(x) (((x) & 0x1F) << 24) 111262306a36Sopenharmony_ci 111362306a36Sopenharmony_ci#define _RARF_RC1(x) ((x) & 0x1F) 111462306a36Sopenharmony_ci#define _RARF_RC2(x) (((x) & 0x1F) << 8) 111562306a36Sopenharmony_ci#define _RARF_RC3(x) (((x) & 0x1F) << 16) 111662306a36Sopenharmony_ci#define _RARF_RC4(x) (((x) & 0x1F) << 24) 111762306a36Sopenharmony_ci#define _RARF_RC5(x) ((x) & 0x1F) 111862306a36Sopenharmony_ci#define _RARF_RC6(x) (((x) & 0x1F) << 8) 111962306a36Sopenharmony_ci#define _RARF_RC7(x) (((x) & 0x1F) << 16) 112062306a36Sopenharmony_ci#define _RARF_RC8(x) (((x) & 0x1F) << 24) 112162306a36Sopenharmony_ci 112262306a36Sopenharmony_ci#define AC_PARAM_TXOP_LIMIT_OFFSET 16 112362306a36Sopenharmony_ci#define AC_PARAM_ECW_MAX_OFFSET 12 112462306a36Sopenharmony_ci#define AC_PARAM_ECW_MIN_OFFSET 8 112562306a36Sopenharmony_ci#define AC_PARAM_AIFS_OFFSET 0 112662306a36Sopenharmony_ci 112762306a36Sopenharmony_ci#define _AIFS(x) (x) 112862306a36Sopenharmony_ci#define _ECW_MAX_MIN(x) ((x) << 8) 112962306a36Sopenharmony_ci#define _TXOP_LIMIT(x) ((x) << 16) 113062306a36Sopenharmony_ci 113162306a36Sopenharmony_ci#define _BCNIFS(x) ((x) & 0xFF) 113262306a36Sopenharmony_ci#define _BCNECW(x) ((((x) & 0xF)) << 8) 113362306a36Sopenharmony_ci 113462306a36Sopenharmony_ci#define _LRL(x) ((x) & 0x3F) 113562306a36Sopenharmony_ci#define _SRL(x) (((x) & 0x3F) << 8) 113662306a36Sopenharmony_ci 113762306a36Sopenharmony_ci#define _SIFS_CCK_CTX(x) ((x) & 0xFF) 113862306a36Sopenharmony_ci#define _SIFS_CCK_TRX(x) (((x) & 0xFF) << 8) 113962306a36Sopenharmony_ci 114062306a36Sopenharmony_ci#define _SIFS_OFDM_CTX(x) ((x) & 0xFF) 114162306a36Sopenharmony_ci#define _SIFS_OFDM_TRX(x) (((x) & 0xFF) << 8) 114262306a36Sopenharmony_ci 114362306a36Sopenharmony_ci#define _TBTT_PROHIBIT_HOLD(x) (((x) & 0xFF) << 8) 114462306a36Sopenharmony_ci 114562306a36Sopenharmony_ci#define DIS_EDCA_CNT_DWN BIT(11) 114662306a36Sopenharmony_ci 114762306a36Sopenharmony_ci#define EN_MBSSID BIT(1) 114862306a36Sopenharmony_ci#define EN_TXBCN_RPT BIT(2) 114962306a36Sopenharmony_ci#define EN_BCN_FUNCTION BIT(3) 115062306a36Sopenharmony_ci 115162306a36Sopenharmony_ci#define TSFTR_RST BIT(0) 115262306a36Sopenharmony_ci#define TSFTR1_RST BIT(1) 115362306a36Sopenharmony_ci 115462306a36Sopenharmony_ci#define STOP_BCNQ BIT(6) 115562306a36Sopenharmony_ci 115662306a36Sopenharmony_ci#define DIS_TSF_UDT0_NORMAL_CHIP BIT(4) 115762306a36Sopenharmony_ci#define DIS_TSF_UDT0_TEST_CHIP BIT(5) 115862306a36Sopenharmony_ci 115962306a36Sopenharmony_ci#define ACMHW_HWEN BIT(0) 116062306a36Sopenharmony_ci#define ACMHW_BEQEN BIT(1) 116162306a36Sopenharmony_ci#define ACMHW_VIQEN BIT(2) 116262306a36Sopenharmony_ci#define ACMHW_VOQEN BIT(3) 116362306a36Sopenharmony_ci#define ACMHW_BEQSTATUS BIT(4) 116462306a36Sopenharmony_ci#define ACMHW_VIQSTATUS BIT(5) 116562306a36Sopenharmony_ci#define ACMHW_VOQSTATUS BIT(6) 116662306a36Sopenharmony_ci 116762306a36Sopenharmony_ci#define APSDOFF BIT(6) 116862306a36Sopenharmony_ci#define APSDOFF_STATUS BIT(7) 116962306a36Sopenharmony_ci 117062306a36Sopenharmony_ci#define BW_20MHZ BIT(2) 117162306a36Sopenharmony_ci 117262306a36Sopenharmony_ci#define RATE_BITMAP_ALL 0xFFFFF 117362306a36Sopenharmony_ci 117462306a36Sopenharmony_ci#define RATE_RRSR_CCK_ONLY_1M 0xFFFF1 117562306a36Sopenharmony_ci 117662306a36Sopenharmony_ci#define TSFRST BIT(0) 117762306a36Sopenharmony_ci#define DIS_GCLK BIT(1) 117862306a36Sopenharmony_ci#define PAD_SEL BIT(2) 117962306a36Sopenharmony_ci#define PWR_ST BIT(6) 118062306a36Sopenharmony_ci#define PWRBIT_OW_EN BIT(7) 118162306a36Sopenharmony_ci#define ACRC BIT(8) 118262306a36Sopenharmony_ci#define CFENDFORM BIT(9) 118362306a36Sopenharmony_ci#define ICV BIT(10) 118462306a36Sopenharmony_ci 118562306a36Sopenharmony_ci#define AAP BIT(0) 118662306a36Sopenharmony_ci#define APM BIT(1) 118762306a36Sopenharmony_ci#define AM BIT(2) 118862306a36Sopenharmony_ci#define AB BIT(3) 118962306a36Sopenharmony_ci#define ADD3 BIT(4) 119062306a36Sopenharmony_ci#define APWRMGT BIT(5) 119162306a36Sopenharmony_ci#define CBSSID BIT(6) 119262306a36Sopenharmony_ci#define CBSSID_DATA BIT(6) 119362306a36Sopenharmony_ci#define CBSSID_BCN BIT(7) 119462306a36Sopenharmony_ci#define ACRC32 BIT(8) 119562306a36Sopenharmony_ci#define AICV BIT(9) 119662306a36Sopenharmony_ci#define ADF BIT(11) 119762306a36Sopenharmony_ci#define ACF BIT(12) 119862306a36Sopenharmony_ci#define AMF BIT(13) 119962306a36Sopenharmony_ci#define HTC_LOC_CTRL BIT(14) 120062306a36Sopenharmony_ci#define UC_DATA_EN BIT(16) 120162306a36Sopenharmony_ci#define BM_DATA_EN BIT(17) 120262306a36Sopenharmony_ci#define MFBEN BIT(22) 120362306a36Sopenharmony_ci#define LSIGEN BIT(23) 120462306a36Sopenharmony_ci#define ENMBID BIT(24) 120562306a36Sopenharmony_ci#define APP_BASSN BIT(27) 120662306a36Sopenharmony_ci#define APP_PHYSTS BIT(28) 120762306a36Sopenharmony_ci#define APP_ICV BIT(29) 120862306a36Sopenharmony_ci#define APP_MIC BIT(30) 120962306a36Sopenharmony_ci#define APP_FCS BIT(31) 121062306a36Sopenharmony_ci 121162306a36Sopenharmony_ci#define _MIN_SPACE(x) ((x) & 0x7) 121262306a36Sopenharmony_ci#define _SHORT_GI_PADDING(x) (((x) & 0x1F) << 3) 121362306a36Sopenharmony_ci 121462306a36Sopenharmony_ci#define RXERR_TYPE_OFDM_PPDU 0 121562306a36Sopenharmony_ci#define RXERR_TYPE_OFDM_FALSE_ALARM 1 121662306a36Sopenharmony_ci#define RXERR_TYPE_OFDM_MPDU_OK 2 121762306a36Sopenharmony_ci#define RXERR_TYPE_OFDM_MPDU_FAIL 3 121862306a36Sopenharmony_ci#define RXERR_TYPE_CCK_PPDU 4 121962306a36Sopenharmony_ci#define RXERR_TYPE_CCK_FALSE_ALARM 5 122062306a36Sopenharmony_ci#define RXERR_TYPE_CCK_MPDU_OK 6 122162306a36Sopenharmony_ci#define RXERR_TYPE_CCK_MPDU_FAIL 7 122262306a36Sopenharmony_ci#define RXERR_TYPE_HT_PPDU 8 122362306a36Sopenharmony_ci#define RXERR_TYPE_HT_FALSE_ALARM 9 122462306a36Sopenharmony_ci#define RXERR_TYPE_HT_MPDU_TOTAL 10 122562306a36Sopenharmony_ci#define RXERR_TYPE_HT_MPDU_OK 11 122662306a36Sopenharmony_ci#define RXERR_TYPE_HT_MPDU_FAIL 12 122762306a36Sopenharmony_ci#define RXERR_TYPE_RX_FULL_DROP 15 122862306a36Sopenharmony_ci 122962306a36Sopenharmony_ci#define RXERR_COUNTER_MASK 0xFFFFF 123062306a36Sopenharmony_ci#define RXERR_RPT_RST BIT(27) 123162306a36Sopenharmony_ci#define _RXERR_RPT_SEL(type) ((type) << 28) 123262306a36Sopenharmony_ci 123362306a36Sopenharmony_ci#define SCR_TXUSEDK BIT(0) 123462306a36Sopenharmony_ci#define SCR_RXUSEDK BIT(1) 123562306a36Sopenharmony_ci#define SCR_TXENCENABLE BIT(2) 123662306a36Sopenharmony_ci#define SCR_RXDECENABLE BIT(3) 123762306a36Sopenharmony_ci#define SCR_SKBYA2 BIT(4) 123862306a36Sopenharmony_ci#define SCR_NOSKMC BIT(5) 123962306a36Sopenharmony_ci#define SCR_TXBCUSEDK BIT(6) 124062306a36Sopenharmony_ci#define SCR_RXBCUSEDK BIT(7) 124162306a36Sopenharmony_ci 124262306a36Sopenharmony_ci#define XCLK_VLD BIT(0) 124362306a36Sopenharmony_ci#define ACLK_VLD BIT(1) 124462306a36Sopenharmony_ci#define UCLK_VLD BIT(2) 124562306a36Sopenharmony_ci#define PCLK_VLD BIT(3) 124662306a36Sopenharmony_ci#define PCIRSTB BIT(4) 124762306a36Sopenharmony_ci#define V15_VLD BIT(5) 124862306a36Sopenharmony_ci#define TRP_B15V_EN BIT(7) 124962306a36Sopenharmony_ci#define SIC_IDLE BIT(8) 125062306a36Sopenharmony_ci#define BD_MAC2 BIT(9) 125162306a36Sopenharmony_ci#define BD_MAC1 BIT(10) 125262306a36Sopenharmony_ci#define IC_MACPHY_MODE BIT(11) 125362306a36Sopenharmony_ci#define BT_FUNC BIT(16) 125462306a36Sopenharmony_ci#define VENDOR_ID BIT(19) 125562306a36Sopenharmony_ci#define PAD_HWPD_IDN BIT(22) 125662306a36Sopenharmony_ci#define TRP_VAUX_EN BIT(23) 125762306a36Sopenharmony_ci#define TRP_BT_EN BIT(24) 125862306a36Sopenharmony_ci#define BD_PKG_SEL BIT(25) 125962306a36Sopenharmony_ci#define BD_HCI_SEL BIT(26) 126062306a36Sopenharmony_ci#define TYPE_ID BIT(27) 126162306a36Sopenharmony_ci 126262306a36Sopenharmony_ci#define USB_IS_HIGH_SPEED 0 126362306a36Sopenharmony_ci#define USB_IS_FULL_SPEED 1 126462306a36Sopenharmony_ci#define USB_SPEED_MASK BIT(5) 126562306a36Sopenharmony_ci 126662306a36Sopenharmony_ci#define USB_NORMAL_SIE_EP_MASK 0xF 126762306a36Sopenharmony_ci#define USB_NORMAL_SIE_EP_SHIFT 4 126862306a36Sopenharmony_ci 126962306a36Sopenharmony_ci#define USB_TEST_EP_MASK 0x30 127062306a36Sopenharmony_ci#define USB_TEST_EP_SHIFT 4 127162306a36Sopenharmony_ci 127262306a36Sopenharmony_ci#define USB_AGG_EN BIT(3) 127362306a36Sopenharmony_ci 127462306a36Sopenharmony_ci#define MAC_ADDR_LEN 6 127562306a36Sopenharmony_ci#define LAST_ENTRY_OF_TX_PKT_BUFFER 255 127662306a36Sopenharmony_ci 127762306a36Sopenharmony_ci#define POLLING_LLT_THRESHOLD 20 127862306a36Sopenharmony_ci#define POLLING_READY_TIMEOUT_COUNT 3000 127962306a36Sopenharmony_ci 128062306a36Sopenharmony_ci#define MAX_MSS_DENSITY_2T 0x13 128162306a36Sopenharmony_ci#define MAX_MSS_DENSITY_1T 0x0A 128262306a36Sopenharmony_ci 128362306a36Sopenharmony_ci#define EPROM_CMD_OPERATING_MODE_MASK ((1<<7)|(1<<6)) 128462306a36Sopenharmony_ci#define EPROM_CMD_CONFIG 0x3 128562306a36Sopenharmony_ci#define EPROM_CMD_LOAD 1 128662306a36Sopenharmony_ci 128762306a36Sopenharmony_ci#define HWSET_MAX_SIZE_92S HWSET_MAX_SIZE 128862306a36Sopenharmony_ci 128962306a36Sopenharmony_ci#define HAL_8192C_HW_GPIO_WPS_BIT BIT(2) 129062306a36Sopenharmony_ci 129162306a36Sopenharmony_ci#define RA_LSSIWRITE_8821A 0xc90 129262306a36Sopenharmony_ci#define RB_LSSIWRITE_8821A 0xe90 129362306a36Sopenharmony_ci 129462306a36Sopenharmony_ci#define RA_PIREAD_8821A 0xd04 129562306a36Sopenharmony_ci#define RB_PIREAD_8821A 0xd44 129662306a36Sopenharmony_ci#define RA_SIREAD_8821A 0xd08 129762306a36Sopenharmony_ci#define RB_SIREAD_8821A 0xd48 129862306a36Sopenharmony_ci 129962306a36Sopenharmony_ci#define RPMAC_RESET 0x100 130062306a36Sopenharmony_ci#define RPMAC_TXSTART 0x104 130162306a36Sopenharmony_ci#define RPMAC_TXLEGACYSIG 0x108 130262306a36Sopenharmony_ci#define RPMAC_TXHTSIG1 0x10c 130362306a36Sopenharmony_ci#define RPMAC_TXHTSIG2 0x110 130462306a36Sopenharmony_ci#define RPMAC_PHYDEBUG 0x114 130562306a36Sopenharmony_ci#define RPMAC_TXPACKETNUM 0x118 130662306a36Sopenharmony_ci#define RPMAC_TXIDLE 0x11c 130762306a36Sopenharmony_ci#define RPMAC_TXMACHEADER0 0x120 130862306a36Sopenharmony_ci#define RPMAC_TXMACHEADER1 0x124 130962306a36Sopenharmony_ci#define RPMAC_TXMACHEADER2 0x128 131062306a36Sopenharmony_ci#define RPMAC_TXMACHEADER3 0x12c 131162306a36Sopenharmony_ci#define RPMAC_TXMACHEADER4 0x130 131262306a36Sopenharmony_ci#define RPMAC_TXMACHEADER5 0x134 131362306a36Sopenharmony_ci#define RPMAC_TXDADATYPE 0x138 131462306a36Sopenharmony_ci#define RPMAC_TXRANDOMSEED 0x13c 131562306a36Sopenharmony_ci#define RPMAC_CCKPLCPPREAMBLE 0x140 131662306a36Sopenharmony_ci#define RPMAC_CCKPLCPHEADER 0x144 131762306a36Sopenharmony_ci#define RPMAC_CCKCRC16 0x148 131862306a36Sopenharmony_ci#define RPMAC_OFDMRXCRC32OK 0x170 131962306a36Sopenharmony_ci#define RPMAC_OFDMRXCRC32ER 0x174 132062306a36Sopenharmony_ci#define RPMAC_OFDMRXPARITYER 0x178 132162306a36Sopenharmony_ci#define RPMAC_OFDMRXCRC8ER 0x17c 132262306a36Sopenharmony_ci#define RPMAC_CCKCRXRC16ER 0x180 132362306a36Sopenharmony_ci#define RPMAC_CCKCRXRC32ER 0x184 132462306a36Sopenharmony_ci#define RPMAC_CCKCRXRC32OK 0x188 132562306a36Sopenharmony_ci#define RPMAC_TXSTATUS 0x18c 132662306a36Sopenharmony_ci 132762306a36Sopenharmony_ci#define RFPGA0_RFMOD 0x800 132862306a36Sopenharmony_ci 132962306a36Sopenharmony_ci#define RFPGA0_TXINFO 0x804 133062306a36Sopenharmony_ci#define RFPGA0_PSDFUNCTION 0x808 133162306a36Sopenharmony_ci 133262306a36Sopenharmony_ci#define RFPGA0_TXGAINSTAGE 0x80c 133362306a36Sopenharmony_ci 133462306a36Sopenharmony_ci#define RFPGA0_RFTIMING1 0x810 133562306a36Sopenharmony_ci#define RFPGA0_RFTIMING2 0x814 133662306a36Sopenharmony_ci 133762306a36Sopenharmony_ci#define RFPGA0_XA_HSSIPARAMETER1 0x820 133862306a36Sopenharmony_ci#define RFPGA0_XA_HSSIPARAMETER2 0x824 133962306a36Sopenharmony_ci#define RFPGA0_XB_HSSIPARAMETER1 0x828 134062306a36Sopenharmony_ci#define RFPGA0_XB_HSSIPARAMETER2 0x82c 134162306a36Sopenharmony_ci#define RCCAONSEC 0x838 134262306a36Sopenharmony_ci 134362306a36Sopenharmony_ci#define RFPGA0_XA_LSSIPARAMETER 0x840 134462306a36Sopenharmony_ci#define RFPGA0_XB_LSSIPARAMETER 0x844 134562306a36Sopenharmony_ci#define RL1PEAKTH 0x848 134662306a36Sopenharmony_ci 134762306a36Sopenharmony_ci#define RFPGA0_RFWAKEUPPARAMETER 0x850 134862306a36Sopenharmony_ci#define RFPGA0_RFSLEEPUPPARAMETER 0x854 134962306a36Sopenharmony_ci 135062306a36Sopenharmony_ci#define RFPGA0_XAB_SWITCHCONTROL 0x858 135162306a36Sopenharmony_ci#define RFPGA0_XCD_SWITCHCONTROL 0x85c 135262306a36Sopenharmony_ci 135362306a36Sopenharmony_ci#define RFPGA0_XA_RFINTERFACEOE 0x860 135462306a36Sopenharmony_ci#define RFC_AREA 0x860 135562306a36Sopenharmony_ci#define RFPGA0_XB_RFINTERFACEOE 0x864 135662306a36Sopenharmony_ci 135762306a36Sopenharmony_ci#define RFPGA0_XAB_RFINTERFACESW 0x870 135862306a36Sopenharmony_ci#define RFPGA0_XCD_RFINTERFACESW 0x874 135962306a36Sopenharmony_ci 136062306a36Sopenharmony_ci#define RFPGA0_XAB_RFPARAMETER 0x878 136162306a36Sopenharmony_ci#define RFPGA0_XCD_RFPARAMETER 0x87c 136262306a36Sopenharmony_ci 136362306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER1 0x880 136462306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER2 0x884 136562306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER3 0x888 136662306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER4 0x88c 136762306a36Sopenharmony_ci 136862306a36Sopenharmony_ci#define RFPGA0_XA_LSSIREADBACK 0x8a0 136962306a36Sopenharmony_ci#define RFPGA0_XB_LSSIREADBACK 0x8a4 137062306a36Sopenharmony_ci#define RFPGA0_XC_LSSIREADBACK 0x8a8 137162306a36Sopenharmony_ci#define RRFMOD 0x8ac 137262306a36Sopenharmony_ci#define RHSSIREAD_8821AE 0x8b0 137362306a36Sopenharmony_ci 137462306a36Sopenharmony_ci#define RFPGA0_PSDREPORT 0x8b4 137562306a36Sopenharmony_ci#define TRANSCEIVEA_HSPI_READBACK 0x8b8 137662306a36Sopenharmony_ci#define TRANSCEIVEB_HSPI_READBACK 0x8bc 137762306a36Sopenharmony_ci#define RADC_BUF_CLK 0x8c4 137862306a36Sopenharmony_ci#define RFPGA0_XAB_RFINTERFACERB 0x8e0 137962306a36Sopenharmony_ci#define RFPGA0_XCD_RFINTERFACERB 0x8e4 138062306a36Sopenharmony_ci 138162306a36Sopenharmony_ci#define RFPGA1_RFMOD 0x900 138262306a36Sopenharmony_ci 138362306a36Sopenharmony_ci#define RFPGA1_TXBLOCK 0x904 138462306a36Sopenharmony_ci#define RFPGA1_DEBUGSELECT 0x908 138562306a36Sopenharmony_ci#define RFPGA1_TXINFO 0x90c 138662306a36Sopenharmony_ci 138762306a36Sopenharmony_ci#define RCCK_SYSTEM 0xa00 138862306a36Sopenharmony_ci#define BCCK_SYSTEM 0x10 138962306a36Sopenharmony_ci 139062306a36Sopenharmony_ci#define RCCK0_AFESETTING 0xa04 139162306a36Sopenharmony_ci#define RCCK0_CCA 0xa08 139262306a36Sopenharmony_ci 139362306a36Sopenharmony_ci#define RCCK0_RXAGC1 0xa0c 139462306a36Sopenharmony_ci#define RCCK0_RXAGC2 0xa10 139562306a36Sopenharmony_ci 139662306a36Sopenharmony_ci#define RCCK0_RXHP 0xa14 139762306a36Sopenharmony_ci 139862306a36Sopenharmony_ci#define RCCK0_DSPPARAMETER1 0xa18 139962306a36Sopenharmony_ci#define RCCK0_DSPPARAMETER2 0xa1c 140062306a36Sopenharmony_ci 140162306a36Sopenharmony_ci#define RCCK0_TXFILTER1 0xa20 140262306a36Sopenharmony_ci#define RCCK0_TXFILTER2 0xa24 140362306a36Sopenharmony_ci#define RCCK0_DEBUGPORT 0xa28 140462306a36Sopenharmony_ci#define RCCK0_FALSEALARMREPORT 0xa2c 140562306a36Sopenharmony_ci#define RCCK0_TRSSIREPORT 0xa50 140662306a36Sopenharmony_ci#define RCCK0_RXREPORT 0xa54 140762306a36Sopenharmony_ci#define RCCK0_FACOUNTERLOWER 0xa5c 140862306a36Sopenharmony_ci#define RCCK0_FACOUNTERUPPER 0xa58 140962306a36Sopenharmony_ci#define RCCK0_CCA_CNT 0xa60 141062306a36Sopenharmony_ci 141162306a36Sopenharmony_ci/* PageB(0XB00) */ 141262306a36Sopenharmony_ci#define RPDP_ANTA 0xb00 141362306a36Sopenharmony_ci#define RPDP_ANTA_4 0xb04 141462306a36Sopenharmony_ci#define RPDP_ANTA_8 0xb08 141562306a36Sopenharmony_ci#define RPDP_ANTA_C 0xb0c 141662306a36Sopenharmony_ci#define RPDP_ANTA_10 0xb10 141762306a36Sopenharmony_ci#define RPDP_ANTA_14 0xb14 141862306a36Sopenharmony_ci#define RPDP_ANTA_18 0xb18 141962306a36Sopenharmony_ci#define RPDP_ANTA_1C 0xb1c 142062306a36Sopenharmony_ci#define RPDP_ANTA_20 0xb20 142162306a36Sopenharmony_ci#define RPDP_ANTA_24 0xb24 142262306a36Sopenharmony_ci 142362306a36Sopenharmony_ci#define RCONFIG_PMPD_ANTA 0xb28 142462306a36Sopenharmony_ci#define RCONFIG_RAM64x16 0xb2c 142562306a36Sopenharmony_ci 142662306a36Sopenharmony_ci#define RBNDA 0xb30 142762306a36Sopenharmony_ci#define RHSSIPAR 0xb34 142862306a36Sopenharmony_ci 142962306a36Sopenharmony_ci#define RCONFIG_ANTA 0xb68 143062306a36Sopenharmony_ci#define RCONFIG_ANTB 0xb6c 143162306a36Sopenharmony_ci 143262306a36Sopenharmony_ci#define RPDP_ANTB 0xb70 143362306a36Sopenharmony_ci#define RPDP_ANTB_4 0xb74 143462306a36Sopenharmony_ci#define RPDP_ANTB_8 0xb78 143562306a36Sopenharmony_ci#define RPDP_ANTB_C 0xb7c 143662306a36Sopenharmony_ci#define RPDP_ANTB_10 0xb80 143762306a36Sopenharmony_ci#define RPDP_ANTB_14 0xb84 143862306a36Sopenharmony_ci#define RPDP_ANTB_18 0xb88 143962306a36Sopenharmony_ci#define RPDP_ANTB_1C 0xb8c 144062306a36Sopenharmony_ci#define RPDP_ANTB_20 0xb90 144162306a36Sopenharmony_ci#define RPDP_ANTB_24 0xb94 144262306a36Sopenharmony_ci 144362306a36Sopenharmony_ci#define RCONFIG_PMPD_ANTB 0xb98 144462306a36Sopenharmony_ci 144562306a36Sopenharmony_ci#define RBNDB 0xba0 144662306a36Sopenharmony_ci 144762306a36Sopenharmony_ci#define RAPK 0xbd8 144862306a36Sopenharmony_ci#define RPM_RX0_ANTA 0xbdc 144962306a36Sopenharmony_ci#define RPM_RX1_ANTA 0xbe0 145062306a36Sopenharmony_ci#define RPM_RX2_ANTA 0xbe4 145162306a36Sopenharmony_ci#define RPM_RX3_ANTA 0xbe8 145262306a36Sopenharmony_ci#define RPM_RX0_ANTB 0xbec 145362306a36Sopenharmony_ci#define RPM_RX1_ANTB 0xbf0 145462306a36Sopenharmony_ci#define RPM_RX2_ANTB 0xbf4 145562306a36Sopenharmony_ci#define RPM_RX3_ANTB 0xbf8 145662306a36Sopenharmony_ci 145762306a36Sopenharmony_ci/*RSSI Dump*/ 145862306a36Sopenharmony_ci#define RA_RSSI_DUMP 0XBF0 145962306a36Sopenharmony_ci#define RB_RSSI_DUMP 0XBF1 146062306a36Sopenharmony_ci#define RS1_RX_EVM_DUMP 0XBF4 146162306a36Sopenharmony_ci#define RS2_RX_EVM_DUMP 0XBF5 146262306a36Sopenharmony_ci#define RA_RX_SNR_DUMP 0XBF6 146362306a36Sopenharmony_ci#define RB_RX_SNR_DUMP 0XBF7 146462306a36Sopenharmony_ci#define RA_CFO_SHORT_DUMP 0XBF8 146562306a36Sopenharmony_ci#define RB_CFO_SHORT_DUMP 0XBFA 146662306a36Sopenharmony_ci#define RA_CFO_LONG_DUMP 0XBEC 146762306a36Sopenharmony_ci#define RB_CFO_LONG_DUMP 0XBEE 146862306a36Sopenharmony_ci 146962306a36Sopenharmony_ci/*Page C*/ 147062306a36Sopenharmony_ci#define ROFDM0_LSTF 0xc00 147162306a36Sopenharmony_ci 147262306a36Sopenharmony_ci#define ROFDM0_TRXPATHENABLE 0xc04 147362306a36Sopenharmony_ci#define ROFDM0_TRMUXPAR 0xc08 147462306a36Sopenharmony_ci#define ROFDM0_TRSWISOLATION 0xc0c 147562306a36Sopenharmony_ci 147662306a36Sopenharmony_ci#define ROFDM0_XARXAFE 0xc10 147762306a36Sopenharmony_ci#define ROFDM0_XARXIQIMBALANCE 0xc14 147862306a36Sopenharmony_ci#define ROFDM0_XBRXAFE 0xc18 147962306a36Sopenharmony_ci#define ROFDM0_XBRXIQIMBALANCE 0xc1c 148062306a36Sopenharmony_ci#define ROFDM0_XCRXAFE 0xc20 148162306a36Sopenharmony_ci#define ROFDM0_XCRXIQIMBANLANCE 0xc24 148262306a36Sopenharmony_ci#define ROFDM0_XDRXAFE 0xc28 148362306a36Sopenharmony_ci#define ROFDM0_XDRXIQIMBALANCE 0xc2c 148462306a36Sopenharmony_ci 148562306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR1 0xc30 148662306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR2 0xc34 148762306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR3 0xc38 148862306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR4 0xc3c 148962306a36Sopenharmony_ci 149062306a36Sopenharmony_ci#define ROFDM0_RXDSP 0xc40 149162306a36Sopenharmony_ci#define ROFDM0_CFOANDDAGC 0xc44 149262306a36Sopenharmony_ci#define ROFDM0_CCADROPTHRESHOLD 0xc48 149362306a36Sopenharmony_ci#define ROFDM0_ECCATHRESHOLD 0xc4c 149462306a36Sopenharmony_ci 149562306a36Sopenharmony_ci#define ROFDM0_XAAGCCORE1 0xc50 149662306a36Sopenharmony_ci#define ROFDM0_XAAGCCORE2 0xc54 149762306a36Sopenharmony_ci#define ROFDM0_XBAGCCORE1 0xc58 149862306a36Sopenharmony_ci#define ROFDM0_XBAGCCORE2 0xc5c 149962306a36Sopenharmony_ci#define ROFDM0_XCAGCCORE1 0xc60 150062306a36Sopenharmony_ci#define ROFDM0_XCAGCCORE2 0xc64 150162306a36Sopenharmony_ci#define ROFDM0_XDAGCCORE1 0xc68 150262306a36Sopenharmony_ci#define ROFDM0_XDAGCCORE2 0xc6c 150362306a36Sopenharmony_ci 150462306a36Sopenharmony_ci#define ROFDM0_AGCPARAMETER1 0xc70 150562306a36Sopenharmony_ci#define ROFDM0_AGCPARAMETER2 0xc74 150662306a36Sopenharmony_ci#define ROFDM0_AGCRSSITABLE 0xc78 150762306a36Sopenharmony_ci#define ROFDM0_HTSTFAGC 0xc7c 150862306a36Sopenharmony_ci 150962306a36Sopenharmony_ci#define ROFDM0_XATXIQIMBALANCE 0xc80 151062306a36Sopenharmony_ci#define ROFDM0_XATXAFE 0xc84 151162306a36Sopenharmony_ci#define ROFDM0_XBTXIQIMBALANCE 0xc88 151262306a36Sopenharmony_ci#define ROFDM0_XBTXAFE 0xc8c 151362306a36Sopenharmony_ci#define ROFDM0_XCTXIQIMBALANCE 0xc90 151462306a36Sopenharmony_ci#define ROFDM0_XCTXAFE 0xc94 151562306a36Sopenharmony_ci#define ROFDM0_XDTXIQIMBALANCE 0xc98 151662306a36Sopenharmony_ci#define ROFDM0_XDTXAFE 0xc9c 151762306a36Sopenharmony_ci 151862306a36Sopenharmony_ci#define ROFDM0_RXIQEXTANTA 0xca0 151962306a36Sopenharmony_ci#define ROFDM0_TXCOEFF1 0xca4 152062306a36Sopenharmony_ci#define ROFDM0_TXCOEFF2 0xca8 152162306a36Sopenharmony_ci#define ROFDM0_TXCOEFF3 0xcac 152262306a36Sopenharmony_ci#define ROFDM0_TXCOEFF4 0xcb0 152362306a36Sopenharmony_ci#define ROFDM0_TXCOEFF5 0xcb4 152462306a36Sopenharmony_ci#define ROFDM0_TXCOEFF6 0xcb8 152562306a36Sopenharmony_ci 152662306a36Sopenharmony_ci/*Path_A RFE cotrol */ 152762306a36Sopenharmony_ci#define RA_RFE_CTRL_8812 0xcb8 152862306a36Sopenharmony_ci/*Path_B RFE control*/ 152962306a36Sopenharmony_ci#define RB_RFE_CTRL_8812 0xeb8 153062306a36Sopenharmony_ci 153162306a36Sopenharmony_ci#define ROFDM0_RXHPPARAMETER 0xce0 153262306a36Sopenharmony_ci#define ROFDM0_TXPSEUDONOISEWGT 0xce4 153362306a36Sopenharmony_ci#define ROFDM0_FRAMESYNC 0xcf0 153462306a36Sopenharmony_ci#define ROFDM0_DFSREPORT 0xcf4 153562306a36Sopenharmony_ci 153662306a36Sopenharmony_ci#define ROFDM1_LSTF 0xd00 153762306a36Sopenharmony_ci#define ROFDM1_TRXPATHENABLE 0xd04 153862306a36Sopenharmony_ci 153962306a36Sopenharmony_ci#define ROFDM1_CF0 0xd08 154062306a36Sopenharmony_ci#define ROFDM1_CSI1 0xd10 154162306a36Sopenharmony_ci#define ROFDM1_SBD 0xd14 154262306a36Sopenharmony_ci#define ROFDM1_CSI2 0xd18 154362306a36Sopenharmony_ci#define ROFDM1_CFOTRACKING 0xd2c 154462306a36Sopenharmony_ci#define ROFDM1_TRXMESAURE1 0xd34 154562306a36Sopenharmony_ci#define ROFDM1_INTFDET 0xd3c 154662306a36Sopenharmony_ci#define ROFDM1_PSEUDONOISESTATEAB 0xd50 154762306a36Sopenharmony_ci#define ROFDM1_PSEUDONOISESTATECD 0xd54 154862306a36Sopenharmony_ci#define ROFDM1_RXPSEUDONOISEWGT 0xd58 154962306a36Sopenharmony_ci 155062306a36Sopenharmony_ci#define ROFDM_PHYCOUNTER1 0xda0 155162306a36Sopenharmony_ci#define ROFDM_PHYCOUNTER2 0xda4 155262306a36Sopenharmony_ci#define ROFDM_PHYCOUNTER3 0xda8 155362306a36Sopenharmony_ci 155462306a36Sopenharmony_ci#define ROFDM_SHORTCFOAB 0xdac 155562306a36Sopenharmony_ci#define ROFDM_SHORTCFOCD 0xdb0 155662306a36Sopenharmony_ci#define ROFDM_LONGCFOAB 0xdb4 155762306a36Sopenharmony_ci#define ROFDM_LONGCFOCD 0xdb8 155862306a36Sopenharmony_ci#define ROFDM_TAILCF0AB 0xdbc 155962306a36Sopenharmony_ci#define ROFDM_TAILCF0CD 0xdc0 156062306a36Sopenharmony_ci#define ROFDM_PWMEASURE1 0xdc4 156162306a36Sopenharmony_ci#define ROFDM_PWMEASURE2 0xdc8 156262306a36Sopenharmony_ci#define ROFDM_BWREPORT 0xdcc 156362306a36Sopenharmony_ci#define ROFDM_AGCREPORT 0xdd0 156462306a36Sopenharmony_ci#define ROFDM_RXSNR 0xdd4 156562306a36Sopenharmony_ci#define ROFDM_RXEVMCSI 0xdd8 156662306a36Sopenharmony_ci#define ROFDM_SIGREPORT 0xddc 156762306a36Sopenharmony_ci 156862306a36Sopenharmony_ci#define RTXAGC_A_CCK11_CCK1 0xc20 156962306a36Sopenharmony_ci#define RTXAGC_A_OFDM18_OFDM6 0xc24 157062306a36Sopenharmony_ci#define RTXAGC_A_OFDM54_OFDM24 0xc28 157162306a36Sopenharmony_ci#define RTXAGC_A_MCS03_MCS00 0xc2c 157262306a36Sopenharmony_ci#define RTXAGC_A_MCS07_MCS04 0xc30 157362306a36Sopenharmony_ci#define RTXAGC_A_MCS11_MCS08 0xc34 157462306a36Sopenharmony_ci#define RTXAGC_A_MCS15_MCS12 0xc38 157562306a36Sopenharmony_ci#define RTXAGC_A_NSS1INDEX3_NSS1INDEX0 0xc3c 157662306a36Sopenharmony_ci#define RTXAGC_A_NSS1INDEX7_NSS1INDEX4 0xc40 157762306a36Sopenharmony_ci#define RTXAGC_A_NSS2INDEX1_NSS1INDEX8 0xc44 157862306a36Sopenharmony_ci#define RTXAGC_A_NSS2INDEX5_NSS2INDEX2 0xc48 157962306a36Sopenharmony_ci#define RTXAGC_A_NSS2INDEX9_NSS2INDEX6 0xc4c 158062306a36Sopenharmony_ci#define RTXAGC_B_CCK11_CCK1 0xe20 158162306a36Sopenharmony_ci#define RTXAGC_B_OFDM18_OFDM6 0xe24 158262306a36Sopenharmony_ci#define RTXAGC_B_OFDM54_OFDM24 0xe28 158362306a36Sopenharmony_ci#define RTXAGC_B_MCS03_MCS00 0xe2c 158462306a36Sopenharmony_ci#define RTXAGC_B_MCS07_MCS04 0xe30 158562306a36Sopenharmony_ci#define RTXAGC_B_MCS11_MCS08 0xe34 158662306a36Sopenharmony_ci#define RTXAGC_B_MCS15_MCS12 0xe38 158762306a36Sopenharmony_ci#define RTXAGC_B_NSS1INDEX3_NSS1INDEX0 0xe3c 158862306a36Sopenharmony_ci#define RTXAGC_B_NSS1INDEX7_NSS1INDEX4 0xe40 158962306a36Sopenharmony_ci#define RTXAGC_B_NSS2INDEX1_NSS1INDEX8 0xe44 159062306a36Sopenharmony_ci#define RTXAGC_B_NSS2INDEX5_NSS2INDEX2 0xe48 159162306a36Sopenharmony_ci#define RTXAGC_B_NSS2INDEX9_NSS2INDEX6 0xe4c 159262306a36Sopenharmony_ci 159362306a36Sopenharmony_ci#define RA_TXPWRTRAING 0xc54 159462306a36Sopenharmony_ci#define RB_TXPWRTRAING 0xe54 159562306a36Sopenharmony_ci 159662306a36Sopenharmony_ci#define RFPGA0_IQK 0xe28 159762306a36Sopenharmony_ci#define RTX_IQK_TONE_A 0xe30 159862306a36Sopenharmony_ci#define RRX_IQK_TONE_A 0xe34 159962306a36Sopenharmony_ci#define RTX_IQK_PI_A 0xe38 160062306a36Sopenharmony_ci#define RRX_IQK_PI_A 0xe3c 160162306a36Sopenharmony_ci 160262306a36Sopenharmony_ci#define RTX_IQK 0xe40 160362306a36Sopenharmony_ci#define RRX_IQK 0xe44 160462306a36Sopenharmony_ci#define RIQK_AGC_PTS 0xe48 160562306a36Sopenharmony_ci#define RIQK_AGC_RSP 0xe4c 160662306a36Sopenharmony_ci#define RTX_IQK_TONE_B 0xe50 160762306a36Sopenharmony_ci#define RRX_IQK_TONE_B 0xe54 160862306a36Sopenharmony_ci#define RTX_IQK_PI_B 0xe58 160962306a36Sopenharmony_ci#define RRX_IQK_PI_B 0xe5c 161062306a36Sopenharmony_ci#define RIQK_AGC_CONT 0xe60 161162306a36Sopenharmony_ci 161262306a36Sopenharmony_ci#define RBLUE_TOOTH 0xe6c 161362306a36Sopenharmony_ci#define RRX_WAIT_CCA 0xe70 161462306a36Sopenharmony_ci#define RTX_CCK_RFON 0xe74 161562306a36Sopenharmony_ci#define RTX_CCK_BBON 0xe78 161662306a36Sopenharmony_ci#define RTX_OFDM_RFON 0xe7c 161762306a36Sopenharmony_ci#define RTX_OFDM_BBON 0xe80 161862306a36Sopenharmony_ci#define RTX_TO_RX 0xe84 161962306a36Sopenharmony_ci#define RTX_TO_TX 0xe88 162062306a36Sopenharmony_ci#define RRX_CCK 0xe8c 162162306a36Sopenharmony_ci 162262306a36Sopenharmony_ci#define RTX_POWER_BEFORE_IQK_A 0xe94 162362306a36Sopenharmony_ci#define RTX_POWER_AFTER_IQK_A 0xe9c 162462306a36Sopenharmony_ci 162562306a36Sopenharmony_ci#define RRX_POWER_BEFORE_IQK_A 0xea0 162662306a36Sopenharmony_ci#define RRX_POWER_BEFORE_IQK_A_2 0xea4 162762306a36Sopenharmony_ci#define RRX_POWER_AFTER_IQK_A 0xea8 162862306a36Sopenharmony_ci#define RRX_POWER_AFTER_IQK_A_2 0xeac 162962306a36Sopenharmony_ci 163062306a36Sopenharmony_ci#define RTX_POWER_BEFORE_IQK_B 0xeb4 163162306a36Sopenharmony_ci#define RTX_POWER_AFTER_IQK_B 0xebc 163262306a36Sopenharmony_ci 163362306a36Sopenharmony_ci#define RRX_POER_BEFORE_IQK_B 0xec0 163462306a36Sopenharmony_ci#define RRX_POER_BEFORE_IQK_B_2 0xec4 163562306a36Sopenharmony_ci#define RRX_POWER_AFTER_IQK_B 0xec8 163662306a36Sopenharmony_ci#define RRX_POWER_AFTER_IQK_B_2 0xecc 163762306a36Sopenharmony_ci 163862306a36Sopenharmony_ci#define RRX_OFDM 0xed0 163962306a36Sopenharmony_ci#define RRX_WAIT_RIFS 0xed4 164062306a36Sopenharmony_ci#define RRX_TO_RX 0xed8 164162306a36Sopenharmony_ci#define RSTANDBY 0xedc 164262306a36Sopenharmony_ci#define RSLEEP 0xee0 164362306a36Sopenharmony_ci#define RPMPD_ANAEN 0xeec 164462306a36Sopenharmony_ci 164562306a36Sopenharmony_ci#define RZEBRA1_HSSIENABLE 0x0 164662306a36Sopenharmony_ci#define RZEBRA1_TRXENABLE1 0x1 164762306a36Sopenharmony_ci#define RZEBRA1_TRXENABLE2 0x2 164862306a36Sopenharmony_ci#define RZEBRA1_AGC 0x4 164962306a36Sopenharmony_ci#define RZEBRA1_CHARGEPUMP 0x5 165062306a36Sopenharmony_ci#define RZEBRA1_CHANNEL 0x7 165162306a36Sopenharmony_ci 165262306a36Sopenharmony_ci#define RZEBRA1_TXGAIN 0x8 165362306a36Sopenharmony_ci#define RZEBRA1_TXLPF 0x9 165462306a36Sopenharmony_ci#define RZEBRA1_RXLPF 0xb 165562306a36Sopenharmony_ci#define RZEBRA1_RXHPFCORNER 0xc 165662306a36Sopenharmony_ci 165762306a36Sopenharmony_ci#define RGLOBALCTRL 0 165862306a36Sopenharmony_ci#define RRTL8256_TXLPF 19 165962306a36Sopenharmony_ci#define RRTL8256_RXLPF 11 166062306a36Sopenharmony_ci#define RRTL8258_TXLPF 0x11 166162306a36Sopenharmony_ci#define RRTL8258_RXLPF 0x13 166262306a36Sopenharmony_ci#define RRTL8258_RSSILPF 0xa 166362306a36Sopenharmony_ci 166462306a36Sopenharmony_ci#define RF_AC 0x00 166562306a36Sopenharmony_ci 166662306a36Sopenharmony_ci#define RF_IQADJ_G1 0x01 166762306a36Sopenharmony_ci#define RF_IQADJ_G2 0x02 166862306a36Sopenharmony_ci#define RF_POW_TRSW 0x05 166962306a36Sopenharmony_ci 167062306a36Sopenharmony_ci#define RF_GAIN_RX 0x06 167162306a36Sopenharmony_ci#define RF_GAIN_TX 0x07 167262306a36Sopenharmony_ci 167362306a36Sopenharmony_ci#define RF_TXM_IDAC 0x08 167462306a36Sopenharmony_ci#define RF_BS_IQGEN 0x0F 167562306a36Sopenharmony_ci 167662306a36Sopenharmony_ci#define RF_MODE1 0x10 167762306a36Sopenharmony_ci#define RF_MODE2 0x11 167862306a36Sopenharmony_ci 167962306a36Sopenharmony_ci#define RF_RX_AGC_HP 0x12 168062306a36Sopenharmony_ci#define RF_TX_AGC 0x13 168162306a36Sopenharmony_ci#define RF_BIAS 0x14 168262306a36Sopenharmony_ci#define RF_IPA 0x15 168362306a36Sopenharmony_ci#define RF_POW_ABILITY 0x17 168462306a36Sopenharmony_ci#define RF_MODE_AG 0x18 168562306a36Sopenharmony_ci#define RRFCHANNEL 0x18 168662306a36Sopenharmony_ci#define RF_CHNLBW 0x18 168762306a36Sopenharmony_ci#define RF_TOP 0x19 168862306a36Sopenharmony_ci 168962306a36Sopenharmony_ci#define RF_RX_G1 0x1A 169062306a36Sopenharmony_ci#define RF_RX_G2 0x1B 169162306a36Sopenharmony_ci 169262306a36Sopenharmony_ci#define RF_RX_BB2 0x1C 169362306a36Sopenharmony_ci#define RF_RX_BB1 0x1D 169462306a36Sopenharmony_ci 169562306a36Sopenharmony_ci#define RF_RCK1 0x1E 169662306a36Sopenharmony_ci#define RF_RCK2 0x1F 169762306a36Sopenharmony_ci 169862306a36Sopenharmony_ci#define RF_TX_G1 0x20 169962306a36Sopenharmony_ci#define RF_TX_G2 0x21 170062306a36Sopenharmony_ci#define RF_TX_G3 0x22 170162306a36Sopenharmony_ci 170262306a36Sopenharmony_ci#define RF_TX_BB1 0x23 170362306a36Sopenharmony_ci#define RF_T_METER 0x24 170462306a36Sopenharmony_ci#define RF_T_METER_88E 0x42 170562306a36Sopenharmony_ci#define RF_T_METER_8812A 0x42 170662306a36Sopenharmony_ci 170762306a36Sopenharmony_ci#define RF_SYN_G1 0x25 170862306a36Sopenharmony_ci#define RF_SYN_G2 0x26 170962306a36Sopenharmony_ci#define RF_SYN_G3 0x27 171062306a36Sopenharmony_ci#define RF_SYN_G4 0x28 171162306a36Sopenharmony_ci#define RF_SYN_G5 0x29 171262306a36Sopenharmony_ci#define RF_SYN_G6 0x2A 171362306a36Sopenharmony_ci#define RF_SYN_G7 0x2B 171462306a36Sopenharmony_ci#define RF_SYN_G8 0x2C 171562306a36Sopenharmony_ci 171662306a36Sopenharmony_ci#define RF_RCK_OS 0x30 171762306a36Sopenharmony_ci#define RF_TXPA_G1 0x31 171862306a36Sopenharmony_ci#define RF_TXPA_G2 0x32 171962306a36Sopenharmony_ci#define RF_TXPA_G3 0x33 172062306a36Sopenharmony_ci 172162306a36Sopenharmony_ci#define RF_TX_BIAS_A 0x35 172262306a36Sopenharmony_ci#define RF_TX_BIAS_D 0x36 172362306a36Sopenharmony_ci#define RF_LOBF_9 0x38 172462306a36Sopenharmony_ci#define RF_RXRF_A3 0x3C 172562306a36Sopenharmony_ci#define RF_TRSW 0x3F 172662306a36Sopenharmony_ci 172762306a36Sopenharmony_ci#define RF_TXRF_A2 0x41 172862306a36Sopenharmony_ci#define RF_TXPA_G4 0x46 172962306a36Sopenharmony_ci#define RF_TXPA_A4 0x4B 173062306a36Sopenharmony_ci 173162306a36Sopenharmony_ci#define RF_APK 0x63 173262306a36Sopenharmony_ci 173362306a36Sopenharmony_ci#define RF_WE_LUT 0xEF 173462306a36Sopenharmony_ci 173562306a36Sopenharmony_ci#define BBBRESETB 0x100 173662306a36Sopenharmony_ci#define BGLOBALRESETB 0x200 173762306a36Sopenharmony_ci#define BOFDMTXSTART 0x4 173862306a36Sopenharmony_ci#define BCCKTXSTART 0x8 173962306a36Sopenharmony_ci#define BCRC32DEBUG 0x100 174062306a36Sopenharmony_ci#define BPMACLOOPBACK 0x10 174162306a36Sopenharmony_ci#define BTXLSIG 0xffffff 174262306a36Sopenharmony_ci#define BOFDMTXRATE 0xf 174362306a36Sopenharmony_ci#define BOFDMTXRESERVED 0x10 174462306a36Sopenharmony_ci#define BOFDMTXLENGTH 0x1ffe0 174562306a36Sopenharmony_ci#define BOFDMTXPARITY 0x20000 174662306a36Sopenharmony_ci#define BTXHTSIG1 0xffffff 174762306a36Sopenharmony_ci#define BTXHTMCSRATE 0x7f 174862306a36Sopenharmony_ci#define BTXHTBW 0x80 174962306a36Sopenharmony_ci#define BTXHTLENGTH 0xffff00 175062306a36Sopenharmony_ci#define BTXHTSIG2 0xffffff 175162306a36Sopenharmony_ci#define BTXHTSMOOTHING 0x1 175262306a36Sopenharmony_ci#define BTXHTSOUNDING 0x2 175362306a36Sopenharmony_ci#define BTXHTRESERVED 0x4 175462306a36Sopenharmony_ci#define BTXHTAGGREATION 0x8 175562306a36Sopenharmony_ci#define BTXHTSTBC 0x30 175662306a36Sopenharmony_ci#define BTXHTADVANCECODING 0x40 175762306a36Sopenharmony_ci#define BTXHTSHORTGI 0x80 175862306a36Sopenharmony_ci#define BTXHTNUMBERHT_LTF 0x300 175962306a36Sopenharmony_ci#define BTXHTCRC8 0x3fc00 176062306a36Sopenharmony_ci#define BCOUNTERRESET 0x10000 176162306a36Sopenharmony_ci#define BNUMOFOFDMTX 0xffff 176262306a36Sopenharmony_ci#define BNUMOFCCKTX 0xffff0000 176362306a36Sopenharmony_ci#define BTXIDLEINTERVAL 0xffff 176462306a36Sopenharmony_ci#define BOFDMSERVICE 0xffff0000 176562306a36Sopenharmony_ci#define BTXMACHEADER 0xffffffff 176662306a36Sopenharmony_ci#define BTXDATAINIT 0xff 176762306a36Sopenharmony_ci#define BTXHTMODE 0x100 176862306a36Sopenharmony_ci#define BTXDATATYPE 0x30000 176962306a36Sopenharmony_ci#define BTXRANDOMSEED 0xffffffff 177062306a36Sopenharmony_ci#define BCCKTXPREAMBLE 0x1 177162306a36Sopenharmony_ci#define BCCKTXSFD 0xffff0000 177262306a36Sopenharmony_ci#define BCCKTXSIG 0xff 177362306a36Sopenharmony_ci#define BCCKTXSERVICE 0xff00 177462306a36Sopenharmony_ci#define BCCKLENGTHEXT 0x8000 177562306a36Sopenharmony_ci#define BCCKTXLENGHT 0xffff0000 177662306a36Sopenharmony_ci#define BCCKTXCRC16 0xffff 177762306a36Sopenharmony_ci#define BCCKTXSTATUS 0x1 177862306a36Sopenharmony_ci#define BOFDMTXSTATUS 0x2 177962306a36Sopenharmony_ci#define IS_BB_REG_OFFSET_92S(__offset) \ 178062306a36Sopenharmony_ci ((__offset >= 0x800) && (__offset <= 0xfff)) 178162306a36Sopenharmony_ci 178262306a36Sopenharmony_ci#define BRFMOD 0x1 178362306a36Sopenharmony_ci#define BJAPANMODE 0x2 178462306a36Sopenharmony_ci#define BCCKTXSC 0x30 178562306a36Sopenharmony_ci/* Block & Path enable*/ 178662306a36Sopenharmony_ci#define ROFDMCCKEN 0x808 178762306a36Sopenharmony_ci#define BCCKEN 0x10000000 178862306a36Sopenharmony_ci#define BOFDMEN 0x20000000 178962306a36Sopenharmony_ci/* Rx antenna*/ 179062306a36Sopenharmony_ci#define RRXPATH 0x808 179162306a36Sopenharmony_ci#define BRXPATH 0xff 179262306a36Sopenharmony_ci/* Tx antenna*/ 179362306a36Sopenharmony_ci#define RTXPATH 0x80c 179462306a36Sopenharmony_ci#define BTXPATH 0x0fffffff 179562306a36Sopenharmony_ci/* for cck rx path selection*/ 179662306a36Sopenharmony_ci#define RCCK_RX 0xa04 179762306a36Sopenharmony_ci#define BCCK_RX 0x0c000000 179862306a36Sopenharmony_ci/* Use LSIG for VHT length*/ 179962306a36Sopenharmony_ci#define RVHTLEN_USE_LSIG 0x8c3 180062306a36Sopenharmony_ci 180162306a36Sopenharmony_ci#define BOFDMRXADCPHASE 0x10000 180262306a36Sopenharmony_ci#define BOFDMTXDACPHASE 0x40000 180362306a36Sopenharmony_ci#define BXATXAGC 0x3f 180462306a36Sopenharmony_ci 180562306a36Sopenharmony_ci#define BXBTXAGC 0xf00 180662306a36Sopenharmony_ci#define BXCTXAGC 0xf000 180762306a36Sopenharmony_ci#define BXDTXAGC 0xf0000 180862306a36Sopenharmony_ci 180962306a36Sopenharmony_ci#define BPASTART 0xf0000000 181062306a36Sopenharmony_ci#define BTRSTART 0x00f00000 181162306a36Sopenharmony_ci#define BRFSTART 0x0000f000 181262306a36Sopenharmony_ci#define BBBSTART 0x000000f0 181362306a36Sopenharmony_ci#define BBBCCKSTART 0x0000000f 181462306a36Sopenharmony_ci#define BPAEND 0xf 181562306a36Sopenharmony_ci#define BTREND 0x0f000000 181662306a36Sopenharmony_ci#define BRFEND 0x000f0000 181762306a36Sopenharmony_ci#define BCCAMASK 0x000000f0 181862306a36Sopenharmony_ci#define BR2RCCAMASK 0x00000f00 181962306a36Sopenharmony_ci#define BHSSI_R2TDELAY 0xf8000000 182062306a36Sopenharmony_ci#define BHSSI_T2RDELAY 0xf80000 182162306a36Sopenharmony_ci#define BCONTXHSSI 0x400 182262306a36Sopenharmony_ci#define BIGFROMCCK 0x200 182362306a36Sopenharmony_ci#define BAGCADDRESS 0x3f 182462306a36Sopenharmony_ci#define BRXHPTX 0x7000 182562306a36Sopenharmony_ci#define BRXHP2RX 0x38000 182662306a36Sopenharmony_ci#define BRXHPCCKINI 0xc0000 182762306a36Sopenharmony_ci#define BAGCTXCODE 0xc00000 182862306a36Sopenharmony_ci#define BAGCRXCODE 0x300000 182962306a36Sopenharmony_ci 183062306a36Sopenharmony_ci#define B3WIREDATALENGTH 0x800 183162306a36Sopenharmony_ci#define B3WIREADDREAALENGTH 0x400 183262306a36Sopenharmony_ci 183362306a36Sopenharmony_ci#define B3WIRERFPOWERDOWN 0x1 183462306a36Sopenharmony_ci#define B5GPAPEPOLARITY 0x40000000 183562306a36Sopenharmony_ci#define B2GPAPEPOLARITY 0x80000000 183662306a36Sopenharmony_ci#define BRFSW_TXDEFAULTANT 0x3 183762306a36Sopenharmony_ci#define BRFSW_TXOPTIONANT 0x30 183862306a36Sopenharmony_ci#define BRFSW_RXDEFAULTANT 0x300 183962306a36Sopenharmony_ci#define BRFSW_RXOPTIONANT 0x3000 184062306a36Sopenharmony_ci#define BRFSI_3WIREDATA 0x1 184162306a36Sopenharmony_ci#define BRFSI_3WIRECLOCK 0x2 184262306a36Sopenharmony_ci#define BRFSI_3WIRELOAD 0x4 184362306a36Sopenharmony_ci#define BRFSI_3WIRERW 0x8 184462306a36Sopenharmony_ci#define BRFSI_3WIRE 0xf 184562306a36Sopenharmony_ci 184662306a36Sopenharmony_ci#define BRFSI_RFENV 0x10 184762306a36Sopenharmony_ci 184862306a36Sopenharmony_ci#define BRFSI_TRSW 0x20 184962306a36Sopenharmony_ci#define BRFSI_TRSWB 0x40 185062306a36Sopenharmony_ci#define BRFSI_ANTSW 0x100 185162306a36Sopenharmony_ci#define BRFSI_ANTSWB 0x200 185262306a36Sopenharmony_ci#define BRFSI_PAPE 0x400 185362306a36Sopenharmony_ci#define BRFSI_PAPE5G 0x800 185462306a36Sopenharmony_ci#define BBANDSELECT 0x1 185562306a36Sopenharmony_ci#define BHTSIG2_GI 0x80 185662306a36Sopenharmony_ci#define BHTSIG2_SMOOTHING 0x01 185762306a36Sopenharmony_ci#define BHTSIG2_SOUNDING 0x02 185862306a36Sopenharmony_ci#define BHTSIG2_AGGREATON 0x08 185962306a36Sopenharmony_ci#define BHTSIG2_STBC 0x30 186062306a36Sopenharmony_ci#define BHTSIG2_ADVCODING 0x40 186162306a36Sopenharmony_ci#define BHTSIG2_NUMOFHTLTF 0x300 186262306a36Sopenharmony_ci#define BHTSIG2_CRC8 0x3fc 186362306a36Sopenharmony_ci#define BHTSIG1_MCS 0x7f 186462306a36Sopenharmony_ci#define BHTSIG1_BANDWIDTH 0x80 186562306a36Sopenharmony_ci#define BHTSIG1_HTLENGTH 0xffff 186662306a36Sopenharmony_ci#define BLSIG_RATE 0xf 186762306a36Sopenharmony_ci#define BLSIG_RESERVED 0x10 186862306a36Sopenharmony_ci#define BLSIG_LENGTH 0x1fffe 186962306a36Sopenharmony_ci#define BLSIG_PARITY 0x20 187062306a36Sopenharmony_ci#define BCCKRXPHASE 0x4 187162306a36Sopenharmony_ci 187262306a36Sopenharmony_ci#define BLSSIREADADDRESS 0x7f800000 187362306a36Sopenharmony_ci#define BLSSIREADEDGE 0x80000000 187462306a36Sopenharmony_ci 187562306a36Sopenharmony_ci#define BLSSIREADBACKDATA 0xfffff 187662306a36Sopenharmony_ci 187762306a36Sopenharmony_ci#define BLSSIREADOKFLAG 0x1000 187862306a36Sopenharmony_ci#define BCCKSAMPLERATE 0x8 187962306a36Sopenharmony_ci#define BREGULATOR0STANDBY 0x1 188062306a36Sopenharmony_ci#define BREGULATORPLLSTANDBY 0x2 188162306a36Sopenharmony_ci#define BREGULATOR1STANDBY 0x4 188262306a36Sopenharmony_ci#define BPLLPOWERUP 0x8 188362306a36Sopenharmony_ci#define BDPLLPOWERUP 0x10 188462306a36Sopenharmony_ci#define BDA10POWERUP 0x20 188562306a36Sopenharmony_ci#define BAD7POWERUP 0x200 188662306a36Sopenharmony_ci#define BDA6POWERUP 0x2000 188762306a36Sopenharmony_ci#define BXTALPOWERUP 0x4000 188862306a36Sopenharmony_ci#define B40MDCLKPOWERUP 0x8000 188962306a36Sopenharmony_ci#define BDA6DEBUGMODE 0x20000 189062306a36Sopenharmony_ci#define BDA6SWING 0x380000 189162306a36Sopenharmony_ci 189262306a36Sopenharmony_ci#define BADCLKPHASE 0x4000000 189362306a36Sopenharmony_ci#define B80MCLKDELAY 0x18000000 189462306a36Sopenharmony_ci#define BAFEWATCHDOGENABLE 0x20000000 189562306a36Sopenharmony_ci 189662306a36Sopenharmony_ci#define BXTALCAP01 0xc0000000 189762306a36Sopenharmony_ci#define BXTALCAP23 0x3 189862306a36Sopenharmony_ci#define BXTALCAP92X 0x0f000000 189962306a36Sopenharmony_ci#define BXTALCAP 0x0f000000 190062306a36Sopenharmony_ci 190162306a36Sopenharmony_ci#define BINTDIFCLKENABLE 0x400 190262306a36Sopenharmony_ci#define BEXTSIGCLKENABLE 0x800 190362306a36Sopenharmony_ci#define BBANDGAP_MBIAS_POWERUP 0x10000 190462306a36Sopenharmony_ci#define BAD11SH_GAIN 0xc0000 190562306a36Sopenharmony_ci#define BAD11NPUT_RANGE 0x700000 190662306a36Sopenharmony_ci#define BAD110P_CURRENT 0x3800000 190762306a36Sopenharmony_ci#define BLPATH_LOOPBACK 0x4000000 190862306a36Sopenharmony_ci#define BQPATH_LOOPBACK 0x8000000 190962306a36Sopenharmony_ci#define BAFE_LOOPBACK 0x10000000 191062306a36Sopenharmony_ci#define BDA10_SWING 0x7e0 191162306a36Sopenharmony_ci#define BDA10_REVERSE 0x800 191262306a36Sopenharmony_ci#define BDA_CLK_SOURCE 0x1000 191362306a36Sopenharmony_ci#define BDA7INPUT_RANGE 0x6000 191462306a36Sopenharmony_ci#define BDA7_GAIN 0x38000 191562306a36Sopenharmony_ci#define BDA7OUTPUT_CM_MODE 0x40000 191662306a36Sopenharmony_ci#define BDA7INPUT_CM_MODE 0x380000 191762306a36Sopenharmony_ci#define BDA7CURRENT 0xc00000 191862306a36Sopenharmony_ci#define BREGULATOR_ADJUST 0x7000000 191962306a36Sopenharmony_ci#define BAD11POWERUP_ATTX 0x1 192062306a36Sopenharmony_ci#define BDA10PS_ATTX 0x10 192162306a36Sopenharmony_ci#define BAD11POWERUP_ATRX 0x100 192262306a36Sopenharmony_ci#define BDA10PS_ATRX 0x1000 192362306a36Sopenharmony_ci#define BCCKRX_AGC_FORMAT 0x200 192462306a36Sopenharmony_ci#define BPSDFFT_SAMPLE_POINT 0xc000 192562306a36Sopenharmony_ci#define BPSD_AVERAGE_NUM 0x3000 192662306a36Sopenharmony_ci#define BIQPATH_CONTROL 0xc00 192762306a36Sopenharmony_ci#define BPSD_FREQ 0x3ff 192862306a36Sopenharmony_ci#define BPSD_ANTENNA_PATH 0x30 192962306a36Sopenharmony_ci#define BPSD_IQ_SWITCH 0x40 193062306a36Sopenharmony_ci#define BPSD_RX_TRIGGER 0x400000 193162306a36Sopenharmony_ci#define BPSD_TX_TRIGGER 0x80000000 193262306a36Sopenharmony_ci#define BPSD_SINE_TONE_SCALE 0x7f000000 193362306a36Sopenharmony_ci#define BPSD_REPORT 0xffff 193462306a36Sopenharmony_ci 193562306a36Sopenharmony_ci#define BOFDM_TXSC 0x30000000 193662306a36Sopenharmony_ci#define BCCK_TXON 0x1 193762306a36Sopenharmony_ci#define BOFDM_TXON 0x2 193862306a36Sopenharmony_ci#define BDEBUG_PAGE 0xfff 193962306a36Sopenharmony_ci#define BDEBUG_ITEM 0xff 194062306a36Sopenharmony_ci#define BANTL 0x10 194162306a36Sopenharmony_ci#define BANT_NONHT 0x100 194262306a36Sopenharmony_ci#define BANT_HT1 0x1000 194362306a36Sopenharmony_ci#define BANT_HT2 0x10000 194462306a36Sopenharmony_ci#define BANT_HT1S1 0x100000 194562306a36Sopenharmony_ci#define BANT_NONHTS1 0x1000000 194662306a36Sopenharmony_ci 194762306a36Sopenharmony_ci#define BCCK_BBMODE 0x3 194862306a36Sopenharmony_ci#define BCCK_TXPOWERSAVING 0x80 194962306a36Sopenharmony_ci#define BCCK_RXPOWERSAVING 0x40 195062306a36Sopenharmony_ci 195162306a36Sopenharmony_ci#define BCCK_SIDEBAND 0x10 195262306a36Sopenharmony_ci 195362306a36Sopenharmony_ci#define BCCK_SCRAMBLE 0x8 195462306a36Sopenharmony_ci#define BCCK_ANTDIVERSITY 0x8000 195562306a36Sopenharmony_ci#define BCCK_CARRIER_RECOVERY 0x4000 195662306a36Sopenharmony_ci#define BCCK_TXRATE 0x3000 195762306a36Sopenharmony_ci#define BCCK_DCCANCEL 0x0800 195862306a36Sopenharmony_ci#define BCCK_ISICANCEL 0x0400 195962306a36Sopenharmony_ci#define BCCK_MATCH_FILTER 0x0200 196062306a36Sopenharmony_ci#define BCCK_EQUALIZER 0x0100 196162306a36Sopenharmony_ci#define BCCK_PREAMBLE_DETECT 0x800000 196262306a36Sopenharmony_ci#define BCCK_FAST_FALSECCA 0x400000 196362306a36Sopenharmony_ci#define BCCK_CH_ESTSTART 0x300000 196462306a36Sopenharmony_ci#define BCCK_CCA_COUNT 0x080000 196562306a36Sopenharmony_ci#define BCCK_CS_LIM 0x070000 196662306a36Sopenharmony_ci#define BCCK_BIST_MODE 0x80000000 196762306a36Sopenharmony_ci#define BCCK_CCAMASK 0x40000000 196862306a36Sopenharmony_ci#define BCCK_TX_DAC_PHASE 0x4 196962306a36Sopenharmony_ci#define BCCK_RX_ADC_PHASE 0x20000000 197062306a36Sopenharmony_ci#define BCCKR_CP_MODE 0x0100 197162306a36Sopenharmony_ci#define BCCK_TXDC_OFFSET 0xf0 197262306a36Sopenharmony_ci#define BCCK_RXDC_OFFSET 0xf 197362306a36Sopenharmony_ci#define BCCK_CCA_MODE 0xc000 197462306a36Sopenharmony_ci#define BCCK_FALSECS_LIM 0x3f00 197562306a36Sopenharmony_ci#define BCCK_CS_RATIO 0xc00000 197662306a36Sopenharmony_ci#define BCCK_CORGBIT_SEL 0x300000 197762306a36Sopenharmony_ci#define BCCK_PD_LIM 0x0f0000 197862306a36Sopenharmony_ci#define BCCK_NEWCCA 0x80000000 197962306a36Sopenharmony_ci#define BCCK_RXHP_OF_IG 0x8000 198062306a36Sopenharmony_ci#define BCCK_RXIG 0x7f00 198162306a36Sopenharmony_ci#define BCCK_LNA_POLARITY 0x800000 198262306a36Sopenharmony_ci#define BCCK_RX1ST_BAIN 0x7f0000 198362306a36Sopenharmony_ci#define BCCK_RF_EXTEND 0x20000000 198462306a36Sopenharmony_ci#define BCCK_RXAGC_SATLEVEL 0x1f000000 198562306a36Sopenharmony_ci#define BCCK_RXAGC_SATCOUNT 0xe0 198662306a36Sopenharmony_ci#define BCCKRXRFSETTLE 0x1f 198762306a36Sopenharmony_ci#define BCCK_FIXED_RXAGC 0x8000 198862306a36Sopenharmony_ci#define BCCK_ANTENNA_POLARITY 0x2000 198962306a36Sopenharmony_ci#define BCCK_TXFILTER_TYPE 0x0c00 199062306a36Sopenharmony_ci#define BCCK_RXAGC_REPORTTYPE 0x0300 199162306a36Sopenharmony_ci#define BCCK_RXDAGC_EN 0x80000000 199262306a36Sopenharmony_ci#define BCCK_RXDAGC_PERIOD 0x20000000 199362306a36Sopenharmony_ci#define BCCK_RXDAGC_SATLEVEL 0x1f000000 199462306a36Sopenharmony_ci#define BCCK_TIMING_RECOVERY 0x800000 199562306a36Sopenharmony_ci#define BCCK_TXC0 0x3f0000 199662306a36Sopenharmony_ci#define BCCK_TXC1 0x3f000000 199762306a36Sopenharmony_ci#define BCCK_TXC2 0x3f 199862306a36Sopenharmony_ci#define BCCK_TXC3 0x3f00 199962306a36Sopenharmony_ci#define BCCK_TXC4 0x3f0000 200062306a36Sopenharmony_ci#define BCCK_TXC5 0x3f000000 200162306a36Sopenharmony_ci#define BCCK_TXC6 0x3f 200262306a36Sopenharmony_ci#define BCCK_TXC7 0x3f00 200362306a36Sopenharmony_ci#define BCCK_DEBUGPORT 0xff0000 200462306a36Sopenharmony_ci#define BCCK_DAC_DEBUG 0x0f000000 200562306a36Sopenharmony_ci#define BCCK_FALSEALARM_ENABLE 0x8000 200662306a36Sopenharmony_ci#define BCCK_FALSEALARM_READ 0x4000 200762306a36Sopenharmony_ci#define BCCK_TRSSI 0x7f 200862306a36Sopenharmony_ci#define BCCK_RXAGC_REPORT 0xfe 200962306a36Sopenharmony_ci#define BCCK_RXREPORT_ANTSEL 0x80000000 201062306a36Sopenharmony_ci#define BCCK_RXREPORT_MFOFF 0x40000000 201162306a36Sopenharmony_ci#define BCCK_RXREPORT_SQLOSS 0x20000000 201262306a36Sopenharmony_ci#define BCCK_RXREPORT_PKTLOSS 0x10000000 201362306a36Sopenharmony_ci#define BCCK_RXREPORT_LOCKEDBIT 0x08000000 201462306a36Sopenharmony_ci#define BCCK_RXREPORT_RATEERROR 0x04000000 201562306a36Sopenharmony_ci#define BCCK_RXREPORT_RXRATE 0x03000000 201662306a36Sopenharmony_ci#define BCCK_RXFA_COUNTER_LOWER 0xff 201762306a36Sopenharmony_ci#define BCCK_RXFA_COUNTER_UPPER 0xff000000 201862306a36Sopenharmony_ci#define BCCK_RXHPAGC_START 0xe000 201962306a36Sopenharmony_ci#define BCCK_RXHPAGC_FINAL 0x1c00 202062306a36Sopenharmony_ci#define BCCK_RXFALSEALARM_ENABLE 0x8000 202162306a36Sopenharmony_ci#define BCCK_FACOUNTER_FREEZE 0x4000 202262306a36Sopenharmony_ci#define BCCK_TXPATH_SEL 0x10000000 202362306a36Sopenharmony_ci#define BCCK_DEFAULT_RXPATH 0xc000000 202462306a36Sopenharmony_ci#define BCCK_OPTION_RXPATH 0x3000000 202562306a36Sopenharmony_ci 202662306a36Sopenharmony_ci#define BNUM_OFSTF 0x3 202762306a36Sopenharmony_ci#define BSHIFT_L 0xc0 202862306a36Sopenharmony_ci#define BGI_TH 0xc 202962306a36Sopenharmony_ci#define BRXPATH_A 0x1 203062306a36Sopenharmony_ci#define BRXPATH_B 0x2 203162306a36Sopenharmony_ci#define BRXPATH_C 0x4 203262306a36Sopenharmony_ci#define BRXPATH_D 0x8 203362306a36Sopenharmony_ci#define BTXPATH_A 0x1 203462306a36Sopenharmony_ci#define BTXPATH_B 0x2 203562306a36Sopenharmony_ci#define BTXPATH_C 0x4 203662306a36Sopenharmony_ci#define BTXPATH_D 0x8 203762306a36Sopenharmony_ci#define BTRSSI_FREQ 0x200 203862306a36Sopenharmony_ci#define BADC_BACKOFF 0x3000 203962306a36Sopenharmony_ci#define BDFIR_BACKOFF 0xc000 204062306a36Sopenharmony_ci#define BTRSSI_LATCH_PHASE 0x10000 204162306a36Sopenharmony_ci#define BRX_LDC_OFFSET 0xff 204262306a36Sopenharmony_ci#define BRX_QDC_OFFSET 0xff00 204362306a36Sopenharmony_ci#define BRX_DFIR_MODE 0x1800000 204462306a36Sopenharmony_ci#define BRX_DCNF_TYPE 0xe000000 204562306a36Sopenharmony_ci#define BRXIQIMB_A 0x3ff 204662306a36Sopenharmony_ci#define BRXIQIMB_B 0xfc00 204762306a36Sopenharmony_ci#define BRXIQIMB_C 0x3f0000 204862306a36Sopenharmony_ci#define BRXIQIMB_D 0xffc00000 204962306a36Sopenharmony_ci#define BDC_DC_NOTCH 0x60000 205062306a36Sopenharmony_ci#define BRXNB_NOTCH 0x1f000000 205162306a36Sopenharmony_ci#define BPD_TH 0xf 205262306a36Sopenharmony_ci#define BPD_TH_OPT2 0xc000 205362306a36Sopenharmony_ci#define BPWED_TH 0x700 205462306a36Sopenharmony_ci#define BIFMF_WIN_L 0x800 205562306a36Sopenharmony_ci#define BPD_OPTION 0x1000 205662306a36Sopenharmony_ci#define BMF_WIN_L 0xe000 205762306a36Sopenharmony_ci#define BBW_SEARCH_L 0x30000 205862306a36Sopenharmony_ci#define BWIN_ENH_L 0xc0000 205962306a36Sopenharmony_ci#define BBW_TH 0x700000 206062306a36Sopenharmony_ci#define BED_TH2 0x3800000 206162306a36Sopenharmony_ci#define BBW_OPTION 0x4000000 206262306a36Sopenharmony_ci#define BRADIO_TH 0x18000000 206362306a36Sopenharmony_ci#define BWINDOW_L 0xe0000000 206462306a36Sopenharmony_ci#define BSBD_OPTION 0x1 206562306a36Sopenharmony_ci#define BFRAME_TH 0x1c 206662306a36Sopenharmony_ci#define BFS_OPTION 0x60 206762306a36Sopenharmony_ci#define BDC_SLOPE_CHECK 0x80 206862306a36Sopenharmony_ci#define BFGUARD_COUNTER_DC_L 0xe00 206962306a36Sopenharmony_ci#define BFRAME_WEIGHT_SHORT 0x7000 207062306a36Sopenharmony_ci#define BSUB_TUNE 0xe00000 207162306a36Sopenharmony_ci#define BFRAME_DC_LENGTH 0xe000000 207262306a36Sopenharmony_ci#define BSBD_START_OFFSET 0x30000000 207362306a36Sopenharmony_ci#define BFRAME_TH_2 0x7 207462306a36Sopenharmony_ci#define BFRAME_GI2_TH 0x38 207562306a36Sopenharmony_ci#define BGI2_SYNC_EN 0x40 207662306a36Sopenharmony_ci#define BSARCH_SHORT_EARLY 0x300 207762306a36Sopenharmony_ci#define BSARCH_SHORT_LATE 0xc00 207862306a36Sopenharmony_ci#define BSARCH_GI2_LATE 0x70000 207962306a36Sopenharmony_ci#define BCFOANTSUM 0x1 208062306a36Sopenharmony_ci#define BCFOACC 0x2 208162306a36Sopenharmony_ci#define BCFOSTARTOFFSET 0xc 208262306a36Sopenharmony_ci#define BCFOLOOPBACK 0x70 208362306a36Sopenharmony_ci#define BCFOSUMWEIGHT 0x80 208462306a36Sopenharmony_ci#define BDAGCENABLE 0x10000 208562306a36Sopenharmony_ci#define BTXIQIMB_A 0x3ff 208662306a36Sopenharmony_ci#define BTXIQIMB_b 0xfc00 208762306a36Sopenharmony_ci#define BTXIQIMB_C 0x3f0000 208862306a36Sopenharmony_ci#define BTXIQIMB_D 0xffc00000 208962306a36Sopenharmony_ci#define BTXIDCOFFSET 0xff 209062306a36Sopenharmony_ci#define BTXIQDCOFFSET 0xff00 209162306a36Sopenharmony_ci#define BTXDFIRMODE 0x10000 209262306a36Sopenharmony_ci#define BTXPESUDO_NOISEON 0x4000000 209362306a36Sopenharmony_ci#define BTXPESUDO_NOISE_A 0xff 209462306a36Sopenharmony_ci#define BTXPESUDO_NOISE_B 0xff00 209562306a36Sopenharmony_ci#define BTXPESUDO_NOISE_C 0xff0000 209662306a36Sopenharmony_ci#define BTXPESUDO_NOISE_D 0xff000000 209762306a36Sopenharmony_ci#define BCCA_DROPOPTION 0x20000 209862306a36Sopenharmony_ci#define BCCA_DROPTHRES 0xfff00000 209962306a36Sopenharmony_ci#define BEDCCA_H 0xf 210062306a36Sopenharmony_ci#define BEDCCA_L 0xf0 210162306a36Sopenharmony_ci#define BLAMBDA_ED 0x300 210262306a36Sopenharmony_ci#define BRX_INITIALGAIN 0x7f 210362306a36Sopenharmony_ci#define BRX_ANTDIV_EN 0x80 210462306a36Sopenharmony_ci#define BRX_AGC_ADDRESS_FOR_LNA 0x7f00 210562306a36Sopenharmony_ci#define BRX_HIGHPOWER_FLOW 0x8000 210662306a36Sopenharmony_ci#define BRX_AGC_FREEZE_THRES 0xc0000 210762306a36Sopenharmony_ci#define BRX_FREEZESTEP_AGC1 0x300000 210862306a36Sopenharmony_ci#define BRX_FREEZESTEP_AGC2 0xc00000 210962306a36Sopenharmony_ci#define BRX_FREEZESTEP_AGC3 0x3000000 211062306a36Sopenharmony_ci#define BRX_FREEZESTEP_AGC0 0xc000000 211162306a36Sopenharmony_ci#define BRXRSSI_CMP_EN 0x10000000 211262306a36Sopenharmony_ci#define BRXQUICK_AGCEN 0x20000000 211362306a36Sopenharmony_ci#define BRXAGC_FREEZE_THRES_MODE 0x40000000 211462306a36Sopenharmony_ci#define BRX_OVERFLOW_CHECKTYPE 0x80000000 211562306a36Sopenharmony_ci#define BRX_AGCSHIFT 0x7f 211662306a36Sopenharmony_ci#define BTRSW_TRI_ONLY 0x80 211762306a36Sopenharmony_ci#define BPOWER_THRES 0x300 211862306a36Sopenharmony_ci#define BRXAGC_EN 0x1 211962306a36Sopenharmony_ci#define BRXAGC_TOGETHER_EN 0x2 212062306a36Sopenharmony_ci#define BRXAGC_MIN 0x4 212162306a36Sopenharmony_ci#define BRXHP_INI 0x7 212262306a36Sopenharmony_ci#define BRXHP_TRLNA 0x70 212362306a36Sopenharmony_ci#define BRXHP_RSSI 0x700 212462306a36Sopenharmony_ci#define BRXHP_BBP1 0x7000 212562306a36Sopenharmony_ci#define BRXHP_BBP2 0x70000 212662306a36Sopenharmony_ci#define BRXHP_BBP3 0x700000 212762306a36Sopenharmony_ci#define BRSSI_H 0x7f0000 212862306a36Sopenharmony_ci#define BRSSI_GEN 0x7f000000 212962306a36Sopenharmony_ci#define BRXSETTLE_TRSW 0x7 213062306a36Sopenharmony_ci#define BRXSETTLE_LNA 0x38 213162306a36Sopenharmony_ci#define BRXSETTLE_RSSI 0x1c0 213262306a36Sopenharmony_ci#define BRXSETTLE_BBP 0xe00 213362306a36Sopenharmony_ci#define BRXSETTLE_RXHP 0x7000 213462306a36Sopenharmony_ci#define BRXSETTLE_ANTSW_RSSI 0x38000 213562306a36Sopenharmony_ci#define BRXSETTLE_ANTSW 0xc0000 213662306a36Sopenharmony_ci#define BRXPROCESS_TIME_DAGC 0x300000 213762306a36Sopenharmony_ci#define BRXSETTLE_HSSI 0x400000 213862306a36Sopenharmony_ci#define BRXPROCESS_TIME_BBPPW 0x800000 213962306a36Sopenharmony_ci#define BRXANTENNA_POWER_SHIFT 0x3000000 214062306a36Sopenharmony_ci#define BRSSI_TABLE_SELECT 0xc000000 214162306a36Sopenharmony_ci#define BRXHP_FINAL 0x7000000 214262306a36Sopenharmony_ci#define BRXHPSETTLE_BBP 0x7 214362306a36Sopenharmony_ci#define BRXHTSETTLE_HSSI 0x8 214462306a36Sopenharmony_ci#define BRXHTSETTLE_RXHP 0x70 214562306a36Sopenharmony_ci#define BRXHTSETTLE_BBPPW 0x80 214662306a36Sopenharmony_ci#define BRXHTSETTLE_IDLE 0x300 214762306a36Sopenharmony_ci#define BRXHTSETTLE_RESERVED 0x1c00 214862306a36Sopenharmony_ci#define BRXHT_RXHP_EN 0x8000 214962306a36Sopenharmony_ci#define BRXAGC_FREEZE_THRES 0x30000 215062306a36Sopenharmony_ci#define BRXAGC_TOGETHEREN 0x40000 215162306a36Sopenharmony_ci#define BRXHTAGC_MIN 0x80000 215262306a36Sopenharmony_ci#define BRXHTAGC_EN 0x100000 215362306a36Sopenharmony_ci#define BRXHTDAGC_EN 0x200000 215462306a36Sopenharmony_ci#define BRXHT_RXHP_BBP 0x1c00000 215562306a36Sopenharmony_ci#define BRXHT_RXHP_FINAL 0xe0000000 215662306a36Sopenharmony_ci#define BRXPW_RADIO_TH 0x3 215762306a36Sopenharmony_ci#define BRXPW_RADIO_EN 0x4 215862306a36Sopenharmony_ci#define BRXMF_HOLD 0x3800 215962306a36Sopenharmony_ci#define BRXPD_DELAY_TH1 0x38 216062306a36Sopenharmony_ci#define BRXPD_DELAY_TH2 0x1c0 216162306a36Sopenharmony_ci#define BRXPD_DC_COUNT_MAX 0x600 216262306a36Sopenharmony_ci#define BRXPD_DELAY_TH 0x8000 216362306a36Sopenharmony_ci#define BRXPROCESS_DELAY 0xf0000 216462306a36Sopenharmony_ci#define BRXSEARCHRANGE_GI2_EARLY 0x700000 216562306a36Sopenharmony_ci#define BRXFRAME_FUARD_COUNTER_L 0x3800000 216662306a36Sopenharmony_ci#define BRXSGI_GUARD_L 0xc000000 216762306a36Sopenharmony_ci#define BRXSGI_SEARCH_L 0x30000000 216862306a36Sopenharmony_ci#define BRXSGI_TH 0xc0000000 216962306a36Sopenharmony_ci#define BDFSCNT0 0xff 217062306a36Sopenharmony_ci#define BDFSCNT1 0xff00 217162306a36Sopenharmony_ci#define BDFSFLAG 0xf0000 217262306a36Sopenharmony_ci#define BMF_WEIGHT_SUM 0x300000 217362306a36Sopenharmony_ci#define BMINIDX_TH 0x7f000000 217462306a36Sopenharmony_ci#define BDAFORMAT 0x40000 217562306a36Sopenharmony_ci#define BTXCH_EMU_ENABLE 0x01000000 217662306a36Sopenharmony_ci#define BTRSW_ISOLATION_A 0x7f 217762306a36Sopenharmony_ci#define BTRSW_ISOLATION_B 0x7f00 217862306a36Sopenharmony_ci#define BTRSW_ISOLATION_C 0x7f0000 217962306a36Sopenharmony_ci#define BTRSW_ISOLATION_D 0x7f000000 218062306a36Sopenharmony_ci#define BEXT_LNA_GAIN 0x7c00 218162306a36Sopenharmony_ci 218262306a36Sopenharmony_ci#define BSTBC_EN 0x4 218362306a36Sopenharmony_ci#define BANTENNA_MAPPING 0x10 218462306a36Sopenharmony_ci#define BNSS 0x20 218562306a36Sopenharmony_ci#define BCFO_ANTSUM_ID 0x200 218662306a36Sopenharmony_ci#define BPHY_COUNTER_RESET 0x8000000 218762306a36Sopenharmony_ci#define BCFO_REPORT_GET 0x4000000 218862306a36Sopenharmony_ci#define BOFDM_CONTINUE_TX 0x10000000 218962306a36Sopenharmony_ci#define BOFDM_SINGLE_CARRIER 0x20000000 219062306a36Sopenharmony_ci#define BOFDM_SINGLE_TONE 0x40000000 219162306a36Sopenharmony_ci#define BHT_DETECT 0x100 219262306a36Sopenharmony_ci#define BCFOEN 0x10000 219362306a36Sopenharmony_ci#define BCFOVALUE 0xfff00000 219462306a36Sopenharmony_ci#define BSIGTONE_RE 0x3f 219562306a36Sopenharmony_ci#define BSIGTONE_IM 0x7f00 219662306a36Sopenharmony_ci#define BCOUNTER_CCA 0xffff 219762306a36Sopenharmony_ci#define BCOUNTER_PARITYFAIL 0xffff0000 219862306a36Sopenharmony_ci#define BCOUNTER_RATEILLEGAL 0xffff 219962306a36Sopenharmony_ci#define BCOUNTER_CRC8FAIL 0xffff0000 220062306a36Sopenharmony_ci#define BCOUNTER_MCSNOSUPPORT 0xffff 220162306a36Sopenharmony_ci#define BCOUNTER_FASTSYNC 0xffff 220262306a36Sopenharmony_ci#define BSHORTCFO 0xfff 220362306a36Sopenharmony_ci#define BSHORTCFOT_LENGTH 12 220462306a36Sopenharmony_ci#define BSHORTCFOF_LENGTH 11 220562306a36Sopenharmony_ci#define BLONGCFO 0x7ff 220662306a36Sopenharmony_ci#define BLONGCFOT_LENGTH 11 220762306a36Sopenharmony_ci#define BLONGCFOF_LENGTH 11 220862306a36Sopenharmony_ci#define BTAILCFO 0x1fff 220962306a36Sopenharmony_ci#define BTAILCFOT_LENGTH 13 221062306a36Sopenharmony_ci#define BTAILCFOF_LENGTH 12 221162306a36Sopenharmony_ci#define BNOISE_EN_PWDB 0xffff 221262306a36Sopenharmony_ci#define BCC_POWER_DB 0xffff0000 221362306a36Sopenharmony_ci#define BMOISE_PWDB 0xffff 221462306a36Sopenharmony_ci#define BPOWERMEAST_LENGTH 10 221562306a36Sopenharmony_ci#define BPOWERMEASF_LENGTH 3 221662306a36Sopenharmony_ci#define BRX_HT_BW 0x1 221762306a36Sopenharmony_ci#define BRXSC 0x6 221862306a36Sopenharmony_ci#define BRX_HT 0x8 221962306a36Sopenharmony_ci#define BNB_INTF_DET_ON 0x1 222062306a36Sopenharmony_ci#define BINTF_WIN_LEN_CFG 0x30 222162306a36Sopenharmony_ci#define BNB_INTF_TH_CFG 0x1c0 222262306a36Sopenharmony_ci#define BRFGAIN 0x3f 222362306a36Sopenharmony_ci#define BTABLESEL 0x40 222462306a36Sopenharmony_ci#define BTRSW 0x80 222562306a36Sopenharmony_ci#define BRXSNR_A 0xff 222662306a36Sopenharmony_ci#define BRXSNR_B 0xff00 222762306a36Sopenharmony_ci#define BRXSNR_C 0xff0000 222862306a36Sopenharmony_ci#define BRXSNR_D 0xff000000 222962306a36Sopenharmony_ci#define BSNR_EVMT_LENGTH 8 223062306a36Sopenharmony_ci#define BSNR_EVMF_LENGTH 1 223162306a36Sopenharmony_ci#define BCSI1ST 0xff 223262306a36Sopenharmony_ci#define BCSI2ND 0xff00 223362306a36Sopenharmony_ci#define BRXEVM1ST 0xff0000 223462306a36Sopenharmony_ci#define BRXEVM2ND 0xff000000 223562306a36Sopenharmony_ci#define BSIGEVM 0xff 223662306a36Sopenharmony_ci#define BPWDB 0xff00 223762306a36Sopenharmony_ci#define BSGIEN 0x10000 223862306a36Sopenharmony_ci 223962306a36Sopenharmony_ci#define BSFACTOR_QMA1 0xf 224062306a36Sopenharmony_ci#define BSFACTOR_QMA2 0xf0 224162306a36Sopenharmony_ci#define BSFACTOR_QMA3 0xf00 224262306a36Sopenharmony_ci#define BSFACTOR_QMA4 0xf000 224362306a36Sopenharmony_ci#define BSFACTOR_QMA5 0xf0000 224462306a36Sopenharmony_ci#define BSFACTOR_QMA6 0xf0000 224562306a36Sopenharmony_ci#define BSFACTOR_QMA7 0xf00000 224662306a36Sopenharmony_ci#define BSFACTOR_QMA8 0xf000000 224762306a36Sopenharmony_ci#define BSFACTOR_QMA9 0xf0000000 224862306a36Sopenharmony_ci#define BCSI_SCHEME 0x100000 224962306a36Sopenharmony_ci 225062306a36Sopenharmony_ci#define BNOISE_LVL_TOP_SET 0x3 225162306a36Sopenharmony_ci#define BCHSMOOTH 0x4 225262306a36Sopenharmony_ci#define BCHSMOOTH_CFG1 0x38 225362306a36Sopenharmony_ci#define BCHSMOOTH_CFG2 0x1c0 225462306a36Sopenharmony_ci#define BCHSMOOTH_CFG3 0xe00 225562306a36Sopenharmony_ci#define BCHSMOOTH_CFG4 0x7000 225662306a36Sopenharmony_ci#define BMRCMODE 0x800000 225762306a36Sopenharmony_ci#define BTHEVMCFG 0x7000000 225862306a36Sopenharmony_ci 225962306a36Sopenharmony_ci#define BLOOP_FIT_TYPE 0x1 226062306a36Sopenharmony_ci#define BUPD_CFO 0x40 226162306a36Sopenharmony_ci#define BUPD_CFO_OFFDATA 0x80 226262306a36Sopenharmony_ci#define BADV_UPD_CFO 0x100 226362306a36Sopenharmony_ci#define BADV_TIME_CTRL 0x800 226462306a36Sopenharmony_ci#define BUPD_CLKO 0x1000 226562306a36Sopenharmony_ci#define BFC 0x6000 226662306a36Sopenharmony_ci#define BTRACKING_MODE 0x8000 226762306a36Sopenharmony_ci#define BPHCMP_ENABLE 0x10000 226862306a36Sopenharmony_ci#define BUPD_CLKO_LTF 0x20000 226962306a36Sopenharmony_ci#define BCOM_CH_CFO 0x40000 227062306a36Sopenharmony_ci#define BCSI_ESTI_MODE 0x80000 227162306a36Sopenharmony_ci#define BADV_UPD_EQZ 0x100000 227262306a36Sopenharmony_ci#define BUCHCFG 0x7000000 227362306a36Sopenharmony_ci#define BUPDEQZ 0x8000000 227462306a36Sopenharmony_ci 227562306a36Sopenharmony_ci#define BRX_PESUDO_NOISE_ON 0x20000000 227662306a36Sopenharmony_ci#define BRX_PESUDO_NOISE_A 0xff 227762306a36Sopenharmony_ci#define BRX_PESUDO_NOISE_B 0xff00 227862306a36Sopenharmony_ci#define BRX_PESUDO_NOISE_C 0xff0000 227962306a36Sopenharmony_ci#define BRX_PESUDO_NOISE_D 0xff000000 228062306a36Sopenharmony_ci#define BRX_PESUDO_NOISESTATE_A 0xffff 228162306a36Sopenharmony_ci#define BRX_PESUDO_NOISESTATE_B 0xffff0000 228262306a36Sopenharmony_ci#define BRX_PESUDO_NOISESTATE_C 0xffff 228362306a36Sopenharmony_ci#define BRX_PESUDO_NOISESTATE_D 0xffff0000 228462306a36Sopenharmony_ci 228562306a36Sopenharmony_ci#define BZEBRA1_HSSIENABLE 0x8 228662306a36Sopenharmony_ci#define BZEBRA1_TRXCONTROL 0xc00 228762306a36Sopenharmony_ci#define BZEBRA1_TRXGAINSETTING 0x07f 228862306a36Sopenharmony_ci#define BZEBRA1_RXCOUNTER 0xc00 228962306a36Sopenharmony_ci#define BZEBRA1_TXCHANGEPUMP 0x38 229062306a36Sopenharmony_ci#define BZEBRA1_RXCHANGEPUMP 0x7 229162306a36Sopenharmony_ci#define BZEBRA1_CHANNEL_NUM 0xf80 229262306a36Sopenharmony_ci#define BZEBRA1_TXLPFBW 0x400 229362306a36Sopenharmony_ci#define BZEBRA1_RXLPFBW 0x600 229462306a36Sopenharmony_ci 229562306a36Sopenharmony_ci#define BRTL8256REG_MODE_CTRL1 0x100 229662306a36Sopenharmony_ci#define BRTL8256REG_MODE_CTRL0 0x40 229762306a36Sopenharmony_ci#define BRTL8256REG_TXLPFBW 0x18 229862306a36Sopenharmony_ci#define BRTL8256REG_RXLPFBW 0x600 229962306a36Sopenharmony_ci 230062306a36Sopenharmony_ci#define BRTL8258_TXLPFBW 0xc 230162306a36Sopenharmony_ci#define BRTL8258_RXLPFBW 0xc00 230262306a36Sopenharmony_ci#define BRTL8258_RSSILPFBW 0xc0 230362306a36Sopenharmony_ci 230462306a36Sopenharmony_ci#define BBYTE0 0x1 230562306a36Sopenharmony_ci#define BBYTE1 0x2 230662306a36Sopenharmony_ci#define BBYTE2 0x4 230762306a36Sopenharmony_ci#define BBYTE3 0x8 230862306a36Sopenharmony_ci#define BWORD0 0x3 230962306a36Sopenharmony_ci#define BWORD1 0xc 231062306a36Sopenharmony_ci#define BWORD 0xf 231162306a36Sopenharmony_ci 231262306a36Sopenharmony_ci#define MASKBYTE0 0xff 231362306a36Sopenharmony_ci#define MASKBYTE1 0xff00 231462306a36Sopenharmony_ci#define MASKBYTE2 0xff0000 231562306a36Sopenharmony_ci#define MASKBYTE3 0xff000000 231662306a36Sopenharmony_ci#define MASKHWORD 0xffff0000 231762306a36Sopenharmony_ci#define MASKLWORD 0x0000ffff 231862306a36Sopenharmony_ci#define MASKDWORD 0xffffffff 231962306a36Sopenharmony_ci#define MASK12BITS 0xfff 232062306a36Sopenharmony_ci#define MASKH4BITS 0xf0000000 232162306a36Sopenharmony_ci#define MASKOFDM_D 0xffc00000 232262306a36Sopenharmony_ci#define MASKCCK 0x3f3f3f3f 232362306a36Sopenharmony_ci 232462306a36Sopenharmony_ci#define MASK4BITS 0x0f 232562306a36Sopenharmony_ci#define MASK20BITS 0xfffff 232662306a36Sopenharmony_ci#define RFREG_OFFSET_MASK 0xfffff 232762306a36Sopenharmony_ci 232862306a36Sopenharmony_ci#define BENABLE 0x1 232962306a36Sopenharmony_ci#define BDISABLE 0x0 233062306a36Sopenharmony_ci 233162306a36Sopenharmony_ci#define LEFT_ANTENNA 0x0 233262306a36Sopenharmony_ci#define RIGHT_ANTENNA 0x1 233362306a36Sopenharmony_ci 233462306a36Sopenharmony_ci#define TCHECK_TXSTATUS 500 233562306a36Sopenharmony_ci#define TUPDATE_RXCOUNTER 100 233662306a36Sopenharmony_ci 233762306a36Sopenharmony_ci#define REG_UN_used_register 0x01bf 233862306a36Sopenharmony_ci 233962306a36Sopenharmony_ci/* Path_A RFE cotrol pinmux*/ 234062306a36Sopenharmony_ci#define RA_RFE_PINMUX 0xcb0 234162306a36Sopenharmony_ci/* Path_B RFE control pinmux*/ 234262306a36Sopenharmony_ci#define RB_RFE_PINMUX 0xeb0 234362306a36Sopenharmony_ci 234462306a36Sopenharmony_ci#define RA_RFE_INV 0xcb4 234562306a36Sopenharmony_ci#define RB_RFE_INV 0xeb4 234662306a36Sopenharmony_ci 234762306a36Sopenharmony_ci/* RXIQC */ 234862306a36Sopenharmony_ci/*RxIQ imblance matrix coeff. A & B*/ 234962306a36Sopenharmony_ci#define RA_RXIQC_AB 0xc10 235062306a36Sopenharmony_ci/*RxIQ imblance matrix coeff. C & D*/ 235162306a36Sopenharmony_ci#define RA_RXIQC_CD 0xc14 235262306a36Sopenharmony_ci/* Pah_A TX scaling factor*/ 235362306a36Sopenharmony_ci#define RA_TXSCALE 0xc1c 235462306a36Sopenharmony_ci/* Path_B TX scaling factor*/ 235562306a36Sopenharmony_ci#define RB_TXSCALE 0xe1c 235662306a36Sopenharmony_ci/*RxIQ imblance matrix coeff. A & B*/ 235762306a36Sopenharmony_ci#define RB_RXIQC_AB 0xe10 235862306a36Sopenharmony_ci/*RxIQ imblance matrix coeff. C & D*/ 235962306a36Sopenharmony_ci#define RB_RXIQC_CD 0xe14 236062306a36Sopenharmony_ci/*bit mask for IQC matrix element A & C*/ 236162306a36Sopenharmony_ci#define RXIQC_AC 0x02ff 236262306a36Sopenharmony_ci /*bit mask for IQC matrix element A & C*/ 236362306a36Sopenharmony_ci#define RXIQC_BD 0x02ff0000 236462306a36Sopenharmony_ci 236562306a36Sopenharmony_ci/* 2 EFUSE_TEST (For RTL8723 partially) */ 236662306a36Sopenharmony_ci#define EFUSE_SEL(x) (((x) & 0x3) << 8) 236762306a36Sopenharmony_ci#define EFUSE_SEL_MASK 0x300 236862306a36Sopenharmony_ci#define EFUSE_WIFI_SEL_0 0x0 236962306a36Sopenharmony_ci 237062306a36Sopenharmony_ci/*REG_MULTI_FUNC_CTRL(For RTL8723 Only)*/ 237162306a36Sopenharmony_ci/* Enable GPIO[9] as WiFi HW PDn source*/ 237262306a36Sopenharmony_ci#define WL_HWPDN_EN BIT(0) 237362306a36Sopenharmony_ci/* WiFi HW PDn polarity control*/ 237462306a36Sopenharmony_ci#define WL_HWPDN_SL BIT(1) 237562306a36Sopenharmony_ci/* WiFi function enable */ 237662306a36Sopenharmony_ci#define WL_FUNC_EN BIT(2) 237762306a36Sopenharmony_ci/* Enable GPIO[9] as WiFi RF HW PDn source */ 237862306a36Sopenharmony_ci#define WL_HWROF_EN BIT(3) 237962306a36Sopenharmony_ci/* Enable GPIO[11] as BT HW PDn source */ 238062306a36Sopenharmony_ci#define BT_HWPDN_EN BIT(16) 238162306a36Sopenharmony_ci/* BT HW PDn polarity control */ 238262306a36Sopenharmony_ci#define BT_HWPDN_SL BIT(17) 238362306a36Sopenharmony_ci/* BT function enable */ 238462306a36Sopenharmony_ci#define BT_FUNC_EN BIT(18) 238562306a36Sopenharmony_ci/* Enable GPIO[11] as BT/GPS RF HW PDn source */ 238662306a36Sopenharmony_ci#define BT_HWROF_EN BIT(19) 238762306a36Sopenharmony_ci/* Enable GPIO[10] as GPS HW PDn source */ 238862306a36Sopenharmony_ci#define GPS_HWPDN_EN BIT(20) 238962306a36Sopenharmony_ci/* GPS HW PDn polarity control */ 239062306a36Sopenharmony_ci#define GPS_HWPDN_SL BIT(21) 239162306a36Sopenharmony_ci/* GPS function enable */ 239262306a36Sopenharmony_ci#define GPS_FUNC_EN BIT(22) 239362306a36Sopenharmony_ci 239462306a36Sopenharmony_ci#define BMASKBYTE0 0xff 239562306a36Sopenharmony_ci#define BMASKBYTE1 0xff00 239662306a36Sopenharmony_ci#define BMASKBYTE2 0xff0000 239762306a36Sopenharmony_ci#define BMASKBYTE3 0xff000000 239862306a36Sopenharmony_ci#define BMASKHWORD 0xffff0000 239962306a36Sopenharmony_ci#define BMASKLWORD 0x0000ffff 240062306a36Sopenharmony_ci#define BMASKDWORD 0xffffffff 240162306a36Sopenharmony_ci#define BMASK12BITS 0xfff 240262306a36Sopenharmony_ci#define BMASKH4BITS 0xf0000000 240362306a36Sopenharmony_ci#define BMASKOFDM_D 0xffc00000 240462306a36Sopenharmony_ci#define BMASKCCK 0x3f3f3f3f 240562306a36Sopenharmony_ci#define BMASKRFEINV 0x3ff00000 240662306a36Sopenharmony_ci 240762306a36Sopenharmony_ci#define BRFREGOFFSETMASK 0xfffff 240862306a36Sopenharmony_ci 240962306a36Sopenharmony_ci#define ODM_REG_CCK_RPT_FORMAT_11AC 0x804 241062306a36Sopenharmony_ci#define ODM_REG_BB_RX_PATH_11AC 0x808 241162306a36Sopenharmony_ci/*PAGE 9*/ 241262306a36Sopenharmony_ci#define ODM_REG_OFDM_FA_RST_11AC 0x9A4 241362306a36Sopenharmony_ci/*PAGE A*/ 241462306a36Sopenharmony_ci#define ODM_REG_CCK_CCA_11AC 0xA0A 241562306a36Sopenharmony_ci#define ODM_REG_CCK_FA_RST_11AC 0xA2C 241662306a36Sopenharmony_ci#define ODM_REG_CCK_FA_11AC 0xA5C 241762306a36Sopenharmony_ci/*PAGE C*/ 241862306a36Sopenharmony_ci#define ODM_REG_IGI_A_11AC 0xC50 241962306a36Sopenharmony_ci/*PAGE E*/ 242062306a36Sopenharmony_ci#define ODM_REG_IGI_B_11AC 0xE50 242162306a36Sopenharmony_ci/*PAGE F*/ 242262306a36Sopenharmony_ci#define ODM_REG_OFDM_FA_11AC 0xF48 242362306a36Sopenharmony_ci 242462306a36Sopenharmony_ci/* 2 MAC REG LIST */ 242562306a36Sopenharmony_ci 242662306a36Sopenharmony_ci/* DIG Related */ 242762306a36Sopenharmony_ci#define ODM_BIT_IGI_11AC 0xFFFFFFFF 242862306a36Sopenharmony_ci#define ODM_BIT_CCK_RPT_FORMAT_11AC BIT16 242962306a36Sopenharmony_ci#define ODM_BIT_BB_RX_PATH_11AC 0xF 243062306a36Sopenharmony_ci 243162306a36Sopenharmony_cienum AGGRE_SIZE { 243262306a36Sopenharmony_ci HT_AGG_SIZE_8K = 0, 243362306a36Sopenharmony_ci HT_AGG_SIZE_16K = 1, 243462306a36Sopenharmony_ci HT_AGG_SIZE_32K = 2, 243562306a36Sopenharmony_ci HT_AGG_SIZE_64K = 3, 243662306a36Sopenharmony_ci VHT_AGG_SIZE_128K = 4, 243762306a36Sopenharmony_ci VHT_AGG_SIZE_256K = 5, 243862306a36Sopenharmony_ci VHT_AGG_SIZE_512K = 6, 243962306a36Sopenharmony_ci VHT_AGG_SIZE_1024K = 7, 244062306a36Sopenharmony_ci}; 244162306a36Sopenharmony_ci 244262306a36Sopenharmony_ci#define REG_AMPDU_MAX_LENGTH_8812 0x0458 244362306a36Sopenharmony_ci 244462306a36Sopenharmony_ci#endif 2445