162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* Copyright(c) 2009-2012 Realtek Corporation.*/ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef __REALTEK_92S_REG_H__ 562306a36Sopenharmony_ci#define __REALTEK_92S_REG_H__ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci/* 1. System Configuration Registers */ 862306a36Sopenharmony_ci#define REG_SYS_ISO_CTRL 0x0000 962306a36Sopenharmony_ci#define REG_SYS_FUNC_EN 0x0002 1062306a36Sopenharmony_ci#define PMC_FSM 0x0004 1162306a36Sopenharmony_ci#define SYS_CLKR 0x0008 1262306a36Sopenharmony_ci#define EPROM_CMD 0x000A 1362306a36Sopenharmony_ci#define EE_VPD 0x000C 1462306a36Sopenharmony_ci#define AFE_MISC 0x0010 1562306a36Sopenharmony_ci#define SPS0_CTRL 0x0011 1662306a36Sopenharmony_ci#define SPS1_CTRL 0x0018 1762306a36Sopenharmony_ci#define RF_CTRL 0x001F 1862306a36Sopenharmony_ci#define LDOA15_CTRL 0x0020 1962306a36Sopenharmony_ci#define LDOV12D_CTRL 0x0021 2062306a36Sopenharmony_ci#define LDOHCI12_CTRL 0x0022 2162306a36Sopenharmony_ci#define LDO_USB_SDIO 0x0023 2262306a36Sopenharmony_ci#define LPLDO_CTRL 0x0024 2362306a36Sopenharmony_ci#define AFE_XTAL_CTRL 0x0026 2462306a36Sopenharmony_ci#define AFE_PLL_CTRL 0x0028 2562306a36Sopenharmony_ci#define REG_EFUSE_CTRL 0x0030 2662306a36Sopenharmony_ci#define REG_EFUSE_TEST 0x0034 2762306a36Sopenharmony_ci#define PWR_DATA 0x0038 2862306a36Sopenharmony_ci#define DBG_PORT 0x003A 2962306a36Sopenharmony_ci#define DPS_TIMER 0x003C 3062306a36Sopenharmony_ci#define RCLK_MON 0x003E 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci/* 2. Command Control Registers */ 3362306a36Sopenharmony_ci#define CMDR 0x0040 3462306a36Sopenharmony_ci#define TXPAUSE 0x0042 3562306a36Sopenharmony_ci#define LBKMD_SEL 0x0043 3662306a36Sopenharmony_ci#define TCR 0x0044 3762306a36Sopenharmony_ci#define RCR 0x0048 3862306a36Sopenharmony_ci#define MSR 0x004C 3962306a36Sopenharmony_ci#define SYSF_CFG 0x004D 4062306a36Sopenharmony_ci#define RX_PKY_LIMIT 0x004E 4162306a36Sopenharmony_ci#define MBIDCTRL 0x004F 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci/* 3. MACID Setting Registers */ 4462306a36Sopenharmony_ci#define MACIDR 0x0050 4562306a36Sopenharmony_ci#define MACIDR0 0x0050 4662306a36Sopenharmony_ci#define MACIDR4 0x0054 4762306a36Sopenharmony_ci#define BSSIDR 0x0058 4862306a36Sopenharmony_ci#define HWVID 0x005E 4962306a36Sopenharmony_ci#define MAR 0x0060 5062306a36Sopenharmony_ci#define MBIDCAMCONTENT 0x0068 5162306a36Sopenharmony_ci#define MBIDCAMCFG 0x0070 5262306a36Sopenharmony_ci#define BUILDTIME 0x0074 5362306a36Sopenharmony_ci#define BUILDUSER 0x0078 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#define IDR0 MACIDR0 5662306a36Sopenharmony_ci#define IDR4 MACIDR4 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci/* 4. Timing Control Registers */ 5962306a36Sopenharmony_ci#define TSFR 0x0080 6062306a36Sopenharmony_ci#define SLOT_TIME 0x0089 6162306a36Sopenharmony_ci#define USTIME 0x008A 6262306a36Sopenharmony_ci#define SIFS_CCK 0x008C 6362306a36Sopenharmony_ci#define SIFS_OFDM 0x008E 6462306a36Sopenharmony_ci#define PIFS_TIME 0x0090 6562306a36Sopenharmony_ci#define ACK_TIMEOUT 0x0091 6662306a36Sopenharmony_ci#define EIFSTR 0x0092 6762306a36Sopenharmony_ci#define BCN_INTERVAL 0x0094 6862306a36Sopenharmony_ci#define ATIMWND 0x0096 6962306a36Sopenharmony_ci#define BCN_DRV_EARLY_INT 0x0098 7062306a36Sopenharmony_ci#define BCN_DMATIME 0x009A 7162306a36Sopenharmony_ci#define BCN_ERR_THRESH 0x009C 7262306a36Sopenharmony_ci#define MLT 0x009D 7362306a36Sopenharmony_ci#define RSVD_MAC_TUNE_US 0x009E 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci/* 5. FIFO Control Registers */ 7662306a36Sopenharmony_ci#define RQPN 0x00A0 7762306a36Sopenharmony_ci#define RQPN1 0x00A0 7862306a36Sopenharmony_ci#define RQPN2 0x00A1 7962306a36Sopenharmony_ci#define RQPN3 0x00A2 8062306a36Sopenharmony_ci#define RQPN4 0x00A3 8162306a36Sopenharmony_ci#define RQPN5 0x00A4 8262306a36Sopenharmony_ci#define RQPN6 0x00A5 8362306a36Sopenharmony_ci#define RQPN7 0x00A6 8462306a36Sopenharmony_ci#define RQPN8 0x00A7 8562306a36Sopenharmony_ci#define RQPN9 0x00A8 8662306a36Sopenharmony_ci#define RQPN10 0x00A9 8762306a36Sopenharmony_ci#define LD_RQPN 0x00AB 8862306a36Sopenharmony_ci#define RXFF_BNDY 0x00AC 8962306a36Sopenharmony_ci#define RXRPT_BNDY 0x00B0 9062306a36Sopenharmony_ci#define TXPKTBUF_PGBNDY 0x00B4 9162306a36Sopenharmony_ci#define PBP 0x00B5 9262306a36Sopenharmony_ci#define RXDRVINFO_SZ 0x00B6 9362306a36Sopenharmony_ci#define TXFF_STATUS 0x00B7 9462306a36Sopenharmony_ci#define RXFF_STATUS 0x00B8 9562306a36Sopenharmony_ci#define TXFF_EMPTY_TH 0x00B9 9662306a36Sopenharmony_ci#define SDIO_RX_BLKSZ 0x00BC 9762306a36Sopenharmony_ci#define RXDMA 0x00BD 9862306a36Sopenharmony_ci#define RXPKT_NUM 0x00BE 9962306a36Sopenharmony_ci#define C2HCMD_UDT_SIZE 0x00C0 10062306a36Sopenharmony_ci#define C2HCMD_UDT_ADDR 0x00C2 10162306a36Sopenharmony_ci#define FIFOPAGE1 0x00C4 10262306a36Sopenharmony_ci#define FIFOPAGE2 0x00C8 10362306a36Sopenharmony_ci#define FIFOPAGE3 0x00CC 10462306a36Sopenharmony_ci#define FIFOPAGE4 0x00D0 10562306a36Sopenharmony_ci#define FIFOPAGE5 0x00D4 10662306a36Sopenharmony_ci#define FW_RSVD_PG_CRTL 0x00D8 10762306a36Sopenharmony_ci#define RXDMA_AGG_PG_TH 0x00D9 10862306a36Sopenharmony_ci#define TXDESC_MSK 0x00DC 10962306a36Sopenharmony_ci#define TXRPTFF_RDPTR 0x00E0 11062306a36Sopenharmony_ci#define TXRPTFF_WTPTR 0x00E4 11162306a36Sopenharmony_ci#define C2HFF_RDPTR 0x00E8 11262306a36Sopenharmony_ci#define C2HFF_WTPTR 0x00EC 11362306a36Sopenharmony_ci#define RXFF0_RDPTR 0x00F0 11462306a36Sopenharmony_ci#define RXFF0_WTPTR 0x00F4 11562306a36Sopenharmony_ci#define RXFF1_RDPTR 0x00F8 11662306a36Sopenharmony_ci#define RXFF1_WTPTR 0x00FC 11762306a36Sopenharmony_ci#define RXRPT0_RDPTR 0x0100 11862306a36Sopenharmony_ci#define RXRPT0_WTPTR 0x0104 11962306a36Sopenharmony_ci#define RXRPT1_RDPTR 0x0108 12062306a36Sopenharmony_ci#define RXRPT1_WTPTR 0x010C 12162306a36Sopenharmony_ci#define RX0_UDT_SIZE 0x0110 12262306a36Sopenharmony_ci#define RX1PKTNUM 0x0114 12362306a36Sopenharmony_ci#define RXFILTERMAP 0x0116 12462306a36Sopenharmony_ci#define RXFILTERMAP_GP1 0x0118 12562306a36Sopenharmony_ci#define RXFILTERMAP_GP2 0x011A 12662306a36Sopenharmony_ci#define RXFILTERMAP_GP3 0x011C 12762306a36Sopenharmony_ci#define BCNQ_CTRL 0x0120 12862306a36Sopenharmony_ci#define MGTQ_CTRL 0x0124 12962306a36Sopenharmony_ci#define HIQ_CTRL 0x0128 13062306a36Sopenharmony_ci#define VOTID7_CTRL 0x012c 13162306a36Sopenharmony_ci#define VOTID6_CTRL 0x0130 13262306a36Sopenharmony_ci#define VITID5_CTRL 0x0134 13362306a36Sopenharmony_ci#define VITID4_CTRL 0x0138 13462306a36Sopenharmony_ci#define BETID3_CTRL 0x013c 13562306a36Sopenharmony_ci#define BETID0_CTRL 0x0140 13662306a36Sopenharmony_ci#define BKTID2_CTRL 0x0144 13762306a36Sopenharmony_ci#define BKTID1_CTRL 0x0148 13862306a36Sopenharmony_ci#define CMDQ_CTRL 0x014c 13962306a36Sopenharmony_ci#define TXPKT_NUM_CTRL 0x0150 14062306a36Sopenharmony_ci#define TXQ_PGADD 0x0152 14162306a36Sopenharmony_ci#define TXFF_PG_NUM 0x0154 14262306a36Sopenharmony_ci#define TRXDMA_STATUS 0x0156 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ci/* 6. Adaptive Control Registers */ 14562306a36Sopenharmony_ci#define INIMCS_SEL 0x0160 14662306a36Sopenharmony_ci#define TX_RATE_REG INIMCS_SEL 14762306a36Sopenharmony_ci#define INIRTSMCS_SEL 0x0180 14862306a36Sopenharmony_ci#define RRSR 0x0181 14962306a36Sopenharmony_ci#define ARFR0 0x0184 15062306a36Sopenharmony_ci#define ARFR1 0x0188 15162306a36Sopenharmony_ci#define ARFR2 0x018C 15262306a36Sopenharmony_ci#define ARFR3 0x0190 15362306a36Sopenharmony_ci#define ARFR4 0x0194 15462306a36Sopenharmony_ci#define ARFR5 0x0198 15562306a36Sopenharmony_ci#define ARFR6 0x019C 15662306a36Sopenharmony_ci#define ARFR7 0x01A0 15762306a36Sopenharmony_ci#define AGGLEN_LMT_H 0x01A7 15862306a36Sopenharmony_ci#define AGGLEN_LMT_L 0x01A8 15962306a36Sopenharmony_ci#define DARFRC 0x01B0 16062306a36Sopenharmony_ci#define RARFRC 0x01B8 16162306a36Sopenharmony_ci#define MCS_TXAGC 0x01C0 16262306a36Sopenharmony_ci#define CCK_TXAGC 0x01C8 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci/* 7. EDCA Setting Registers */ 16562306a36Sopenharmony_ci#define EDCAPARA_VO 0x01D0 16662306a36Sopenharmony_ci#define EDCAPARA_VI 0x01D4 16762306a36Sopenharmony_ci#define EDCAPARA_BE 0x01D8 16862306a36Sopenharmony_ci#define EDCAPARA_BK 0x01DC 16962306a36Sopenharmony_ci#define BCNTCFG 0x01E0 17062306a36Sopenharmony_ci#define CWRR 0x01E2 17162306a36Sopenharmony_ci#define ACMAVG 0x01E4 17262306a36Sopenharmony_ci#define ACMHWCTRL 0x01E7 17362306a36Sopenharmony_ci#define VO_ADMTM 0x01E8 17462306a36Sopenharmony_ci#define VI_ADMTM 0x01EC 17562306a36Sopenharmony_ci#define BE_ADMTM 0x01F0 17662306a36Sopenharmony_ci#define RETRY_LIMIT 0x01F4 17762306a36Sopenharmony_ci#define SG_RATE 0x01F6 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci/* 8. WMAC, BA and CCX related Register. */ 18062306a36Sopenharmony_ci#define NAV_CTRL 0x0200 18162306a36Sopenharmony_ci#define BW_OPMODE 0x0203 18262306a36Sopenharmony_ci#define BACAMCMD 0x0204 18362306a36Sopenharmony_ci#define BACAMCONTENT 0x0208 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ci/* the 0x2xx register WMAC definition */ 18662306a36Sopenharmony_ci#define LBDLY 0x0210 18762306a36Sopenharmony_ci#define FWDLY 0x0211 18862306a36Sopenharmony_ci#define HWPC_RX_CTRL 0x0218 18962306a36Sopenharmony_ci#define MQIR 0x0220 19062306a36Sopenharmony_ci#define MAIR 0x0222 19162306a36Sopenharmony_ci#define MSIR 0x0224 19262306a36Sopenharmony_ci#define CLM_RESULT 0x0227 19362306a36Sopenharmony_ci#define NHM_RPI_CNT 0x0228 19462306a36Sopenharmony_ci#define RXERR_RPT 0x0230 19562306a36Sopenharmony_ci#define NAV_PROT_LEN 0x0234 19662306a36Sopenharmony_ci#define CFEND_TH 0x0236 19762306a36Sopenharmony_ci#define AMPDU_MIN_SPACE 0x0237 19862306a36Sopenharmony_ci#define TXOP_STALL_CTRL 0x0238 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci/* 9. Security Control Registers */ 20162306a36Sopenharmony_ci#define REG_RWCAM 0x0240 20262306a36Sopenharmony_ci#define REG_WCAMI 0x0244 20362306a36Sopenharmony_ci#define REG_RCAMO 0x0248 20462306a36Sopenharmony_ci#define REG_CAMDBG 0x024C 20562306a36Sopenharmony_ci#define REG_SECR 0x0250 20662306a36Sopenharmony_ci 20762306a36Sopenharmony_ci/* 10. Power Save Control Registers */ 20862306a36Sopenharmony_ci#define WOW_CTRL 0x0260 20962306a36Sopenharmony_ci#define PSSTATUS 0x0261 21062306a36Sopenharmony_ci#define PSSWITCH 0x0262 21162306a36Sopenharmony_ci#define MIMOPS_WAIT_PERIOD 0x0263 21262306a36Sopenharmony_ci#define LPNAV_CTRL 0x0264 21362306a36Sopenharmony_ci#define WFM0 0x0270 21462306a36Sopenharmony_ci#define WFM1 0x0280 21562306a36Sopenharmony_ci#define WFM2 0x0290 21662306a36Sopenharmony_ci#define WFM3 0x02A0 21762306a36Sopenharmony_ci#define WFM4 0x02B0 21862306a36Sopenharmony_ci#define WFM5 0x02C0 21962306a36Sopenharmony_ci#define WFCRC 0x02D0 22062306a36Sopenharmony_ci#define FW_RPT_REG 0x02c4 22162306a36Sopenharmony_ci 22262306a36Sopenharmony_ci/* 11. General Purpose Registers */ 22362306a36Sopenharmony_ci#define PSTIME 0x02E0 22462306a36Sopenharmony_ci#define TIMER0 0x02E4 22562306a36Sopenharmony_ci#define TIMER1 0x02E8 22662306a36Sopenharmony_ci#define GPIO_IN_SE 0x02EC 22762306a36Sopenharmony_ci#define GPIO_IO_SEL 0x02EE 22862306a36Sopenharmony_ci#define MAC_PINMUX_CFG 0x02F1 22962306a36Sopenharmony_ci#define LEDCFG 0x02F2 23062306a36Sopenharmony_ci#define PHY_REG 0x02F3 23162306a36Sopenharmony_ci#define PHY_REG_DATA 0x02F4 23262306a36Sopenharmony_ci#define REG_EFUSE_CLK 0x02F8 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_ci/* 12. Host Interrupt Status Registers */ 23562306a36Sopenharmony_ci#define INTA_MASK 0x0300 23662306a36Sopenharmony_ci#define ISR 0x0308 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ci/* 13. Test mode and Debug Control Registers */ 23962306a36Sopenharmony_ci#define DBG_PORT_SWITCH 0x003A 24062306a36Sopenharmony_ci#define BIST 0x0310 24162306a36Sopenharmony_ci#define DBS 0x0314 24262306a36Sopenharmony_ci#define CPUINST 0x0318 24362306a36Sopenharmony_ci#define CPUCAUSE 0x031C 24462306a36Sopenharmony_ci#define LBUS_ERR_ADDR 0x0320 24562306a36Sopenharmony_ci#define LBUS_ERR_CMD 0x0324 24662306a36Sopenharmony_ci#define LBUS_ERR_DATA_L 0x0328 24762306a36Sopenharmony_ci#define LBUS_ERR_DATA_H 0x032C 24862306a36Sopenharmony_ci#define LX_EXCEPTION_ADDR 0x0330 24962306a36Sopenharmony_ci#define WDG_CTRL 0x0334 25062306a36Sopenharmony_ci#define INTMTU 0x0338 25162306a36Sopenharmony_ci#define INTM 0x033A 25262306a36Sopenharmony_ci#define FDLOCKTURN0 0x033C 25362306a36Sopenharmony_ci#define FDLOCKTURN1 0x033D 25462306a36Sopenharmony_ci#define TRXPKTBUF_DBG_DATA 0x0340 25562306a36Sopenharmony_ci#define TRXPKTBUF_DBG_CTRL 0x0348 25662306a36Sopenharmony_ci#define DPLL 0x034A 25762306a36Sopenharmony_ci#define CBUS_ERR_ADDR 0x0350 25862306a36Sopenharmony_ci#define CBUS_ERR_CMD 0x0354 25962306a36Sopenharmony_ci#define CBUS_ERR_DATA_L 0x0358 26062306a36Sopenharmony_ci#define CBUS_ERR_DATA_H 0x035C 26162306a36Sopenharmony_ci#define USB_SIE_INTF_ADDR 0x0360 26262306a36Sopenharmony_ci#define USB_SIE_INTF_WD 0x0361 26362306a36Sopenharmony_ci#define USB_SIE_INTF_RD 0x0362 26462306a36Sopenharmony_ci#define USB_SIE_INTF_CTRL 0x0363 26562306a36Sopenharmony_ci#define LBUS_MON_ADDR 0x0364 26662306a36Sopenharmony_ci#define LBUS_ADDR_MASK 0x0368 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci/* Boundary is 0x37F */ 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_ci/* 14. PCIE config register */ 27162306a36Sopenharmony_ci#define TP_POLL 0x0500 27262306a36Sopenharmony_ci#define PM_CTRL 0x0502 27362306a36Sopenharmony_ci#define PCIF 0x0503 27462306a36Sopenharmony_ci 27562306a36Sopenharmony_ci#define THPDA 0x0514 27662306a36Sopenharmony_ci#define TMDA 0x0518 27762306a36Sopenharmony_ci#define TCDA 0x051C 27862306a36Sopenharmony_ci#define HDA 0x0520 27962306a36Sopenharmony_ci#define TVODA 0x0524 28062306a36Sopenharmony_ci#define TVIDA 0x0528 28162306a36Sopenharmony_ci#define TBEDA 0x052C 28262306a36Sopenharmony_ci#define TBKDA 0x0530 28362306a36Sopenharmony_ci#define TBDA 0x0534 28462306a36Sopenharmony_ci#define RCDA 0x0538 28562306a36Sopenharmony_ci#define RDQDA 0x053C 28662306a36Sopenharmony_ci#define DBI_WDATA 0x0540 28762306a36Sopenharmony_ci#define DBI_RDATA 0x0544 28862306a36Sopenharmony_ci#define DBI_CTRL 0x0548 28962306a36Sopenharmony_ci#define MDIO_DATA 0x0550 29062306a36Sopenharmony_ci#define MDIO_CTRL 0x0554 29162306a36Sopenharmony_ci#define PCI_RPWM 0x0561 29262306a36Sopenharmony_ci#define PCI_CPWM 0x0563 29362306a36Sopenharmony_ci 29462306a36Sopenharmony_ci/* Config register (Offset 0x800-) */ 29562306a36Sopenharmony_ci#define PHY_CCA 0x803 29662306a36Sopenharmony_ci 29762306a36Sopenharmony_ci/* Min Spacing related settings. */ 29862306a36Sopenharmony_ci#define MAX_MSS_DENSITY_2T 0x13 29962306a36Sopenharmony_ci#define MAX_MSS_DENSITY_1T 0x0A 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci/* Rx DMA Control related settings */ 30262306a36Sopenharmony_ci#define RXDMA_AGG_EN BIT(7) 30362306a36Sopenharmony_ci 30462306a36Sopenharmony_ci#define RPWM PCI_RPWM 30562306a36Sopenharmony_ci 30662306a36Sopenharmony_ci/* Regsiter Bit and Content definition */ 30762306a36Sopenharmony_ci 30862306a36Sopenharmony_ci#define ISO_MD2PP BIT(0) 30962306a36Sopenharmony_ci#define ISO_PA2PCIE BIT(3) 31062306a36Sopenharmony_ci#define ISO_PLL2MD BIT(4) 31162306a36Sopenharmony_ci#define ISO_PWC_DV2RP BIT(11) 31262306a36Sopenharmony_ci#define ISO_PWC_RV2RP BIT(12) 31362306a36Sopenharmony_ci 31462306a36Sopenharmony_ci 31562306a36Sopenharmony_ci#define FEN_MREGEN BIT(15) 31662306a36Sopenharmony_ci#define FEN_DCORE BIT(11) 31762306a36Sopenharmony_ci#define FEN_CPUEN BIT(10) 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_ci#define PAD_HWPD_IDN BIT(22) 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci#define SYS_CLKSEL_80M BIT(0) 32262306a36Sopenharmony_ci#define SYS_PS_CLKSEL BIT(1) 32362306a36Sopenharmony_ci#define SYS_CPU_CLKSEL BIT(2) 32462306a36Sopenharmony_ci#define SYS_MAC_CLK_EN BIT(11) 32562306a36Sopenharmony_ci#define SYS_SWHW_SEL BIT(14) 32662306a36Sopenharmony_ci#define SYS_FWHW_SEL BIT(15) 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_ci#define CMDEEPROM_EN BIT(5) 32962306a36Sopenharmony_ci#define CMDEERPOMSEL BIT(4) 33062306a36Sopenharmony_ci#define CMD9346CR_9356SEL BIT(4) 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_ci#define AFE_MBEN BIT(1) 33362306a36Sopenharmony_ci#define AFE_BGEN BIT(0) 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci#define SPS1_SWEN BIT(1) 33662306a36Sopenharmony_ci#define SPS1_LDEN BIT(0) 33762306a36Sopenharmony_ci 33862306a36Sopenharmony_ci#define RF_EN BIT(0) 33962306a36Sopenharmony_ci#define RF_RSTB BIT(1) 34062306a36Sopenharmony_ci#define RF_SDMRSTB BIT(2) 34162306a36Sopenharmony_ci 34262306a36Sopenharmony_ci#define LDA15_EN BIT(0) 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_ci#define LDV12_EN BIT(0) 34562306a36Sopenharmony_ci#define LDV12_SDBY BIT(1) 34662306a36Sopenharmony_ci 34762306a36Sopenharmony_ci#define XTAL_GATE_AFE BIT(10) 34862306a36Sopenharmony_ci 34962306a36Sopenharmony_ci#define APLL_EN BIT(0) 35062306a36Sopenharmony_ci 35162306a36Sopenharmony_ci#define AFR_CARDBEN BIT(0) 35262306a36Sopenharmony_ci#define AFR_CLKRUN_SEL BIT(1) 35362306a36Sopenharmony_ci#define AFR_FUNCREGEN BIT(2) 35462306a36Sopenharmony_ci 35562306a36Sopenharmony_ci#define APSDOFF_STATUS BIT(15) 35662306a36Sopenharmony_ci#define APSDOFF BIT(14) 35762306a36Sopenharmony_ci#define BBRSTN BIT(13) 35862306a36Sopenharmony_ci#define BB_GLB_RSTN BIT(12) 35962306a36Sopenharmony_ci#define SCHEDULE_EN BIT(10) 36062306a36Sopenharmony_ci#define MACRXEN BIT(9) 36162306a36Sopenharmony_ci#define MACTXEN BIT(8) 36262306a36Sopenharmony_ci#define DDMA_EN BIT(7) 36362306a36Sopenharmony_ci#define FW2HW_EN BIT(6) 36462306a36Sopenharmony_ci#define RXDMA_EN BIT(5) 36562306a36Sopenharmony_ci#define TXDMA_EN BIT(4) 36662306a36Sopenharmony_ci#define HCI_RXDMA_EN BIT(3) 36762306a36Sopenharmony_ci#define HCI_TXDMA_EN BIT(2) 36862306a36Sopenharmony_ci 36962306a36Sopenharmony_ci#define STOPHCCA BIT(6) 37062306a36Sopenharmony_ci#define STOPHIGH BIT(5) 37162306a36Sopenharmony_ci#define STOPMGT BIT(4) 37262306a36Sopenharmony_ci#define STOPVO BIT(3) 37362306a36Sopenharmony_ci#define STOPVI BIT(2) 37462306a36Sopenharmony_ci#define STOPBE BIT(1) 37562306a36Sopenharmony_ci#define STOPBK BIT(0) 37662306a36Sopenharmony_ci 37762306a36Sopenharmony_ci#define LBK_NORMAL 0x00 37862306a36Sopenharmony_ci#define LBK_MAC_LB (BIT(0) | BIT(1) | BIT(3)) 37962306a36Sopenharmony_ci#define LBK_MAC_DLB (BIT(0) | BIT(1)) 38062306a36Sopenharmony_ci#define LBK_DMA_LB (BIT(0) | BIT(1) | BIT(2)) 38162306a36Sopenharmony_ci 38262306a36Sopenharmony_ci#define TCP_OFDL_EN BIT(25) 38362306a36Sopenharmony_ci#define HWPC_TX_EN BIT(24) 38462306a36Sopenharmony_ci#define TXDMAPRE2FULL BIT(23) 38562306a36Sopenharmony_ci#define DISCW BIT(20) 38662306a36Sopenharmony_ci#define TCRICV BIT(19) 38762306a36Sopenharmony_ci#define cfendform BIT(17) 38862306a36Sopenharmony_ci#define TCRCRC BIT(16) 38962306a36Sopenharmony_ci#define FAKE_IMEM_EN BIT(15) 39062306a36Sopenharmony_ci#define TSFRST BIT(9) 39162306a36Sopenharmony_ci#define TSFEN BIT(8) 39262306a36Sopenharmony_ci#define FWALLRDY (BIT(0) | BIT(1) | BIT(2) | \ 39362306a36Sopenharmony_ci BIT(3) | BIT(4) | BIT(5) | \ 39462306a36Sopenharmony_ci BIT(6) | BIT(7)) 39562306a36Sopenharmony_ci#define FWRDY BIT(7) 39662306a36Sopenharmony_ci#define BASECHG BIT(6) 39762306a36Sopenharmony_ci#define IMEM BIT(5) 39862306a36Sopenharmony_ci#define DMEM_CODE_DONE BIT(4) 39962306a36Sopenharmony_ci#define EXT_IMEM_CHK_RPT BIT(3) 40062306a36Sopenharmony_ci#define EXT_IMEM_CODE_DONE BIT(2) 40162306a36Sopenharmony_ci#define IMEM_CHK_RPT BIT(1) 40262306a36Sopenharmony_ci#define IMEM_CODE_DONE BIT(0) 40362306a36Sopenharmony_ci#define EMEM_CODE_DONE BIT(2) 40462306a36Sopenharmony_ci#define EMEM_CHK_RPT BIT(3) 40562306a36Sopenharmony_ci#define IMEM_RDY BIT(5) 40662306a36Sopenharmony_ci#define LOAD_FW_READY (IMEM_CODE_DONE | \ 40762306a36Sopenharmony_ci IMEM_CHK_RPT | \ 40862306a36Sopenharmony_ci EMEM_CODE_DONE | \ 40962306a36Sopenharmony_ci EMEM_CHK_RPT | \ 41062306a36Sopenharmony_ci DMEM_CODE_DONE | \ 41162306a36Sopenharmony_ci IMEM_RDY | \ 41262306a36Sopenharmony_ci BASECHG | \ 41362306a36Sopenharmony_ci FWRDY) 41462306a36Sopenharmony_ci#define TCR_TSFEN BIT(8) 41562306a36Sopenharmony_ci#define TCR_TSFRST BIT(9) 41662306a36Sopenharmony_ci#define TCR_FAKE_IMEM_EN BIT(15) 41762306a36Sopenharmony_ci#define TCR_CRC BIT(16) 41862306a36Sopenharmony_ci#define TCR_ICV BIT(19) 41962306a36Sopenharmony_ci#define TCR_DISCW BIT(20) 42062306a36Sopenharmony_ci#define TCR_HWPC_TX_EN BIT(24) 42162306a36Sopenharmony_ci#define TCR_TCP_OFDL_EN BIT(25) 42262306a36Sopenharmony_ci#define TXDMA_INIT_VALUE (IMEM_CHK_RPT | \ 42362306a36Sopenharmony_ci EXT_IMEM_CHK_RPT) 42462306a36Sopenharmony_ci 42562306a36Sopenharmony_ci#define RCR_APPFCS BIT(31) 42662306a36Sopenharmony_ci#define RCR_DIS_ENC_2BYTE BIT(30) 42762306a36Sopenharmony_ci#define RCR_DIS_AES_2BYTE BIT(29) 42862306a36Sopenharmony_ci#define RCR_HTC_LOC_CTRL BIT(28) 42962306a36Sopenharmony_ci#define RCR_ENMBID BIT(27) 43062306a36Sopenharmony_ci#define RCR_RX_TCPOFDL_EN BIT(26) 43162306a36Sopenharmony_ci#define RCR_APP_PHYST_RXFF BIT(25) 43262306a36Sopenharmony_ci#define RCR_APP_PHYST_STAFF BIT(24) 43362306a36Sopenharmony_ci#define RCR_CBSSID BIT(23) 43462306a36Sopenharmony_ci#define RCR_APWRMGT BIT(22) 43562306a36Sopenharmony_ci#define RCR_ADD3 BIT(21) 43662306a36Sopenharmony_ci#define RCR_AMF BIT(20) 43762306a36Sopenharmony_ci#define RCR_ACF BIT(19) 43862306a36Sopenharmony_ci#define RCR_ADF BIT(18) 43962306a36Sopenharmony_ci#define RCR_APP_MIC BIT(17) 44062306a36Sopenharmony_ci#define RCR_APP_ICV BIT(16) 44162306a36Sopenharmony_ci#define RCR_RXFTH BIT(13) 44262306a36Sopenharmony_ci#define RCR_AICV BIT(12) 44362306a36Sopenharmony_ci#define RCR_RXDESC_LK_EN BIT(11) 44462306a36Sopenharmony_ci#define RCR_APP_BA_SSN BIT(6) 44562306a36Sopenharmony_ci#define RCR_ACRC32 BIT(5) 44662306a36Sopenharmony_ci#define RCR_RXSHFT_EN BIT(4) 44762306a36Sopenharmony_ci#define RCR_AB BIT(3) 44862306a36Sopenharmony_ci#define RCR_AM BIT(2) 44962306a36Sopenharmony_ci#define RCR_APM BIT(1) 45062306a36Sopenharmony_ci#define RCR_AAP BIT(0) 45162306a36Sopenharmony_ci#define RCR_MXDMA_OFFSET 8 45262306a36Sopenharmony_ci#define RCR_FIFO_OFFSET 13 45362306a36Sopenharmony_ci 45462306a36Sopenharmony_ci 45562306a36Sopenharmony_ci#define MSR_LINK_MASK ((1 << 0) | (1 << 1)) 45662306a36Sopenharmony_ci#define MSR_LINK_MANAGED 2 45762306a36Sopenharmony_ci#define MSR_LINK_NONE 0 45862306a36Sopenharmony_ci#define MSR_LINK_SHIFT 0 45962306a36Sopenharmony_ci#define MSR_LINK_ADHOC 1 46062306a36Sopenharmony_ci#define MSR_LINK_MASTER 3 46162306a36Sopenharmony_ci#define MSR_NOLINK 0x00 46262306a36Sopenharmony_ci#define MSR_ADHOC 0x01 46362306a36Sopenharmony_ci#define MSR_INFRA 0x02 46462306a36Sopenharmony_ci#define MSR_AP 0x03 46562306a36Sopenharmony_ci 46662306a36Sopenharmony_ci#define ENUART BIT(7) 46762306a36Sopenharmony_ci#define ENJTAG BIT(3) 46862306a36Sopenharmony_ci#define BTMODE (BIT(2) | BIT(1)) 46962306a36Sopenharmony_ci#define ENBT BIT(0) 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ci#define ENMBID BIT(7) 47262306a36Sopenharmony_ci#define BCNUM (BIT(6) | BIT(5) | BIT(4)) 47362306a36Sopenharmony_ci 47462306a36Sopenharmony_ci#define USTIME_EDCA 0xFF00 47562306a36Sopenharmony_ci#define USTIME_TSF 0x00FF 47662306a36Sopenharmony_ci 47762306a36Sopenharmony_ci#define SIFS_TRX 0xFF00 47862306a36Sopenharmony_ci#define SIFS_CTX 0x00FF 47962306a36Sopenharmony_ci 48062306a36Sopenharmony_ci#define ENSWBCN BIT(15) 48162306a36Sopenharmony_ci#define DRVERLY_TU 0x0FF0 48262306a36Sopenharmony_ci#define DRVERLY_US 0x000F 48362306a36Sopenharmony_ci#define BCN_TCFG_CW_SHIFT 8 48462306a36Sopenharmony_ci#define BCN_TCFG_IFS 0 48562306a36Sopenharmony_ci 48662306a36Sopenharmony_ci#define RRSR_RSC_OFFSET 21 48762306a36Sopenharmony_ci#define RRSR_SHORT_OFFSET 23 48862306a36Sopenharmony_ci#define RRSR_RSC_BW_40M 0x600000 48962306a36Sopenharmony_ci#define RRSR_RSC_UPSUBCHNL 0x400000 49062306a36Sopenharmony_ci#define RRSR_RSC_LOWSUBCHNL 0x200000 49162306a36Sopenharmony_ci#define RRSR_SHORT 0x800000 49262306a36Sopenharmony_ci#define RRSR_1M BIT(0) 49362306a36Sopenharmony_ci#define RRSR_2M BIT(1) 49462306a36Sopenharmony_ci#define RRSR_5_5M BIT(2) 49562306a36Sopenharmony_ci#define RRSR_11M BIT(3) 49662306a36Sopenharmony_ci#define RRSR_6M BIT(4) 49762306a36Sopenharmony_ci#define RRSR_9M BIT(5) 49862306a36Sopenharmony_ci#define RRSR_12M BIT(6) 49962306a36Sopenharmony_ci#define RRSR_18M BIT(7) 50062306a36Sopenharmony_ci#define RRSR_24M BIT(8) 50162306a36Sopenharmony_ci#define RRSR_36M BIT(9) 50262306a36Sopenharmony_ci#define RRSR_48M BIT(10) 50362306a36Sopenharmony_ci#define RRSR_54M BIT(11) 50462306a36Sopenharmony_ci#define RRSR_MCS0 BIT(12) 50562306a36Sopenharmony_ci#define RRSR_MCS1 BIT(13) 50662306a36Sopenharmony_ci#define RRSR_MCS2 BIT(14) 50762306a36Sopenharmony_ci#define RRSR_MCS3 BIT(15) 50862306a36Sopenharmony_ci#define RRSR_MCS4 BIT(16) 50962306a36Sopenharmony_ci#define RRSR_MCS5 BIT(17) 51062306a36Sopenharmony_ci#define RRSR_MCS6 BIT(18) 51162306a36Sopenharmony_ci#define RRSR_MCS7 BIT(19) 51262306a36Sopenharmony_ci#define BRSR_ACKSHORTPMB BIT(23) 51362306a36Sopenharmony_ci 51462306a36Sopenharmony_ci#define RATR_1M 0x00000001 51562306a36Sopenharmony_ci#define RATR_2M 0x00000002 51662306a36Sopenharmony_ci#define RATR_55M 0x00000004 51762306a36Sopenharmony_ci#define RATR_11M 0x00000008 51862306a36Sopenharmony_ci#define RATR_6M 0x00000010 51962306a36Sopenharmony_ci#define RATR_9M 0x00000020 52062306a36Sopenharmony_ci#define RATR_12M 0x00000040 52162306a36Sopenharmony_ci#define RATR_18M 0x00000080 52262306a36Sopenharmony_ci#define RATR_24M 0x00000100 52362306a36Sopenharmony_ci#define RATR_36M 0x00000200 52462306a36Sopenharmony_ci#define RATR_48M 0x00000400 52562306a36Sopenharmony_ci#define RATR_54M 0x00000800 52662306a36Sopenharmony_ci#define RATR_MCS0 0x00001000 52762306a36Sopenharmony_ci#define RATR_MCS1 0x00002000 52862306a36Sopenharmony_ci#define RATR_MCS2 0x00004000 52962306a36Sopenharmony_ci#define RATR_MCS3 0x00008000 53062306a36Sopenharmony_ci#define RATR_MCS4 0x00010000 53162306a36Sopenharmony_ci#define RATR_MCS5 0x00020000 53262306a36Sopenharmony_ci#define RATR_MCS6 0x00040000 53362306a36Sopenharmony_ci#define RATR_MCS7 0x00080000 53462306a36Sopenharmony_ci#define RATR_MCS8 0x00100000 53562306a36Sopenharmony_ci#define RATR_MCS9 0x00200000 53662306a36Sopenharmony_ci#define RATR_MCS10 0x00400000 53762306a36Sopenharmony_ci#define RATR_MCS11 0x00800000 53862306a36Sopenharmony_ci#define RATR_MCS12 0x01000000 53962306a36Sopenharmony_ci#define RATR_MCS13 0x02000000 54062306a36Sopenharmony_ci#define RATR_MCS14 0x04000000 54162306a36Sopenharmony_ci#define RATR_MCS15 0x08000000 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ci#define RATE_ALL_CCK (RATR_1M | RATR_2M | \ 54462306a36Sopenharmony_ci RATR_55M | RATR_11M) 54562306a36Sopenharmony_ci#define RATE_ALL_OFDM_AG (RATR_6M | RATR_9M | \ 54662306a36Sopenharmony_ci RATR_12M | RATR_18M | \ 54762306a36Sopenharmony_ci RATR_24M | RATR_36M | \ 54862306a36Sopenharmony_ci RATR_48M | RATR_54M) 54962306a36Sopenharmony_ci#define RATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | \ 55062306a36Sopenharmony_ci RATR_MCS2 | RATR_MCS3 | \ 55162306a36Sopenharmony_ci RATR_MCS4 | RATR_MCS5 | \ 55262306a36Sopenharmony_ci RATR_MCS6 | RATR_MCS7) 55362306a36Sopenharmony_ci#define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | \ 55462306a36Sopenharmony_ci RATR_MCS10 | RATR_MCS11 | \ 55562306a36Sopenharmony_ci RATR_MCS12 | RATR_MCS13 | \ 55662306a36Sopenharmony_ci RATR_MCS14 | RATR_MCS15) 55762306a36Sopenharmony_ci 55862306a36Sopenharmony_ci#define AC_PARAM_TXOP_LIMIT_OFFSET 16 55962306a36Sopenharmony_ci#define AC_PARAM_ECW_MAX_OFFSET 12 56062306a36Sopenharmony_ci#define AC_PARAM_ECW_MIN_OFFSET 8 56162306a36Sopenharmony_ci#define AC_PARAM_AIFS_OFFSET 0 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci#define ACMHW_HWEN BIT(0) 56462306a36Sopenharmony_ci#define ACMHW_BEQEN BIT(1) 56562306a36Sopenharmony_ci#define ACMHW_VIQEN BIT(2) 56662306a36Sopenharmony_ci#define ACMHW_VOQEN BIT(3) 56762306a36Sopenharmony_ci#define ACMHW_BEQSTATUS BIT(4) 56862306a36Sopenharmony_ci#define ACMHW_VIQSTATUS BIT(5) 56962306a36Sopenharmony_ci#define ACMHW_VOQSTATUS BIT(6) 57062306a36Sopenharmony_ci 57162306a36Sopenharmony_ci#define RETRY_LIMIT_SHORT_SHIFT 8 57262306a36Sopenharmony_ci#define RETRY_LIMIT_LONG_SHIFT 0 57362306a36Sopenharmony_ci 57462306a36Sopenharmony_ci#define NAV_UPPER_EN BIT(16) 57562306a36Sopenharmony_ci#define NAV_UPPER 0xFF00 57662306a36Sopenharmony_ci#define NAV_RTSRST 0xFF 57762306a36Sopenharmony_ci 57862306a36Sopenharmony_ci#define BW_OPMODE_20MHZ BIT(2) 57962306a36Sopenharmony_ci#define BW_OPMODE_5G BIT(1) 58062306a36Sopenharmony_ci#define BW_OPMODE_11J BIT(0) 58162306a36Sopenharmony_ci 58262306a36Sopenharmony_ci#define RXERR_RPT_RST BIT(27) 58362306a36Sopenharmony_ci#define RXERR_OFDM_PPDU 0 58462306a36Sopenharmony_ci#define RXERR_OFDM_FALSE_ALARM 1 58562306a36Sopenharmony_ci#define RXERR_OFDM_MPDU_OK 2 58662306a36Sopenharmony_ci#define RXERR_OFDM_MPDU_FAIL 3 58762306a36Sopenharmony_ci#define RXERR_CCK_PPDU 4 58862306a36Sopenharmony_ci#define RXERR_CCK_FALSE_ALARM 5 58962306a36Sopenharmony_ci#define RXERR_CCK_MPDU_OK 6 59062306a36Sopenharmony_ci#define RXERR_CCK_MPDU_FAIL 7 59162306a36Sopenharmony_ci#define RXERR_HT_PPDU 8 59262306a36Sopenharmony_ci#define RXERR_HT_FALSE_ALARM 9 59362306a36Sopenharmony_ci#define RXERR_HT_MPDU_TOTAL 10 59462306a36Sopenharmony_ci#define RXERR_HT_MPDU_OK 11 59562306a36Sopenharmony_ci#define RXERR_HT_MPDU_FAIL 12 59662306a36Sopenharmony_ci#define RXERR_RX_FULL_DROP 15 59762306a36Sopenharmony_ci 59862306a36Sopenharmony_ci#define SCR_TXUSEDK BIT(0) 59962306a36Sopenharmony_ci#define SCR_RXUSEDK BIT(1) 60062306a36Sopenharmony_ci#define SCR_TXENCENABLE BIT(2) 60162306a36Sopenharmony_ci#define SCR_RXENCENABLE BIT(3) 60262306a36Sopenharmony_ci#define SCR_SKBYA2 BIT(4) 60362306a36Sopenharmony_ci#define SCR_NOSKMC BIT(5) 60462306a36Sopenharmony_ci 60562306a36Sopenharmony_ci#define CAM_VALID BIT(15) 60662306a36Sopenharmony_ci#define CAM_NOTVALID 0x0000 60762306a36Sopenharmony_ci#define CAM_USEDK BIT(5) 60862306a36Sopenharmony_ci 60962306a36Sopenharmony_ci#define CAM_NONE 0x0 61062306a36Sopenharmony_ci#define CAM_WEP40 0x01 61162306a36Sopenharmony_ci#define CAM_TKIP 0x02 61262306a36Sopenharmony_ci#define CAM_AES 0x04 61362306a36Sopenharmony_ci#define CAM_WEP104 0x05 61462306a36Sopenharmony_ci 61562306a36Sopenharmony_ci#define TOTAL_CAM_ENTRY 32 61662306a36Sopenharmony_ci#define HALF_CAM_ENTRY 16 61762306a36Sopenharmony_ci 61862306a36Sopenharmony_ci#define CAM_WRITE BIT(16) 61962306a36Sopenharmony_ci#define CAM_READ 0x00000000 62062306a36Sopenharmony_ci#define CAM_POLLINIG BIT(31) 62162306a36Sopenharmony_ci 62262306a36Sopenharmony_ci#define WOW_PMEN BIT(0) 62362306a36Sopenharmony_ci#define WOW_WOMEN BIT(1) 62462306a36Sopenharmony_ci#define WOW_MAGIC BIT(2) 62562306a36Sopenharmony_ci#define WOW_UWF BIT(3) 62662306a36Sopenharmony_ci 62762306a36Sopenharmony_ci#define GPIOMUX_EN BIT(3) 62862306a36Sopenharmony_ci#define GPIOSEL_GPIO 0 62962306a36Sopenharmony_ci#define GPIOSEL_PHYDBG 1 63062306a36Sopenharmony_ci#define GPIOSEL_BT 2 63162306a36Sopenharmony_ci#define GPIOSEL_WLANDBG 3 63262306a36Sopenharmony_ci#define GPIOSEL_GPIO_MASK (~(BIT(0)|BIT(1))) 63362306a36Sopenharmony_ci 63462306a36Sopenharmony_ci#define HST_RDBUSY BIT(0) 63562306a36Sopenharmony_ci#define CPU_WTBUSY BIT(1) 63662306a36Sopenharmony_ci 63762306a36Sopenharmony_ci#define IMR8190_DISABLED 0x0 63862306a36Sopenharmony_ci#define IMR_CPUERR BIT(5) 63962306a36Sopenharmony_ci#define IMR_ATIMEND BIT(4) 64062306a36Sopenharmony_ci#define IMR_TBDOK BIT(3) 64162306a36Sopenharmony_ci#define IMR_TBDER BIT(2) 64262306a36Sopenharmony_ci#define IMR_BCNDMAINT8 BIT(1) 64362306a36Sopenharmony_ci#define IMR_BCNDMAINT7 BIT(0) 64462306a36Sopenharmony_ci#define IMR_BCNDMAINT6 BIT(31) 64562306a36Sopenharmony_ci#define IMR_BCNDMAINT5 BIT(30) 64662306a36Sopenharmony_ci#define IMR_BCNDMAINT4 BIT(29) 64762306a36Sopenharmony_ci#define IMR_BCNDMAINT3 BIT(28) 64862306a36Sopenharmony_ci#define IMR_BCNDMAINT2 BIT(27) 64962306a36Sopenharmony_ci#define IMR_BCNDMAINT1 BIT(26) 65062306a36Sopenharmony_ci#define IMR_BCNDOK8 BIT(25) 65162306a36Sopenharmony_ci#define IMR_BCNDOK7 BIT(24) 65262306a36Sopenharmony_ci#define IMR_BCNDOK6 BIT(23) 65362306a36Sopenharmony_ci#define IMR_BCNDOK5 BIT(22) 65462306a36Sopenharmony_ci#define IMR_BCNDOK4 BIT(21) 65562306a36Sopenharmony_ci#define IMR_BCNDOK3 BIT(20) 65662306a36Sopenharmony_ci#define IMR_BCNDOK2 BIT(19) 65762306a36Sopenharmony_ci#define IMR_BCNDOK1 BIT(18) 65862306a36Sopenharmony_ci#define IMR_TIMEOUT2 BIT(17) 65962306a36Sopenharmony_ci#define IMR_TIMEOUT1 BIT(16) 66062306a36Sopenharmony_ci#define IMR_TXFOVW BIT(15) 66162306a36Sopenharmony_ci#define IMR_PSTIMEOUT BIT(14) 66262306a36Sopenharmony_ci#define IMR_BCNINT BIT(13) 66362306a36Sopenharmony_ci#define IMR_RXFOVW BIT(12) 66462306a36Sopenharmony_ci#define IMR_RDU BIT(11) 66562306a36Sopenharmony_ci#define IMR_RXCMDOK BIT(10) 66662306a36Sopenharmony_ci#define IMR_BDOK BIT(9) 66762306a36Sopenharmony_ci#define IMR_HIGHDOK BIT(8) 66862306a36Sopenharmony_ci#define IMR_COMDOK BIT(7) 66962306a36Sopenharmony_ci#define IMR_MGNTDOK BIT(6) 67062306a36Sopenharmony_ci#define IMR_HCCADOK BIT(5) 67162306a36Sopenharmony_ci#define IMR_BKDOK BIT(4) 67262306a36Sopenharmony_ci#define IMR_BEDOK BIT(3) 67362306a36Sopenharmony_ci#define IMR_VIDOK BIT(2) 67462306a36Sopenharmony_ci#define IMR_VODOK BIT(1) 67562306a36Sopenharmony_ci#define IMR_ROK BIT(0) 67662306a36Sopenharmony_ci 67762306a36Sopenharmony_ci#define TPPOLL_BKQ BIT(0) 67862306a36Sopenharmony_ci#define TPPOLL_BEQ BIT(1) 67962306a36Sopenharmony_ci#define TPPOLL_VIQ BIT(2) 68062306a36Sopenharmony_ci#define TPPOLL_VOQ BIT(3) 68162306a36Sopenharmony_ci#define TPPOLL_BQ BIT(4) 68262306a36Sopenharmony_ci#define TPPOLL_CQ BIT(5) 68362306a36Sopenharmony_ci#define TPPOLL_MQ BIT(6) 68462306a36Sopenharmony_ci#define TPPOLL_HQ BIT(7) 68562306a36Sopenharmony_ci#define TPPOLL_HCCAQ BIT(8) 68662306a36Sopenharmony_ci#define TPPOLL_STOPBK BIT(9) 68762306a36Sopenharmony_ci#define TPPOLL_STOPBE BIT(10) 68862306a36Sopenharmony_ci#define TPPOLL_STOPVI BIT(11) 68962306a36Sopenharmony_ci#define TPPOLL_STOPVO BIT(12) 69062306a36Sopenharmony_ci#define TPPOLL_STOPMGT BIT(13) 69162306a36Sopenharmony_ci#define TPPOLL_STOPHIGH BIT(14) 69262306a36Sopenharmony_ci#define TPPOLL_STOPHCCA BIT(15) 69362306a36Sopenharmony_ci#define TPPOLL_SHIFT 8 69462306a36Sopenharmony_ci 69562306a36Sopenharmony_ci#define CCX_CMD_CLM_ENABLE BIT(0) 69662306a36Sopenharmony_ci#define CCX_CMD_NHM_ENABLE BIT(1) 69762306a36Sopenharmony_ci#define CCX_CMD_FUNCTION_ENABLE BIT(8) 69862306a36Sopenharmony_ci#define CCX_CMD_IGNORE_CCA BIT(9) 69962306a36Sopenharmony_ci#define CCX_CMD_IGNORE_TXON BIT(10) 70062306a36Sopenharmony_ci#define CCX_CLM_RESULT_READY BIT(16) 70162306a36Sopenharmony_ci#define CCX_NHM_RESULT_READY BIT(16) 70262306a36Sopenharmony_ci#define CCX_CMD_RESET 0x0 70362306a36Sopenharmony_ci 70462306a36Sopenharmony_ci 70562306a36Sopenharmony_ci#define HWSET_MAX_SIZE_92S 128 70662306a36Sopenharmony_ci#define EFUSE_MAX_SECTION 16 70762306a36Sopenharmony_ci#define EFUSE_REAL_CONTENT_LEN 512 70862306a36Sopenharmony_ci#define EFUSE_OOB_PROTECT_BYTES 15 70962306a36Sopenharmony_ci 71062306a36Sopenharmony_ci#define RTL8190_EEPROM_ID 0x8129 71162306a36Sopenharmony_ci#define EEPROM_HPON 0x02 71262306a36Sopenharmony_ci#define EEPROM_CLK 0x06 71362306a36Sopenharmony_ci#define EEPROM_TESTR 0x08 71462306a36Sopenharmony_ci 71562306a36Sopenharmony_ci#define EEPROM_VID 0x0A 71662306a36Sopenharmony_ci#define EEPROM_DID 0x0C 71762306a36Sopenharmony_ci#define EEPROM_SVID 0x0E 71862306a36Sopenharmony_ci#define EEPROM_SMID 0x10 71962306a36Sopenharmony_ci 72062306a36Sopenharmony_ci#define EEPROM_MAC_ADDR 0x12 72162306a36Sopenharmony_ci#define EEPROM_NODE_ADDRESS_BYTE_0 0x12 72262306a36Sopenharmony_ci 72362306a36Sopenharmony_ci#define EEPROM_PWDIFF 0x54 72462306a36Sopenharmony_ci 72562306a36Sopenharmony_ci#define EEPROM_TXPOWERBASE 0x50 72662306a36Sopenharmony_ci#define EEPROM_TX_PWR_INDEX_RANGE 28 72762306a36Sopenharmony_ci 72862306a36Sopenharmony_ci#define EEPROM_TX_PWR_HT20_DIFF 0x62 72962306a36Sopenharmony_ci#define DEFAULT_HT20_TXPWR_DIFF 2 73062306a36Sopenharmony_ci#define EEPROM_TX_PWR_OFDM_DIFF 0x65 73162306a36Sopenharmony_ci 73262306a36Sopenharmony_ci#define EEPROM_TXPWRGROUP 0x67 73362306a36Sopenharmony_ci#define EEPROM_REGULATORY 0x6D 73462306a36Sopenharmony_ci 73562306a36Sopenharmony_ci#define TX_PWR_SAFETY_CHK 0x6D 73662306a36Sopenharmony_ci#define EEPROM_TXPWINDEX_CCK_24G 0x5D 73762306a36Sopenharmony_ci#define EEPROM_TXPWINDEX_OFDM_24G 0x6B 73862306a36Sopenharmony_ci#define EEPROM_HT2T_CH1_A 0x6c 73962306a36Sopenharmony_ci#define EEPROM_HT2T_CH7_A 0x6d 74062306a36Sopenharmony_ci#define EEPROM_HT2T_CH13_A 0x6e 74162306a36Sopenharmony_ci#define EEPROM_HT2T_CH1_B 0x6f 74262306a36Sopenharmony_ci#define EEPROM_HT2T_CH7_B 0x70 74362306a36Sopenharmony_ci#define EEPROM_HT2T_CH13_B 0x71 74462306a36Sopenharmony_ci 74562306a36Sopenharmony_ci#define EEPROM_TSSI_A 0x74 74662306a36Sopenharmony_ci#define EEPROM_TSSI_B 0x75 74762306a36Sopenharmony_ci 74862306a36Sopenharmony_ci#define EEPROM_RFIND_POWERDIFF 0x76 74962306a36Sopenharmony_ci#define EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF 0x3 75062306a36Sopenharmony_ci 75162306a36Sopenharmony_ci#define EEPROM_THERMALMETER 0x77 75262306a36Sopenharmony_ci#define EEPROM_BLUETOOTH_COEXIST 0x78 75362306a36Sopenharmony_ci#define EEPROM_BLUETOOTH_TYPE 0x4f 75462306a36Sopenharmony_ci 75562306a36Sopenharmony_ci#define EEPROM_OPTIONAL 0x78 75662306a36Sopenharmony_ci#define EEPROM_WOWLAN 0x78 75762306a36Sopenharmony_ci 75862306a36Sopenharmony_ci#define EEPROM_CRYSTALCAP 0x79 75962306a36Sopenharmony_ci#define EEPROM_CHANNELPLAN 0x7B 76062306a36Sopenharmony_ci#define EEPROM_VERSION 0x7C 76162306a36Sopenharmony_ci#define EEPROM_CUSTOMID 0x7A 76262306a36Sopenharmony_ci#define EEPROM_BOARDTYPE 0x7E 76362306a36Sopenharmony_ci 76462306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_FCC 0x0 76562306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_IC 0x1 76662306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_ETSI 0x2 76762306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_SPAIN 0x3 76862306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_FRANCE 0x4 76962306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_MKK 0x5 77062306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_MKK1 0x6 77162306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_ISRAEL 0x7 77262306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_TELEC 0x8 77362306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_GLOBAL_DOMAIN 0x9 77462306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_WORLD_WIDE_13 0xA 77562306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_NCC 0xB 77662306a36Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_BY_HW_MASK 0x80 77762306a36Sopenharmony_ci 77862306a36Sopenharmony_ci#define FW_DIG_DISABLE 0xfd00cc00 77962306a36Sopenharmony_ci#define FW_DIG_ENABLE 0xfd000000 78062306a36Sopenharmony_ci#define FW_DIG_HALT 0xfd000001 78162306a36Sopenharmony_ci#define FW_DIG_RESUME 0xfd000002 78262306a36Sopenharmony_ci#define FW_HIGH_PWR_DISABLE 0xfd000008 78362306a36Sopenharmony_ci#define FW_HIGH_PWR_ENABLE 0xfd000009 78462306a36Sopenharmony_ci#define FW_ADD_A2_ENTRY 0xfd000016 78562306a36Sopenharmony_ci#define FW_TXPWR_TRACK_ENABLE 0xfd000017 78662306a36Sopenharmony_ci#define FW_TXPWR_TRACK_DISABLE 0xfd000018 78762306a36Sopenharmony_ci#define FW_TXPWR_TRACK_THERMAL 0xfd000019 78862306a36Sopenharmony_ci#define FW_TXANT_SWITCH_ENABLE 0xfd000023 78962306a36Sopenharmony_ci#define FW_TXANT_SWITCH_DISABLE 0xfd000024 79062306a36Sopenharmony_ci#define FW_RA_INIT 0xfd000026 79162306a36Sopenharmony_ci#define FW_CTRL_DM_BY_DRIVER 0Xfd00002a 79262306a36Sopenharmony_ci#define FW_RA_IOT_BG_COMB 0xfd000030 79362306a36Sopenharmony_ci#define FW_RA_IOT_N_COMB 0xfd000031 79462306a36Sopenharmony_ci#define FW_RA_REFRESH 0xfd0000a0 79562306a36Sopenharmony_ci#define FW_RA_UPDATE_MASK 0xfd0000a2 79662306a36Sopenharmony_ci#define FW_RA_DISABLE 0xfd0000a4 79762306a36Sopenharmony_ci#define FW_RA_ACTIVE 0xfd0000a6 79862306a36Sopenharmony_ci#define FW_RA_DISABLE_RSSI_MASK 0xfd0000ac 79962306a36Sopenharmony_ci#define FW_RA_ENABLE_RSSI_MASK 0xfd0000ad 80062306a36Sopenharmony_ci#define FW_RA_RESET 0xfd0000af 80162306a36Sopenharmony_ci#define FW_DM_DISABLE 0xfd00aa00 80262306a36Sopenharmony_ci#define FW_IQK_ENABLE 0xf0000020 80362306a36Sopenharmony_ci#define FW_IQK_SUCCESS 0x0000dddd 80462306a36Sopenharmony_ci#define FW_IQK_FAIL 0x0000ffff 80562306a36Sopenharmony_ci#define FW_OP_FAILURE 0xffffffff 80662306a36Sopenharmony_ci#define FW_TX_FEEDBACK_NONE 0xfb000000 80762306a36Sopenharmony_ci#define FW_TX_FEEDBACK_DTM_ENABLE (FW_TX_FEEDBACK_NONE | 0x1) 80862306a36Sopenharmony_ci#define FW_TX_FEEDBACK_CCX_ENABL (FW_TX_FEEDBACK_NONE | 0x2) 80962306a36Sopenharmony_ci#define FW_BB_RESET_ENABLE 0xff00000d 81062306a36Sopenharmony_ci#define FW_BB_RESET_DISABLE 0xff00000e 81162306a36Sopenharmony_ci#define FW_CCA_CHK_ENABLE 0xff000011 81262306a36Sopenharmony_ci#define FW_CCK_RESET_CNT 0xff000013 81362306a36Sopenharmony_ci#define FW_LPS_ENTER 0xfe000010 81462306a36Sopenharmony_ci#define FW_LPS_LEAVE 0xfe000011 81562306a36Sopenharmony_ci#define FW_INDIRECT_READ 0xf2000000 81662306a36Sopenharmony_ci#define FW_INDIRECT_WRITE 0xf2000001 81762306a36Sopenharmony_ci#define FW_CHAN_SET 0xf3000001 81862306a36Sopenharmony_ci 81962306a36Sopenharmony_ci#define RFPC 0x5F 82062306a36Sopenharmony_ci#define RCR_9356SEL BIT(6) 82162306a36Sopenharmony_ci#define TCR_LRL_OFFSET 0 82262306a36Sopenharmony_ci#define TCR_SRL_OFFSET 8 82362306a36Sopenharmony_ci#define TCR_MXDMA_OFFSET 21 82462306a36Sopenharmony_ci#define TCR_SAT BIT(24) 82562306a36Sopenharmony_ci#define RCR_MXDMA_OFFSET 8 82662306a36Sopenharmony_ci#define RCR_FIFO_OFFSET 13 82762306a36Sopenharmony_ci#define RCR_ONLYERLPKT BIT(31) 82862306a36Sopenharmony_ci#define CWR 0xDC 82962306a36Sopenharmony_ci#define RETRYCTR 0xDE 83062306a36Sopenharmony_ci 83162306a36Sopenharmony_ci#define CPU_GEN_SYSTEM_RESET 0x00000001 83262306a36Sopenharmony_ci 83362306a36Sopenharmony_ci#define CCX_COMMAND_REG 0x890 83462306a36Sopenharmony_ci#define CLM_PERIOD_REG 0x894 83562306a36Sopenharmony_ci#define NHM_PERIOD_REG 0x896 83662306a36Sopenharmony_ci 83762306a36Sopenharmony_ci#define NHM_THRESHOLD0 0x898 83862306a36Sopenharmony_ci#define NHM_THRESHOLD1 0x899 83962306a36Sopenharmony_ci#define NHM_THRESHOLD2 0x89A 84062306a36Sopenharmony_ci#define NHM_THRESHOLD3 0x89B 84162306a36Sopenharmony_ci#define NHM_THRESHOLD4 0x89C 84262306a36Sopenharmony_ci#define NHM_THRESHOLD5 0x89D 84362306a36Sopenharmony_ci#define NHM_THRESHOLD6 0x89E 84462306a36Sopenharmony_ci#define CLM_RESULT_REG 0x8D0 84562306a36Sopenharmony_ci#define NHM_RESULT_REG 0x8D4 84662306a36Sopenharmony_ci#define NHM_RPI_COUNTER0 0x8D8 84762306a36Sopenharmony_ci#define NHM_RPI_COUNTER1 0x8D9 84862306a36Sopenharmony_ci#define NHM_RPI_COUNTER2 0x8DA 84962306a36Sopenharmony_ci#define NHM_RPI_COUNTER3 0x8DB 85062306a36Sopenharmony_ci#define NHM_RPI_COUNTER4 0x8DC 85162306a36Sopenharmony_ci#define NHM_RPI_COUNTER5 0x8DD 85262306a36Sopenharmony_ci#define NHM_RPI_COUNTER6 0x8DE 85362306a36Sopenharmony_ci#define NHM_RPI_COUNTER7 0x8DF 85462306a36Sopenharmony_ci 85562306a36Sopenharmony_ci#define HAL_8192S_HW_GPIO_OFF_BIT BIT(3) 85662306a36Sopenharmony_ci#define HAL_8192S_HW_GPIO_OFF_MASK 0xF7 85762306a36Sopenharmony_ci#define HAL_8192S_HW_GPIO_WPS_BIT BIT(4) 85862306a36Sopenharmony_ci 85962306a36Sopenharmony_ci#define RPMAC_RESET 0x100 86062306a36Sopenharmony_ci#define RPMAC_TXSTART 0x104 86162306a36Sopenharmony_ci#define RPMAC_TXLEGACYSIG 0x108 86262306a36Sopenharmony_ci#define RPMAC_TXHTSIG1 0x10c 86362306a36Sopenharmony_ci#define RPMAC_TXHTSIG2 0x110 86462306a36Sopenharmony_ci#define RPMAC_PHYDEBUG 0x114 86562306a36Sopenharmony_ci#define RPMAC_TXPACKETNNM 0x118 86662306a36Sopenharmony_ci#define RPMAC_TXIDLE 0x11c 86762306a36Sopenharmony_ci#define RPMAC_TXMACHEADER0 0x120 86862306a36Sopenharmony_ci#define RPMAC_TXMACHEADER1 0x124 86962306a36Sopenharmony_ci#define RPMAC_TXMACHEADER2 0x128 87062306a36Sopenharmony_ci#define RPMAC_TXMACHEADER3 0x12c 87162306a36Sopenharmony_ci#define RPMAC_TXMACHEADER4 0x130 87262306a36Sopenharmony_ci#define RPMAC_TXMACHEADER5 0x134 87362306a36Sopenharmony_ci#define RPMAC_TXDATATYPE 0x138 87462306a36Sopenharmony_ci#define RPMAC_TXRANDOMSEED 0x13c 87562306a36Sopenharmony_ci#define RPMAC_CCKPLCPPREAMBLE 0x140 87662306a36Sopenharmony_ci#define RPMAC_CCKPLCPHEADER 0x144 87762306a36Sopenharmony_ci#define RPMAC_CCKCRC16 0x148 87862306a36Sopenharmony_ci#define RPMAC_OFDMRXCRC32OK 0x170 87962306a36Sopenharmony_ci#define RPMAC_OFDMRXCRC32ER 0x174 88062306a36Sopenharmony_ci#define RPMAC_OFDMRXPARITYER 0x178 88162306a36Sopenharmony_ci#define RPMAC_OFDMRXCRC8ER 0x17c 88262306a36Sopenharmony_ci#define RPMAC_CCKCRXRC16ER 0x180 88362306a36Sopenharmony_ci#define RPMAC_CCKCRXRC32ER 0x184 88462306a36Sopenharmony_ci#define RPMAC_CCKCRXRC32OK 0x188 88562306a36Sopenharmony_ci#define RPMAC_TXSTATUS 0x18c 88662306a36Sopenharmony_ci 88762306a36Sopenharmony_ci#define RF_BB_CMD_ADDR 0x02c0 88862306a36Sopenharmony_ci#define RF_BB_CMD_DATA 0x02c4 88962306a36Sopenharmony_ci 89062306a36Sopenharmony_ci#define RFPGA0_RFMOD 0x800 89162306a36Sopenharmony_ci 89262306a36Sopenharmony_ci#define RFPGA0_TXINFO 0x804 89362306a36Sopenharmony_ci#define RFPGA0_PSDFUNCTION 0x808 89462306a36Sopenharmony_ci 89562306a36Sopenharmony_ci#define RFPGA0_TXGAINSTAGE 0x80c 89662306a36Sopenharmony_ci 89762306a36Sopenharmony_ci#define RFPGA0_RFTIMING1 0x810 89862306a36Sopenharmony_ci#define RFPGA0_RFTIMING2 0x814 89962306a36Sopenharmony_ci#define RFPGA0_XA_HSSIPARAMETER1 0x820 90062306a36Sopenharmony_ci#define RFPGA0_XA_HSSIPARAMETER2 0x824 90162306a36Sopenharmony_ci#define RFPGA0_XB_HSSIPARAMETER1 0x828 90262306a36Sopenharmony_ci#define RFPGA0_XB_HSSIPARAMETER2 0x82c 90362306a36Sopenharmony_ci#define RFPGA0_XC_HSSIPARAMETER1 0x830 90462306a36Sopenharmony_ci#define RFPGA0_XC_HSSIPARAMETER2 0x834 90562306a36Sopenharmony_ci#define RFPGA0_XD_HSSIPARAMETER1 0x838 90662306a36Sopenharmony_ci#define RFPGA0_XD_HSSIPARAMETER2 0x83c 90762306a36Sopenharmony_ci#define RFPGA0_XA_LSSIPARAMETER 0x840 90862306a36Sopenharmony_ci#define RFPGA0_XB_LSSIPARAMETER 0x844 90962306a36Sopenharmony_ci#define RFPGA0_XC_LSSIPARAMETER 0x848 91062306a36Sopenharmony_ci#define RFPGA0_XD_LSSIPARAMETER 0x84c 91162306a36Sopenharmony_ci 91262306a36Sopenharmony_ci#define RFPGA0_RFWAKEUP_PARAMETER 0x850 91362306a36Sopenharmony_ci#define RFPGA0_RFSLEEPUP_PARAMETER 0x854 91462306a36Sopenharmony_ci 91562306a36Sopenharmony_ci#define RFPGA0_XAB_SWITCHCONTROL 0x858 91662306a36Sopenharmony_ci#define RFPGA0_XCD_SWITCHCONTROL 0x85c 91762306a36Sopenharmony_ci 91862306a36Sopenharmony_ci#define RFPGA0_XA_RFINTERFACEOE 0x860 91962306a36Sopenharmony_ci#define RFPGA0_XB_RFINTERFACEOE 0x864 92062306a36Sopenharmony_ci#define RFPGA0_XC_RFINTERFACEOE 0x868 92162306a36Sopenharmony_ci#define RFPGA0_XD_RFINTERFACEOE 0x86c 92262306a36Sopenharmony_ci 92362306a36Sopenharmony_ci#define RFPGA0_XAB_RFINTERFACESW 0x870 92462306a36Sopenharmony_ci#define RFPGA0_XCD_RFINTERFACESW 0x874 92562306a36Sopenharmony_ci 92662306a36Sopenharmony_ci#define RFPGA0_XAB_RFPARAMETER 0x878 92762306a36Sopenharmony_ci#define RFPGA0_XCD_RFPARAMETER 0x87c 92862306a36Sopenharmony_ci 92962306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER1 0x880 93062306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER2 0x884 93162306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER3 0x888 93262306a36Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER4 0x88c 93362306a36Sopenharmony_ci 93462306a36Sopenharmony_ci#define RFPGA0_XA_LSSIREADBACK 0x8a0 93562306a36Sopenharmony_ci#define RFPGA0_XB_LSSIREADBACK 0x8a4 93662306a36Sopenharmony_ci#define RFPGA0_XC_LSSIREADBACK 0x8a8 93762306a36Sopenharmony_ci#define RFPGA0_XD_LSSIREADBACK 0x8ac 93862306a36Sopenharmony_ci 93962306a36Sopenharmony_ci#define RFPGA0_PSDREPORT 0x8b4 94062306a36Sopenharmony_ci#define TRANSCEIVERA_HSPI_READBACK 0x8b8 94162306a36Sopenharmony_ci#define TRANSCEIVERB_HSPI_READBACK 0x8bc 94262306a36Sopenharmony_ci#define RFPGA0_XAB_RFINTERFACERB 0x8e0 94362306a36Sopenharmony_ci#define RFPGA0_XCD_RFINTERFACERB 0x8e4 94462306a36Sopenharmony_ci#define RFPGA1_RFMOD 0x900 94562306a36Sopenharmony_ci 94662306a36Sopenharmony_ci#define RFPGA1_TXBLOCK 0x904 94762306a36Sopenharmony_ci#define RFPGA1_DEBUGSELECT 0x908 94862306a36Sopenharmony_ci#define RFPGA1_TXINFO 0x90c 94962306a36Sopenharmony_ci 95062306a36Sopenharmony_ci#define RCCK0_SYSTEM 0xa00 95162306a36Sopenharmony_ci 95262306a36Sopenharmony_ci#define RCCK0_AFESETTING 0xa04 95362306a36Sopenharmony_ci#define RCCK0_CCA 0xa08 95462306a36Sopenharmony_ci 95562306a36Sopenharmony_ci#define RCCK0_RXAGC1 0xa0c 95662306a36Sopenharmony_ci#define RCCK0_RXAGC2 0xa10 95762306a36Sopenharmony_ci 95862306a36Sopenharmony_ci#define RCCK0_RXHP 0xa14 95962306a36Sopenharmony_ci 96062306a36Sopenharmony_ci#define RCCK0_DSPPARAMETER1 0xa18 96162306a36Sopenharmony_ci#define RCCK0_DSPPARAMETER2 0xa1c 96262306a36Sopenharmony_ci 96362306a36Sopenharmony_ci#define RCCK0_TXFILTER1 0xa20 96462306a36Sopenharmony_ci#define RCCK0_TXFILTER2 0xa24 96562306a36Sopenharmony_ci#define RCCK0_DEBUGPORT 0xa28 96662306a36Sopenharmony_ci#define RCCK0_FALSEALARMREPORT 0xa2c 96762306a36Sopenharmony_ci#define RCCK0_TRSSIREPORT 0xa50 96862306a36Sopenharmony_ci#define RCCK0_RXREPORT 0xa54 96962306a36Sopenharmony_ci#define RCCK0_FACOUNTERLOWER 0xa5c 97062306a36Sopenharmony_ci#define RCCK0_FACOUNTERUPPER 0xa58 97162306a36Sopenharmony_ci 97262306a36Sopenharmony_ci#define ROFDM0_LSTF 0xc00 97362306a36Sopenharmony_ci 97462306a36Sopenharmony_ci#define ROFDM0_TRXPATHENABLE 0xc04 97562306a36Sopenharmony_ci#define ROFDM0_TRMUXPAR 0xc08 97662306a36Sopenharmony_ci#define ROFDM0_TRSWISOLATION 0xc0c 97762306a36Sopenharmony_ci 97862306a36Sopenharmony_ci#define ROFDM0_XARXAFE 0xc10 97962306a36Sopenharmony_ci#define ROFDM0_XARXIQIMBALANCE 0xc14 98062306a36Sopenharmony_ci#define ROFDM0_XBRXAFE 0xc18 98162306a36Sopenharmony_ci#define ROFDM0_XBRXIQIMBALANCE 0xc1c 98262306a36Sopenharmony_ci#define ROFDM0_XCRXAFE 0xc20 98362306a36Sopenharmony_ci#define ROFDM0_XCRXIQIMBALANCE 0xc24 98462306a36Sopenharmony_ci#define ROFDM0_XDRXAFE 0xc28 98562306a36Sopenharmony_ci#define ROFDM0_XDRXIQIMBALANCE 0xc2c 98662306a36Sopenharmony_ci 98762306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR1 0xc30 98862306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR2 0xc34 98962306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR3 0xc38 99062306a36Sopenharmony_ci#define ROFDM0_RXDETECTOR4 0xc3c 99162306a36Sopenharmony_ci 99262306a36Sopenharmony_ci#define ROFDM0_RXDSP 0xc40 99362306a36Sopenharmony_ci#define ROFDM0_CFO_AND_DAGC 0xc44 99462306a36Sopenharmony_ci#define ROFDM0_CCADROP_THRESHOLD 0xc48 99562306a36Sopenharmony_ci#define ROFDM0_ECCA_THRESHOLD 0xc4c 99662306a36Sopenharmony_ci 99762306a36Sopenharmony_ci#define ROFDM0_XAAGCCORE1 0xc50 99862306a36Sopenharmony_ci#define ROFDM0_XAAGCCORE2 0xc54 99962306a36Sopenharmony_ci#define ROFDM0_XBAGCCORE1 0xc58 100062306a36Sopenharmony_ci#define ROFDM0_XBAGCCORE2 0xc5c 100162306a36Sopenharmony_ci#define ROFDM0_XCAGCCORE1 0xc60 100262306a36Sopenharmony_ci#define ROFDM0_XCAGCCORE2 0xc64 100362306a36Sopenharmony_ci#define ROFDM0_XDAGCCORE1 0xc68 100462306a36Sopenharmony_ci#define ROFDM0_XDAGCCORE2 0xc6c 100562306a36Sopenharmony_ci 100662306a36Sopenharmony_ci#define ROFDM0_AGCPARAMETER1 0xc70 100762306a36Sopenharmony_ci#define ROFDM0_AGCPARAMETER2 0xc74 100862306a36Sopenharmony_ci#define ROFDM0_AGCRSSITABLE 0xc78 100962306a36Sopenharmony_ci#define ROFDM0_HTSTFAGC 0xc7c 101062306a36Sopenharmony_ci 101162306a36Sopenharmony_ci#define ROFDM0_XATXIQIMBALANCE 0xc80 101262306a36Sopenharmony_ci#define ROFDM0_XATXAFE 0xc84 101362306a36Sopenharmony_ci#define ROFDM0_XBTXIQIMBALANCE 0xc88 101462306a36Sopenharmony_ci#define ROFDM0_XBTXAFE 0xc8c 101562306a36Sopenharmony_ci#define ROFDM0_XCTXIQIMBALANCE 0xc90 101662306a36Sopenharmony_ci#define ROFDM0_XCTXAFE 0xc94 101762306a36Sopenharmony_ci#define ROFDM0_XDTXIQIMBALANCE 0xc98 101862306a36Sopenharmony_ci#define ROFDM0_XDTXAFE 0xc9c 101962306a36Sopenharmony_ci 102062306a36Sopenharmony_ci#define ROFDM0_RXHP_PARAMETER 0xce0 102162306a36Sopenharmony_ci#define ROFDM0_TXPSEUDO_NOISE_WGT 0xce4 102262306a36Sopenharmony_ci#define ROFDM0_FRAME_SYNC 0xcf0 102362306a36Sopenharmony_ci#define ROFDM0_DFSREPORT 0xcf4 102462306a36Sopenharmony_ci#define ROFDM0_TXCOEFF1 0xca4 102562306a36Sopenharmony_ci#define ROFDM0_TXCOEFF2 0xca8 102662306a36Sopenharmony_ci#define ROFDM0_TXCOEFF3 0xcac 102762306a36Sopenharmony_ci#define ROFDM0_TXCOEFF4 0xcb0 102862306a36Sopenharmony_ci#define ROFDM0_TXCOEFF5 0xcb4 102962306a36Sopenharmony_ci#define ROFDM0_TXCOEFF6 0xcb8 103062306a36Sopenharmony_ci 103162306a36Sopenharmony_ci 103262306a36Sopenharmony_ci#define ROFDM1_LSTF 0xd00 103362306a36Sopenharmony_ci#define ROFDM1_TRXPATHENABLE 0xd04 103462306a36Sopenharmony_ci 103562306a36Sopenharmony_ci#define ROFDM1_CFO 0xd08 103662306a36Sopenharmony_ci#define ROFDM1_CSI1 0xd10 103762306a36Sopenharmony_ci#define ROFDM1_SBD 0xd14 103862306a36Sopenharmony_ci#define ROFDM1_CSI2 0xd18 103962306a36Sopenharmony_ci#define ROFDM1_CFOTRACKING 0xd2c 104062306a36Sopenharmony_ci#define ROFDM1_TRXMESAURE1 0xd34 104162306a36Sopenharmony_ci#define ROFDM1_INTF_DET 0xd3c 104262306a36Sopenharmony_ci#define ROFDM1_PSEUDO_NOISESTATEAB 0xd50 104362306a36Sopenharmony_ci#define ROFDM1_PSEUDO_NOISESTATECD 0xd54 104462306a36Sopenharmony_ci#define ROFDM1_RX_PSEUDO_NOISE_WGT 0xd58 104562306a36Sopenharmony_ci 104662306a36Sopenharmony_ci#define ROFDM_PHYCOUNTER1 0xda0 104762306a36Sopenharmony_ci#define ROFDM_PHYCOUNTER2 0xda4 104862306a36Sopenharmony_ci#define ROFDM_PHYCOUNTER3 0xda8 104962306a36Sopenharmony_ci 105062306a36Sopenharmony_ci#define ROFDM_SHORT_CFOAB 0xdac 105162306a36Sopenharmony_ci#define ROFDM_SHORT_CFOCD 0xdb0 105262306a36Sopenharmony_ci#define ROFDM_LONG_CFOAB 0xdb4 105362306a36Sopenharmony_ci#define ROFDM_LONG_CFOCD 0xdb8 105462306a36Sopenharmony_ci#define ROFDM_TAIL_CFOAB 0xdbc 105562306a36Sopenharmony_ci#define ROFDM_TAIL_CFOCD 0xdc0 105662306a36Sopenharmony_ci#define ROFDM_PW_MEASURE1 0xdc4 105762306a36Sopenharmony_ci#define ROFDM_PW_MEASURE2 0xdc8 105862306a36Sopenharmony_ci#define ROFDM_BW_REPORT 0xdcc 105962306a36Sopenharmony_ci#define ROFDM_AGC_REPORT 0xdd0 106062306a36Sopenharmony_ci#define ROFDM_RXSNR 0xdd4 106162306a36Sopenharmony_ci#define ROFDM_RXEVMCSI 0xdd8 106262306a36Sopenharmony_ci#define ROFDM_SIG_REPORT 0xddc 106362306a36Sopenharmony_ci 106462306a36Sopenharmony_ci 106562306a36Sopenharmony_ci#define RTXAGC_RATE18_06 0xe00 106662306a36Sopenharmony_ci#define RTXAGC_RATE54_24 0xe04 106762306a36Sopenharmony_ci#define RTXAGC_CCK_MCS32 0xe08 106862306a36Sopenharmony_ci#define RTXAGC_MCS03_MCS00 0xe10 106962306a36Sopenharmony_ci#define RTXAGC_MCS07_MCS04 0xe14 107062306a36Sopenharmony_ci#define RTXAGC_MCS11_MCS08 0xe18 107162306a36Sopenharmony_ci#define RTXAGC_MCS15_MCS12 0xe1c 107262306a36Sopenharmony_ci 107362306a36Sopenharmony_ci 107462306a36Sopenharmony_ci#define RF_AC 0x00 107562306a36Sopenharmony_ci#define RF_IQADJ_G1 0x01 107662306a36Sopenharmony_ci#define RF_IQADJ_G2 0x02 107762306a36Sopenharmony_ci#define RF_POW_TRSW 0x05 107862306a36Sopenharmony_ci#define RF_GAIN_RX 0x06 107962306a36Sopenharmony_ci#define RF_GAIN_TX 0x07 108062306a36Sopenharmony_ci#define RF_TXM_IDAC 0x08 108162306a36Sopenharmony_ci#define RF_BS_IQGEN 0x0F 108262306a36Sopenharmony_ci 108362306a36Sopenharmony_ci#define RF_MODE1 0x10 108462306a36Sopenharmony_ci#define RF_MODE2 0x11 108562306a36Sopenharmony_ci#define RF_RX_AGC_HP 0x12 108662306a36Sopenharmony_ci#define RF_TX_AGC 0x13 108762306a36Sopenharmony_ci#define RF_BIAS 0x14 108862306a36Sopenharmony_ci#define RF_IPA 0x15 108962306a36Sopenharmony_ci#define RF_POW_ABILITY 0x17 109062306a36Sopenharmony_ci#define RF_MODE_AG 0x18 109162306a36Sopenharmony_ci#define RF_CHANNEL 0x18 109262306a36Sopenharmony_ci#define RF_CHNLBW 0x18 109362306a36Sopenharmony_ci#define RF_TOP 0x19 109462306a36Sopenharmony_ci#define RF_RX_G1 0x1A 109562306a36Sopenharmony_ci#define RF_RX_G2 0x1B 109662306a36Sopenharmony_ci#define RF_RX_BB2 0x1C 109762306a36Sopenharmony_ci#define RF_RX_BB1 0x1D 109862306a36Sopenharmony_ci#define RF_RCK1 0x1E 109962306a36Sopenharmony_ci#define RF_RCK2 0x1F 110062306a36Sopenharmony_ci 110162306a36Sopenharmony_ci#define RF_TX_G1 0x20 110262306a36Sopenharmony_ci#define RF_TX_G2 0x21 110362306a36Sopenharmony_ci#define RF_TX_G3 0x22 110462306a36Sopenharmony_ci#define RF_TX_BB1 0x23 110562306a36Sopenharmony_ci#define RF_T_METER 0x24 110662306a36Sopenharmony_ci#define RF_SYN_G1 0x25 110762306a36Sopenharmony_ci#define RF_SYN_G2 0x26 110862306a36Sopenharmony_ci#define RF_SYN_G3 0x27 110962306a36Sopenharmony_ci#define RF_SYN_G4 0x28 111062306a36Sopenharmony_ci#define RF_SYN_G5 0x29 111162306a36Sopenharmony_ci#define RF_SYN_G6 0x2A 111262306a36Sopenharmony_ci#define RF_SYN_G7 0x2B 111362306a36Sopenharmony_ci#define RF_SYN_G8 0x2C 111462306a36Sopenharmony_ci 111562306a36Sopenharmony_ci#define RF_RCK_OS 0x30 111662306a36Sopenharmony_ci#define RF_TXPA_G1 0x31 111762306a36Sopenharmony_ci#define RF_TXPA_G2 0x32 111862306a36Sopenharmony_ci#define RF_TXPA_G3 0x33 111962306a36Sopenharmony_ci 112062306a36Sopenharmony_ci#define BRFMOD 0x1 112162306a36Sopenharmony_ci#define BCCKEN 0x1000000 112262306a36Sopenharmony_ci#define BOFDMEN 0x2000000 112362306a36Sopenharmony_ci 112462306a36Sopenharmony_ci#define BXBTXAGC 0xf00 112562306a36Sopenharmony_ci#define BXCTXAGC 0xf000 112662306a36Sopenharmony_ci#define BXDTXAGC 0xf0000 112762306a36Sopenharmony_ci 112862306a36Sopenharmony_ci#define B3WIRE_DATALENGTH 0x800 112962306a36Sopenharmony_ci#define B3WIRE_ADDRESSLENGTH 0x400 113062306a36Sopenharmony_ci 113162306a36Sopenharmony_ci#define BRFSI_RFENV 0x10 113262306a36Sopenharmony_ci 113362306a36Sopenharmony_ci#define BLSSI_READADDRESS 0x7f800000 113462306a36Sopenharmony_ci#define BLSSI_READEDGE 0x80000000 113562306a36Sopenharmony_ci#define BLSSI_READBACK_DATA 0xfffff 113662306a36Sopenharmony_ci 113762306a36Sopenharmony_ci#define BADCLKPHASE 0x4000000 113862306a36Sopenharmony_ci 113962306a36Sopenharmony_ci#define BCCK_SIDEBAND 0x10 114062306a36Sopenharmony_ci 114162306a36Sopenharmony_ci#define BTX_AGCRATECCK 0x7f00 114262306a36Sopenharmony_ci 114362306a36Sopenharmony_ci#endif 1144