18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 28c2ecf20Sopenharmony_ci/* Copyright(c) 2018-2019 Realtek Corporation 38c2ecf20Sopenharmony_ci */ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#ifndef __RTW8723D_H__ 68c2ecf20Sopenharmony_ci#define __RTW8723D_H__ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cienum rtw8723d_path { 98c2ecf20Sopenharmony_ci PATH_S1, 108c2ecf20Sopenharmony_ci PATH_S0, 118c2ecf20Sopenharmony_ci PATH_NR, 128c2ecf20Sopenharmony_ci}; 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cienum rtw8723d_iqk_round { 158c2ecf20Sopenharmony_ci IQK_ROUND_0, 168c2ecf20Sopenharmony_ci IQK_ROUND_1, 178c2ecf20Sopenharmony_ci IQK_ROUND_2, 188c2ecf20Sopenharmony_ci IQK_ROUND_HYBRID, 198c2ecf20Sopenharmony_ci IQK_ROUND_SIZE, 208c2ecf20Sopenharmony_ci IQK_ROUND_INVALID = 0xff, 218c2ecf20Sopenharmony_ci}; 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_cienum rtw8723d_iqk_result { 248c2ecf20Sopenharmony_ci IQK_S1_TX_X, 258c2ecf20Sopenharmony_ci IQK_S1_TX_Y, 268c2ecf20Sopenharmony_ci IQK_S1_RX_X, 278c2ecf20Sopenharmony_ci IQK_S1_RX_Y, 288c2ecf20Sopenharmony_ci IQK_S0_TX_X, 298c2ecf20Sopenharmony_ci IQK_S0_TX_Y, 308c2ecf20Sopenharmony_ci IQK_S0_RX_X, 318c2ecf20Sopenharmony_ci IQK_S0_RX_Y, 328c2ecf20Sopenharmony_ci IQK_NR, 338c2ecf20Sopenharmony_ci IQK_SX_NR = IQK_NR / PATH_NR, 348c2ecf20Sopenharmony_ci}; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cistruct rtw8723de_efuse { 378c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; /* 0xd0 */ 388c2ecf20Sopenharmony_ci u8 vender_id[2]; 398c2ecf20Sopenharmony_ci u8 device_id[2]; 408c2ecf20Sopenharmony_ci u8 sub_vender_id[2]; 418c2ecf20Sopenharmony_ci u8 sub_device_id[2]; 428c2ecf20Sopenharmony_ci}; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_cistruct rtw8723d_efuse { 458c2ecf20Sopenharmony_ci __le16 rtl_id; 468c2ecf20Sopenharmony_ci u8 rsvd[2]; 478c2ecf20Sopenharmony_ci u8 afe; 488c2ecf20Sopenharmony_ci u8 rsvd1[11]; 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci /* power index for four RF paths */ 518c2ecf20Sopenharmony_ci struct rtw_txpwr_idx txpwr_idx_table[4]; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci u8 channel_plan; /* 0xb8 */ 548c2ecf20Sopenharmony_ci u8 xtal_k; 558c2ecf20Sopenharmony_ci u8 thermal_meter; 568c2ecf20Sopenharmony_ci u8 iqk_lck; 578c2ecf20Sopenharmony_ci u8 pa_type; /* 0xbc */ 588c2ecf20Sopenharmony_ci u8 lna_type_2g[2]; /* 0xbd */ 598c2ecf20Sopenharmony_ci u8 lna_type_5g[2]; 608c2ecf20Sopenharmony_ci u8 rf_board_option; 618c2ecf20Sopenharmony_ci u8 rf_feature_option; 628c2ecf20Sopenharmony_ci u8 rf_bt_setting; 638c2ecf20Sopenharmony_ci u8 eeprom_version; 648c2ecf20Sopenharmony_ci u8 eeprom_customer_id; 658c2ecf20Sopenharmony_ci u8 tx_bb_swing_setting_2g; 668c2ecf20Sopenharmony_ci u8 res_c7; 678c2ecf20Sopenharmony_ci u8 tx_pwr_calibrate_rate; 688c2ecf20Sopenharmony_ci u8 rf_antenna_option; /* 0xc9 */ 698c2ecf20Sopenharmony_ci u8 rfe_option; 708c2ecf20Sopenharmony_ci u8 country_code[2]; 718c2ecf20Sopenharmony_ci u8 res[3]; 728c2ecf20Sopenharmony_ci struct rtw8723de_efuse e; 738c2ecf20Sopenharmony_ci}; 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci/* phy status page0 */ 768c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P0_PWDB(phy_stat) \ 778c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci/* phy status page1 */ 808c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_PWDB_A(phy_stat) \ 818c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) 828c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_PWDB_B(phy_stat) \ 838c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(23, 16)) 848c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_RF_MODE(phy_stat) \ 858c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x03), GENMASK(29, 28)) 868c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_L_RXSC(phy_stat) \ 878c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(11, 8)) 888c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_HT_RXSC(phy_stat) \ 898c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(15, 12)) 908c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_RXEVM_A(phy_stat) \ 918c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x04), GENMASK(7, 0)) 928c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_CFO_TAIL_A(phy_stat) \ 938c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x05), GENMASK(7, 0)) 948c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_RXSNR_A(phy_stat) \ 958c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x06), GENMASK(7, 0)) 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_cistatic inline s32 iqkxy_to_s32(s32 val) 988c2ecf20Sopenharmony_ci{ 998c2ecf20Sopenharmony_ci /* val is Q10.8 */ 1008c2ecf20Sopenharmony_ci return sign_extend32(val, 9); 1018c2ecf20Sopenharmony_ci} 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_cistatic inline s32 iqk_mult(s32 x, s32 y, s32 *ext) 1048c2ecf20Sopenharmony_ci{ 1058c2ecf20Sopenharmony_ci /* x, y and return value are Q10.8 */ 1068c2ecf20Sopenharmony_ci s32 t; 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci t = x * y; 1098c2ecf20Sopenharmony_ci if (ext) 1108c2ecf20Sopenharmony_ci *ext = (t >> 7) & 0x1; /* Q.16 --> Q.9; get LSB of Q.9 */ 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci return (t >> 8); /* Q.16 --> Q.8 */ 1138c2ecf20Sopenharmony_ci} 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci#define OFDM_SWING_A(swing) FIELD_GET(GENMASK(9, 0), swing) 1168c2ecf20Sopenharmony_ci#define OFDM_SWING_B(swing) FIELD_GET(GENMASK(15, 10), swing) 1178c2ecf20Sopenharmony_ci#define OFDM_SWING_C(swing) FIELD_GET(GENMASK(21, 16), swing) 1188c2ecf20Sopenharmony_ci#define OFDM_SWING_D(swing) FIELD_GET(GENMASK(31, 22), swing) 1198c2ecf20Sopenharmony_ci#define RTW_DEF_OFDM_SWING_INDEX 28 1208c2ecf20Sopenharmony_ci#define RTW_DEF_CCK_SWING_INDEX 28 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci#define MAX_TOLERANCE 5 1238c2ecf20Sopenharmony_ci#define IQK_TX_X_ERR 0x142 1248c2ecf20Sopenharmony_ci#define IQK_TX_Y_ERR 0x42 1258c2ecf20Sopenharmony_ci#define IQK_RX_X_UPPER 0x11a 1268c2ecf20Sopenharmony_ci#define IQK_RX_X_LOWER 0xe6 1278c2ecf20Sopenharmony_ci#define IQK_RX_Y_LMT 0x1a 1288c2ecf20Sopenharmony_ci#define IQK_TX_OK BIT(0) 1298c2ecf20Sopenharmony_ci#define IQK_RX_OK BIT(1) 1308c2ecf20Sopenharmony_ci#define PATH_IQK_RETRY 2 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci#define SPUR_THRES 0x16 1338c2ecf20Sopenharmony_ci#define CCK_DFIR_NR 3 1348c2ecf20Sopenharmony_ci#define DIS_3WIRE 0xccf000c0 1358c2ecf20Sopenharmony_ci#define EN_3WIRE 0xccc000c0 1368c2ecf20Sopenharmony_ci#define START_PSD 0x400000 1378c2ecf20Sopenharmony_ci#define FREQ_CH13 0xfccd 1388c2ecf20Sopenharmony_ci#define FREQ_CH14 0xff9a 1398c2ecf20Sopenharmony_ci#define RFCFGCH_CHANNEL_MASK GENMASK(7, 0) 1408c2ecf20Sopenharmony_ci#define RFCFGCH_BW_MASK (BIT(11) | BIT(10)) 1418c2ecf20Sopenharmony_ci#define RFCFGCH_BW_20M (BIT(11) | BIT(10)) 1428c2ecf20Sopenharmony_ci#define RFCFGCH_BW_40M BIT(10) 1438c2ecf20Sopenharmony_ci#define BIT_MASK_RFMOD BIT(0) 1448c2ecf20Sopenharmony_ci#define BIT_LCK BIT(15) 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci#define REG_GPIO_INTM 0x0048 1478c2ecf20Sopenharmony_ci#define REG_BTG_SEL 0x0067 1488c2ecf20Sopenharmony_ci#define BIT_MASK_BTG_WL BIT(7) 1498c2ecf20Sopenharmony_ci#define REG_LTECOEX_PATH_CONTROL 0x0070 1508c2ecf20Sopenharmony_ci#define REG_LTECOEX_CTRL 0x07c0 1518c2ecf20Sopenharmony_ci#define REG_LTECOEX_WRITE_DATA 0x07c4 1528c2ecf20Sopenharmony_ci#define REG_LTECOEX_READ_DATA 0x07c8 1538c2ecf20Sopenharmony_ci#define REG_PSDFN 0x0808 1548c2ecf20Sopenharmony_ci#define REG_BB_PWR_SAV1_11N 0x0874 1558c2ecf20Sopenharmony_ci#define REG_ANA_PARAM1 0x0880 1568c2ecf20Sopenharmony_ci#define REG_ANALOG_P4 0x088c 1578c2ecf20Sopenharmony_ci#define REG_PSDRPT 0x08b4 1588c2ecf20Sopenharmony_ci#define REG_FPGA1_RFMOD 0x0900 1598c2ecf20Sopenharmony_ci#define REG_BB_SEL_BTG 0x0948 1608c2ecf20Sopenharmony_ci#define REG_BBRX_DFIR 0x0954 1618c2ecf20Sopenharmony_ci#define BIT_MASK_RXBB_DFIR GENMASK(27, 24) 1628c2ecf20Sopenharmony_ci#define BIT_RXBB_DFIR_EN BIT(19) 1638c2ecf20Sopenharmony_ci#define REG_CCK0_SYS 0x0a00 1648c2ecf20Sopenharmony_ci#define BIT_CCK_SIDE_BAND BIT(4) 1658c2ecf20Sopenharmony_ci#define REG_CCK_ANT_SEL_11N 0x0a04 1668c2ecf20Sopenharmony_ci#define REG_CCK_FA_RST_11N 0x0a2c 1678c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_CNT_KEEP BIT(12) 1688c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_CNT_EN BIT(13) 1698c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_CNT_KPEN (BIT_MASK_CCK_CNT_KEEP | BIT_MASK_CCK_CNT_EN) 1708c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_FA_KEEP BIT(14) 1718c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_FA_EN BIT(15) 1728c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_FA_KPEN (BIT_MASK_CCK_FA_KEEP | BIT_MASK_CCK_FA_EN) 1738c2ecf20Sopenharmony_ci#define REG_CCK_FA_LSB_11N 0x0a5c 1748c2ecf20Sopenharmony_ci#define REG_CCK_FA_MSB_11N 0x0a58 1758c2ecf20Sopenharmony_ci#define REG_CCK_CCA_CNT_11N 0x0a60 1768c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_FA_MSB GENMASK(7, 0) 1778c2ecf20Sopenharmony_ci#define BIT_MASK_CCK_FA_LSB GENMASK(15, 8) 1788c2ecf20Sopenharmony_ci#define REG_OFDM_FA_HOLDC_11N 0x0c00 1798c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_FA_KEEP BIT(31) 1808c2ecf20Sopenharmony_ci#define REG_BB_RX_PATH_11N 0x0c04 1818c2ecf20Sopenharmony_ci#define REG_TRMUX_11N 0x0c08 1828c2ecf20Sopenharmony_ci#define REG_OFDM_FA_RSTC_11N 0x0c0c 1838c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_FA_RST BIT(31) 1848c2ecf20Sopenharmony_ci#define REG_A_RXIQI 0x0c14 1858c2ecf20Sopenharmony_ci#define BIT_MASK_RXIQ_S1_X 0x000003FF 1868c2ecf20Sopenharmony_ci#define BIT_MASK_RXIQ_S1_Y1 0x0000FC00 1878c2ecf20Sopenharmony_ci#define BIT_SET_RXIQ_S1_Y1(y) ((y) & 0x3F) 1888c2ecf20Sopenharmony_ci#define REG_OFDM0_RXDSP 0x0c40 1898c2ecf20Sopenharmony_ci#define BIT_MASK_RXDSP GENMASK(28, 24) 1908c2ecf20Sopenharmony_ci#define BIT_EN_RXDSP BIT(9) 1918c2ecf20Sopenharmony_ci#define REG_OFDM_0_ECCA_THRESHOLD 0x0c4c 1928c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM0_EXT_A BIT(31) 1938c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM0_EXT_C BIT(29) 1948c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM0_EXTS (BIT(31) | BIT(29) | BIT(28)) 1958c2ecf20Sopenharmony_ci#define BIT_SET_OFDM0_EXTS(a, c, d) (((a) << 31) | ((c) << 29) | ((d) << 28)) 1968c2ecf20Sopenharmony_ci#define REG_OFDM0_XAAGC1 0x0c50 1978c2ecf20Sopenharmony_ci#define REG_OFDM0_XBAGC1 0x0c58 1988c2ecf20Sopenharmony_ci#define REG_AGCRSSI 0x0c78 1998c2ecf20Sopenharmony_ci#define REG_OFDM_0_XA_TX_IQ_IMBALANCE 0x0c80 2008c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_ELM_A 0x03ff 2018c2ecf20Sopenharmony_ci#define BIT_SET_TXIQ_ELM_ACD(a, c, d) (((d) << 22) | (((c) & 0x3F) << 16) | \ 2028c2ecf20Sopenharmony_ci ((a) & 0x03ff)) 2038c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_ELM_C GENMASK(21, 16) 2048c2ecf20Sopenharmony_ci#define BIT_SET_TXIQ_ELM_C2(c) ((c) & 0x3F) 2058c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_ELM_D GENMASK(31, 22) 2068c2ecf20Sopenharmony_ci#define REG_TXIQK_MATRIXA_LSB2_11N 0x0c94 2078c2ecf20Sopenharmony_ci#define BIT_SET_TXIQ_ELM_C1(c) (((c) & 0x000003C0) >> 6) 2088c2ecf20Sopenharmony_ci#define REG_RXIQK_MATRIX_LSB_11N 0x0ca0 2098c2ecf20Sopenharmony_ci#define BIT_MASK_RXIQ_S1_Y2 0xF0000000 2108c2ecf20Sopenharmony_ci#define BIT_SET_RXIQ_S1_Y2(y) (((y) >> 6) & 0xF) 2118c2ecf20Sopenharmony_ci#define REG_TXIQ_AB_S0 0x0cd0 2128c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_A_S0 0x000007FE 2138c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_A_EXT_S0 BIT(0) 2148c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_B_S0 0x0007E000 2158c2ecf20Sopenharmony_ci#define REG_TXIQ_CD_S0 0x0cd4 2168c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_C_S0 0x000007FE 2178c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_C_EXT_S0 BIT(0) 2188c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_D_S0 GENMASK(22, 13) 2198c2ecf20Sopenharmony_ci#define BIT_MASK_TXIQ_D_EXT_S0 BIT(12) 2208c2ecf20Sopenharmony_ci#define REG_RXIQ_AB_S0 0x0cd8 2218c2ecf20Sopenharmony_ci#define BIT_MASK_RXIQ_X_S0 0x000003FF 2228c2ecf20Sopenharmony_ci#define BIT_MASK_RXIQ_Y_S0 0x003FF000 2238c2ecf20Sopenharmony_ci#define REG_OFDM_FA_TYPE1_11N 0x0cf0 2248c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_FF_CNT GENMASK(15, 0) 2258c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_SF_CNT GENMASK(31, 16) 2268c2ecf20Sopenharmony_ci#define REG_OFDM_FA_RSTD_11N 0x0d00 2278c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_FA_RST1 BIT(27) 2288c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_FA_KEEP1 BIT(31) 2298c2ecf20Sopenharmony_ci#define REG_CTX 0x0d03 2308c2ecf20Sopenharmony_ci#define BIT_MASK_CTX_TYPE GENMASK(6, 4) 2318c2ecf20Sopenharmony_ci#define REG_OFDM1_CFOTRK 0x0d2c 2328c2ecf20Sopenharmony_ci#define BIT_EN_CFOTRK BIT(28) 2338c2ecf20Sopenharmony_ci#define REG_OFDM1_CSI1 0x0d40 2348c2ecf20Sopenharmony_ci#define REG_OFDM1_CSI2 0x0d44 2358c2ecf20Sopenharmony_ci#define REG_OFDM1_CSI3 0x0d48 2368c2ecf20Sopenharmony_ci#define REG_OFDM1_CSI4 0x0d4c 2378c2ecf20Sopenharmony_ci#define REG_OFDM_FA_TYPE2_11N 0x0da0 2388c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_CCA_CNT GENMASK(15, 0) 2398c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_PF_CNT GENMASK(31, 16) 2408c2ecf20Sopenharmony_ci#define REG_OFDM_FA_TYPE3_11N 0x0da4 2418c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_RI_CNT GENMASK(15, 0) 2428c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_CRC_CNT GENMASK(31, 16) 2438c2ecf20Sopenharmony_ci#define REG_OFDM_FA_TYPE4_11N 0x0da8 2448c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_MNS_CNT GENMASK(15, 0) 2458c2ecf20Sopenharmony_ci#define REG_FPGA0_IQK_11N 0x0e28 2468c2ecf20Sopenharmony_ci#define BIT_MASK_IQK_MOD 0xffffff00 2478c2ecf20Sopenharmony_ci#define EN_IQK 0x808000 2488c2ecf20Sopenharmony_ci#define RST_IQK 0x000000 2498c2ecf20Sopenharmony_ci#define REG_TXIQK_TONE_A_11N 0x0e30 2508c2ecf20Sopenharmony_ci#define REG_RXIQK_TONE_A_11N 0x0e34 2518c2ecf20Sopenharmony_ci#define REG_TXIQK_PI_A_11N 0x0e38 2528c2ecf20Sopenharmony_ci#define REG_RXIQK_PI_A_11N 0x0e3c 2538c2ecf20Sopenharmony_ci#define REG_TXIQK_11N 0x0e40 2548c2ecf20Sopenharmony_ci#define BIT_SET_TXIQK_11N(x, y) (0x80007C00 | ((x) << 16) | (y)) 2558c2ecf20Sopenharmony_ci#define REG_RXIQK_11N 0x0e44 2568c2ecf20Sopenharmony_ci#define REG_IQK_AGC_PTS_11N 0x0e48 2578c2ecf20Sopenharmony_ci#define REG_IQK_AGC_RSP_11N 0x0e4c 2588c2ecf20Sopenharmony_ci#define REG_TX_IQK_TONE_B 0x0e50 2598c2ecf20Sopenharmony_ci#define REG_RX_IQK_TONE_B 0x0e54 2608c2ecf20Sopenharmony_ci#define REG_IQK_RES_TX 0x0e94 2618c2ecf20Sopenharmony_ci#define BIT_MASK_RES_TX GENMASK(25, 16) 2628c2ecf20Sopenharmony_ci#define REG_IQK_RES_TY 0x0e9c 2638c2ecf20Sopenharmony_ci#define BIT_MASK_RES_TY GENMASK(25, 16) 2648c2ecf20Sopenharmony_ci#define REG_IQK_RES_RX 0x0ea4 2658c2ecf20Sopenharmony_ci#define BIT_MASK_RES_RX GENMASK(25, 16) 2668c2ecf20Sopenharmony_ci#define REG_IQK_RES_RY 0x0eac 2678c2ecf20Sopenharmony_ci#define BIT_IQK_TX_FAIL BIT(28) 2688c2ecf20Sopenharmony_ci#define BIT_IQK_RX_FAIL BIT(27) 2698c2ecf20Sopenharmony_ci#define BIT_IQK_DONE BIT(26) 2708c2ecf20Sopenharmony_ci#define BIT_MASK_RES_RY GENMASK(25, 16) 2718c2ecf20Sopenharmony_ci#define REG_PAGE_F_RST_11N 0x0f14 2728c2ecf20Sopenharmony_ci#define BIT_MASK_F_RST_ALL BIT(16) 2738c2ecf20Sopenharmony_ci#define REG_IGI_C_11N 0x0f84 2748c2ecf20Sopenharmony_ci#define REG_IGI_D_11N 0x0f88 2758c2ecf20Sopenharmony_ci#define REG_HT_CRC32_CNT_11N 0x0f90 2768c2ecf20Sopenharmony_ci#define BIT_MASK_HT_CRC_OK GENMASK(15, 0) 2778c2ecf20Sopenharmony_ci#define BIT_MASK_HT_CRC_ERR GENMASK(31, 16) 2788c2ecf20Sopenharmony_ci#define REG_OFDM_CRC32_CNT_11N 0x0f94 2798c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_LCRC_OK GENMASK(15, 0) 2808c2ecf20Sopenharmony_ci#define BIT_MASK_OFDM_LCRC_ERR GENMASK(31, 16) 2818c2ecf20Sopenharmony_ci#define REG_HT_CRC32_CNT_11N_AGG 0x0fb8 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci#endif 284