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 __RTW8822C_H__ 68c2ecf20Sopenharmony_ci#define __RTW8822C_H__ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <asm/byteorder.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_cistruct rtw8822cu_efuse { 118c2ecf20Sopenharmony_ci u8 res0[0x30]; /* 0x120 */ 128c2ecf20Sopenharmony_ci u8 vid[2]; /* 0x150 */ 138c2ecf20Sopenharmony_ci u8 pid[2]; 148c2ecf20Sopenharmony_ci u8 res1[3]; 158c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; /* 0x157 */ 168c2ecf20Sopenharmony_ci u8 res2[0x3d]; 178c2ecf20Sopenharmony_ci}; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistruct rtw8822ce_efuse { 208c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; /* 0x120 */ 218c2ecf20Sopenharmony_ci u8 vender_id[2]; 228c2ecf20Sopenharmony_ci u8 device_id[2]; 238c2ecf20Sopenharmony_ci u8 sub_vender_id[2]; 248c2ecf20Sopenharmony_ci u8 sub_device_id[2]; 258c2ecf20Sopenharmony_ci u8 pmc[2]; 268c2ecf20Sopenharmony_ci u8 exp_device_cap[2]; 278c2ecf20Sopenharmony_ci u8 msi_cap; 288c2ecf20Sopenharmony_ci u8 ltr_cap; /* 0x133 */ 298c2ecf20Sopenharmony_ci u8 exp_link_control[2]; 308c2ecf20Sopenharmony_ci u8 link_cap[4]; 318c2ecf20Sopenharmony_ci u8 link_control[2]; 328c2ecf20Sopenharmony_ci u8 serial_number[8]; 338c2ecf20Sopenharmony_ci u8 res0:2; /* 0x144 */ 348c2ecf20Sopenharmony_ci u8 ltr_en:1; 358c2ecf20Sopenharmony_ci u8 res1:2; 368c2ecf20Sopenharmony_ci u8 obff:2; 378c2ecf20Sopenharmony_ci u8 res2:3; 388c2ecf20Sopenharmony_ci u8 obff_cap:2; 398c2ecf20Sopenharmony_ci u8 res3:4; 408c2ecf20Sopenharmony_ci u8 class_code[3]; 418c2ecf20Sopenharmony_ci u8 res4; 428c2ecf20Sopenharmony_ci u8 pci_pm_L1_2_supp:1; 438c2ecf20Sopenharmony_ci u8 pci_pm_L1_1_supp:1; 448c2ecf20Sopenharmony_ci u8 aspm_pm_L1_2_supp:1; 458c2ecf20Sopenharmony_ci u8 aspm_pm_L1_1_supp:1; 468c2ecf20Sopenharmony_ci u8 L1_pm_substates_supp:1; 478c2ecf20Sopenharmony_ci u8 res5:3; 488c2ecf20Sopenharmony_ci u8 port_common_mode_restore_time; 498c2ecf20Sopenharmony_ci u8 port_t_power_on_scale:2; 508c2ecf20Sopenharmony_ci u8 res6:1; 518c2ecf20Sopenharmony_ci u8 port_t_power_on_value:5; 528c2ecf20Sopenharmony_ci u8 res7; 538c2ecf20Sopenharmony_ci}; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_cistruct rtw8822c_efuse { 568c2ecf20Sopenharmony_ci __le16 rtl_id; 578c2ecf20Sopenharmony_ci u8 res0[0x0e]; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci /* power index for four RF paths */ 608c2ecf20Sopenharmony_ci struct rtw_txpwr_idx txpwr_idx_table[4]; 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci u8 channel_plan; /* 0xb8 */ 638c2ecf20Sopenharmony_ci u8 xtal_k; 648c2ecf20Sopenharmony_ci u8 res1; 658c2ecf20Sopenharmony_ci u8 iqk_lck; 668c2ecf20Sopenharmony_ci u8 res2[5]; /* 0xbc */ 678c2ecf20Sopenharmony_ci u8 rf_board_option; 688c2ecf20Sopenharmony_ci u8 rf_feature_option; 698c2ecf20Sopenharmony_ci u8 rf_bt_setting; 708c2ecf20Sopenharmony_ci u8 eeprom_version; 718c2ecf20Sopenharmony_ci u8 eeprom_customer_id; 728c2ecf20Sopenharmony_ci u8 tx_bb_swing_setting_2g; 738c2ecf20Sopenharmony_ci u8 tx_bb_swing_setting_5g; 748c2ecf20Sopenharmony_ci u8 tx_pwr_calibrate_rate; 758c2ecf20Sopenharmony_ci u8 rf_antenna_option; /* 0xc9 */ 768c2ecf20Sopenharmony_ci u8 rfe_option; 778c2ecf20Sopenharmony_ci u8 country_code[2]; 788c2ecf20Sopenharmony_ci u8 res3[3]; 798c2ecf20Sopenharmony_ci u8 path_a_thermal; /* 0xd0 */ 808c2ecf20Sopenharmony_ci u8 path_b_thermal; 818c2ecf20Sopenharmony_ci u8 res4[2]; 828c2ecf20Sopenharmony_ci u8 rx_gain_gap_2g_ofdm; 838c2ecf20Sopenharmony_ci u8 res5; 848c2ecf20Sopenharmony_ci u8 rx_gain_gap_2g_cck; 858c2ecf20Sopenharmony_ci u8 res6; 868c2ecf20Sopenharmony_ci u8 rx_gain_gap_5gl; 878c2ecf20Sopenharmony_ci u8 res7; 888c2ecf20Sopenharmony_ci u8 rx_gain_gap_5gm; 898c2ecf20Sopenharmony_ci u8 res8; 908c2ecf20Sopenharmony_ci u8 rx_gain_gap_5gh; 918c2ecf20Sopenharmony_ci u8 res9; 928c2ecf20Sopenharmony_ci u8 res10[0x42]; 938c2ecf20Sopenharmony_ci union { 948c2ecf20Sopenharmony_ci struct rtw8822cu_efuse u; 958c2ecf20Sopenharmony_ci struct rtw8822ce_efuse e; 968c2ecf20Sopenharmony_ci }; 978c2ecf20Sopenharmony_ci}; 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_cienum rtw8822c_dpk_agc_phase { 1008c2ecf20Sopenharmony_ci RTW_DPK_GAIN_CHECK, 1018c2ecf20Sopenharmony_ci RTW_DPK_GAIN_LARGE, 1028c2ecf20Sopenharmony_ci RTW_DPK_GAIN_LESS, 1038c2ecf20Sopenharmony_ci RTW_DPK_GL_LARGE, 1048c2ecf20Sopenharmony_ci RTW_DPK_GL_LESS, 1058c2ecf20Sopenharmony_ci RTW_DPK_LOSS_CHECK, 1068c2ecf20Sopenharmony_ci RTW_DPK_AGC_OUT, 1078c2ecf20Sopenharmony_ci}; 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_cienum rtw8822c_dpk_one_shot_action { 1108c2ecf20Sopenharmony_ci RTW_DPK_CAL_PWR, 1118c2ecf20Sopenharmony_ci RTW_DPK_GAIN_LOSS, 1128c2ecf20Sopenharmony_ci RTW_DPK_DO_DPK, 1138c2ecf20Sopenharmony_ci RTW_DPK_DPK_ON, 1148c2ecf20Sopenharmony_ci RTW_DPK_DAGC, 1158c2ecf20Sopenharmony_ci RTW_DPK_ACTION_MAX 1168c2ecf20Sopenharmony_ci}; 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_civoid rtw8822c_parse_tbl_dpk(struct rtw_dev *rtwdev, 1198c2ecf20Sopenharmony_ci const struct rtw_table *tbl); 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci#define RTW_DECL_TABLE_DPK(name) \ 1228c2ecf20Sopenharmony_ciconst struct rtw_table name ## _tbl = { \ 1238c2ecf20Sopenharmony_ci .data = name, \ 1248c2ecf20Sopenharmony_ci .size = ARRAY_SIZE(name), \ 1258c2ecf20Sopenharmony_ci .parse = rtw8822c_parse_tbl_dpk, \ 1268c2ecf20Sopenharmony_ci} 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci#define DACK_PATH_8822C 2 1298c2ecf20Sopenharmony_ci#define DACK_REG_8822C 16 1308c2ecf20Sopenharmony_ci#define DACK_RF_8822C 1 1318c2ecf20Sopenharmony_ci#define DACK_SN_8822C 100 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci/* phy status page0 */ 1348c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P0_PWDB_A(phy_stat) \ 1358c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) 1368c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P0_PWDB_B(phy_stat) \ 1378c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x04), GENMASK(7, 0)) 1388c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P0_GAIN_A(phy_stat) \ 1398c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(21, 16)) 1408c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P0_GAIN_B(phy_stat) \ 1418c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x04), GENMASK(29, 24)) 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci/* phy status page1 */ 1448c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_PWDB_A(phy_stat) \ 1458c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) 1468c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_PWDB_B(phy_stat) \ 1478c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(23, 16)) 1488c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_L_RXSC(phy_stat) \ 1498c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(11, 8)) 1508c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_HT_RXSC(phy_stat) \ 1518c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(15, 12)) 1528c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_RXEVM_A(phy_stat) \ 1538c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x04), GENMASK(7, 0)) 1548c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_RXEVM_B(phy_stat) \ 1558c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x04), GENMASK(15, 8)) 1568c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_CFO_TAIL_A(phy_stat) \ 1578c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x05), GENMASK(7, 0)) 1588c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_CFO_TAIL_B(phy_stat) \ 1598c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x05), GENMASK(15, 8)) 1608c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_RXSNR_A(phy_stat) \ 1618c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x06), GENMASK(7, 0)) 1628c2ecf20Sopenharmony_ci#define GET_PHY_STAT_P1_RXSNR_B(phy_stat) \ 1638c2ecf20Sopenharmony_ci le32_get_bits(*((__le32 *)(phy_stat) + 0x06), GENMASK(15, 8)) 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci#define REG_ANAPARLDO_POW_MAC 0x0029 1668c2ecf20Sopenharmony_ci#define BIT_LDOE25_PON BIT(0) 1678c2ecf20Sopenharmony_ci#define REG_RRSR 0x0440 1688c2ecf20Sopenharmony_ci#define BITS_RRSR_RSC (BIT(21) | BIT(22)) 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci#define REG_TXDFIR0 0x808 1718c2ecf20Sopenharmony_ci#define REG_DFIRBW 0x810 1728c2ecf20Sopenharmony_ci#define REG_ANTMAP0 0x820 1738c2ecf20Sopenharmony_ci#define REG_ANTMAP 0x824 1748c2ecf20Sopenharmony_ci#define REG_DYMPRITH 0x86c 1758c2ecf20Sopenharmony_ci#define REG_DYMENTH0 0x870 1768c2ecf20Sopenharmony_ci#define REG_DYMENTH 0x874 1778c2ecf20Sopenharmony_ci#define REG_SBD 0x88c 1788c2ecf20Sopenharmony_ci#define BITS_SUBTUNE GENMASK(15, 12) 1798c2ecf20Sopenharmony_ci#define REG_DYMTHMIN 0x8a4 1808c2ecf20Sopenharmony_ci#define REG_TXBWCTL 0x9b0 1818c2ecf20Sopenharmony_ci#define REG_TXCLK 0x9b4 1828c2ecf20Sopenharmony_ci#define REG_SCOTRK 0xc30 1838c2ecf20Sopenharmony_ci#define REG_MRCM 0xc38 1848c2ecf20Sopenharmony_ci#define REG_AGCSWSH 0xc44 1858c2ecf20Sopenharmony_ci#define REG_ANTWTPD 0xc54 1868c2ecf20Sopenharmony_ci#define REG_PT_CHSMO 0xcbc 1878c2ecf20Sopenharmony_ci#define BIT_PT_OPT BIT(21) 1888c2ecf20Sopenharmony_ci#define REG_ORITXCODE 0x1800 1898c2ecf20Sopenharmony_ci#define REG_3WIRE 0x180c 1908c2ecf20Sopenharmony_ci#define BIT_3WIRE_TX_EN BIT(0) 1918c2ecf20Sopenharmony_ci#define BIT_3WIRE_RX_EN BIT(1) 1928c2ecf20Sopenharmony_ci#define BIT_3WIRE_PI_ON BIT(28) 1938c2ecf20Sopenharmony_ci#define REG_ANAPAR_A 0x1830 1948c2ecf20Sopenharmony_ci#define BIT_ANAPAR_UPDATE BIT(29) 1958c2ecf20Sopenharmony_ci#define REG_RXAGCCTL0 0x18ac 1968c2ecf20Sopenharmony_ci#define BITS_RXAGC_CCK GENMASK(15, 12) 1978c2ecf20Sopenharmony_ci#define BITS_RXAGC_OFDM GENMASK(8, 4) 1988c2ecf20Sopenharmony_ci#define REG_DCKA_I_0 0x18bc 1998c2ecf20Sopenharmony_ci#define REG_DCKA_I_1 0x18c0 2008c2ecf20Sopenharmony_ci#define REG_DCKA_Q_0 0x18d8 2018c2ecf20Sopenharmony_ci#define REG_DCKA_Q_1 0x18dc 2028c2ecf20Sopenharmony_ci#define REG_CCKSB 0x1a00 2038c2ecf20Sopenharmony_ci#define REG_RXCCKSEL 0x1a04 2048c2ecf20Sopenharmony_ci#define REG_BGCTRL 0x1a14 2058c2ecf20Sopenharmony_ci#define BITS_RX_IQ_WEIGHT (BIT(8) | BIT(9)) 2068c2ecf20Sopenharmony_ci#define REG_TXF0 0x1a20 2078c2ecf20Sopenharmony_ci#define REG_TXF1 0x1a24 2088c2ecf20Sopenharmony_ci#define REG_TXF2 0x1a28 2098c2ecf20Sopenharmony_ci#define REG_CCANRX 0x1a2c 2108c2ecf20Sopenharmony_ci#define BIT_CCK_FA_RST (BIT(14) | BIT(15)) 2118c2ecf20Sopenharmony_ci#define BIT_OFDM_FA_RST (BIT(12) | BIT(13)) 2128c2ecf20Sopenharmony_ci#define REG_CCK_FACNT 0x1a5c 2138c2ecf20Sopenharmony_ci#define REG_CCKTXONLY 0x1a80 2148c2ecf20Sopenharmony_ci#define BIT_BB_CCK_CHECK_EN BIT(18) 2158c2ecf20Sopenharmony_ci#define REG_TXF3 0x1a98 2168c2ecf20Sopenharmony_ci#define REG_TXF4 0x1a9c 2178c2ecf20Sopenharmony_ci#define REG_TXF5 0x1aa0 2188c2ecf20Sopenharmony_ci#define REG_TXF6 0x1aac 2198c2ecf20Sopenharmony_ci#define REG_TXF7 0x1ab0 2208c2ecf20Sopenharmony_ci#define REG_CCK_SOURCE 0x1abc 2218c2ecf20Sopenharmony_ci#define BIT_NBI_EN BIT(30) 2228c2ecf20Sopenharmony_ci#define REG_IQKSTAT 0x1b10 2238c2ecf20Sopenharmony_ci#define REG_TXANT 0x1c28 2248c2ecf20Sopenharmony_ci#define REG_ENCCK 0x1c3c 2258c2ecf20Sopenharmony_ci#define BIT_CCK_BLK_EN BIT(1) 2268c2ecf20Sopenharmony_ci#define BIT_CCK_OFDM_BLK_EN (BIT(0) | BIT(1)) 2278c2ecf20Sopenharmony_ci#define REG_CCAMSK 0x1c80 2288c2ecf20Sopenharmony_ci#define REG_RSTB 0x1c90 2298c2ecf20Sopenharmony_ci#define BIT_RSTB_3WIRE BIT(8) 2308c2ecf20Sopenharmony_ci#define REG_RX_BREAK 0x1d2c 2318c2ecf20Sopenharmony_ci#define BIT_COM_RX_GCK_EN BIT(31) 2328c2ecf20Sopenharmony_ci#define REG_RXFNCTL 0x1d30 2338c2ecf20Sopenharmony_ci#define REG_RXIGI 0x1d70 2348c2ecf20Sopenharmony_ci#define REG_ENFN 0x1e24 2358c2ecf20Sopenharmony_ci#define REG_TXANTSEG 0x1e28 2368c2ecf20Sopenharmony_ci#define REG_TXLGMAP 0x1e2c 2378c2ecf20Sopenharmony_ci#define REG_CCKPATH 0x1e5c 2388c2ecf20Sopenharmony_ci#define REG_CNT_CTRL 0x1eb4 2398c2ecf20Sopenharmony_ci#define BIT_ALL_CNT_RST BIT(25) 2408c2ecf20Sopenharmony_ci#define REG_OFDM_FACNT 0x2d00 2418c2ecf20Sopenharmony_ci#define REG_OFDM_FACNT1 0x2d04 2428c2ecf20Sopenharmony_ci#define REG_OFDM_FACNT2 0x2d08 2438c2ecf20Sopenharmony_ci#define REG_OFDM_FACNT3 0x2d0c 2448c2ecf20Sopenharmony_ci#define REG_OFDM_FACNT4 0x2d10 2458c2ecf20Sopenharmony_ci#define REG_OFDM_FACNT5 0x2d20 2468c2ecf20Sopenharmony_ci#define REG_RPT_CIP 0x2d9c 2478c2ecf20Sopenharmony_ci#define REG_OFDM_TXCNT 0x2de0 2488c2ecf20Sopenharmony_ci#define REG_ORITXCODE2 0x4100 2498c2ecf20Sopenharmony_ci#define REG_3WIRE2 0x410c 2508c2ecf20Sopenharmony_ci#define REG_ANAPAR_B 0x4130 2518c2ecf20Sopenharmony_ci#define REG_RXAGCCTL 0x41ac 2528c2ecf20Sopenharmony_ci#define REG_DCKB_I_0 0x41bc 2538c2ecf20Sopenharmony_ci#define REG_DCKB_I_1 0x41c0 2548c2ecf20Sopenharmony_ci#define REG_DCKB_Q_0 0x41d8 2558c2ecf20Sopenharmony_ci#define REG_DCKB_Q_1 0x41dc 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci#define RF_MODE_TRXAGC 0x00 2588c2ecf20Sopenharmony_ci#define RF_RXAGC_OFFSET 0x19 2598c2ecf20Sopenharmony_ci#define RF_BW_TRXBB 0x1a 2608c2ecf20Sopenharmony_ci#define RF_TX_GAIN_OFFSET 0x55 2618c2ecf20Sopenharmony_ci#define RF_TX_GAIN 0x56 2628c2ecf20Sopenharmony_ci#define RF_TXA_LB_SW 0x63 2638c2ecf20Sopenharmony_ci#define RF_RXG_GAIN 0x87 2648c2ecf20Sopenharmony_ci#define RF_RXA_MIX_GAIN 0x8a 2658c2ecf20Sopenharmony_ci#define RF_EXT_TIA_BW 0x8f 2668c2ecf20Sopenharmony_ci#define RF_DEBUG 0xde 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci#define REG_NCTL0 0x1b00 2698c2ecf20Sopenharmony_ci#define REG_DPD_CTL0_S0 0x1b04 2708c2ecf20Sopenharmony_ci#define REG_DPD_CTL1_S0 0x1b08 2718c2ecf20Sopenharmony_ci#define REG_IQK_CTL1 0x1b20 2728c2ecf20Sopenharmony_ci#define REG_DPD_LUT0 0x1b44 2738c2ecf20Sopenharmony_ci#define REG_DPD_CTL0_S1 0x1b5c 2748c2ecf20Sopenharmony_ci#define REG_DPD_LUT3 0x1b60 2758c2ecf20Sopenharmony_ci#define REG_DPD_CTL1_S1 0x1b60 2768c2ecf20Sopenharmony_ci#define REG_DPD_AGC 0x1b67 2778c2ecf20Sopenharmony_ci#define REG_DPD_CTL0 0x1bb4 2788c2ecf20Sopenharmony_ci#define REG_R_CONFIG 0x1bcc 2798c2ecf20Sopenharmony_ci#define REG_RXSRAM_CTL 0x1bd4 2808c2ecf20Sopenharmony_ci#define REG_DPD_CTL11 0x1be4 2818c2ecf20Sopenharmony_ci#define REG_DPD_CTL12 0x1be8 2828c2ecf20Sopenharmony_ci#define REG_DPD_CTL15 0x1bf4 2838c2ecf20Sopenharmony_ci#define REG_DPD_CTL16 0x1bf8 2848c2ecf20Sopenharmony_ci#define REG_STAT_RPT 0x1bfc 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci#define BIT_EXT_TIA_BW BIT(1) 2878c2ecf20Sopenharmony_ci#define BIT_DE_TRXBW BIT(2) 2888c2ecf20Sopenharmony_ci#define BIT_DE_TX_GAIN BIT(16) 2898c2ecf20Sopenharmony_ci#define BIT_RXG_GAIN BIT(18) 2908c2ecf20Sopenharmony_ci#define BIT_DE_PWR_TRIM BIT(19) 2918c2ecf20Sopenharmony_ci#define BIT_INNER_LB BIT(21) 2928c2ecf20Sopenharmony_ci#define BIT_BYPASS_DPD BIT(25) 2938c2ecf20Sopenharmony_ci#define BIT_DPD_EN BIT(31) 2948c2ecf20Sopenharmony_ci#define BIT_SUBPAGE GENMASK(3, 0) 2958c2ecf20Sopenharmony_ci#define BIT_TXAGC GENMASK(4, 0) 2968c2ecf20Sopenharmony_ci#define BIT_GAIN_TXBB GENMASK(4, 0) 2978c2ecf20Sopenharmony_ci#define BIT_LB_ATT GENMASK(4, 2) 2988c2ecf20Sopenharmony_ci#define BIT_RXA_MIX_GAIN GENMASK(4, 3) 2998c2ecf20Sopenharmony_ci#define BIT_IQ_SWITCH GENMASK(5, 0) 3008c2ecf20Sopenharmony_ci#define BIT_DPD_CLK GENMASK(7, 4) 3018c2ecf20Sopenharmony_ci#define BIT_RXAGC GENMASK(9, 5) 3028c2ecf20Sopenharmony_ci#define BIT_BW_RXBB GENMASK(11, 10) 3038c2ecf20Sopenharmony_ci#define BIT_LB_SW GENMASK(13, 12) 3048c2ecf20Sopenharmony_ci#define BIT_BW_TXBB GENMASK(14, 12) 3058c2ecf20Sopenharmony_ci#define BIT_GLOSS_DB GENMASK(14, 12) 3068c2ecf20Sopenharmony_ci#define BIT_TXA_LB_ATT GENMASK(15, 14) 3078c2ecf20Sopenharmony_ci#define BIT_TX_OFFSET_VAL GENMASK(18, 14) 3088c2ecf20Sopenharmony_ci#define BIT_RPT_SEL GENMASK(20, 16) 3098c2ecf20Sopenharmony_ci#define BIT_GS_PWSF GENMASK(27, 0) 3108c2ecf20Sopenharmony_ci#define BIT_RPT_DGAIN GENMASK(27, 16) 3118c2ecf20Sopenharmony_ci#define BIT_TX_CFIR GENMASK(31, 30) 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci#define PPG_THERMAL_A 0x1ef 3148c2ecf20Sopenharmony_ci#define PPG_THERMAL_B 0x1b0 3158c2ecf20Sopenharmony_ci#define RF_THEMAL_MASK GENMASK(19, 16) 3168c2ecf20Sopenharmony_ci#define PPG_2GL_TXAB 0x1d4 3178c2ecf20Sopenharmony_ci#define PPG_2GM_TXAB 0x1ee 3188c2ecf20Sopenharmony_ci#define PPG_2GH_TXAB 0x1d2 3198c2ecf20Sopenharmony_ci#define PPG_2G_A_MASK GENMASK(3, 0) 3208c2ecf20Sopenharmony_ci#define PPG_2G_B_MASK GENMASK(7, 4) 3218c2ecf20Sopenharmony_ci#define PPG_5GL1_TXA 0x1ec 3228c2ecf20Sopenharmony_ci#define PPG_5GL2_TXA 0x1e8 3238c2ecf20Sopenharmony_ci#define PPG_5GM1_TXA 0x1e4 3248c2ecf20Sopenharmony_ci#define PPG_5GM2_TXA 0x1e0 3258c2ecf20Sopenharmony_ci#define PPG_5GH1_TXA 0x1dc 3268c2ecf20Sopenharmony_ci#define PPG_5GL1_TXB 0x1eb 3278c2ecf20Sopenharmony_ci#define PPG_5GL2_TXB 0x1e7 3288c2ecf20Sopenharmony_ci#define PPG_5GM1_TXB 0x1e3 3298c2ecf20Sopenharmony_ci#define PPG_5GM2_TXB 0x1df 3308c2ecf20Sopenharmony_ci#define PPG_5GH1_TXB 0x1db 3318c2ecf20Sopenharmony_ci#define PPG_5G_MASK GENMASK(4, 0) 3328c2ecf20Sopenharmony_ci#define PPG_PABIAS_2GA 0x1d6 3338c2ecf20Sopenharmony_ci#define PPG_PABIAS_2GB 0x1d5 3348c2ecf20Sopenharmony_ci#define PPG_PABIAS_5GA 0x1d8 3358c2ecf20Sopenharmony_ci#define PPG_PABIAS_5GB 0x1d7 3368c2ecf20Sopenharmony_ci#define PPG_PABIAS_MASK GENMASK(3, 0) 3378c2ecf20Sopenharmony_ci#define RF_PABIAS_2G_MASK GENMASK(15, 12) 3388c2ecf20Sopenharmony_ci#define RF_PABIAS_5G_MASK GENMASK(19, 16) 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci#endif 341