18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Copyright(c) 2009-2012 Realtek Corporation.*/ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef __REALTEK_92S_REG_H__ 58c2ecf20Sopenharmony_ci#define __REALTEK_92S_REG_H__ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* 1. System Configuration Registers */ 88c2ecf20Sopenharmony_ci#define REG_SYS_ISO_CTRL 0x0000 98c2ecf20Sopenharmony_ci#define REG_SYS_FUNC_EN 0x0002 108c2ecf20Sopenharmony_ci#define PMC_FSM 0x0004 118c2ecf20Sopenharmony_ci#define SYS_CLKR 0x0008 128c2ecf20Sopenharmony_ci#define EPROM_CMD 0x000A 138c2ecf20Sopenharmony_ci#define EE_VPD 0x000C 148c2ecf20Sopenharmony_ci#define AFE_MISC 0x0010 158c2ecf20Sopenharmony_ci#define SPS0_CTRL 0x0011 168c2ecf20Sopenharmony_ci#define SPS1_CTRL 0x0018 178c2ecf20Sopenharmony_ci#define RF_CTRL 0x001F 188c2ecf20Sopenharmony_ci#define LDOA15_CTRL 0x0020 198c2ecf20Sopenharmony_ci#define LDOV12D_CTRL 0x0021 208c2ecf20Sopenharmony_ci#define LDOHCI12_CTRL 0x0022 218c2ecf20Sopenharmony_ci#define LDO_USB_SDIO 0x0023 228c2ecf20Sopenharmony_ci#define LPLDO_CTRL 0x0024 238c2ecf20Sopenharmony_ci#define AFE_XTAL_CTRL 0x0026 248c2ecf20Sopenharmony_ci#define AFE_PLL_CTRL 0x0028 258c2ecf20Sopenharmony_ci#define REG_EFUSE_CTRL 0x0030 268c2ecf20Sopenharmony_ci#define REG_EFUSE_TEST 0x0034 278c2ecf20Sopenharmony_ci#define PWR_DATA 0x0038 288c2ecf20Sopenharmony_ci#define DBG_PORT 0x003A 298c2ecf20Sopenharmony_ci#define DPS_TIMER 0x003C 308c2ecf20Sopenharmony_ci#define RCLK_MON 0x003E 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci/* 2. Command Control Registers */ 338c2ecf20Sopenharmony_ci#define CMDR 0x0040 348c2ecf20Sopenharmony_ci#define TXPAUSE 0x0042 358c2ecf20Sopenharmony_ci#define LBKMD_SEL 0x0043 368c2ecf20Sopenharmony_ci#define TCR 0x0044 378c2ecf20Sopenharmony_ci#define RCR 0x0048 388c2ecf20Sopenharmony_ci#define MSR 0x004C 398c2ecf20Sopenharmony_ci#define SYSF_CFG 0x004D 408c2ecf20Sopenharmony_ci#define RX_PKY_LIMIT 0x004E 418c2ecf20Sopenharmony_ci#define MBIDCTRL 0x004F 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci/* 3. MACID Setting Registers */ 448c2ecf20Sopenharmony_ci#define MACIDR 0x0050 458c2ecf20Sopenharmony_ci#define MACIDR0 0x0050 468c2ecf20Sopenharmony_ci#define MACIDR4 0x0054 478c2ecf20Sopenharmony_ci#define BSSIDR 0x0058 488c2ecf20Sopenharmony_ci#define HWVID 0x005E 498c2ecf20Sopenharmony_ci#define MAR 0x0060 508c2ecf20Sopenharmony_ci#define MBIDCAMCONTENT 0x0068 518c2ecf20Sopenharmony_ci#define MBIDCAMCFG 0x0070 528c2ecf20Sopenharmony_ci#define BUILDTIME 0x0074 538c2ecf20Sopenharmony_ci#define BUILDUSER 0x0078 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#define IDR0 MACIDR0 568c2ecf20Sopenharmony_ci#define IDR4 MACIDR4 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci/* 4. Timing Control Registers */ 598c2ecf20Sopenharmony_ci#define TSFR 0x0080 608c2ecf20Sopenharmony_ci#define SLOT_TIME 0x0089 618c2ecf20Sopenharmony_ci#define USTIME 0x008A 628c2ecf20Sopenharmony_ci#define SIFS_CCK 0x008C 638c2ecf20Sopenharmony_ci#define SIFS_OFDM 0x008E 648c2ecf20Sopenharmony_ci#define PIFS_TIME 0x0090 658c2ecf20Sopenharmony_ci#define ACK_TIMEOUT 0x0091 668c2ecf20Sopenharmony_ci#define EIFSTR 0x0092 678c2ecf20Sopenharmony_ci#define BCN_INTERVAL 0x0094 688c2ecf20Sopenharmony_ci#define ATIMWND 0x0096 698c2ecf20Sopenharmony_ci#define BCN_DRV_EARLY_INT 0x0098 708c2ecf20Sopenharmony_ci#define BCN_DMATIME 0x009A 718c2ecf20Sopenharmony_ci#define BCN_ERR_THRESH 0x009C 728c2ecf20Sopenharmony_ci#define MLT 0x009D 738c2ecf20Sopenharmony_ci#define RSVD_MAC_TUNE_US 0x009E 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci/* 5. FIFO Control Registers */ 768c2ecf20Sopenharmony_ci#define RQPN 0x00A0 778c2ecf20Sopenharmony_ci#define RQPN1 0x00A0 788c2ecf20Sopenharmony_ci#define RQPN2 0x00A1 798c2ecf20Sopenharmony_ci#define RQPN3 0x00A2 808c2ecf20Sopenharmony_ci#define RQPN4 0x00A3 818c2ecf20Sopenharmony_ci#define RQPN5 0x00A4 828c2ecf20Sopenharmony_ci#define RQPN6 0x00A5 838c2ecf20Sopenharmony_ci#define RQPN7 0x00A6 848c2ecf20Sopenharmony_ci#define RQPN8 0x00A7 858c2ecf20Sopenharmony_ci#define RQPN9 0x00A8 868c2ecf20Sopenharmony_ci#define RQPN10 0x00A9 878c2ecf20Sopenharmony_ci#define LD_RQPN 0x00AB 888c2ecf20Sopenharmony_ci#define RXFF_BNDY 0x00AC 898c2ecf20Sopenharmony_ci#define RXRPT_BNDY 0x00B0 908c2ecf20Sopenharmony_ci#define TXPKTBUF_PGBNDY 0x00B4 918c2ecf20Sopenharmony_ci#define PBP 0x00B5 928c2ecf20Sopenharmony_ci#define RXDRVINFO_SZ 0x00B6 938c2ecf20Sopenharmony_ci#define TXFF_STATUS 0x00B7 948c2ecf20Sopenharmony_ci#define RXFF_STATUS 0x00B8 958c2ecf20Sopenharmony_ci#define TXFF_EMPTY_TH 0x00B9 968c2ecf20Sopenharmony_ci#define SDIO_RX_BLKSZ 0x00BC 978c2ecf20Sopenharmony_ci#define RXDMA 0x00BD 988c2ecf20Sopenharmony_ci#define RXPKT_NUM 0x00BE 998c2ecf20Sopenharmony_ci#define C2HCMD_UDT_SIZE 0x00C0 1008c2ecf20Sopenharmony_ci#define C2HCMD_UDT_ADDR 0x00C2 1018c2ecf20Sopenharmony_ci#define FIFOPAGE1 0x00C4 1028c2ecf20Sopenharmony_ci#define FIFOPAGE2 0x00C8 1038c2ecf20Sopenharmony_ci#define FIFOPAGE3 0x00CC 1048c2ecf20Sopenharmony_ci#define FIFOPAGE4 0x00D0 1058c2ecf20Sopenharmony_ci#define FIFOPAGE5 0x00D4 1068c2ecf20Sopenharmony_ci#define FW_RSVD_PG_CRTL 0x00D8 1078c2ecf20Sopenharmony_ci#define RXDMA_AGG_PG_TH 0x00D9 1088c2ecf20Sopenharmony_ci#define TXDESC_MSK 0x00DC 1098c2ecf20Sopenharmony_ci#define TXRPTFF_RDPTR 0x00E0 1108c2ecf20Sopenharmony_ci#define TXRPTFF_WTPTR 0x00E4 1118c2ecf20Sopenharmony_ci#define C2HFF_RDPTR 0x00E8 1128c2ecf20Sopenharmony_ci#define C2HFF_WTPTR 0x00EC 1138c2ecf20Sopenharmony_ci#define RXFF0_RDPTR 0x00F0 1148c2ecf20Sopenharmony_ci#define RXFF0_WTPTR 0x00F4 1158c2ecf20Sopenharmony_ci#define RXFF1_RDPTR 0x00F8 1168c2ecf20Sopenharmony_ci#define RXFF1_WTPTR 0x00FC 1178c2ecf20Sopenharmony_ci#define RXRPT0_RDPTR 0x0100 1188c2ecf20Sopenharmony_ci#define RXRPT0_WTPTR 0x0104 1198c2ecf20Sopenharmony_ci#define RXRPT1_RDPTR 0x0108 1208c2ecf20Sopenharmony_ci#define RXRPT1_WTPTR 0x010C 1218c2ecf20Sopenharmony_ci#define RX0_UDT_SIZE 0x0110 1228c2ecf20Sopenharmony_ci#define RX1PKTNUM 0x0114 1238c2ecf20Sopenharmony_ci#define RXFILTERMAP 0x0116 1248c2ecf20Sopenharmony_ci#define RXFILTERMAP_GP1 0x0118 1258c2ecf20Sopenharmony_ci#define RXFILTERMAP_GP2 0x011A 1268c2ecf20Sopenharmony_ci#define RXFILTERMAP_GP3 0x011C 1278c2ecf20Sopenharmony_ci#define BCNQ_CTRL 0x0120 1288c2ecf20Sopenharmony_ci#define MGTQ_CTRL 0x0124 1298c2ecf20Sopenharmony_ci#define HIQ_CTRL 0x0128 1308c2ecf20Sopenharmony_ci#define VOTID7_CTRL 0x012c 1318c2ecf20Sopenharmony_ci#define VOTID6_CTRL 0x0130 1328c2ecf20Sopenharmony_ci#define VITID5_CTRL 0x0134 1338c2ecf20Sopenharmony_ci#define VITID4_CTRL 0x0138 1348c2ecf20Sopenharmony_ci#define BETID3_CTRL 0x013c 1358c2ecf20Sopenharmony_ci#define BETID0_CTRL 0x0140 1368c2ecf20Sopenharmony_ci#define BKTID2_CTRL 0x0144 1378c2ecf20Sopenharmony_ci#define BKTID1_CTRL 0x0148 1388c2ecf20Sopenharmony_ci#define CMDQ_CTRL 0x014c 1398c2ecf20Sopenharmony_ci#define TXPKT_NUM_CTRL 0x0150 1408c2ecf20Sopenharmony_ci#define TXQ_PGADD 0x0152 1418c2ecf20Sopenharmony_ci#define TXFF_PG_NUM 0x0154 1428c2ecf20Sopenharmony_ci#define TRXDMA_STATUS 0x0156 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci/* 6. Adaptive Control Registers */ 1458c2ecf20Sopenharmony_ci#define INIMCS_SEL 0x0160 1468c2ecf20Sopenharmony_ci#define TX_RATE_REG INIMCS_SEL 1478c2ecf20Sopenharmony_ci#define INIRTSMCS_SEL 0x0180 1488c2ecf20Sopenharmony_ci#define RRSR 0x0181 1498c2ecf20Sopenharmony_ci#define ARFR0 0x0184 1508c2ecf20Sopenharmony_ci#define ARFR1 0x0188 1518c2ecf20Sopenharmony_ci#define ARFR2 0x018C 1528c2ecf20Sopenharmony_ci#define ARFR3 0x0190 1538c2ecf20Sopenharmony_ci#define ARFR4 0x0194 1548c2ecf20Sopenharmony_ci#define ARFR5 0x0198 1558c2ecf20Sopenharmony_ci#define ARFR6 0x019C 1568c2ecf20Sopenharmony_ci#define ARFR7 0x01A0 1578c2ecf20Sopenharmony_ci#define AGGLEN_LMT_H 0x01A7 1588c2ecf20Sopenharmony_ci#define AGGLEN_LMT_L 0x01A8 1598c2ecf20Sopenharmony_ci#define DARFRC 0x01B0 1608c2ecf20Sopenharmony_ci#define RARFRC 0x01B8 1618c2ecf20Sopenharmony_ci#define MCS_TXAGC 0x01C0 1628c2ecf20Sopenharmony_ci#define CCK_TXAGC 0x01C8 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci/* 7. EDCA Setting Registers */ 1658c2ecf20Sopenharmony_ci#define EDCAPARA_VO 0x01D0 1668c2ecf20Sopenharmony_ci#define EDCAPARA_VI 0x01D4 1678c2ecf20Sopenharmony_ci#define EDCAPARA_BE 0x01D8 1688c2ecf20Sopenharmony_ci#define EDCAPARA_BK 0x01DC 1698c2ecf20Sopenharmony_ci#define BCNTCFG 0x01E0 1708c2ecf20Sopenharmony_ci#define CWRR 0x01E2 1718c2ecf20Sopenharmony_ci#define ACMAVG 0x01E4 1728c2ecf20Sopenharmony_ci#define ACMHWCTRL 0x01E7 1738c2ecf20Sopenharmony_ci#define VO_ADMTM 0x01E8 1748c2ecf20Sopenharmony_ci#define VI_ADMTM 0x01EC 1758c2ecf20Sopenharmony_ci#define BE_ADMTM 0x01F0 1768c2ecf20Sopenharmony_ci#define RETRY_LIMIT 0x01F4 1778c2ecf20Sopenharmony_ci#define SG_RATE 0x01F6 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci/* 8. WMAC, BA and CCX related Register. */ 1808c2ecf20Sopenharmony_ci#define NAV_CTRL 0x0200 1818c2ecf20Sopenharmony_ci#define BW_OPMODE 0x0203 1828c2ecf20Sopenharmony_ci#define BACAMCMD 0x0204 1838c2ecf20Sopenharmony_ci#define BACAMCONTENT 0x0208 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci/* the 0x2xx register WMAC definition */ 1868c2ecf20Sopenharmony_ci#define LBDLY 0x0210 1878c2ecf20Sopenharmony_ci#define FWDLY 0x0211 1888c2ecf20Sopenharmony_ci#define HWPC_RX_CTRL 0x0218 1898c2ecf20Sopenharmony_ci#define MQIR 0x0220 1908c2ecf20Sopenharmony_ci#define MAIR 0x0222 1918c2ecf20Sopenharmony_ci#define MSIR 0x0224 1928c2ecf20Sopenharmony_ci#define CLM_RESULT 0x0227 1938c2ecf20Sopenharmony_ci#define NHM_RPI_CNT 0x0228 1948c2ecf20Sopenharmony_ci#define RXERR_RPT 0x0230 1958c2ecf20Sopenharmony_ci#define NAV_PROT_LEN 0x0234 1968c2ecf20Sopenharmony_ci#define CFEND_TH 0x0236 1978c2ecf20Sopenharmony_ci#define AMPDU_MIN_SPACE 0x0237 1988c2ecf20Sopenharmony_ci#define TXOP_STALL_CTRL 0x0238 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci/* 9. Security Control Registers */ 2018c2ecf20Sopenharmony_ci#define REG_RWCAM 0x0240 2028c2ecf20Sopenharmony_ci#define REG_WCAMI 0x0244 2038c2ecf20Sopenharmony_ci#define REG_RCAMO 0x0248 2048c2ecf20Sopenharmony_ci#define REG_CAMDBG 0x024C 2058c2ecf20Sopenharmony_ci#define REG_SECR 0x0250 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci/* 10. Power Save Control Registers */ 2088c2ecf20Sopenharmony_ci#define WOW_CTRL 0x0260 2098c2ecf20Sopenharmony_ci#define PSSTATUS 0x0261 2108c2ecf20Sopenharmony_ci#define PSSWITCH 0x0262 2118c2ecf20Sopenharmony_ci#define MIMOPS_WAIT_PERIOD 0x0263 2128c2ecf20Sopenharmony_ci#define LPNAV_CTRL 0x0264 2138c2ecf20Sopenharmony_ci#define WFM0 0x0270 2148c2ecf20Sopenharmony_ci#define WFM1 0x0280 2158c2ecf20Sopenharmony_ci#define WFM2 0x0290 2168c2ecf20Sopenharmony_ci#define WFM3 0x02A0 2178c2ecf20Sopenharmony_ci#define WFM4 0x02B0 2188c2ecf20Sopenharmony_ci#define WFM5 0x02C0 2198c2ecf20Sopenharmony_ci#define WFCRC 0x02D0 2208c2ecf20Sopenharmony_ci#define FW_RPT_REG 0x02c4 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci/* 11. General Purpose Registers */ 2238c2ecf20Sopenharmony_ci#define PSTIME 0x02E0 2248c2ecf20Sopenharmony_ci#define TIMER0 0x02E4 2258c2ecf20Sopenharmony_ci#define TIMER1 0x02E8 2268c2ecf20Sopenharmony_ci#define GPIO_IN_SE 0x02EC 2278c2ecf20Sopenharmony_ci#define GPIO_IO_SEL 0x02EE 2288c2ecf20Sopenharmony_ci#define MAC_PINMUX_CFG 0x02F1 2298c2ecf20Sopenharmony_ci#define LEDCFG 0x02F2 2308c2ecf20Sopenharmony_ci#define PHY_REG 0x02F3 2318c2ecf20Sopenharmony_ci#define PHY_REG_DATA 0x02F4 2328c2ecf20Sopenharmony_ci#define REG_EFUSE_CLK 0x02F8 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci/* 12. Host Interrupt Status Registers */ 2358c2ecf20Sopenharmony_ci#define INTA_MASK 0x0300 2368c2ecf20Sopenharmony_ci#define ISR 0x0308 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci/* 13. Test mode and Debug Control Registers */ 2398c2ecf20Sopenharmony_ci#define DBG_PORT_SWITCH 0x003A 2408c2ecf20Sopenharmony_ci#define BIST 0x0310 2418c2ecf20Sopenharmony_ci#define DBS 0x0314 2428c2ecf20Sopenharmony_ci#define CPUINST 0x0318 2438c2ecf20Sopenharmony_ci#define CPUCAUSE 0x031C 2448c2ecf20Sopenharmony_ci#define LBUS_ERR_ADDR 0x0320 2458c2ecf20Sopenharmony_ci#define LBUS_ERR_CMD 0x0324 2468c2ecf20Sopenharmony_ci#define LBUS_ERR_DATA_L 0x0328 2478c2ecf20Sopenharmony_ci#define LBUS_ERR_DATA_H 0x032C 2488c2ecf20Sopenharmony_ci#define LX_EXCEPTION_ADDR 0x0330 2498c2ecf20Sopenharmony_ci#define WDG_CTRL 0x0334 2508c2ecf20Sopenharmony_ci#define INTMTU 0x0338 2518c2ecf20Sopenharmony_ci#define INTM 0x033A 2528c2ecf20Sopenharmony_ci#define FDLOCKTURN0 0x033C 2538c2ecf20Sopenharmony_ci#define FDLOCKTURN1 0x033D 2548c2ecf20Sopenharmony_ci#define TRXPKTBUF_DBG_DATA 0x0340 2558c2ecf20Sopenharmony_ci#define TRXPKTBUF_DBG_CTRL 0x0348 2568c2ecf20Sopenharmony_ci#define DPLL 0x034A 2578c2ecf20Sopenharmony_ci#define CBUS_ERR_ADDR 0x0350 2588c2ecf20Sopenharmony_ci#define CBUS_ERR_CMD 0x0354 2598c2ecf20Sopenharmony_ci#define CBUS_ERR_DATA_L 0x0358 2608c2ecf20Sopenharmony_ci#define CBUS_ERR_DATA_H 0x035C 2618c2ecf20Sopenharmony_ci#define USB_SIE_INTF_ADDR 0x0360 2628c2ecf20Sopenharmony_ci#define USB_SIE_INTF_WD 0x0361 2638c2ecf20Sopenharmony_ci#define USB_SIE_INTF_RD 0x0362 2648c2ecf20Sopenharmony_ci#define USB_SIE_INTF_CTRL 0x0363 2658c2ecf20Sopenharmony_ci#define LBUS_MON_ADDR 0x0364 2668c2ecf20Sopenharmony_ci#define LBUS_ADDR_MASK 0x0368 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci/* Boundary is 0x37F */ 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci/* 14. PCIE config register */ 2718c2ecf20Sopenharmony_ci#define TP_POLL 0x0500 2728c2ecf20Sopenharmony_ci#define PM_CTRL 0x0502 2738c2ecf20Sopenharmony_ci#define PCIF 0x0503 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ci#define THPDA 0x0514 2768c2ecf20Sopenharmony_ci#define TMDA 0x0518 2778c2ecf20Sopenharmony_ci#define TCDA 0x051C 2788c2ecf20Sopenharmony_ci#define HDA 0x0520 2798c2ecf20Sopenharmony_ci#define TVODA 0x0524 2808c2ecf20Sopenharmony_ci#define TVIDA 0x0528 2818c2ecf20Sopenharmony_ci#define TBEDA 0x052C 2828c2ecf20Sopenharmony_ci#define TBKDA 0x0530 2838c2ecf20Sopenharmony_ci#define TBDA 0x0534 2848c2ecf20Sopenharmony_ci#define RCDA 0x0538 2858c2ecf20Sopenharmony_ci#define RDQDA 0x053C 2868c2ecf20Sopenharmony_ci#define DBI_WDATA 0x0540 2878c2ecf20Sopenharmony_ci#define DBI_RDATA 0x0544 2888c2ecf20Sopenharmony_ci#define DBI_CTRL 0x0548 2898c2ecf20Sopenharmony_ci#define MDIO_DATA 0x0550 2908c2ecf20Sopenharmony_ci#define MDIO_CTRL 0x0554 2918c2ecf20Sopenharmony_ci#define PCI_RPWM 0x0561 2928c2ecf20Sopenharmony_ci#define PCI_CPWM 0x0563 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci/* Config register (Offset 0x800-) */ 2958c2ecf20Sopenharmony_ci#define PHY_CCA 0x803 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci/* Min Spacing related settings. */ 2988c2ecf20Sopenharmony_ci#define MAX_MSS_DENSITY_2T 0x13 2998c2ecf20Sopenharmony_ci#define MAX_MSS_DENSITY_1T 0x0A 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ci/* Rx DMA Control related settings */ 3028c2ecf20Sopenharmony_ci#define RXDMA_AGG_EN BIT(7) 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_ci#define RPWM PCI_RPWM 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_ci/* Regsiter Bit and Content definition */ 3078c2ecf20Sopenharmony_ci 3088c2ecf20Sopenharmony_ci#define ISO_MD2PP BIT(0) 3098c2ecf20Sopenharmony_ci#define ISO_PA2PCIE BIT(3) 3108c2ecf20Sopenharmony_ci#define ISO_PLL2MD BIT(4) 3118c2ecf20Sopenharmony_ci#define ISO_PWC_DV2RP BIT(11) 3128c2ecf20Sopenharmony_ci#define ISO_PWC_RV2RP BIT(12) 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_ci#define FEN_MREGEN BIT(15) 3168c2ecf20Sopenharmony_ci#define FEN_DCORE BIT(11) 3178c2ecf20Sopenharmony_ci#define FEN_CPUEN BIT(10) 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci#define PAD_HWPD_IDN BIT(22) 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci#define SYS_CLKSEL_80M BIT(0) 3228c2ecf20Sopenharmony_ci#define SYS_PS_CLKSEL BIT(1) 3238c2ecf20Sopenharmony_ci#define SYS_CPU_CLKSEL BIT(2) 3248c2ecf20Sopenharmony_ci#define SYS_MAC_CLK_EN BIT(11) 3258c2ecf20Sopenharmony_ci#define SYS_SWHW_SEL BIT(14) 3268c2ecf20Sopenharmony_ci#define SYS_FWHW_SEL BIT(15) 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ci#define CMDEEPROM_EN BIT(5) 3298c2ecf20Sopenharmony_ci#define CMDEERPOMSEL BIT(4) 3308c2ecf20Sopenharmony_ci#define CMD9346CR_9356SEL BIT(4) 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ci#define AFE_MBEN BIT(1) 3338c2ecf20Sopenharmony_ci#define AFE_BGEN BIT(0) 3348c2ecf20Sopenharmony_ci 3358c2ecf20Sopenharmony_ci#define SPS1_SWEN BIT(1) 3368c2ecf20Sopenharmony_ci#define SPS1_LDEN BIT(0) 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_ci#define RF_EN BIT(0) 3398c2ecf20Sopenharmony_ci#define RF_RSTB BIT(1) 3408c2ecf20Sopenharmony_ci#define RF_SDMRSTB BIT(2) 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci#define LDA15_EN BIT(0) 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ci#define LDV12_EN BIT(0) 3458c2ecf20Sopenharmony_ci#define LDV12_SDBY BIT(1) 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci#define XTAL_GATE_AFE BIT(10) 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ci#define APLL_EN BIT(0) 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_ci#define AFR_CARDBEN BIT(0) 3528c2ecf20Sopenharmony_ci#define AFR_CLKRUN_SEL BIT(1) 3538c2ecf20Sopenharmony_ci#define AFR_FUNCREGEN BIT(2) 3548c2ecf20Sopenharmony_ci 3558c2ecf20Sopenharmony_ci#define APSDOFF_STATUS BIT(15) 3568c2ecf20Sopenharmony_ci#define APSDOFF BIT(14) 3578c2ecf20Sopenharmony_ci#define BBRSTN BIT(13) 3588c2ecf20Sopenharmony_ci#define BB_GLB_RSTN BIT(12) 3598c2ecf20Sopenharmony_ci#define SCHEDULE_EN BIT(10) 3608c2ecf20Sopenharmony_ci#define MACRXEN BIT(9) 3618c2ecf20Sopenharmony_ci#define MACTXEN BIT(8) 3628c2ecf20Sopenharmony_ci#define DDMA_EN BIT(7) 3638c2ecf20Sopenharmony_ci#define FW2HW_EN BIT(6) 3648c2ecf20Sopenharmony_ci#define RXDMA_EN BIT(5) 3658c2ecf20Sopenharmony_ci#define TXDMA_EN BIT(4) 3668c2ecf20Sopenharmony_ci#define HCI_RXDMA_EN BIT(3) 3678c2ecf20Sopenharmony_ci#define HCI_TXDMA_EN BIT(2) 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci#define STOPHCCA BIT(6) 3708c2ecf20Sopenharmony_ci#define STOPHIGH BIT(5) 3718c2ecf20Sopenharmony_ci#define STOPMGT BIT(4) 3728c2ecf20Sopenharmony_ci#define STOPVO BIT(3) 3738c2ecf20Sopenharmony_ci#define STOPVI BIT(2) 3748c2ecf20Sopenharmony_ci#define STOPBE BIT(1) 3758c2ecf20Sopenharmony_ci#define STOPBK BIT(0) 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ci#define LBK_NORMAL 0x00 3788c2ecf20Sopenharmony_ci#define LBK_MAC_LB (BIT(0) | BIT(1) | BIT(3)) 3798c2ecf20Sopenharmony_ci#define LBK_MAC_DLB (BIT(0) | BIT(1)) 3808c2ecf20Sopenharmony_ci#define LBK_DMA_LB (BIT(0) | BIT(1) | BIT(2)) 3818c2ecf20Sopenharmony_ci 3828c2ecf20Sopenharmony_ci#define TCP_OFDL_EN BIT(25) 3838c2ecf20Sopenharmony_ci#define HWPC_TX_EN BIT(24) 3848c2ecf20Sopenharmony_ci#define TXDMAPRE2FULL BIT(23) 3858c2ecf20Sopenharmony_ci#define DISCW BIT(20) 3868c2ecf20Sopenharmony_ci#define TCRICV BIT(19) 3878c2ecf20Sopenharmony_ci#define cfendform BIT(17) 3888c2ecf20Sopenharmony_ci#define TCRCRC BIT(16) 3898c2ecf20Sopenharmony_ci#define FAKE_IMEM_EN BIT(15) 3908c2ecf20Sopenharmony_ci#define TSFRST BIT(9) 3918c2ecf20Sopenharmony_ci#define TSFEN BIT(8) 3928c2ecf20Sopenharmony_ci#define FWALLRDY (BIT(0) | BIT(1) | BIT(2) | \ 3938c2ecf20Sopenharmony_ci BIT(3) | BIT(4) | BIT(5) | \ 3948c2ecf20Sopenharmony_ci BIT(6) | BIT(7)) 3958c2ecf20Sopenharmony_ci#define FWRDY BIT(7) 3968c2ecf20Sopenharmony_ci#define BASECHG BIT(6) 3978c2ecf20Sopenharmony_ci#define IMEM BIT(5) 3988c2ecf20Sopenharmony_ci#define DMEM_CODE_DONE BIT(4) 3998c2ecf20Sopenharmony_ci#define EXT_IMEM_CHK_RPT BIT(3) 4008c2ecf20Sopenharmony_ci#define EXT_IMEM_CODE_DONE BIT(2) 4018c2ecf20Sopenharmony_ci#define IMEM_CHK_RPT BIT(1) 4028c2ecf20Sopenharmony_ci#define IMEM_CODE_DONE BIT(0) 4038c2ecf20Sopenharmony_ci#define EMEM_CODE_DONE BIT(2) 4048c2ecf20Sopenharmony_ci#define EMEM_CHK_RPT BIT(3) 4058c2ecf20Sopenharmony_ci#define IMEM_RDY BIT(5) 4068c2ecf20Sopenharmony_ci#define LOAD_FW_READY (IMEM_CODE_DONE | \ 4078c2ecf20Sopenharmony_ci IMEM_CHK_RPT | \ 4088c2ecf20Sopenharmony_ci EMEM_CODE_DONE | \ 4098c2ecf20Sopenharmony_ci EMEM_CHK_RPT | \ 4108c2ecf20Sopenharmony_ci DMEM_CODE_DONE | \ 4118c2ecf20Sopenharmony_ci IMEM_RDY | \ 4128c2ecf20Sopenharmony_ci BASECHG | \ 4138c2ecf20Sopenharmony_ci FWRDY) 4148c2ecf20Sopenharmony_ci#define TCR_TSFEN BIT(8) 4158c2ecf20Sopenharmony_ci#define TCR_TSFRST BIT(9) 4168c2ecf20Sopenharmony_ci#define TCR_FAKE_IMEM_EN BIT(15) 4178c2ecf20Sopenharmony_ci#define TCR_CRC BIT(16) 4188c2ecf20Sopenharmony_ci#define TCR_ICV BIT(19) 4198c2ecf20Sopenharmony_ci#define TCR_DISCW BIT(20) 4208c2ecf20Sopenharmony_ci#define TCR_HWPC_TX_EN BIT(24) 4218c2ecf20Sopenharmony_ci#define TCR_TCP_OFDL_EN BIT(25) 4228c2ecf20Sopenharmony_ci#define TXDMA_INIT_VALUE (IMEM_CHK_RPT | \ 4238c2ecf20Sopenharmony_ci EXT_IMEM_CHK_RPT) 4248c2ecf20Sopenharmony_ci 4258c2ecf20Sopenharmony_ci#define RCR_APPFCS BIT(31) 4268c2ecf20Sopenharmony_ci#define RCR_DIS_ENC_2BYTE BIT(30) 4278c2ecf20Sopenharmony_ci#define RCR_DIS_AES_2BYTE BIT(29) 4288c2ecf20Sopenharmony_ci#define RCR_HTC_LOC_CTRL BIT(28) 4298c2ecf20Sopenharmony_ci#define RCR_ENMBID BIT(27) 4308c2ecf20Sopenharmony_ci#define RCR_RX_TCPOFDL_EN BIT(26) 4318c2ecf20Sopenharmony_ci#define RCR_APP_PHYST_RXFF BIT(25) 4328c2ecf20Sopenharmony_ci#define RCR_APP_PHYST_STAFF BIT(24) 4338c2ecf20Sopenharmony_ci#define RCR_CBSSID BIT(23) 4348c2ecf20Sopenharmony_ci#define RCR_APWRMGT BIT(22) 4358c2ecf20Sopenharmony_ci#define RCR_ADD3 BIT(21) 4368c2ecf20Sopenharmony_ci#define RCR_AMF BIT(20) 4378c2ecf20Sopenharmony_ci#define RCR_ACF BIT(19) 4388c2ecf20Sopenharmony_ci#define RCR_ADF BIT(18) 4398c2ecf20Sopenharmony_ci#define RCR_APP_MIC BIT(17) 4408c2ecf20Sopenharmony_ci#define RCR_APP_ICV BIT(16) 4418c2ecf20Sopenharmony_ci#define RCR_RXFTH BIT(13) 4428c2ecf20Sopenharmony_ci#define RCR_AICV BIT(12) 4438c2ecf20Sopenharmony_ci#define RCR_RXDESC_LK_EN BIT(11) 4448c2ecf20Sopenharmony_ci#define RCR_APP_BA_SSN BIT(6) 4458c2ecf20Sopenharmony_ci#define RCR_ACRC32 BIT(5) 4468c2ecf20Sopenharmony_ci#define RCR_RXSHFT_EN BIT(4) 4478c2ecf20Sopenharmony_ci#define RCR_AB BIT(3) 4488c2ecf20Sopenharmony_ci#define RCR_AM BIT(2) 4498c2ecf20Sopenharmony_ci#define RCR_APM BIT(1) 4508c2ecf20Sopenharmony_ci#define RCR_AAP BIT(0) 4518c2ecf20Sopenharmony_ci#define RCR_MXDMA_OFFSET 8 4528c2ecf20Sopenharmony_ci#define RCR_FIFO_OFFSET 13 4538c2ecf20Sopenharmony_ci 4548c2ecf20Sopenharmony_ci 4558c2ecf20Sopenharmony_ci#define MSR_LINK_MASK ((1 << 0) | (1 << 1)) 4568c2ecf20Sopenharmony_ci#define MSR_LINK_MANAGED 2 4578c2ecf20Sopenharmony_ci#define MSR_LINK_NONE 0 4588c2ecf20Sopenharmony_ci#define MSR_LINK_SHIFT 0 4598c2ecf20Sopenharmony_ci#define MSR_LINK_ADHOC 1 4608c2ecf20Sopenharmony_ci#define MSR_LINK_MASTER 3 4618c2ecf20Sopenharmony_ci#define MSR_NOLINK 0x00 4628c2ecf20Sopenharmony_ci#define MSR_ADHOC 0x01 4638c2ecf20Sopenharmony_ci#define MSR_INFRA 0x02 4648c2ecf20Sopenharmony_ci#define MSR_AP 0x03 4658c2ecf20Sopenharmony_ci 4668c2ecf20Sopenharmony_ci#define ENUART BIT(7) 4678c2ecf20Sopenharmony_ci#define ENJTAG BIT(3) 4688c2ecf20Sopenharmony_ci#define BTMODE (BIT(2) | BIT(1)) 4698c2ecf20Sopenharmony_ci#define ENBT BIT(0) 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_ci#define ENMBID BIT(7) 4728c2ecf20Sopenharmony_ci#define BCNUM (BIT(6) | BIT(5) | BIT(4)) 4738c2ecf20Sopenharmony_ci 4748c2ecf20Sopenharmony_ci#define USTIME_EDCA 0xFF00 4758c2ecf20Sopenharmony_ci#define USTIME_TSF 0x00FF 4768c2ecf20Sopenharmony_ci 4778c2ecf20Sopenharmony_ci#define SIFS_TRX 0xFF00 4788c2ecf20Sopenharmony_ci#define SIFS_CTX 0x00FF 4798c2ecf20Sopenharmony_ci 4808c2ecf20Sopenharmony_ci#define ENSWBCN BIT(15) 4818c2ecf20Sopenharmony_ci#define DRVERLY_TU 0x0FF0 4828c2ecf20Sopenharmony_ci#define DRVERLY_US 0x000F 4838c2ecf20Sopenharmony_ci#define BCN_TCFG_CW_SHIFT 8 4848c2ecf20Sopenharmony_ci#define BCN_TCFG_IFS 0 4858c2ecf20Sopenharmony_ci 4868c2ecf20Sopenharmony_ci#define RRSR_RSC_OFFSET 21 4878c2ecf20Sopenharmony_ci#define RRSR_SHORT_OFFSET 23 4888c2ecf20Sopenharmony_ci#define RRSR_RSC_BW_40M 0x600000 4898c2ecf20Sopenharmony_ci#define RRSR_RSC_UPSUBCHNL 0x400000 4908c2ecf20Sopenharmony_ci#define RRSR_RSC_LOWSUBCHNL 0x200000 4918c2ecf20Sopenharmony_ci#define RRSR_SHORT 0x800000 4928c2ecf20Sopenharmony_ci#define RRSR_1M BIT(0) 4938c2ecf20Sopenharmony_ci#define RRSR_2M BIT(1) 4948c2ecf20Sopenharmony_ci#define RRSR_5_5M BIT(2) 4958c2ecf20Sopenharmony_ci#define RRSR_11M BIT(3) 4968c2ecf20Sopenharmony_ci#define RRSR_6M BIT(4) 4978c2ecf20Sopenharmony_ci#define RRSR_9M BIT(5) 4988c2ecf20Sopenharmony_ci#define RRSR_12M BIT(6) 4998c2ecf20Sopenharmony_ci#define RRSR_18M BIT(7) 5008c2ecf20Sopenharmony_ci#define RRSR_24M BIT(8) 5018c2ecf20Sopenharmony_ci#define RRSR_36M BIT(9) 5028c2ecf20Sopenharmony_ci#define RRSR_48M BIT(10) 5038c2ecf20Sopenharmony_ci#define RRSR_54M BIT(11) 5048c2ecf20Sopenharmony_ci#define RRSR_MCS0 BIT(12) 5058c2ecf20Sopenharmony_ci#define RRSR_MCS1 BIT(13) 5068c2ecf20Sopenharmony_ci#define RRSR_MCS2 BIT(14) 5078c2ecf20Sopenharmony_ci#define RRSR_MCS3 BIT(15) 5088c2ecf20Sopenharmony_ci#define RRSR_MCS4 BIT(16) 5098c2ecf20Sopenharmony_ci#define RRSR_MCS5 BIT(17) 5108c2ecf20Sopenharmony_ci#define RRSR_MCS6 BIT(18) 5118c2ecf20Sopenharmony_ci#define RRSR_MCS7 BIT(19) 5128c2ecf20Sopenharmony_ci#define BRSR_ACKSHORTPMB BIT(23) 5138c2ecf20Sopenharmony_ci 5148c2ecf20Sopenharmony_ci#define RATR_1M 0x00000001 5158c2ecf20Sopenharmony_ci#define RATR_2M 0x00000002 5168c2ecf20Sopenharmony_ci#define RATR_55M 0x00000004 5178c2ecf20Sopenharmony_ci#define RATR_11M 0x00000008 5188c2ecf20Sopenharmony_ci#define RATR_6M 0x00000010 5198c2ecf20Sopenharmony_ci#define RATR_9M 0x00000020 5208c2ecf20Sopenharmony_ci#define RATR_12M 0x00000040 5218c2ecf20Sopenharmony_ci#define RATR_18M 0x00000080 5228c2ecf20Sopenharmony_ci#define RATR_24M 0x00000100 5238c2ecf20Sopenharmony_ci#define RATR_36M 0x00000200 5248c2ecf20Sopenharmony_ci#define RATR_48M 0x00000400 5258c2ecf20Sopenharmony_ci#define RATR_54M 0x00000800 5268c2ecf20Sopenharmony_ci#define RATR_MCS0 0x00001000 5278c2ecf20Sopenharmony_ci#define RATR_MCS1 0x00002000 5288c2ecf20Sopenharmony_ci#define RATR_MCS2 0x00004000 5298c2ecf20Sopenharmony_ci#define RATR_MCS3 0x00008000 5308c2ecf20Sopenharmony_ci#define RATR_MCS4 0x00010000 5318c2ecf20Sopenharmony_ci#define RATR_MCS5 0x00020000 5328c2ecf20Sopenharmony_ci#define RATR_MCS6 0x00040000 5338c2ecf20Sopenharmony_ci#define RATR_MCS7 0x00080000 5348c2ecf20Sopenharmony_ci#define RATR_MCS8 0x00100000 5358c2ecf20Sopenharmony_ci#define RATR_MCS9 0x00200000 5368c2ecf20Sopenharmony_ci#define RATR_MCS10 0x00400000 5378c2ecf20Sopenharmony_ci#define RATR_MCS11 0x00800000 5388c2ecf20Sopenharmony_ci#define RATR_MCS12 0x01000000 5398c2ecf20Sopenharmony_ci#define RATR_MCS13 0x02000000 5408c2ecf20Sopenharmony_ci#define RATR_MCS14 0x04000000 5418c2ecf20Sopenharmony_ci#define RATR_MCS15 0x08000000 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_ci#define RATE_ALL_CCK (RATR_1M | RATR_2M | \ 5448c2ecf20Sopenharmony_ci RATR_55M | RATR_11M) 5458c2ecf20Sopenharmony_ci#define RATE_ALL_OFDM_AG (RATR_6M | RATR_9M | \ 5468c2ecf20Sopenharmony_ci RATR_12M | RATR_18M | \ 5478c2ecf20Sopenharmony_ci RATR_24M | RATR_36M | \ 5488c2ecf20Sopenharmony_ci RATR_48M | RATR_54M) 5498c2ecf20Sopenharmony_ci#define RATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | \ 5508c2ecf20Sopenharmony_ci RATR_MCS2 | RATR_MCS3 | \ 5518c2ecf20Sopenharmony_ci RATR_MCS4 | RATR_MCS5 | \ 5528c2ecf20Sopenharmony_ci RATR_MCS6 | RATR_MCS7) 5538c2ecf20Sopenharmony_ci#define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | \ 5548c2ecf20Sopenharmony_ci RATR_MCS10 | RATR_MCS11 | \ 5558c2ecf20Sopenharmony_ci RATR_MCS12 | RATR_MCS13 | \ 5568c2ecf20Sopenharmony_ci RATR_MCS14 | RATR_MCS15) 5578c2ecf20Sopenharmony_ci 5588c2ecf20Sopenharmony_ci#define AC_PARAM_TXOP_LIMIT_OFFSET 16 5598c2ecf20Sopenharmony_ci#define AC_PARAM_ECW_MAX_OFFSET 12 5608c2ecf20Sopenharmony_ci#define AC_PARAM_ECW_MIN_OFFSET 8 5618c2ecf20Sopenharmony_ci#define AC_PARAM_AIFS_OFFSET 0 5628c2ecf20Sopenharmony_ci 5638c2ecf20Sopenharmony_ci#define ACMHW_HWEN BIT(0) 5648c2ecf20Sopenharmony_ci#define ACMHW_BEQEN BIT(1) 5658c2ecf20Sopenharmony_ci#define ACMHW_VIQEN BIT(2) 5668c2ecf20Sopenharmony_ci#define ACMHW_VOQEN BIT(3) 5678c2ecf20Sopenharmony_ci#define ACMHW_BEQSTATUS BIT(4) 5688c2ecf20Sopenharmony_ci#define ACMHW_VIQSTATUS BIT(5) 5698c2ecf20Sopenharmony_ci#define ACMHW_VOQSTATUS BIT(6) 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_ci#define RETRY_LIMIT_SHORT_SHIFT 8 5728c2ecf20Sopenharmony_ci#define RETRY_LIMIT_LONG_SHIFT 0 5738c2ecf20Sopenharmony_ci 5748c2ecf20Sopenharmony_ci#define NAV_UPPER_EN BIT(16) 5758c2ecf20Sopenharmony_ci#define NAV_UPPER 0xFF00 5768c2ecf20Sopenharmony_ci#define NAV_RTSRST 0xFF 5778c2ecf20Sopenharmony_ci 5788c2ecf20Sopenharmony_ci#define BW_OPMODE_20MHZ BIT(2) 5798c2ecf20Sopenharmony_ci#define BW_OPMODE_5G BIT(1) 5808c2ecf20Sopenharmony_ci#define BW_OPMODE_11J BIT(0) 5818c2ecf20Sopenharmony_ci 5828c2ecf20Sopenharmony_ci#define RXERR_RPT_RST BIT(27) 5838c2ecf20Sopenharmony_ci#define RXERR_OFDM_PPDU 0 5848c2ecf20Sopenharmony_ci#define RXERR_OFDM_FALSE_ALARM 1 5858c2ecf20Sopenharmony_ci#define RXERR_OFDM_MPDU_OK 2 5868c2ecf20Sopenharmony_ci#define RXERR_OFDM_MPDU_FAIL 3 5878c2ecf20Sopenharmony_ci#define RXERR_CCK_PPDU 4 5888c2ecf20Sopenharmony_ci#define RXERR_CCK_FALSE_ALARM 5 5898c2ecf20Sopenharmony_ci#define RXERR_CCK_MPDU_OK 6 5908c2ecf20Sopenharmony_ci#define RXERR_CCK_MPDU_FAIL 7 5918c2ecf20Sopenharmony_ci#define RXERR_HT_PPDU 8 5928c2ecf20Sopenharmony_ci#define RXERR_HT_FALSE_ALARM 9 5938c2ecf20Sopenharmony_ci#define RXERR_HT_MPDU_TOTAL 10 5948c2ecf20Sopenharmony_ci#define RXERR_HT_MPDU_OK 11 5958c2ecf20Sopenharmony_ci#define RXERR_HT_MPDU_FAIL 12 5968c2ecf20Sopenharmony_ci#define RXERR_RX_FULL_DROP 15 5978c2ecf20Sopenharmony_ci 5988c2ecf20Sopenharmony_ci#define SCR_TXUSEDK BIT(0) 5998c2ecf20Sopenharmony_ci#define SCR_RXUSEDK BIT(1) 6008c2ecf20Sopenharmony_ci#define SCR_TXENCENABLE BIT(2) 6018c2ecf20Sopenharmony_ci#define SCR_RXENCENABLE BIT(3) 6028c2ecf20Sopenharmony_ci#define SCR_SKBYA2 BIT(4) 6038c2ecf20Sopenharmony_ci#define SCR_NOSKMC BIT(5) 6048c2ecf20Sopenharmony_ci 6058c2ecf20Sopenharmony_ci#define CAM_VALID BIT(15) 6068c2ecf20Sopenharmony_ci#define CAM_NOTVALID 0x0000 6078c2ecf20Sopenharmony_ci#define CAM_USEDK BIT(5) 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci#define CAM_NONE 0x0 6108c2ecf20Sopenharmony_ci#define CAM_WEP40 0x01 6118c2ecf20Sopenharmony_ci#define CAM_TKIP 0x02 6128c2ecf20Sopenharmony_ci#define CAM_AES 0x04 6138c2ecf20Sopenharmony_ci#define CAM_WEP104 0x05 6148c2ecf20Sopenharmony_ci 6158c2ecf20Sopenharmony_ci#define TOTAL_CAM_ENTRY 32 6168c2ecf20Sopenharmony_ci#define HALF_CAM_ENTRY 16 6178c2ecf20Sopenharmony_ci 6188c2ecf20Sopenharmony_ci#define CAM_WRITE BIT(16) 6198c2ecf20Sopenharmony_ci#define CAM_READ 0x00000000 6208c2ecf20Sopenharmony_ci#define CAM_POLLINIG BIT(31) 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_ci#define WOW_PMEN BIT(0) 6238c2ecf20Sopenharmony_ci#define WOW_WOMEN BIT(1) 6248c2ecf20Sopenharmony_ci#define WOW_MAGIC BIT(2) 6258c2ecf20Sopenharmony_ci#define WOW_UWF BIT(3) 6268c2ecf20Sopenharmony_ci 6278c2ecf20Sopenharmony_ci#define GPIOMUX_EN BIT(3) 6288c2ecf20Sopenharmony_ci#define GPIOSEL_GPIO 0 6298c2ecf20Sopenharmony_ci#define GPIOSEL_PHYDBG 1 6308c2ecf20Sopenharmony_ci#define GPIOSEL_BT 2 6318c2ecf20Sopenharmony_ci#define GPIOSEL_WLANDBG 3 6328c2ecf20Sopenharmony_ci#define GPIOSEL_GPIO_MASK (~(BIT(0)|BIT(1))) 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_ci#define HST_RDBUSY BIT(0) 6358c2ecf20Sopenharmony_ci#define CPU_WTBUSY BIT(1) 6368c2ecf20Sopenharmony_ci 6378c2ecf20Sopenharmony_ci#define IMR8190_DISABLED 0x0 6388c2ecf20Sopenharmony_ci#define IMR_CPUERR BIT(5) 6398c2ecf20Sopenharmony_ci#define IMR_ATIMEND BIT(4) 6408c2ecf20Sopenharmony_ci#define IMR_TBDOK BIT(3) 6418c2ecf20Sopenharmony_ci#define IMR_TBDER BIT(2) 6428c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT8 BIT(1) 6438c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT7 BIT(0) 6448c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT6 BIT(31) 6458c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT5 BIT(30) 6468c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT4 BIT(29) 6478c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT3 BIT(28) 6488c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT2 BIT(27) 6498c2ecf20Sopenharmony_ci#define IMR_BCNDMAINT1 BIT(26) 6508c2ecf20Sopenharmony_ci#define IMR_BCNDOK8 BIT(25) 6518c2ecf20Sopenharmony_ci#define IMR_BCNDOK7 BIT(24) 6528c2ecf20Sopenharmony_ci#define IMR_BCNDOK6 BIT(23) 6538c2ecf20Sopenharmony_ci#define IMR_BCNDOK5 BIT(22) 6548c2ecf20Sopenharmony_ci#define IMR_BCNDOK4 BIT(21) 6558c2ecf20Sopenharmony_ci#define IMR_BCNDOK3 BIT(20) 6568c2ecf20Sopenharmony_ci#define IMR_BCNDOK2 BIT(19) 6578c2ecf20Sopenharmony_ci#define IMR_BCNDOK1 BIT(18) 6588c2ecf20Sopenharmony_ci#define IMR_TIMEOUT2 BIT(17) 6598c2ecf20Sopenharmony_ci#define IMR_TIMEOUT1 BIT(16) 6608c2ecf20Sopenharmony_ci#define IMR_TXFOVW BIT(15) 6618c2ecf20Sopenharmony_ci#define IMR_PSTIMEOUT BIT(14) 6628c2ecf20Sopenharmony_ci#define IMR_BCNINT BIT(13) 6638c2ecf20Sopenharmony_ci#define IMR_RXFOVW BIT(12) 6648c2ecf20Sopenharmony_ci#define IMR_RDU BIT(11) 6658c2ecf20Sopenharmony_ci#define IMR_RXCMDOK BIT(10) 6668c2ecf20Sopenharmony_ci#define IMR_BDOK BIT(9) 6678c2ecf20Sopenharmony_ci#define IMR_HIGHDOK BIT(8) 6688c2ecf20Sopenharmony_ci#define IMR_COMDOK BIT(7) 6698c2ecf20Sopenharmony_ci#define IMR_MGNTDOK BIT(6) 6708c2ecf20Sopenharmony_ci#define IMR_HCCADOK BIT(5) 6718c2ecf20Sopenharmony_ci#define IMR_BKDOK BIT(4) 6728c2ecf20Sopenharmony_ci#define IMR_BEDOK BIT(3) 6738c2ecf20Sopenharmony_ci#define IMR_VIDOK BIT(2) 6748c2ecf20Sopenharmony_ci#define IMR_VODOK BIT(1) 6758c2ecf20Sopenharmony_ci#define IMR_ROK BIT(0) 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_ci#define TPPOLL_BKQ BIT(0) 6788c2ecf20Sopenharmony_ci#define TPPOLL_BEQ BIT(1) 6798c2ecf20Sopenharmony_ci#define TPPOLL_VIQ BIT(2) 6808c2ecf20Sopenharmony_ci#define TPPOLL_VOQ BIT(3) 6818c2ecf20Sopenharmony_ci#define TPPOLL_BQ BIT(4) 6828c2ecf20Sopenharmony_ci#define TPPOLL_CQ BIT(5) 6838c2ecf20Sopenharmony_ci#define TPPOLL_MQ BIT(6) 6848c2ecf20Sopenharmony_ci#define TPPOLL_HQ BIT(7) 6858c2ecf20Sopenharmony_ci#define TPPOLL_HCCAQ BIT(8) 6868c2ecf20Sopenharmony_ci#define TPPOLL_STOPBK BIT(9) 6878c2ecf20Sopenharmony_ci#define TPPOLL_STOPBE BIT(10) 6888c2ecf20Sopenharmony_ci#define TPPOLL_STOPVI BIT(11) 6898c2ecf20Sopenharmony_ci#define TPPOLL_STOPVO BIT(12) 6908c2ecf20Sopenharmony_ci#define TPPOLL_STOPMGT BIT(13) 6918c2ecf20Sopenharmony_ci#define TPPOLL_STOPHIGH BIT(14) 6928c2ecf20Sopenharmony_ci#define TPPOLL_STOPHCCA BIT(15) 6938c2ecf20Sopenharmony_ci#define TPPOLL_SHIFT 8 6948c2ecf20Sopenharmony_ci 6958c2ecf20Sopenharmony_ci#define CCX_CMD_CLM_ENABLE BIT(0) 6968c2ecf20Sopenharmony_ci#define CCX_CMD_NHM_ENABLE BIT(1) 6978c2ecf20Sopenharmony_ci#define CCX_CMD_FUNCTION_ENABLE BIT(8) 6988c2ecf20Sopenharmony_ci#define CCX_CMD_IGNORE_CCA BIT(9) 6998c2ecf20Sopenharmony_ci#define CCX_CMD_IGNORE_TXON BIT(10) 7008c2ecf20Sopenharmony_ci#define CCX_CLM_RESULT_READY BIT(16) 7018c2ecf20Sopenharmony_ci#define CCX_NHM_RESULT_READY BIT(16) 7028c2ecf20Sopenharmony_ci#define CCX_CMD_RESET 0x0 7038c2ecf20Sopenharmony_ci 7048c2ecf20Sopenharmony_ci 7058c2ecf20Sopenharmony_ci#define HWSET_MAX_SIZE_92S 128 7068c2ecf20Sopenharmony_ci#define EFUSE_MAX_SECTION 16 7078c2ecf20Sopenharmony_ci#define EFUSE_REAL_CONTENT_LEN 512 7088c2ecf20Sopenharmony_ci#define EFUSE_OOB_PROTECT_BYTES 15 7098c2ecf20Sopenharmony_ci 7108c2ecf20Sopenharmony_ci#define RTL8190_EEPROM_ID 0x8129 7118c2ecf20Sopenharmony_ci#define EEPROM_HPON 0x02 7128c2ecf20Sopenharmony_ci#define EEPROM_CLK 0x06 7138c2ecf20Sopenharmony_ci#define EEPROM_TESTR 0x08 7148c2ecf20Sopenharmony_ci 7158c2ecf20Sopenharmony_ci#define EEPROM_VID 0x0A 7168c2ecf20Sopenharmony_ci#define EEPROM_DID 0x0C 7178c2ecf20Sopenharmony_ci#define EEPROM_SVID 0x0E 7188c2ecf20Sopenharmony_ci#define EEPROM_SMID 0x10 7198c2ecf20Sopenharmony_ci 7208c2ecf20Sopenharmony_ci#define EEPROM_MAC_ADDR 0x12 7218c2ecf20Sopenharmony_ci#define EEPROM_NODE_ADDRESS_BYTE_0 0x12 7228c2ecf20Sopenharmony_ci 7238c2ecf20Sopenharmony_ci#define EEPROM_PWDIFF 0x54 7248c2ecf20Sopenharmony_ci 7258c2ecf20Sopenharmony_ci#define EEPROM_TXPOWERBASE 0x50 7268c2ecf20Sopenharmony_ci#define EEPROM_TX_PWR_INDEX_RANGE 28 7278c2ecf20Sopenharmony_ci 7288c2ecf20Sopenharmony_ci#define EEPROM_TX_PWR_HT20_DIFF 0x62 7298c2ecf20Sopenharmony_ci#define DEFAULT_HT20_TXPWR_DIFF 2 7308c2ecf20Sopenharmony_ci#define EEPROM_TX_PWR_OFDM_DIFF 0x65 7318c2ecf20Sopenharmony_ci 7328c2ecf20Sopenharmony_ci#define EEPROM_TXPWRGROUP 0x67 7338c2ecf20Sopenharmony_ci#define EEPROM_REGULATORY 0x6D 7348c2ecf20Sopenharmony_ci 7358c2ecf20Sopenharmony_ci#define TX_PWR_SAFETY_CHK 0x6D 7368c2ecf20Sopenharmony_ci#define EEPROM_TXPWINDEX_CCK_24G 0x5D 7378c2ecf20Sopenharmony_ci#define EEPROM_TXPWINDEX_OFDM_24G 0x6B 7388c2ecf20Sopenharmony_ci#define EEPROM_HT2T_CH1_A 0x6c 7398c2ecf20Sopenharmony_ci#define EEPROM_HT2T_CH7_A 0x6d 7408c2ecf20Sopenharmony_ci#define EEPROM_HT2T_CH13_A 0x6e 7418c2ecf20Sopenharmony_ci#define EEPROM_HT2T_CH1_B 0x6f 7428c2ecf20Sopenharmony_ci#define EEPROM_HT2T_CH7_B 0x70 7438c2ecf20Sopenharmony_ci#define EEPROM_HT2T_CH13_B 0x71 7448c2ecf20Sopenharmony_ci 7458c2ecf20Sopenharmony_ci#define EEPROM_TSSI_A 0x74 7468c2ecf20Sopenharmony_ci#define EEPROM_TSSI_B 0x75 7478c2ecf20Sopenharmony_ci 7488c2ecf20Sopenharmony_ci#define EEPROM_RFIND_POWERDIFF 0x76 7498c2ecf20Sopenharmony_ci#define EEPROM_DEFAULT_LEGACYHTTXPOWERDIFF 0x3 7508c2ecf20Sopenharmony_ci 7518c2ecf20Sopenharmony_ci#define EEPROM_THERMALMETER 0x77 7528c2ecf20Sopenharmony_ci#define EEPROM_BLUETOOTH_COEXIST 0x78 7538c2ecf20Sopenharmony_ci#define EEPROM_BLUETOOTH_TYPE 0x4f 7548c2ecf20Sopenharmony_ci 7558c2ecf20Sopenharmony_ci#define EEPROM_OPTIONAL 0x78 7568c2ecf20Sopenharmony_ci#define EEPROM_WOWLAN 0x78 7578c2ecf20Sopenharmony_ci 7588c2ecf20Sopenharmony_ci#define EEPROM_CRYSTALCAP 0x79 7598c2ecf20Sopenharmony_ci#define EEPROM_CHANNELPLAN 0x7B 7608c2ecf20Sopenharmony_ci#define EEPROM_VERSION 0x7C 7618c2ecf20Sopenharmony_ci#define EEPROM_CUSTOMID 0x7A 7628c2ecf20Sopenharmony_ci#define EEPROM_BOARDTYPE 0x7E 7638c2ecf20Sopenharmony_ci 7648c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_FCC 0x0 7658c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_IC 0x1 7668c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_ETSI 0x2 7678c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_SPAIN 0x3 7688c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_FRANCE 0x4 7698c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_MKK 0x5 7708c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_MKK1 0x6 7718c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_ISRAEL 0x7 7728c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_TELEC 0x8 7738c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_GLOBAL_DOMAIN 0x9 7748c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_WORLD_WIDE_13 0xA 7758c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_NCC 0xB 7768c2ecf20Sopenharmony_ci#define EEPROM_CHANNEL_PLAN_BY_HW_MASK 0x80 7778c2ecf20Sopenharmony_ci 7788c2ecf20Sopenharmony_ci#define FW_DIG_DISABLE 0xfd00cc00 7798c2ecf20Sopenharmony_ci#define FW_DIG_ENABLE 0xfd000000 7808c2ecf20Sopenharmony_ci#define FW_DIG_HALT 0xfd000001 7818c2ecf20Sopenharmony_ci#define FW_DIG_RESUME 0xfd000002 7828c2ecf20Sopenharmony_ci#define FW_HIGH_PWR_DISABLE 0xfd000008 7838c2ecf20Sopenharmony_ci#define FW_HIGH_PWR_ENABLE 0xfd000009 7848c2ecf20Sopenharmony_ci#define FW_ADD_A2_ENTRY 0xfd000016 7858c2ecf20Sopenharmony_ci#define FW_TXPWR_TRACK_ENABLE 0xfd000017 7868c2ecf20Sopenharmony_ci#define FW_TXPWR_TRACK_DISABLE 0xfd000018 7878c2ecf20Sopenharmony_ci#define FW_TXPWR_TRACK_THERMAL 0xfd000019 7888c2ecf20Sopenharmony_ci#define FW_TXANT_SWITCH_ENABLE 0xfd000023 7898c2ecf20Sopenharmony_ci#define FW_TXANT_SWITCH_DISABLE 0xfd000024 7908c2ecf20Sopenharmony_ci#define FW_RA_INIT 0xfd000026 7918c2ecf20Sopenharmony_ci#define FW_CTRL_DM_BY_DRIVER 0Xfd00002a 7928c2ecf20Sopenharmony_ci#define FW_RA_IOT_BG_COMB 0xfd000030 7938c2ecf20Sopenharmony_ci#define FW_RA_IOT_N_COMB 0xfd000031 7948c2ecf20Sopenharmony_ci#define FW_RA_REFRESH 0xfd0000a0 7958c2ecf20Sopenharmony_ci#define FW_RA_UPDATE_MASK 0xfd0000a2 7968c2ecf20Sopenharmony_ci#define FW_RA_DISABLE 0xfd0000a4 7978c2ecf20Sopenharmony_ci#define FW_RA_ACTIVE 0xfd0000a6 7988c2ecf20Sopenharmony_ci#define FW_RA_DISABLE_RSSI_MASK 0xfd0000ac 7998c2ecf20Sopenharmony_ci#define FW_RA_ENABLE_RSSI_MASK 0xfd0000ad 8008c2ecf20Sopenharmony_ci#define FW_RA_RESET 0xfd0000af 8018c2ecf20Sopenharmony_ci#define FW_DM_DISABLE 0xfd00aa00 8028c2ecf20Sopenharmony_ci#define FW_IQK_ENABLE 0xf0000020 8038c2ecf20Sopenharmony_ci#define FW_IQK_SUCCESS 0x0000dddd 8048c2ecf20Sopenharmony_ci#define FW_IQK_FAIL 0x0000ffff 8058c2ecf20Sopenharmony_ci#define FW_OP_FAILURE 0xffffffff 8068c2ecf20Sopenharmony_ci#define FW_TX_FEEDBACK_NONE 0xfb000000 8078c2ecf20Sopenharmony_ci#define FW_TX_FEEDBACK_DTM_ENABLE (FW_TX_FEEDBACK_NONE | 0x1) 8088c2ecf20Sopenharmony_ci#define FW_TX_FEEDBACK_CCX_ENABL (FW_TX_FEEDBACK_NONE | 0x2) 8098c2ecf20Sopenharmony_ci#define FW_BB_RESET_ENABLE 0xff00000d 8108c2ecf20Sopenharmony_ci#define FW_BB_RESET_DISABLE 0xff00000e 8118c2ecf20Sopenharmony_ci#define FW_CCA_CHK_ENABLE 0xff000011 8128c2ecf20Sopenharmony_ci#define FW_CCK_RESET_CNT 0xff000013 8138c2ecf20Sopenharmony_ci#define FW_LPS_ENTER 0xfe000010 8148c2ecf20Sopenharmony_ci#define FW_LPS_LEAVE 0xfe000011 8158c2ecf20Sopenharmony_ci#define FW_INDIRECT_READ 0xf2000000 8168c2ecf20Sopenharmony_ci#define FW_INDIRECT_WRITE 0xf2000001 8178c2ecf20Sopenharmony_ci#define FW_CHAN_SET 0xf3000001 8188c2ecf20Sopenharmony_ci 8198c2ecf20Sopenharmony_ci#define RFPC 0x5F 8208c2ecf20Sopenharmony_ci#define RCR_9356SEL BIT(6) 8218c2ecf20Sopenharmony_ci#define TCR_LRL_OFFSET 0 8228c2ecf20Sopenharmony_ci#define TCR_SRL_OFFSET 8 8238c2ecf20Sopenharmony_ci#define TCR_MXDMA_OFFSET 21 8248c2ecf20Sopenharmony_ci#define TCR_SAT BIT(24) 8258c2ecf20Sopenharmony_ci#define RCR_MXDMA_OFFSET 8 8268c2ecf20Sopenharmony_ci#define RCR_FIFO_OFFSET 13 8278c2ecf20Sopenharmony_ci#define RCR_ONLYERLPKT BIT(31) 8288c2ecf20Sopenharmony_ci#define CWR 0xDC 8298c2ecf20Sopenharmony_ci#define RETRYCTR 0xDE 8308c2ecf20Sopenharmony_ci 8318c2ecf20Sopenharmony_ci#define CPU_GEN_SYSTEM_RESET 0x00000001 8328c2ecf20Sopenharmony_ci 8338c2ecf20Sopenharmony_ci#define CCX_COMMAND_REG 0x890 8348c2ecf20Sopenharmony_ci#define CLM_PERIOD_REG 0x894 8358c2ecf20Sopenharmony_ci#define NHM_PERIOD_REG 0x896 8368c2ecf20Sopenharmony_ci 8378c2ecf20Sopenharmony_ci#define NHM_THRESHOLD0 0x898 8388c2ecf20Sopenharmony_ci#define NHM_THRESHOLD1 0x899 8398c2ecf20Sopenharmony_ci#define NHM_THRESHOLD2 0x89A 8408c2ecf20Sopenharmony_ci#define NHM_THRESHOLD3 0x89B 8418c2ecf20Sopenharmony_ci#define NHM_THRESHOLD4 0x89C 8428c2ecf20Sopenharmony_ci#define NHM_THRESHOLD5 0x89D 8438c2ecf20Sopenharmony_ci#define NHM_THRESHOLD6 0x89E 8448c2ecf20Sopenharmony_ci#define CLM_RESULT_REG 0x8D0 8458c2ecf20Sopenharmony_ci#define NHM_RESULT_REG 0x8D4 8468c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER0 0x8D8 8478c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER1 0x8D9 8488c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER2 0x8DA 8498c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER3 0x8DB 8508c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER4 0x8DC 8518c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER5 0x8DD 8528c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER6 0x8DE 8538c2ecf20Sopenharmony_ci#define NHM_RPI_COUNTER7 0x8DF 8548c2ecf20Sopenharmony_ci 8558c2ecf20Sopenharmony_ci#define HAL_8192S_HW_GPIO_OFF_BIT BIT(3) 8568c2ecf20Sopenharmony_ci#define HAL_8192S_HW_GPIO_OFF_MASK 0xF7 8578c2ecf20Sopenharmony_ci#define HAL_8192S_HW_GPIO_WPS_BIT BIT(4) 8588c2ecf20Sopenharmony_ci 8598c2ecf20Sopenharmony_ci#define RPMAC_RESET 0x100 8608c2ecf20Sopenharmony_ci#define RPMAC_TXSTART 0x104 8618c2ecf20Sopenharmony_ci#define RPMAC_TXLEGACYSIG 0x108 8628c2ecf20Sopenharmony_ci#define RPMAC_TXHTSIG1 0x10c 8638c2ecf20Sopenharmony_ci#define RPMAC_TXHTSIG2 0x110 8648c2ecf20Sopenharmony_ci#define RPMAC_PHYDEBUG 0x114 8658c2ecf20Sopenharmony_ci#define RPMAC_TXPACKETNNM 0x118 8668c2ecf20Sopenharmony_ci#define RPMAC_TXIDLE 0x11c 8678c2ecf20Sopenharmony_ci#define RPMAC_TXMACHEADER0 0x120 8688c2ecf20Sopenharmony_ci#define RPMAC_TXMACHEADER1 0x124 8698c2ecf20Sopenharmony_ci#define RPMAC_TXMACHEADER2 0x128 8708c2ecf20Sopenharmony_ci#define RPMAC_TXMACHEADER3 0x12c 8718c2ecf20Sopenharmony_ci#define RPMAC_TXMACHEADER4 0x130 8728c2ecf20Sopenharmony_ci#define RPMAC_TXMACHEADER5 0x134 8738c2ecf20Sopenharmony_ci#define RPMAC_TXDATATYPE 0x138 8748c2ecf20Sopenharmony_ci#define RPMAC_TXRANDOMSEED 0x13c 8758c2ecf20Sopenharmony_ci#define RPMAC_CCKPLCPPREAMBLE 0x140 8768c2ecf20Sopenharmony_ci#define RPMAC_CCKPLCPHEADER 0x144 8778c2ecf20Sopenharmony_ci#define RPMAC_CCKCRC16 0x148 8788c2ecf20Sopenharmony_ci#define RPMAC_OFDMRXCRC32OK 0x170 8798c2ecf20Sopenharmony_ci#define RPMAC_OFDMRXCRC32ER 0x174 8808c2ecf20Sopenharmony_ci#define RPMAC_OFDMRXPARITYER 0x178 8818c2ecf20Sopenharmony_ci#define RPMAC_OFDMRXCRC8ER 0x17c 8828c2ecf20Sopenharmony_ci#define RPMAC_CCKCRXRC16ER 0x180 8838c2ecf20Sopenharmony_ci#define RPMAC_CCKCRXRC32ER 0x184 8848c2ecf20Sopenharmony_ci#define RPMAC_CCKCRXRC32OK 0x188 8858c2ecf20Sopenharmony_ci#define RPMAC_TXSTATUS 0x18c 8868c2ecf20Sopenharmony_ci 8878c2ecf20Sopenharmony_ci#define RF_BB_CMD_ADDR 0x02c0 8888c2ecf20Sopenharmony_ci#define RF_BB_CMD_DATA 0x02c4 8898c2ecf20Sopenharmony_ci 8908c2ecf20Sopenharmony_ci#define RFPGA0_RFMOD 0x800 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_ci#define RFPGA0_TXINFO 0x804 8938c2ecf20Sopenharmony_ci#define RFPGA0_PSDFUNCTION 0x808 8948c2ecf20Sopenharmony_ci 8958c2ecf20Sopenharmony_ci#define RFPGA0_TXGAINSTAGE 0x80c 8968c2ecf20Sopenharmony_ci 8978c2ecf20Sopenharmony_ci#define RFPGA0_RFTIMING1 0x810 8988c2ecf20Sopenharmony_ci#define RFPGA0_RFTIMING2 0x814 8998c2ecf20Sopenharmony_ci#define RFPGA0_XA_HSSIPARAMETER1 0x820 9008c2ecf20Sopenharmony_ci#define RFPGA0_XA_HSSIPARAMETER2 0x824 9018c2ecf20Sopenharmony_ci#define RFPGA0_XB_HSSIPARAMETER1 0x828 9028c2ecf20Sopenharmony_ci#define RFPGA0_XB_HSSIPARAMETER2 0x82c 9038c2ecf20Sopenharmony_ci#define RFPGA0_XC_HSSIPARAMETER1 0x830 9048c2ecf20Sopenharmony_ci#define RFPGA0_XC_HSSIPARAMETER2 0x834 9058c2ecf20Sopenharmony_ci#define RFPGA0_XD_HSSIPARAMETER1 0x838 9068c2ecf20Sopenharmony_ci#define RFPGA0_XD_HSSIPARAMETER2 0x83c 9078c2ecf20Sopenharmony_ci#define RFPGA0_XA_LSSIPARAMETER 0x840 9088c2ecf20Sopenharmony_ci#define RFPGA0_XB_LSSIPARAMETER 0x844 9098c2ecf20Sopenharmony_ci#define RFPGA0_XC_LSSIPARAMETER 0x848 9108c2ecf20Sopenharmony_ci#define RFPGA0_XD_LSSIPARAMETER 0x84c 9118c2ecf20Sopenharmony_ci 9128c2ecf20Sopenharmony_ci#define RFPGA0_RFWAKEUP_PARAMETER 0x850 9138c2ecf20Sopenharmony_ci#define RFPGA0_RFSLEEPUP_PARAMETER 0x854 9148c2ecf20Sopenharmony_ci 9158c2ecf20Sopenharmony_ci#define RFPGA0_XAB_SWITCHCONTROL 0x858 9168c2ecf20Sopenharmony_ci#define RFPGA0_XCD_SWITCHCONTROL 0x85c 9178c2ecf20Sopenharmony_ci 9188c2ecf20Sopenharmony_ci#define RFPGA0_XA_RFINTERFACEOE 0x860 9198c2ecf20Sopenharmony_ci#define RFPGA0_XB_RFINTERFACEOE 0x864 9208c2ecf20Sopenharmony_ci#define RFPGA0_XC_RFINTERFACEOE 0x868 9218c2ecf20Sopenharmony_ci#define RFPGA0_XD_RFINTERFACEOE 0x86c 9228c2ecf20Sopenharmony_ci 9238c2ecf20Sopenharmony_ci#define RFPGA0_XAB_RFINTERFACESW 0x870 9248c2ecf20Sopenharmony_ci#define RFPGA0_XCD_RFINTERFACESW 0x874 9258c2ecf20Sopenharmony_ci 9268c2ecf20Sopenharmony_ci#define RFPGA0_XAB_RFPARAMETER 0x878 9278c2ecf20Sopenharmony_ci#define RFPGA0_XCD_RFPARAMETER 0x87c 9288c2ecf20Sopenharmony_ci 9298c2ecf20Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER1 0x880 9308c2ecf20Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER2 0x884 9318c2ecf20Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER3 0x888 9328c2ecf20Sopenharmony_ci#define RFPGA0_ANALOGPARAMETER4 0x88c 9338c2ecf20Sopenharmony_ci 9348c2ecf20Sopenharmony_ci#define RFPGA0_XA_LSSIREADBACK 0x8a0 9358c2ecf20Sopenharmony_ci#define RFPGA0_XB_LSSIREADBACK 0x8a4 9368c2ecf20Sopenharmony_ci#define RFPGA0_XC_LSSIREADBACK 0x8a8 9378c2ecf20Sopenharmony_ci#define RFPGA0_XD_LSSIREADBACK 0x8ac 9388c2ecf20Sopenharmony_ci 9398c2ecf20Sopenharmony_ci#define RFPGA0_PSDREPORT 0x8b4 9408c2ecf20Sopenharmony_ci#define TRANSCEIVERA_HSPI_READBACK 0x8b8 9418c2ecf20Sopenharmony_ci#define TRANSCEIVERB_HSPI_READBACK 0x8bc 9428c2ecf20Sopenharmony_ci#define RFPGA0_XAB_RFINTERFACERB 0x8e0 9438c2ecf20Sopenharmony_ci#define RFPGA0_XCD_RFINTERFACERB 0x8e4 9448c2ecf20Sopenharmony_ci#define RFPGA1_RFMOD 0x900 9458c2ecf20Sopenharmony_ci 9468c2ecf20Sopenharmony_ci#define RFPGA1_TXBLOCK 0x904 9478c2ecf20Sopenharmony_ci#define RFPGA1_DEBUGSELECT 0x908 9488c2ecf20Sopenharmony_ci#define RFPGA1_TXINFO 0x90c 9498c2ecf20Sopenharmony_ci 9508c2ecf20Sopenharmony_ci#define RCCK0_SYSTEM 0xa00 9518c2ecf20Sopenharmony_ci 9528c2ecf20Sopenharmony_ci#define RCCK0_AFESETTING 0xa04 9538c2ecf20Sopenharmony_ci#define RCCK0_CCA 0xa08 9548c2ecf20Sopenharmony_ci 9558c2ecf20Sopenharmony_ci#define RCCK0_RXAGC1 0xa0c 9568c2ecf20Sopenharmony_ci#define RCCK0_RXAGC2 0xa10 9578c2ecf20Sopenharmony_ci 9588c2ecf20Sopenharmony_ci#define RCCK0_RXHP 0xa14 9598c2ecf20Sopenharmony_ci 9608c2ecf20Sopenharmony_ci#define RCCK0_DSPPARAMETER1 0xa18 9618c2ecf20Sopenharmony_ci#define RCCK0_DSPPARAMETER2 0xa1c 9628c2ecf20Sopenharmony_ci 9638c2ecf20Sopenharmony_ci#define RCCK0_TXFILTER1 0xa20 9648c2ecf20Sopenharmony_ci#define RCCK0_TXFILTER2 0xa24 9658c2ecf20Sopenharmony_ci#define RCCK0_DEBUGPORT 0xa28 9668c2ecf20Sopenharmony_ci#define RCCK0_FALSEALARMREPORT 0xa2c 9678c2ecf20Sopenharmony_ci#define RCCK0_TRSSIREPORT 0xa50 9688c2ecf20Sopenharmony_ci#define RCCK0_RXREPORT 0xa54 9698c2ecf20Sopenharmony_ci#define RCCK0_FACOUNTERLOWER 0xa5c 9708c2ecf20Sopenharmony_ci#define RCCK0_FACOUNTERUPPER 0xa58 9718c2ecf20Sopenharmony_ci 9728c2ecf20Sopenharmony_ci#define ROFDM0_LSTF 0xc00 9738c2ecf20Sopenharmony_ci 9748c2ecf20Sopenharmony_ci#define ROFDM0_TRXPATHENABLE 0xc04 9758c2ecf20Sopenharmony_ci#define ROFDM0_TRMUXPAR 0xc08 9768c2ecf20Sopenharmony_ci#define ROFDM0_TRSWISOLATION 0xc0c 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_ci#define ROFDM0_XARXAFE 0xc10 9798c2ecf20Sopenharmony_ci#define ROFDM0_XARXIQIMBALANCE 0xc14 9808c2ecf20Sopenharmony_ci#define ROFDM0_XBRXAFE 0xc18 9818c2ecf20Sopenharmony_ci#define ROFDM0_XBRXIQIMBALANCE 0xc1c 9828c2ecf20Sopenharmony_ci#define ROFDM0_XCRXAFE 0xc20 9838c2ecf20Sopenharmony_ci#define ROFDM0_XCRXIQIMBALANCE 0xc24 9848c2ecf20Sopenharmony_ci#define ROFDM0_XDRXAFE 0xc28 9858c2ecf20Sopenharmony_ci#define ROFDM0_XDRXIQIMBALANCE 0xc2c 9868c2ecf20Sopenharmony_ci 9878c2ecf20Sopenharmony_ci#define ROFDM0_RXDETECTOR1 0xc30 9888c2ecf20Sopenharmony_ci#define ROFDM0_RXDETECTOR2 0xc34 9898c2ecf20Sopenharmony_ci#define ROFDM0_RXDETECTOR3 0xc38 9908c2ecf20Sopenharmony_ci#define ROFDM0_RXDETECTOR4 0xc3c 9918c2ecf20Sopenharmony_ci 9928c2ecf20Sopenharmony_ci#define ROFDM0_RXDSP 0xc40 9938c2ecf20Sopenharmony_ci#define ROFDM0_CFO_AND_DAGC 0xc44 9948c2ecf20Sopenharmony_ci#define ROFDM0_CCADROP_THRESHOLD 0xc48 9958c2ecf20Sopenharmony_ci#define ROFDM0_ECCA_THRESHOLD 0xc4c 9968c2ecf20Sopenharmony_ci 9978c2ecf20Sopenharmony_ci#define ROFDM0_XAAGCCORE1 0xc50 9988c2ecf20Sopenharmony_ci#define ROFDM0_XAAGCCORE2 0xc54 9998c2ecf20Sopenharmony_ci#define ROFDM0_XBAGCCORE1 0xc58 10008c2ecf20Sopenharmony_ci#define ROFDM0_XBAGCCORE2 0xc5c 10018c2ecf20Sopenharmony_ci#define ROFDM0_XCAGCCORE1 0xc60 10028c2ecf20Sopenharmony_ci#define ROFDM0_XCAGCCORE2 0xc64 10038c2ecf20Sopenharmony_ci#define ROFDM0_XDAGCCORE1 0xc68 10048c2ecf20Sopenharmony_ci#define ROFDM0_XDAGCCORE2 0xc6c 10058c2ecf20Sopenharmony_ci 10068c2ecf20Sopenharmony_ci#define ROFDM0_AGCPARAMETER1 0xc70 10078c2ecf20Sopenharmony_ci#define ROFDM0_AGCPARAMETER2 0xc74 10088c2ecf20Sopenharmony_ci#define ROFDM0_AGCRSSITABLE 0xc78 10098c2ecf20Sopenharmony_ci#define ROFDM0_HTSTFAGC 0xc7c 10108c2ecf20Sopenharmony_ci 10118c2ecf20Sopenharmony_ci#define ROFDM0_XATXIQIMBALANCE 0xc80 10128c2ecf20Sopenharmony_ci#define ROFDM0_XATXAFE 0xc84 10138c2ecf20Sopenharmony_ci#define ROFDM0_XBTXIQIMBALANCE 0xc88 10148c2ecf20Sopenharmony_ci#define ROFDM0_XBTXAFE 0xc8c 10158c2ecf20Sopenharmony_ci#define ROFDM0_XCTXIQIMBALANCE 0xc90 10168c2ecf20Sopenharmony_ci#define ROFDM0_XCTXAFE 0xc94 10178c2ecf20Sopenharmony_ci#define ROFDM0_XDTXIQIMBALANCE 0xc98 10188c2ecf20Sopenharmony_ci#define ROFDM0_XDTXAFE 0xc9c 10198c2ecf20Sopenharmony_ci 10208c2ecf20Sopenharmony_ci#define ROFDM0_RXHP_PARAMETER 0xce0 10218c2ecf20Sopenharmony_ci#define ROFDM0_TXPSEUDO_NOISE_WGT 0xce4 10228c2ecf20Sopenharmony_ci#define ROFDM0_FRAME_SYNC 0xcf0 10238c2ecf20Sopenharmony_ci#define ROFDM0_DFSREPORT 0xcf4 10248c2ecf20Sopenharmony_ci#define ROFDM0_TXCOEFF1 0xca4 10258c2ecf20Sopenharmony_ci#define ROFDM0_TXCOEFF2 0xca8 10268c2ecf20Sopenharmony_ci#define ROFDM0_TXCOEFF3 0xcac 10278c2ecf20Sopenharmony_ci#define ROFDM0_TXCOEFF4 0xcb0 10288c2ecf20Sopenharmony_ci#define ROFDM0_TXCOEFF5 0xcb4 10298c2ecf20Sopenharmony_ci#define ROFDM0_TXCOEFF6 0xcb8 10308c2ecf20Sopenharmony_ci 10318c2ecf20Sopenharmony_ci 10328c2ecf20Sopenharmony_ci#define ROFDM1_LSTF 0xd00 10338c2ecf20Sopenharmony_ci#define ROFDM1_TRXPATHENABLE 0xd04 10348c2ecf20Sopenharmony_ci 10358c2ecf20Sopenharmony_ci#define ROFDM1_CFO 0xd08 10368c2ecf20Sopenharmony_ci#define ROFDM1_CSI1 0xd10 10378c2ecf20Sopenharmony_ci#define ROFDM1_SBD 0xd14 10388c2ecf20Sopenharmony_ci#define ROFDM1_CSI2 0xd18 10398c2ecf20Sopenharmony_ci#define ROFDM1_CFOTRACKING 0xd2c 10408c2ecf20Sopenharmony_ci#define ROFDM1_TRXMESAURE1 0xd34 10418c2ecf20Sopenharmony_ci#define ROFDM1_INTF_DET 0xd3c 10428c2ecf20Sopenharmony_ci#define ROFDM1_PSEUDO_NOISESTATEAB 0xd50 10438c2ecf20Sopenharmony_ci#define ROFDM1_PSEUDO_NOISESTATECD 0xd54 10448c2ecf20Sopenharmony_ci#define ROFDM1_RX_PSEUDO_NOISE_WGT 0xd58 10458c2ecf20Sopenharmony_ci 10468c2ecf20Sopenharmony_ci#define ROFDM_PHYCOUNTER1 0xda0 10478c2ecf20Sopenharmony_ci#define ROFDM_PHYCOUNTER2 0xda4 10488c2ecf20Sopenharmony_ci#define ROFDM_PHYCOUNTER3 0xda8 10498c2ecf20Sopenharmony_ci 10508c2ecf20Sopenharmony_ci#define ROFDM_SHORT_CFOAB 0xdac 10518c2ecf20Sopenharmony_ci#define ROFDM_SHORT_CFOCD 0xdb0 10528c2ecf20Sopenharmony_ci#define ROFDM_LONG_CFOAB 0xdb4 10538c2ecf20Sopenharmony_ci#define ROFDM_LONG_CFOCD 0xdb8 10548c2ecf20Sopenharmony_ci#define ROFDM_TAIL_CFOAB 0xdbc 10558c2ecf20Sopenharmony_ci#define ROFDM_TAIL_CFOCD 0xdc0 10568c2ecf20Sopenharmony_ci#define ROFDM_PW_MEASURE1 0xdc4 10578c2ecf20Sopenharmony_ci#define ROFDM_PW_MEASURE2 0xdc8 10588c2ecf20Sopenharmony_ci#define ROFDM_BW_REPORT 0xdcc 10598c2ecf20Sopenharmony_ci#define ROFDM_AGC_REPORT 0xdd0 10608c2ecf20Sopenharmony_ci#define ROFDM_RXSNR 0xdd4 10618c2ecf20Sopenharmony_ci#define ROFDM_RXEVMCSI 0xdd8 10628c2ecf20Sopenharmony_ci#define ROFDM_SIG_REPORT 0xddc 10638c2ecf20Sopenharmony_ci 10648c2ecf20Sopenharmony_ci 10658c2ecf20Sopenharmony_ci#define RTXAGC_RATE18_06 0xe00 10668c2ecf20Sopenharmony_ci#define RTXAGC_RATE54_24 0xe04 10678c2ecf20Sopenharmony_ci#define RTXAGC_CCK_MCS32 0xe08 10688c2ecf20Sopenharmony_ci#define RTXAGC_MCS03_MCS00 0xe10 10698c2ecf20Sopenharmony_ci#define RTXAGC_MCS07_MCS04 0xe14 10708c2ecf20Sopenharmony_ci#define RTXAGC_MCS11_MCS08 0xe18 10718c2ecf20Sopenharmony_ci#define RTXAGC_MCS15_MCS12 0xe1c 10728c2ecf20Sopenharmony_ci 10738c2ecf20Sopenharmony_ci 10748c2ecf20Sopenharmony_ci#define RF_AC 0x00 10758c2ecf20Sopenharmony_ci#define RF_IQADJ_G1 0x01 10768c2ecf20Sopenharmony_ci#define RF_IQADJ_G2 0x02 10778c2ecf20Sopenharmony_ci#define RF_POW_TRSW 0x05 10788c2ecf20Sopenharmony_ci#define RF_GAIN_RX 0x06 10798c2ecf20Sopenharmony_ci#define RF_GAIN_TX 0x07 10808c2ecf20Sopenharmony_ci#define RF_TXM_IDAC 0x08 10818c2ecf20Sopenharmony_ci#define RF_BS_IQGEN 0x0F 10828c2ecf20Sopenharmony_ci 10838c2ecf20Sopenharmony_ci#define RF_MODE1 0x10 10848c2ecf20Sopenharmony_ci#define RF_MODE2 0x11 10858c2ecf20Sopenharmony_ci#define RF_RX_AGC_HP 0x12 10868c2ecf20Sopenharmony_ci#define RF_TX_AGC 0x13 10878c2ecf20Sopenharmony_ci#define RF_BIAS 0x14 10888c2ecf20Sopenharmony_ci#define RF_IPA 0x15 10898c2ecf20Sopenharmony_ci#define RF_POW_ABILITY 0x17 10908c2ecf20Sopenharmony_ci#define RF_MODE_AG 0x18 10918c2ecf20Sopenharmony_ci#define RF_CHANNEL 0x18 10928c2ecf20Sopenharmony_ci#define RF_CHNLBW 0x18 10938c2ecf20Sopenharmony_ci#define RF_TOP 0x19 10948c2ecf20Sopenharmony_ci#define RF_RX_G1 0x1A 10958c2ecf20Sopenharmony_ci#define RF_RX_G2 0x1B 10968c2ecf20Sopenharmony_ci#define RF_RX_BB2 0x1C 10978c2ecf20Sopenharmony_ci#define RF_RX_BB1 0x1D 10988c2ecf20Sopenharmony_ci#define RF_RCK1 0x1E 10998c2ecf20Sopenharmony_ci#define RF_RCK2 0x1F 11008c2ecf20Sopenharmony_ci 11018c2ecf20Sopenharmony_ci#define RF_TX_G1 0x20 11028c2ecf20Sopenharmony_ci#define RF_TX_G2 0x21 11038c2ecf20Sopenharmony_ci#define RF_TX_G3 0x22 11048c2ecf20Sopenharmony_ci#define RF_TX_BB1 0x23 11058c2ecf20Sopenharmony_ci#define RF_T_METER 0x24 11068c2ecf20Sopenharmony_ci#define RF_SYN_G1 0x25 11078c2ecf20Sopenharmony_ci#define RF_SYN_G2 0x26 11088c2ecf20Sopenharmony_ci#define RF_SYN_G3 0x27 11098c2ecf20Sopenharmony_ci#define RF_SYN_G4 0x28 11108c2ecf20Sopenharmony_ci#define RF_SYN_G5 0x29 11118c2ecf20Sopenharmony_ci#define RF_SYN_G6 0x2A 11128c2ecf20Sopenharmony_ci#define RF_SYN_G7 0x2B 11138c2ecf20Sopenharmony_ci#define RF_SYN_G8 0x2C 11148c2ecf20Sopenharmony_ci 11158c2ecf20Sopenharmony_ci#define RF_RCK_OS 0x30 11168c2ecf20Sopenharmony_ci#define RF_TXPA_G1 0x31 11178c2ecf20Sopenharmony_ci#define RF_TXPA_G2 0x32 11188c2ecf20Sopenharmony_ci#define RF_TXPA_G3 0x33 11198c2ecf20Sopenharmony_ci 11208c2ecf20Sopenharmony_ci#define BRFMOD 0x1 11218c2ecf20Sopenharmony_ci#define BCCKEN 0x1000000 11228c2ecf20Sopenharmony_ci#define BOFDMEN 0x2000000 11238c2ecf20Sopenharmony_ci 11248c2ecf20Sopenharmony_ci#define BXBTXAGC 0xf00 11258c2ecf20Sopenharmony_ci#define BXCTXAGC 0xf000 11268c2ecf20Sopenharmony_ci#define BXDTXAGC 0xf0000 11278c2ecf20Sopenharmony_ci 11288c2ecf20Sopenharmony_ci#define B3WIRE_DATALENGTH 0x800 11298c2ecf20Sopenharmony_ci#define B3WIRE_ADDRESSLENGTH 0x400 11308c2ecf20Sopenharmony_ci 11318c2ecf20Sopenharmony_ci#define BRFSI_RFENV 0x10 11328c2ecf20Sopenharmony_ci 11338c2ecf20Sopenharmony_ci#define BLSSI_READADDRESS 0x7f800000 11348c2ecf20Sopenharmony_ci#define BLSSI_READEDGE 0x80000000 11358c2ecf20Sopenharmony_ci#define BLSSI_READBACK_DATA 0xfffff 11368c2ecf20Sopenharmony_ci 11378c2ecf20Sopenharmony_ci#define BADCLKPHASE 0x4000000 11388c2ecf20Sopenharmony_ci 11398c2ecf20Sopenharmony_ci#define BCCK_SIDEBAND 0x10 11408c2ecf20Sopenharmony_ci 11418c2ecf20Sopenharmony_ci#define BTX_AGCRATECCK 0x7f00 11428c2ecf20Sopenharmony_ci 11438c2ecf20Sopenharmony_ci#endif 1144