18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2010-2011 Atheros Communications, Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 118c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 148c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#ifndef AR9003_PHY_H 188c2ecf20Sopenharmony_ci#define AR9003_PHY_H 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* 218c2ecf20Sopenharmony_ci * Channel Register Map 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci#define AR_CHAN_BASE 0x9800 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define AR_PHY_TIMING1 (AR_CHAN_BASE + 0x0) 268c2ecf20Sopenharmony_ci#define AR_PHY_TIMING2 (AR_CHAN_BASE + 0x4) 278c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3 (AR_CHAN_BASE + 0x8) 288c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4 (AR_CHAN_BASE + 0xc) 298c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5 (AR_CHAN_BASE + 0x10) 308c2ecf20Sopenharmony_ci#define AR_PHY_TIMING6 (AR_CHAN_BASE + 0x14) 318c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11 (AR_CHAN_BASE + 0x18) 328c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG (AR_CHAN_BASE + 0x1c) 338c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B0 (AR_CHAN_BASE + 0xdc) 348c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_3 (AR_CHAN_BASE + 0xb0) 358c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT 16 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_FREQ_SD 0x3FF00000 388c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_FREQ_SD_S 20 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE 0x000FFFFF 418c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE_S 0 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_AGC 0x40000000 448c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_AGC_S 30 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_SELFCOR 0x80000000 478c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_FILTER_IN_SELFCOR_S 31 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_NF_RSSI_SPUR_MIT 0x4000000 508c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_NF_RSSI_SPUR_MIT_S 26 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM 0x20000 /* bins move with freq offset */ 538c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM_S 17 548c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH 0x000000FF 558c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_S 0 568c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_EN_VIT_SPUR_RSSI 0x00000100 578c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_EN_VIT_SPUR_RSSI_S 8 588c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL 0x03FC0000 598c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL_S 18 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN 0x20000000 628c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN_S 29 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN 0x80000000 658c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN_S 31 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW (AR_CHAN_BASE + 0x20) 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR (AR_CHAN_BASE + 0x24) 708c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW (AR_CHAN_BASE + 0x28) 718c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT (AR_CHAN_BASE + 0x2c) 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA (AR_CHAN_BASE + 0x30) 748c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0 (AR_CHAN_BASE + 0x34) 758c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1 (AR_CHAN_BASE + 0x38) 768c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_EXT (AR_CHAN_BASE + 0x3c) 778c2ecf20Sopenharmony_ci#define AR_PHY_MULTICHAIN_CTRL (AR_CHAN_BASE + 0x80) 788c2ecf20Sopenharmony_ci#define AR_PHY_PERCHAIN_CSD (AR_CHAN_BASE + 0x84) 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_0 (AR_CHAN_BASE + 0xd0) 818c2ecf20Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_0 (AR_CHAN_BASE + 0xd4) 828c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_0_B0 (AR_CHAN_BASE + 0xc0) 838c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_1_B0 (AR_CHAN_BASE + 0xc4) 848c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_2_B0 (AR_CHAN_BASE + 0xc8) 858c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_3_B0 (AR_CHAN_BASE + 0xcc) 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci/* The following registers changed position from AR9300 1.0 to AR9300 2.0 */ 888c2ecf20Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_0_9300_10 (AR_CHAN_BASE + 0xd0 - 0x10) 898c2ecf20Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_0_9300_10 (AR_CHAN_BASE + 0xd4 - 0x10) 908c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_0_B0_9300_10 (AR_CHAN_BASE + 0xc0 + 0x8) 918c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_1_B0_9300_10 (AR_CHAN_BASE + 0xc4 + 0x8) 928c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_2_B0_9300_10 (AR_CHAN_BASE + 0xc8 + 0x8) 938c2ecf20Sopenharmony_ci#define AR_PHY_IQ_ADC_MEAS_3_B0_9300_10 (AR_CHAN_BASE + 0xcc + 0x8) 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define AR_PHY_TX_CRC (AR_CHAN_BASE + 0xa0) 968c2ecf20Sopenharmony_ci#define AR_PHY_TST_DAC_CONST (AR_CHAN_BASE + 0xa4) 978c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REPORT_0 (AR_CHAN_BASE + 0xa8) 988c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_0 (AR_CHAN_BASE + 0x300) 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci/* 1018c2ecf20Sopenharmony_ci * Channel Field Definitions 1028c2ecf20Sopenharmony_ci */ 1038c2ecf20Sopenharmony_ci#define AR_PHY_TIMING2_USE_FORCE_PPM 0x00001000 1048c2ecf20Sopenharmony_ci#define AR_PHY_TIMING2_FORCE_PPM_VAL 0x00000fff 1058c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN 0xFFFE0000 1068c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN_S 17 1078c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP 0x0001E000 1088c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP_S 13 1098c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX 0xF000 1108c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX_S 12 1118c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_DO_CAL 0x10000 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_PILOT_MASK 0x10000000 1148c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_PILOT_MASK_S 28 1158c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_CHAN_MASK 0x20000000 1168c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_CHAN_MASK_S 29 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_FILTER 0x40000000 1198c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_FILTER_S 30 1208c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_RSSI 0x80000000 1218c2ecf20Sopenharmony_ci#define AR_PHY_TIMING4_ENABLE_SPUR_RSSI_S 31 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci#define AR_PHY_NEW_ADC_GAIN_CORR_ENABLE 0x40000000 1248c2ecf20Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_OFFSET_CORR_ENABLE 0x80000000 1258c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW 0x00000001 1268c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW 0x00003F00 1278c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_S 8 1288c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW 0x001FC000 1298c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_S 14 1308c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW 0x0FE00000 1318c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_S 21 1328c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR 0x0000001F 1338c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR_S 0 1348c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH 0x00FE0000 1358c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH_S 17 1368c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH 0x7F000000 1378c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH_S 24 1388c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH 0x0000007F 1398c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_S 0 1408c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH 0x00003F80 1418c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_S 7 1428c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW 0x001FC000 1438c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_S 14 1448c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW 0x0FE00000 1458c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_S 21 1468c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_SPUR_SUBCHANNEL_SD 0x10000000 1478c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_SPUR_SUBCHANNEL_SD_S 28 1488c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S 28 1498c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62 0x007F0000 1508c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62_S 16 1518c2ecf20Sopenharmony_ci#define AR_PHY_EXTCHN_PWRTHR1_ANT_DIV_ALT_ANT_MINGAINIDX 0x0000FF00 1528c2ecf20Sopenharmony_ci#define AR_PHY_EXTCHN_PWRTHR1_ANT_DIV_ALT_ANT_MINGAINIDX_S 8 1538c2ecf20Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR 0x01FF0000 1548c2ecf20Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR_S 16 1558c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CYCPWR_THR1 0x0000FE00L 1568c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CYCPWR_THR1_S 9 1578c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1 0x000000FE 1588c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_S 1 1598c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_ENABLE 0x00000001 1608c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_ENABLE_S 0 1618c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1A 0x007F0000 1628c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1A_S 16 1638c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_RSSI_THR1A (0x7F << 16) 1648c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_RSSI_THR1A_S 16 1658c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_RSSI_THR1A_ENA (0x1 << 15) 1668c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_ENA 0x00000001 1678c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_FFT_ENA 0x80000000 1688c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND 0x0000003e 1698c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND_S 1 1708c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI 0x00000FC0 1718c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI_S 6 1728c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT 0x0003F000 1738c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT_S 12 1748c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI 0x00FC0000 1758c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI_S 18 1768c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR 0x7F000000 1778c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR_S 24 1788c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000 1798c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_USE_FIR128 0x00400000 1808c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH 0x003F0000 1818c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH_S 16 1828c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_BLOCK_CHECK 0x00008000 1838c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_MAX_RRSSI 0x00004000 1848c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_CHECK 0x00002000 1858c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH 0x00001F00 1868c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH_S 8 1878c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN 0x000000FF 1888c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN_S 0 1898c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_EXT_ENA 0x00004000 1908c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_DC_PWR_THRESH 0x007f8000 1918c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_DC_PWR_THRESH_S 15 1928c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_LB_DC_CAP 0x7f800000 1938c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_LB_DC_CAP_S 23 1948c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW (0x3f << 6) 1958c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW_S 6 1968c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRPWR (0x7f << 12) 1978c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRPWR_S 12 1988c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_FIRPWR_SIGN_BIT 19 1998c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_RELSTEP 0x1f 2008c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_RELSTEP_S 0 2018c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW_RELSTEP_SIGN_BIT 5 2028c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_S2_READ 0x00000008 2038c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_S2_READ_S 3 2048c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF 0x0000007F 2058c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF_S 0 2068c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF 0x00003F80 2078c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF_S 7 2088c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE 0x00004000 2098c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_Q_COFF 0x003f8000 2108c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_Q_COFF_S 15 2118c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_I_COFF 0x1fc00000 2128c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_LOOPBACK_IQCORR_Q_I_COFF_S 22 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci/* 2158c2ecf20Sopenharmony_ci * MRC Register Map 2168c2ecf20Sopenharmony_ci */ 2178c2ecf20Sopenharmony_ci#define AR_MRC_BASE 0x9c00 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_3A (AR_MRC_BASE + 0x0) 2208c2ecf20Sopenharmony_ci#define AR_PHY_LDPC_CNTL1 (AR_MRC_BASE + 0x4) 2218c2ecf20Sopenharmony_ci#define AR_PHY_LDPC_CNTL2 (AR_MRC_BASE + 0x8) 2228c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK (AR_MRC_BASE + 0xc) 2238c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK (AR_MRC_BASE + 0x10) 2248c2ecf20Sopenharmony_ci#define AR_PHY_SGI_DELTA (AR_MRC_BASE + 0x14) 2258c2ecf20Sopenharmony_ci#define AR_PHY_ML_CNTL_1 (AR_MRC_BASE + 0x18) 2268c2ecf20Sopenharmony_ci#define AR_PHY_ML_CNTL_2 (AR_MRC_BASE + 0x1c) 2278c2ecf20Sopenharmony_ci#define AR_PHY_TST_ADC (AR_MRC_BASE + 0x20) 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_A 0x00000FE0 2308c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_A_S 5 2318c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_A 0x1F 2328c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_A_S 0 2338c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_B 0x00FE0000 2348c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_IDX_B_S 17 2358c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_B 0x0001F000 2368c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_SPUR_MASK_CF_PILOT_MASK_B_S 12 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_A 0x00000FE0 2398c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_A_S 5 2408c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_A 0x1F 2418c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_A_S 0 2428c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_B 0x00FE0000 2438c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_IDX_B_S 17 2448c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_B 0x0001F000 2458c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_B_S 12 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_ci/* 2498c2ecf20Sopenharmony_ci * MRC Feild Definitions 2508c2ecf20Sopenharmony_ci */ 2518c2ecf20Sopenharmony_ci#define AR_PHY_SGI_DSC_MAN 0x0007FFF0 2528c2ecf20Sopenharmony_ci#define AR_PHY_SGI_DSC_MAN_S 4 2538c2ecf20Sopenharmony_ci#define AR_PHY_SGI_DSC_EXP 0x0000000F 2548c2ecf20Sopenharmony_ci#define AR_PHY_SGI_DSC_EXP_S 0 2558c2ecf20Sopenharmony_ci/* 2568c2ecf20Sopenharmony_ci * BBB Register Map 2578c2ecf20Sopenharmony_ci */ 2588c2ecf20Sopenharmony_ci#define AR_BBB_BASE 0x9d00 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci/* 2618c2ecf20Sopenharmony_ci * AGC Register Map 2628c2ecf20Sopenharmony_ci */ 2638c2ecf20Sopenharmony_ci#define AR_AGC_BASE 0x9e00 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci#define AR_PHY_SETTLING (AR_AGC_BASE + 0x0) 2668c2ecf20Sopenharmony_ci#define AR_PHY_FORCEMAX_GAINS_0 (AR_AGC_BASE + 0x4) 2678c2ecf20Sopenharmony_ci#define AR_PHY_GAINS_MINOFF0 (AR_AGC_BASE + 0x8) 2688c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ (AR_AGC_BASE + 0xc) 2698c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG (AR_AGC_BASE + 0x10) 2708c2ecf20Sopenharmony_ci#define AR_PHY_AGC (AR_AGC_BASE + 0x14) 2718c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_0 (AR_AGC_BASE + 0x18) 2728c2ecf20Sopenharmony_ci#define AR_PHY_CCA_0 (AR_AGC_BASE + 0x1c) 2738c2ecf20Sopenharmony_ci#define AR_PHY_CCA_CTRL_0 (AR_AGC_BASE + 0x20) 2748c2ecf20Sopenharmony_ci#define AR_PHY_RESTART (AR_AGC_BASE + 0x24) 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci/* 2778c2ecf20Sopenharmony_ci * Antenna Diversity settings 2788c2ecf20Sopenharmony_ci */ 2798c2ecf20Sopenharmony_ci#define AR_PHY_MC_GAIN_CTRL (AR_AGC_BASE + 0x28) 2808c2ecf20Sopenharmony_ci#define AR_ANT_DIV_CTRL_ALL 0x7e000000 2818c2ecf20Sopenharmony_ci#define AR_ANT_DIV_CTRL_ALL_S 25 2828c2ecf20Sopenharmony_ci#define AR_ANT_DIV_ENABLE 0x1000000 2838c2ecf20Sopenharmony_ci#define AR_ANT_DIV_ENABLE_S 24 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci#define AR_PHY_ANT_FAST_DIV_BIAS 0x00007e00 2878c2ecf20Sopenharmony_ci#define AR_PHY_ANT_FAST_DIV_BIAS_S 9 2888c2ecf20Sopenharmony_ci#define AR_PHY_ANT_SW_RX_PROT 0x00800000 2898c2ecf20Sopenharmony_ci#define AR_PHY_ANT_SW_RX_PROT_S 23 2908c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_LNADIV 0x01000000 2918c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_LNADIV_S 24 2928c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_LNACONF 0x06000000 2938c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_LNACONF_S 25 2948c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_LNACONF 0x18000000 2958c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_LNACONF_S 27 2968c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_GAINTB 0x20000000 2978c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_ALT_GAINTB_S 29 2988c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_GAINTB 0x40000000 2998c2ecf20Sopenharmony_ci#define AR_PHY_ANT_DIV_MAIN_GAINTB_S 30 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ci#define AR_PHY_EXTCHN_PWRTHR1 (AR_AGC_BASE + 0x2c) 3028c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CHN_WIN (AR_AGC_BASE + 0x30) 3038c2ecf20Sopenharmony_ci#define AR_PHY_20_40_DET_THR (AR_AGC_BASE + 0x34) 3048c2ecf20Sopenharmony_ci#define AR_PHY_RIFS_SRCH (AR_AGC_BASE + 0x38) 3058c2ecf20Sopenharmony_ci#define AR_PHY_PEAK_DET_CTRL_1 (AR_AGC_BASE + 0x3c) 3068c2ecf20Sopenharmony_ci#define AR_PHY_PEAK_DET_CTRL_2 (AR_AGC_BASE + 0x40) 3078c2ecf20Sopenharmony_ci#define AR_PHY_RX_GAIN_BOUNDS_1 (AR_AGC_BASE + 0x44) 3088c2ecf20Sopenharmony_ci#define AR_PHY_RX_GAIN_BOUNDS_2 (AR_AGC_BASE + 0x48) 3098c2ecf20Sopenharmony_ci#define AR_PHY_RSSI_0 (AR_AGC_BASE + 0x180) 3108c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_CCK_REP0 (AR_AGC_BASE + 0x184) 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT (AR_AGC_BASE + 0x1c0) 3138c2ecf20Sopenharmony_ci#define AR_FAST_DIV_ENABLE 0x2000 3148c2ecf20Sopenharmony_ci#define AR_FAST_DIV_ENABLE_S 13 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK (AR_AGC_BASE + 0x1c4) 3178c2ecf20Sopenharmony_ci#define AR_PHY_IQCORR_CTRL_CCK (AR_AGC_BASE + 0x1c8) 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT (AR_AGC_BASE + 0x1cc) 3208c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_RSSI_THR 0x000001fe 3218c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_RSSI_THR_S 1 3228c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_FILTER_TYPE 0x60000000 3238c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_SPUR_FILTER_TYPE_S 29 3248c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_USE_CCK_SPUR_MIT 0x00000001 3258c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_USE_CCK_SPUR_MIT_S 0 3268c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_CCK_SPUR_FREQ 0x1ffffe00 3278c2ecf20Sopenharmony_ci#define AR_PHY_CCK_SPUR_MIT_CCK_SPUR_FREQ_S 9 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci#define AR_PHY_MRC_CCK_CTRL (AR_AGC_BASE + 0x1d0) 3308c2ecf20Sopenharmony_ci#define AR_PHY_MRC_CCK_ENABLE 0x00000001 3318c2ecf20Sopenharmony_ci#define AR_PHY_MRC_CCK_ENABLE_S 0 3328c2ecf20Sopenharmony_ci#define AR_PHY_MRC_CCK_MUX_REG 0x00000002 3338c2ecf20Sopenharmony_ci#define AR_PHY_MRC_CCK_MUX_REG_S 1 3348c2ecf20Sopenharmony_ci 3358c2ecf20Sopenharmony_ci#define AR_PHY_RX_OCGAIN (AR_AGC_BASE + 0x200) 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9300_2GHZ -110 3388c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9300_5GHZ -115 3398c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ -125 3408c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ -125 3418c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ -60 3428c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ -60 3438c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_2GHZ -95 3448c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_5GHZ -100 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9462_2GHZ -127 3478c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9462_2GHZ -127 3488c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9462_2GHZ -60 3498c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9462_5GHZ -127 3508c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9462_5GHZ -127 3518c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9462_5GHZ -60 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118 3548c2ecf20Sopenharmony_ci 3558c2ecf20Sopenharmony_ci#define AR9300_EXT_LNA_CTL_GPIO_AR9485 9 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_ci/* 3588c2ecf20Sopenharmony_ci * AGC Field Definitions 3598c2ecf20Sopenharmony_ci */ 3608c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_RXTX_MARGIN 0x00FC0000 3618c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_RXTX_MARGIN_S 18 3628c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_MARGIN 0x00003C00 3638c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_MARGIN_S 10 3648c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_ATTEN 0x0000001F 3658c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_BSW_ATTEN_S 0 3668c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_MARGIN 0x003E0000 3678c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_MARGIN_S 17 3688c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN 0x0001F000 3698c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN_S 12 3708c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_DB 0x00000FC0 3718c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN2_DB_S 6 3728c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB 0x0000003F 3738c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB_S 0 3748c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN 0x0003F000 3758c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN_S 12 3768c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX 0x007C0000 3778c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX_S 18 3788c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN 0x00003F80 3798c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN_S 7 3808c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN 0x001FC000 3818c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN_S 14 3828c2ecf20Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH 0x00003F80 3838c2ecf20Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH_S 7 3848c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC 0x000000FF 3858c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC_S 0 3868c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA 0x0000FF00 3878c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA_S 8 3888c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES 0x0FF00000 3898c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES_S 20 3908c2ecf20Sopenharmony_ci#define AR_PHY_MINCCA_PWR 0x1FF00000 3918c2ecf20Sopenharmony_ci#define AR_PHY_MINCCA_PWR_S 20 3928c2ecf20Sopenharmony_ci#define AR_PHY_CCA_THRESH62 0x0007F000 3938c2ecf20Sopenharmony_ci#define AR_PHY_CCA_THRESH62_S 12 3948c2ecf20Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR 0x1FF00000 3958c2ecf20Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR_S 20 3968c2ecf20Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62 0x000FF000 3978c2ecf20Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62_S 12 3988c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62 0x000000FF 3998c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_S 0 4008c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_1 0x000001FF 4018c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_1_S 0 4028c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK 0x0000003F 4038c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_S 0 4048c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME 0x00001FC0 4058c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_S 6 4068c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x2000 4078c2ecf20Sopenharmony_ci 4088c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR 0x00000200 4098c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR_S 9 4108c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR 0x0001FC00 4118c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR_S 10 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci#define AR_PHY_RIFS_INIT_DELAY 0x3ff0000 4148c2ecf20Sopenharmony_ci#define AR_PHY_AGC_QUICK_DROP 0x03c00000 4158c2ecf20Sopenharmony_ci#define AR_PHY_AGC_QUICK_DROP_S 22 4168c2ecf20Sopenharmony_ci#define AR_PHY_AGC_COARSE_LOW 0x00007F80 4178c2ecf20Sopenharmony_ci#define AR_PHY_AGC_COARSE_LOW_S 7 4188c2ecf20Sopenharmony_ci#define AR_PHY_AGC_COARSE_HIGH 0x003F8000 4198c2ecf20Sopenharmony_ci#define AR_PHY_AGC_COARSE_HIGH_S 15 4208c2ecf20Sopenharmony_ci#define AR_PHY_AGC_COARSE_PWR_CONST 0x0000007F 4218c2ecf20Sopenharmony_ci#define AR_PHY_AGC_COARSE_PWR_CONST_S 0 4228c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP 0x0003F000 4238c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_S 12 4248c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR 0x03FC0000 4258c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR_S 18 4268c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR_SIGN_BIT 25 4278c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_RELPWR (0x1f << 6) 4288c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_RELPWR_S 6 4298c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_RELPWR_SIGN_BIT 11 4308c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_RELSTEP 0x1f 4318c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_RELSTEP_S 0 4328c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_RELSTEP_SIGN_BIT 5 4338c2ecf20Sopenharmony_ci#define AR_PHY_RESTART_ENABLE_DIV_M2FLAG 0x00200000 4348c2ecf20Sopenharmony_ci#define AR_PHY_RESTART_ENABLE_DIV_M2FLAG_S 21 4358c2ecf20Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC 0x001C0000 4368c2ecf20Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC_S 18 4378c2ecf20Sopenharmony_ci#define AR_PHY_RESTART_ENA 0x01 4388c2ecf20Sopenharmony_ci#define AR_PHY_DC_RESTART_DIS 0x40000000 4398c2ecf20Sopenharmony_ci 4408c2ecf20Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA_PAL_ON 0xFF000000 4418c2ecf20Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA_PAL_ON_S 24 4428c2ecf20Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA 0x00FF0000 4438c2ecf20Sopenharmony_ci#define AR_PHY_TPC_OLPC_GAIN_DELTA_S 16 4448c2ecf20Sopenharmony_ci 4458c2ecf20Sopenharmony_ci#define AR_PHY_TPC_6_ERROR_EST_MODE 0x03000000 4468c2ecf20Sopenharmony_ci#define AR_PHY_TPC_6_ERROR_EST_MODE_S 24 4478c2ecf20Sopenharmony_ci 4488c2ecf20Sopenharmony_ci/* 4498c2ecf20Sopenharmony_ci * SM Register Map 4508c2ecf20Sopenharmony_ci */ 4518c2ecf20Sopenharmony_ci#define AR_SM_BASE 0xa200 4528c2ecf20Sopenharmony_ci 4538c2ecf20Sopenharmony_ci#define AR_PHY_D2_CHIP_ID (AR_SM_BASE + 0x0) 4548c2ecf20Sopenharmony_ci#define AR_PHY_GEN_CTRL (AR_SM_BASE + 0x4) 4558c2ecf20Sopenharmony_ci#define AR_PHY_MODE (AR_SM_BASE + 0x8) 4568c2ecf20Sopenharmony_ci#define AR_PHY_ACTIVE (AR_SM_BASE + 0xc) 4578c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_MASK_A (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x18 : 0x20)) 4588c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_MASK_B (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x1c : 0x24)) 4598c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN (AR_SM_BASE + 0x28) 4608c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_BW_FILTER (AR_SM_BASE + 0x2c) 4618c2ecf20Sopenharmony_ci#define AR_PHY_SEARCH_START_DELAY (AR_SM_BASE + 0x30) 4628c2ecf20Sopenharmony_ci#define AR_PHY_MAX_RX_LEN (AR_SM_BASE + 0x34) 4638c2ecf20Sopenharmony_ci#define AR_PHY_FRAME_CTL (AR_SM_BASE + 0x38) 4648c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_REQ (AR_SM_BASE + 0x3c) 4658c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_GRANT (AR_SM_BASE + 0x40) 4668c2ecf20Sopenharmony_ci#define AR_PHY_RIFS (AR_SM_BASE + 0x44) 4678c2ecf20Sopenharmony_ci#define AR_PHY_RX_CLR_DELAY (AR_SM_BASE + 0x50) 4688c2ecf20Sopenharmony_ci#define AR_PHY_RX_DELAY (AR_SM_BASE + 0x54) 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL (AR_SM_BASE + 0x64) 4718c2ecf20Sopenharmony_ci#define AR_PHY_MISC_PA_CTL (AR_SM_BASE + 0x80) 4728c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_0 (AR_SM_BASE + 0x84) 4738c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_COM (AR_SM_BASE + 0x88) 4748c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_COM_2 (AR_SM_BASE + 0x8c) 4758c2ecf20Sopenharmony_ci#define AR_PHY_RX_CHAINMASK (AR_SM_BASE + 0xa0) 4768c2ecf20Sopenharmony_ci#define AR_PHY_CAL_CHAINMASK (AR_SM_BASE + 0xc0) 4778c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE (AR_SM_BASE + 0xc8) 4788c2ecf20Sopenharmony_ci#define AR_PHY_FCAL_1 (AR_SM_BASE + 0xcc) 4798c2ecf20Sopenharmony_ci#define AR_PHY_FCAL_2_0 (AR_SM_BASE + 0xd0) 4808c2ecf20Sopenharmony_ci#define AR_PHY_DFT_TONE_CTL_0 (AR_SM_BASE + 0xd4) 4818c2ecf20Sopenharmony_ci#define AR_PHY_CL_CAL_CTL (AR_SM_BASE + 0xd8) 4828c2ecf20Sopenharmony_ci#define AR_PHY_CL_TAB_0 (AR_SM_BASE + 0x100) 4838c2ecf20Sopenharmony_ci#define AR_PHY_SYNTH_CONTROL (AR_SM_BASE + 0x140) 4848c2ecf20Sopenharmony_ci#define AR_PHY_ADDAC_CLK_SEL (AR_SM_BASE + 0x144) 4858c2ecf20Sopenharmony_ci#define AR_PHY_PLL_CTL (AR_SM_BASE + 0x148) 4868c2ecf20Sopenharmony_ci#define AR_PHY_ANALOG_SWAP (AR_SM_BASE + 0x14c) 4878c2ecf20Sopenharmony_ci#define AR_PHY_ADDAC_PARA_CTL (AR_SM_BASE + 0x150) 4888c2ecf20Sopenharmony_ci#define AR_PHY_XPA_CFG (AR_SM_BASE + 0x158) 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ci#define AR_PHY_FLC_PWR_THRESH 7 4918c2ecf20Sopenharmony_ci#define AR_PHY_FLC_PWR_THRESH_S 0 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ci#define AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW 3 4948c2ecf20Sopenharmony_ci#define AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW_S 0 4958c2ecf20Sopenharmony_ci 4968c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_IDX_A 0x0001FC00 4978c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_IDX_A_S 10 4988c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_A 0x3FF 4998c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_A_S 0 5008c2ecf20Sopenharmony_ci 5018c2ecf20Sopenharmony_ci#define AR_PHY_TEST (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x15c : 0x160)) 5028c2ecf20Sopenharmony_ci 5038c2ecf20Sopenharmony_ci#define AR_PHY_TEST_BBB_OBS_SEL 0x780000 5048c2ecf20Sopenharmony_ci#define AR_PHY_TEST_BBB_OBS_SEL_S 19 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_ci#define AR_PHY_TEST_RX_OBS_SEL_BIT5_S 23 5078c2ecf20Sopenharmony_ci#define AR_PHY_TEST_RX_OBS_SEL_BIT5 (1 << AR_PHY_TEST_RX_OBS_SEL_BIT5_S) 5088c2ecf20Sopenharmony_ci 5098c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CHAIN_SEL 0xC0000000 5108c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CHAIN_SEL_S 30 5118c2ecf20Sopenharmony_ci 5128c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_STATUS (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x160 : 0x164)) 5138c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTDAC_EN 0x1 5148c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTDAC_EN_S 0 5158c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_SEL 0x1C 5168c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_SEL_S 2 5178c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_MUX_SEL 0x60 5188c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TX_OBS_MUX_SEL_S 5 5198c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTADC_EN 0x100 5208c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_TSTADC_EN_S 8 5218c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_RX_OBS_SEL 0x3C00 5228c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_RX_OBS_SEL_S 10 5238c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_DEBUGPORT_SEL 0xe0000000 5248c2ecf20Sopenharmony_ci#define AR_PHY_TEST_CTL_DEBUGPORT_SEL_S 29 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ci 5278c2ecf20Sopenharmony_ci#define AR_PHY_TSTDAC (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x164 : 0x168)) 5288c2ecf20Sopenharmony_ci 5298c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_STATUS (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x168 : 0x16c)) 5308c2ecf20Sopenharmony_ci 5318c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x16c : 0x170)) 5328c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CHANINFOMEM_S2_READ 0x00000008 5338c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CHANINFOMEM_S2_READ_S 3 5348c2ecf20Sopenharmony_ci 5358c2ecf20Sopenharmony_ci#define AR_PHY_CHNINFO_NOISEPWR (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x170 : 0x174)) 5368c2ecf20Sopenharmony_ci#define AR_PHY_CHNINFO_GAINDIFF (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x174 : 0x178)) 5378c2ecf20Sopenharmony_ci#define AR_PHY_CHNINFO_FINETIM (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x178 : 0x17c)) 5388c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_0 (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x17c : 0x180)) 5398c2ecf20Sopenharmony_ci#define AR_PHY_SCRAMBLER_SEED (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x184 : 0x190)) 5408c2ecf20Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x188 : 0x194)) 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_CTL (AR_SM_BASE + (AR_SREV_9561(ah) ? 0x198 : 0x1a4)) 5438c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_20 (AR_SM_BASE + 0x1a8) 5448c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_40 (AR_SM_BASE + 0x1ac) 5458c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_1 (AR_SM_BASE + 0x19c) 5468c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_2 (AR_SM_BASE + 0x1a0) 5478c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_3 (AR_SM_BASE + 0x1a4) 5488c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_4 (AR_SM_BASE + 0x1a8) 5498c2ecf20Sopenharmony_ci#define AR_PHY_HEAVYCLIP_5 (AR_SM_BASE + 0x1ac) 5508c2ecf20Sopenharmony_ci#define AR_PHY_ILLEGAL_TXRATE (AR_SM_BASE + 0x1b0) 5518c2ecf20Sopenharmony_ci 5528c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE(_d) (AR_SM_BASE + 0x1c0 + ((_d) << 2)) 5538c2ecf20Sopenharmony_ci 5548c2ecf20Sopenharmony_ci#define AR_PHY_PWRTX_MAX (AR_SM_BASE + 0x1f0) 5558c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_SUB (AR_SM_BASE + 0x1f4) 5568c2ecf20Sopenharmony_ci 5578c2ecf20Sopenharmony_ci#define AR_PHY_TPC_1 (AR_SM_BASE + 0x1f8) 5588c2ecf20Sopenharmony_ci#define AR_PHY_TPC_1_FORCED_DAC_GAIN 0x0000003e 5598c2ecf20Sopenharmony_ci#define AR_PHY_TPC_1_FORCED_DAC_GAIN_S 1 5608c2ecf20Sopenharmony_ci#define AR_PHY_TPC_1_FORCE_DAC_GAIN 0x00000001 5618c2ecf20Sopenharmony_ci#define AR_PHY_TPC_1_FORCE_DAC_GAIN_S 0 5628c2ecf20Sopenharmony_ci 5638c2ecf20Sopenharmony_ci#define AR_PHY_TPC_4_B0 (AR_SM_BASE + 0x204) 5648c2ecf20Sopenharmony_ci#define AR_PHY_TPC_5_B0 (AR_SM_BASE + 0x208) 5658c2ecf20Sopenharmony_ci#define AR_PHY_TPC_6_B0 (AR_SM_BASE + 0x20c) 5668c2ecf20Sopenharmony_ci 5678c2ecf20Sopenharmony_ci#define AR_PHY_TPC_11_B0 (AR_SM_BASE + 0x220) 5688c2ecf20Sopenharmony_ci#define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220) 5698c2ecf20Sopenharmony_ci#define AR_PHY_TPC_11_B2 (AR_SM2_BASE + 0x220) 5708c2ecf20Sopenharmony_ci#define AR_PHY_TPC_11_OLPC_GAIN_DELTA 0x00ff0000 5718c2ecf20Sopenharmony_ci#define AR_PHY_TPC_11_OLPC_GAIN_DELTA_S 16 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ci#define AR_PHY_TPC_12 (AR_SM_BASE + 0x224) 5748c2ecf20Sopenharmony_ci#define AR_PHY_TPC_12_DESIRED_SCALE_HT40_5 0x3e000000 5758c2ecf20Sopenharmony_ci#define AR_PHY_TPC_12_DESIRED_SCALE_HT40_5_S 25 5768c2ecf20Sopenharmony_ci 5778c2ecf20Sopenharmony_ci#define AR_PHY_TPC_18 (AR_SM_BASE + 0x23c) 5788c2ecf20Sopenharmony_ci#define AR_PHY_TPC_18_THERM_CAL_VALUE 0x000000ff 5798c2ecf20Sopenharmony_ci#define AR_PHY_TPC_18_THERM_CAL_VALUE_S 0 5808c2ecf20Sopenharmony_ci#define AR_PHY_TPC_18_VOLT_CAL_VALUE 0x0000ff00 5818c2ecf20Sopenharmony_ci#define AR_PHY_TPC_18_VOLT_CAL_VALUE_S 8 5828c2ecf20Sopenharmony_ci 5838c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19 (AR_SM_BASE + 0x240) 5848c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_VOLT 0x001f0000 5858c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_VOLT_S 16 5868c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_THERM 0xff 5878c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_ALPHA_THERM_S 0 5888c2ecf20Sopenharmony_ci 5898c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN (AR_SM_BASE + 0x258) 5908c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCE_TX_GAIN 0x00000001 5918c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCE_TX_GAIN_S 0 5928c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB1DBGAIN 0x0000000e 5938c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB1DBGAIN_S 1 5948c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB6DBGAIN 0x00000030 5958c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXBB6DBGAIN_S 4 5968c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXMXRGAIN 0x000003c0 5978c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_TXMXRGAIN_S 6 5988c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNA 0x00003c00 5998c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNA_S 10 6008c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNB 0x0003c000 6018c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNB_S 14 6028c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNC 0x003c0000 6038c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGNC_S 18 6048c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGND 0x00c00000 6058c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_PADRVGND_S 22 6068c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_ENABLE_PAL 0x01000000 6078c2ecf20Sopenharmony_ci#define AR_PHY_TX_FORCED_GAIN_FORCED_ENABLE_PAL_S 24 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci 6108c2ecf20Sopenharmony_ci#define AR_PHY_PDADC_TAB_0 (AR_SM_BASE + 0x280) 6118c2ecf20Sopenharmony_ci 6128c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300) 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ 6158c2ecf20Sopenharmony_ci 0x3c4 : 0x444)) 6168c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ 6178c2ecf20Sopenharmony_ci 0x3c8 : 0x448)) 6188c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + (AR_SREV_9485(ah) ? \ 6198c2ecf20Sopenharmony_ci 0x3c4 : 0x440)) 6208c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B0 (AR_SM_BASE + (AR_SREV_9485(ah) ? \ 6218c2ecf20Sopenharmony_ci 0x3f0 : 0x48c)) 6228c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_B0(_i) (AR_SM_BASE + \ 6238c2ecf20Sopenharmony_ci (AR_SREV_9485(ah) ? \ 6248c2ecf20Sopenharmony_ci 0x3d0 : 0x450) + ((_i) << 2)) 6258c2ecf20Sopenharmony_ci#define AR_PHY_RTT_CTRL (AR_SM_BASE + 0x380) 6268c2ecf20Sopenharmony_ci 6278c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_STATUS (AR_SM_BASE + 0x5c0) 6288c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_CTL_1 (AR_SM_BASE + 0x5c4) 6298c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_CTL_2 (AR_SM_BASE + 0x5c8) 6308c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_CTL (AR_SM_BASE + 0x5cc) 6318c2ecf20Sopenharmony_ci#define AR_PHY_ONLY_WARMRESET (AR_SM_BASE + 0x5d0) 6328c2ecf20Sopenharmony_ci#define AR_PHY_ONLY_CTL (AR_SM_BASE + 0x5d4) 6338c2ecf20Sopenharmony_ci#define AR_PHY_ECO_CTRL (AR_SM_BASE + 0x5dc) 6348c2ecf20Sopenharmony_ci 6358c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_1 (AR_SM_BASE + 0x248) 6368c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_1_INIT_THERM 0x000000ff 6378c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_1_INIT_THERM_S 0 6388c2ecf20Sopenharmony_ci 6398c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3 (AR_SM_BASE + 0x250) 6408c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN 0x0001ff00 6418c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN_S 8 6428c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET 0x000000ff 6438c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET_S 0 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4 (AR_SM_BASE + 0x254) 6468c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_THERM_VALUE 0x000000ff 6478c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_THERM_VALUE_S 0 6488c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_VOLT_VALUE 0x0000ff00 6498c2ecf20Sopenharmony_ci#define AR_PHY_BB_THERM_ADC_4_LATEST_VOLT_VALUE_S 8 6508c2ecf20Sopenharmony_ci 6518c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_TXRF3 0x16048 6528c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_TXRF3_CAPDIV2G 0x0000001e 6538c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_TXRF3_CAPDIV2G_S 1 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH4 0x1608c 6568c2ecf20Sopenharmony_ci#define AR_PHY_SYNTH4_LONG_SHIFT_SELECT ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x00000001 : 0x00000002) 6578c2ecf20Sopenharmony_ci#define AR_PHY_SYNTH4_LONG_SHIFT_SELECT_S ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0 : 1) 6588c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH7 0x16098 6598c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH12 0x160ac 6608c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_BIAS1 0x160c0 6618c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_BIAS2 0x160c4 6628c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_BIAS4 0x160cc 6638c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2 0x16104 6648c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH1_RXTX2 0x16504 6658c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH2_RXTX2 0x16904 6668c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4 0x1610c 6678c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH1_RXTX4 0x1650c 6688c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH2_RXTX4 0x1690c 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_BB1 0x16140 6718c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_BB2 0x16144 6728c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_BB3 0x16148 6738c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH1_BB1 0x16540 6748c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH1_BB2 0x16544 6758c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH1_BB3 0x16548 6768c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH2_BB1 0x16940 6778c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH2_BB2 0x16944 6788c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH2_BB3 0x16948 6798c2ecf20Sopenharmony_ci 6808c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH12_VREFMUL3 0x00780000 6818c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_SYNTH12_VREFMUL3_S 19 6828c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK 0x00000004 6838c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK_S 2 6848c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK 0x00000008 6858c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX2_SYNTHOVR_MASK_S 3 6868c2ecf20Sopenharmony_ci 6878c2ecf20Sopenharmony_ci#define AR_CH0_TOP (AR_SREV_9300(ah) ? 0x16288 : \ 6888c2ecf20Sopenharmony_ci (((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x1628c : 0x16280))) 6898c2ecf20Sopenharmony_ci#define AR_CH0_TOP_XPABIASLVL (AR_SREV_9550(ah) ? 0x3c0 : 0x300) 6908c2ecf20Sopenharmony_ci#define AR_CH0_TOP_XPABIASLVL_S (AR_SREV_9550(ah) ? 6 : 8) 6918c2ecf20Sopenharmony_ci 6928c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_ALL (0xffff) 6938c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_ALL_S (0) 6948c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9462_ALL (0xffffff) 6958c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9462_ALL_S (0) 6968c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9550_ALL (0xffffff) 6978c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_AR9550_ALL_S (0) 6988c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_SPDT (0x00f00000) 6998c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_SPDT_ALL (0x0000fff0) 7008c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM_SPDT_ALL_S (4) 7018c2ecf20Sopenharmony_ci 7028c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM2_ALL (0xffffff) 7038c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_COM2_ALL_S (0) 7048c2ecf20Sopenharmony_ci 7058c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_ALL (0xfff) 7068c2ecf20Sopenharmony_ci#define AR_SWITCH_TABLE_ALL_S (0) 7078c2ecf20Sopenharmony_ci 7088c2ecf20Sopenharmony_ci#define AR_CH0_THERM (AR_SREV_9300(ah) ? 0x16290 :\ 7098c2ecf20Sopenharmony_ci ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16294 : 0x1628c)) 7108c2ecf20Sopenharmony_ci#define AR_CH0_THERM_XPABIASLVL_MSB 0x3 7118c2ecf20Sopenharmony_ci#define AR_CH0_THERM_XPABIASLVL_MSB_S 0 7128c2ecf20Sopenharmony_ci#define AR_CH0_THERM_XPASHORT2GND 0x4 7138c2ecf20Sopenharmony_ci#define AR_CH0_THERM_XPASHORT2GND_S 2 7148c2ecf20Sopenharmony_ci 7158c2ecf20Sopenharmony_ci#define AR_CH0_THERM_LOCAL 0x80000000 7168c2ecf20Sopenharmony_ci#define AR_CH0_THERM_START 0x20000000 7178c2ecf20Sopenharmony_ci#define AR_CH0_THERM_SAR_ADC_OUT 0x0000ff00 7188c2ecf20Sopenharmony_ci#define AR_CH0_THERM_SAR_ADC_OUT_S 8 7198c2ecf20Sopenharmony_ci 7208c2ecf20Sopenharmony_ci#define AR_CH0_TOP2 (AR_SREV_9300(ah) ? 0x1628c : \ 7218c2ecf20Sopenharmony_ci (AR_SREV_9462(ah) ? 0x16290 : 0x16284)) 7228c2ecf20Sopenharmony_ci#define AR_CH0_TOP2_XPABIASLVL (AR_SREV_9561(ah) ? 0x1e00 : 0xf000) 7238c2ecf20Sopenharmony_ci#define AR_CH0_TOP2_XPABIASLVL_S (AR_SREV_9561(ah) ? 9 : 12) 7248c2ecf20Sopenharmony_ci 7258c2ecf20Sopenharmony_ci#define AR_CH0_XTAL (AR_SREV_9300(ah) ? 0x16294 : \ 7268c2ecf20Sopenharmony_ci ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16298 : \ 7278c2ecf20Sopenharmony_ci (AR_SREV_9561(ah) ? 0x162c0 : 0x16290))) 7288c2ecf20Sopenharmony_ci#define AR_CH0_XTAL_CAPINDAC 0x7f000000 7298c2ecf20Sopenharmony_ci#define AR_CH0_XTAL_CAPINDAC_S 24 7308c2ecf20Sopenharmony_ci#define AR_CH0_XTAL_CAPOUTDAC 0x00fe0000 7318c2ecf20Sopenharmony_ci#define AR_CH0_XTAL_CAPOUTDAC_S 17 7328c2ecf20Sopenharmony_ci 7338c2ecf20Sopenharmony_ci#define AR_PHY_PMU1 ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16340 : \ 7348c2ecf20Sopenharmony_ci (AR_SREV_9561(ah) ? 0x16cc0 : 0x16c40)) 7358c2ecf20Sopenharmony_ci#define AR_PHY_PMU1_PWD 0x1 7368c2ecf20Sopenharmony_ci#define AR_PHY_PMU1_PWD_S 0 7378c2ecf20Sopenharmony_ci 7388c2ecf20Sopenharmony_ci#define AR_PHY_PMU2 ((AR_SREV_9462(ah) || AR_SREV_9565(ah)) ? 0x16344 : \ 7398c2ecf20Sopenharmony_ci (AR_SREV_9561(ah) ? 0x16cc4 : 0x16c44)) 7408c2ecf20Sopenharmony_ci#define AR_PHY_PMU2_PGM 0x00200000 7418c2ecf20Sopenharmony_ci#define AR_PHY_PMU2_PGM_S 21 7428c2ecf20Sopenharmony_ci 7438c2ecf20Sopenharmony_ci#define AR_PHY_RX1DB_BIQUAD_LONG_SHIFT 0x00380000 7448c2ecf20Sopenharmony_ci#define AR_PHY_RX1DB_BIQUAD_LONG_SHIFT_S 19 7458c2ecf20Sopenharmony_ci#define AR_PHY_RX6DB_BIQUAD_LONG_SHIFT 0x00c00000 7468c2ecf20Sopenharmony_ci#define AR_PHY_RX6DB_BIQUAD_LONG_SHIFT_S 22 7478c2ecf20Sopenharmony_ci#define AR_PHY_LNAGAIN_LONG_SHIFT 0xe0000000 7488c2ecf20Sopenharmony_ci#define AR_PHY_LNAGAIN_LONG_SHIFT_S 29 7498c2ecf20Sopenharmony_ci#define AR_PHY_MXRGAIN_LONG_SHIFT 0x03000000 7508c2ecf20Sopenharmony_ci#define AR_PHY_MXRGAIN_LONG_SHIFT_S 24 7518c2ecf20Sopenharmony_ci#define AR_PHY_VGAGAIN_LONG_SHIFT 0x1c000000 7528c2ecf20Sopenharmony_ci#define AR_PHY_VGAGAIN_LONG_SHIFT_S 26 7538c2ecf20Sopenharmony_ci#define AR_PHY_SCFIR_GAIN_LONG_SHIFT 0x00000001 7548c2ecf20Sopenharmony_ci#define AR_PHY_SCFIR_GAIN_LONG_SHIFT_S 0 7558c2ecf20Sopenharmony_ci#define AR_PHY_MANRXGAIN_LONG_SHIFT 0x00000002 7568c2ecf20Sopenharmony_ci#define AR_PHY_MANRXGAIN_LONG_SHIFT_S 1 7578c2ecf20Sopenharmony_ci 7588c2ecf20Sopenharmony_ci/* 7598c2ecf20Sopenharmony_ci * SM Field Definitions 7608c2ecf20Sopenharmony_ci */ 7618c2ecf20Sopenharmony_ci#define AR_PHY_CL_CAL_ENABLE 0x00000002 7628c2ecf20Sopenharmony_ci#define AR_PHY_PARALLEL_CAL_ENABLE 0x00000001 7638c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE 0x00400000 7648c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE_S 22 7658c2ecf20Sopenharmony_ci 7668c2ecf20Sopenharmony_ci#define AR_PHY_ADDAC_PARACTL_OFF_PWDADC 0x00008000 7678c2ecf20Sopenharmony_ci 7688c2ecf20Sopenharmony_ci#define AR_PHY_FCAL20_CAP_STATUS_0 0x01f00000 7698c2ecf20Sopenharmony_ci#define AR_PHY_FCAL20_CAP_STATUS_0_S 20 7708c2ecf20Sopenharmony_ci 7718c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_REQ_EN 0x00000001 /* request for RF bus */ 7728c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_GRANT_EN 0x00000001 /* RF bus granted */ 7738c2ecf20Sopenharmony_ci#define AR_PHY_GC_TURBO_MODE 0x00000001 /* set turbo mode bits */ 7748c2ecf20Sopenharmony_ci#define AR_PHY_GC_TURBO_SHORT 0x00000002 /* set short symbols to turbo mode setting */ 7758c2ecf20Sopenharmony_ci#define AR_PHY_GC_DYN2040_EN 0x00000004 /* enable dyn 20/40 mode */ 7768c2ecf20Sopenharmony_ci#define AR_PHY_GC_DYN2040_PRI_ONLY 0x00000008 /* dyn 20/40 - primary only */ 7778c2ecf20Sopenharmony_ci#define AR_PHY_GC_DYN2040_PRI_CH 0x00000010 /* dyn 20/40 - primary ch offset (0=+10MHz, 1=-10MHz)*/ 7788c2ecf20Sopenharmony_ci#define AR_PHY_GC_DYN2040_PRI_CH_S 4 7798c2ecf20Sopenharmony_ci#define AR_PHY_GC_DYN2040_EXT_CH 0x00000020 /* dyn 20/40 - ext ch spacing (0=20MHz/ 1=25MHz) */ 7808c2ecf20Sopenharmony_ci#define AR_PHY_GC_HT_EN 0x00000040 /* ht enable */ 7818c2ecf20Sopenharmony_ci#define AR_PHY_GC_SHORT_GI_40 0x00000080 /* allow short GI for HT 40 */ 7828c2ecf20Sopenharmony_ci#define AR_PHY_GC_WALSH 0x00000100 /* walsh spatial spreading for 2 chains,2 streams TX */ 7838c2ecf20Sopenharmony_ci#define AR_PHY_GC_SINGLE_HT_LTF1 0x00000200 /* single length (4us) 1st HT long training symbol */ 7848c2ecf20Sopenharmony_ci#define AR_PHY_GC_GF_DETECT_EN 0x00000400 /* enable Green Field detection. Only affects rx, not tx */ 7858c2ecf20Sopenharmony_ci#define AR_PHY_GC_ENABLE_DAC_FIFO 0x00000800 /* fifo between bb and dac */ 7868c2ecf20Sopenharmony_ci#define AR_PHY_RX_DELAY_DELAY 0x00003FFF /* delay from wakeup to rx ena */ 7878c2ecf20Sopenharmony_ci 7888c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_IQ 0x00000000 7898c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_ADC_GAIN 0x00000001 7908c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_PER 0x00000002 7918c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_INIT 0x00000003 7928c2ecf20Sopenharmony_ci#define AR_PHY_SWAP_ALT_CHAIN 0x00000040 7938c2ecf20Sopenharmony_ci#define AR_PHY_MODE_OFDM 0x00000000 7948c2ecf20Sopenharmony_ci#define AR_PHY_MODE_CCK 0x00000001 7958c2ecf20Sopenharmony_ci#define AR_PHY_MODE_DYNAMIC 0x00000004 7968c2ecf20Sopenharmony_ci#define AR_PHY_MODE_DYNAMIC_S 2 7978c2ecf20Sopenharmony_ci#define AR_PHY_MODE_HALF 0x00000020 7988c2ecf20Sopenharmony_ci#define AR_PHY_MODE_QUARTER 0x00000040 7998c2ecf20Sopenharmony_ci#define AR_PHY_MAC_CLK_MODE 0x00000080 8008c2ecf20Sopenharmony_ci#define AR_PHY_MODE_DYN_CCK_DISABLE 0x00000100 8018c2ecf20Sopenharmony_ci#define AR_PHY_MODE_SVD_HALF 0x00000200 8028c2ecf20Sopenharmony_ci#define AR_PHY_ACTIVE_EN 0x00000001 8038c2ecf20Sopenharmony_ci#define AR_PHY_ACTIVE_DIS 0x00000000 8048c2ecf20Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG 0x000000001 8058c2ecf20Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG_S 0 8068c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAB_OFF 0xFF000000 8078c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAB_OFF_S 24 8088c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF 0x00FF0000 8098c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF_S 16 8108c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON 0x0000FF00 8118c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON_S 8 8128c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON 0x000000FF 8138c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON_S 0 8148c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000 8158c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON_S 16 8168c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_DATA_START 0x000000FF 8178c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_DATA_START_S 0 8188c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_PA_ON 0x0000FF00 8198c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_PA_ON_S 8 8208c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP 0x0000000F 8218c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_S 0 8228c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1 0x000003F0 8238c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_S 4 8248c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2 0x0000FC00 8258c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_S 10 8268c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3 0x003F0000 8278c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_S 16 8288c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4 0x0FC00000 8298c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_S 22 8308c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN 0x0000c000 8318c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN_S 14 8328c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1 0x00030000 8338c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1_S 16 8348c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2 0x000C0000 8358c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2_S 18 8368c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3 0x00300000 8378c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3_S 20 8388c2ecf20Sopenharmony_ci#define AR_PHY_TPCGR1_FORCED_DAC_GAIN 0x0000003e 8398c2ecf20Sopenharmony_ci#define AR_PHY_TPCGR1_FORCED_DAC_GAIN_S 1 8408c2ecf20Sopenharmony_ci#define AR_PHY_TPCGR1_FORCE_DAC_GAIN 0x00000001 8418c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCE 0x00000001 8428c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCE_S 0 8438c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRA 0x00003c00 8448c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRA_S 10 8458c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRB 0x0003c000 8468c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRB_S 14 8478c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRD 0x00c00000 8488c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_PADVGNRD_S 22 8498c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXMXRGAIN 0x000003c0 8508c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXMXRGAIN_S 6 8518c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXBB1DBGAIN 0x0000000e 8528c2ecf20Sopenharmony_ci#define AR_PHY_TXGAIN_FORCED_TXBB1DBGAIN_S 1 8538c2ecf20Sopenharmony_ci 8548c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE1 0x9934 8558c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE2 0x9938 8568c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX 0x993c 8578c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX_TPC_ENABLE 0x00000040 8588c2ecf20Sopenharmony_ci#define PHY_AGC_CLR 0x10000000 8598c2ecf20Sopenharmony_ci#define RFSILENT_BB 0x00002000 8608c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_PPM_MASK 0xFFF 8618c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_PPM_SIGNED_BIT 0x800 8628c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320 8638c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CAPTURE_MASK 0x0001 8648c2ecf20Sopenharmony_ci#define AR_PHY_RX_DELAY_DELAY 0x00003FFF 8658c2ecf20Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_JAPAN 0x00000010 8668c2ecf20Sopenharmony_ci 8678c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENABLE 0x00000001 8688c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENABLE_S 0 8698c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE 0x00000002 8708c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE_S 1 8718c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD 0x000000F0 8728c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD_S 4 8738c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD 0x0000FF00 8748c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD_S 8 8758c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT 0x0FFF0000 8768c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_S 16 8778c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x10000000 8788c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_S 28 8798c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PRIORITY 0x20000000 8808c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PRIORITY_S 29 8818c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_USE_ERR5 0x40000000 8828c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_USE_ERR5_S 30 8838c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COMPRESSED_RPT 0x80000000 8848c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COMPRESSED_RPT_S 31 8858c2ecf20Sopenharmony_ci 8868c2ecf20Sopenharmony_ci#define AR_PHY_CHANNEL_STATUS_RX_CLEAR 0x00000004 8878c2ecf20Sopenharmony_ci#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION 0x00000001 8888c2ecf20Sopenharmony_ci#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION_S 0 8898c2ecf20Sopenharmony_ci#define AR_PHY_RTT_CTRL_RESTORE_MASK 0x0000007E 8908c2ecf20Sopenharmony_ci#define AR_PHY_RTT_CTRL_RESTORE_MASK_S 1 8918c2ecf20Sopenharmony_ci#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE 0x00000080 8928c2ecf20Sopenharmony_ci#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE_S 7 8938c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS 0x00000001 8948c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_S 0 8958c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_WRITE 0x00000002 8968c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_S 1 8978c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ADDR 0x0000001C 8988c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_S 2 8998c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_DATA 0xFFFFFFF0 9008c2ecf20Sopenharmony_ci#define AR_PHY_RTT_SW_RTT_TABLE_DATA_S 4 9018c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL 0x80000000 9028c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL_S 31 9038c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT 0x01fc0000 9048c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT_S 18 9058c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_START_DO_CAL 0x00000001 9068c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_START_DO_CAL_S 0 9078c2ecf20Sopenharmony_ci 9088c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_FAILED 0x00000001 9098c2ecf20Sopenharmony_ci#define AR_PHY_CALIBRATED_GAINS_0 0x3e 9108c2ecf20Sopenharmony_ci#define AR_PHY_CALIBRATED_GAINS_0_S 1 9118c2ecf20Sopenharmony_ci 9128c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE 0x00003fff 9138c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE_S 0 9148c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE 0x0fffc000 9158c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE_S 14 9168c2ecf20Sopenharmony_ci 9178c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON 0x10000000 9188c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON_S 28 9198c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR 0x20000000 9208c2ecf20Sopenharmony_ci#define AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR_S 29 9218c2ecf20Sopenharmony_ci 9228c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXTX4_XLNA_BIAS 0xC0000000 9238c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXTX4_XLNA_BIAS_S 30 9248c2ecf20Sopenharmony_ci 9258c2ecf20Sopenharmony_ci/* 9268c2ecf20Sopenharmony_ci * Channel 1 Register Map 9278c2ecf20Sopenharmony_ci */ 9288c2ecf20Sopenharmony_ci#define AR_CHAN1_BASE 0xa800 9298c2ecf20Sopenharmony_ci 9308c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_1 (AR_CHAN1_BASE + 0x30) 9318c2ecf20Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_1 (AR_CHAN1_BASE + 0xd0) 9328c2ecf20Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_1 (AR_CHAN1_BASE + 0xd4) 9338c2ecf20Sopenharmony_ci 9348c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REPORT_1 (AR_CHAN1_BASE + 0xa8) 9358c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_1 (AR_CHAN1_BASE + 0x300) 9368c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B1 (AR_CHAN1_BASE + 0xdc) 9378c2ecf20Sopenharmony_ci 9388c2ecf20Sopenharmony_ci/* 9398c2ecf20Sopenharmony_ci * Channel 1 Field Definitions 9408c2ecf20Sopenharmony_ci */ 9418c2ecf20Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR 0x01FF0000 9428c2ecf20Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR_S 16 9438c2ecf20Sopenharmony_ci 9448c2ecf20Sopenharmony_ci/* 9458c2ecf20Sopenharmony_ci * AGC 1 Register Map 9468c2ecf20Sopenharmony_ci */ 9478c2ecf20Sopenharmony_ci#define AR_AGC1_BASE 0xae00 9488c2ecf20Sopenharmony_ci 9498c2ecf20Sopenharmony_ci#define AR_PHY_FORCEMAX_GAINS_1 (AR_AGC1_BASE + 0x4) 9508c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_1 (AR_AGC1_BASE + 0x18) 9518c2ecf20Sopenharmony_ci#define AR_PHY_CCA_1 (AR_AGC1_BASE + 0x1c) 9528c2ecf20Sopenharmony_ci#define AR_PHY_CCA_CTRL_1 (AR_AGC1_BASE + 0x20) 9538c2ecf20Sopenharmony_ci#define AR_PHY_RSSI_1 (AR_AGC1_BASE + 0x180) 9548c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_CCK_REP_1 (AR_AGC1_BASE + 0x184) 9558c2ecf20Sopenharmony_ci#define AR_PHY_RX_OCGAIN_2 (AR_AGC1_BASE + 0x200) 9568c2ecf20Sopenharmony_ci 9578c2ecf20Sopenharmony_ci/* 9588c2ecf20Sopenharmony_ci * AGC 1 Field Definitions 9598c2ecf20Sopenharmony_ci */ 9608c2ecf20Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR 0x1FF00000 9618c2ecf20Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR_S 20 9628c2ecf20Sopenharmony_ci 9638c2ecf20Sopenharmony_ci/* 9648c2ecf20Sopenharmony_ci * SM 1 Register Map 9658c2ecf20Sopenharmony_ci */ 9668c2ecf20Sopenharmony_ci#define AR_SM1_BASE 0xb200 9678c2ecf20Sopenharmony_ci 9688c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_1 (AR_SM1_BASE + 0x84) 9698c2ecf20Sopenharmony_ci#define AR_PHY_FCAL_2_1 (AR_SM1_BASE + 0xd0) 9708c2ecf20Sopenharmony_ci#define AR_PHY_DFT_TONE_CTL_1 (AR_SM1_BASE + 0xd4) 9718c2ecf20Sopenharmony_ci#define AR_PHY_CL_TAB_1 (AR_SM1_BASE + 0x100) 9728c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_1 (AR_SM1_BASE + 0x180) 9738c2ecf20Sopenharmony_ci#define AR_PHY_TPC_4_B1 (AR_SM1_BASE + 0x204) 9748c2ecf20Sopenharmony_ci#define AR_PHY_TPC_5_B1 (AR_SM1_BASE + 0x208) 9758c2ecf20Sopenharmony_ci#define AR_PHY_TPC_6_B1 (AR_SM1_BASE + 0x20c) 9768c2ecf20Sopenharmony_ci#define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220) 9778c2ecf20Sopenharmony_ci#define AR_PHY_PDADC_TAB_1 (AR_SM1_BASE + (AR_SREV_9462_20_OR_LATER(ah) ? \ 9788c2ecf20Sopenharmony_ci 0x280 : 0x240)) 9798c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_B1 (AR_SM1_BASE + 0x240) 9808c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_B1_ALPHA_THERM 0xff 9818c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_B1_ALPHA_THERM_S 0 9828c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B1 (AR_SM1_BASE + 0x48c) 9838c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_B1(_i) (AR_SM1_BASE + 0x450 + ((_i) << 2)) 9848c2ecf20Sopenharmony_ci 9858c2ecf20Sopenharmony_ci#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + ((i) ? \ 9868c2ecf20Sopenharmony_ci AR_SM1_BASE : AR_SM_BASE)) 9878c2ecf20Sopenharmony_ci#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + ((i) ? \ 9888c2ecf20Sopenharmony_ci AR_SM1_BASE : AR_SM_BASE)) 9898c2ecf20Sopenharmony_ci/* 9908c2ecf20Sopenharmony_ci * Channel 2 Register Map 9918c2ecf20Sopenharmony_ci */ 9928c2ecf20Sopenharmony_ci#define AR_CHAN2_BASE 0xb800 9938c2ecf20Sopenharmony_ci 9948c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_2 (AR_CHAN2_BASE + 0x30) 9958c2ecf20Sopenharmony_ci#define AR_PHY_TX_PHASE_RAMP_2 (AR_CHAN2_BASE + 0xd0) 9968c2ecf20Sopenharmony_ci#define AR_PHY_ADC_GAIN_DC_CORR_2 (AR_CHAN2_BASE + 0xd4) 9978c2ecf20Sopenharmony_ci 9988c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REPORT_2 (AR_CHAN2_BASE + 0xa8) 9998c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_TAB_2 (AR_CHAN2_BASE + 0x300) 10008c2ecf20Sopenharmony_ci#define AR_PHY_RX_IQCAL_CORR_B2 (AR_CHAN2_BASE + 0xdc) 10018c2ecf20Sopenharmony_ci 10028c2ecf20Sopenharmony_ci/* 10038c2ecf20Sopenharmony_ci * Channel 2 Field Definitions 10048c2ecf20Sopenharmony_ci */ 10058c2ecf20Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR 0x01FF0000 10068c2ecf20Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR_S 16 10078c2ecf20Sopenharmony_ci/* 10088c2ecf20Sopenharmony_ci * AGC 2 Register Map 10098c2ecf20Sopenharmony_ci */ 10108c2ecf20Sopenharmony_ci#define AR_AGC2_BASE 0xbe00 10118c2ecf20Sopenharmony_ci 10128c2ecf20Sopenharmony_ci#define AR_PHY_FORCEMAX_GAINS_2 (AR_AGC2_BASE + 0x4) 10138c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL_2 (AR_AGC2_BASE + 0x18) 10148c2ecf20Sopenharmony_ci#define AR_PHY_CCA_2 (AR_AGC2_BASE + 0x1c) 10158c2ecf20Sopenharmony_ci#define AR_PHY_CCA_CTRL_2 (AR_AGC2_BASE + 0x20) 10168c2ecf20Sopenharmony_ci#define AR_PHY_RSSI_2 (AR_AGC2_BASE + 0x180) 10178c2ecf20Sopenharmony_ci 10188c2ecf20Sopenharmony_ci/* 10198c2ecf20Sopenharmony_ci * AGC 2 Field Definitions 10208c2ecf20Sopenharmony_ci */ 10218c2ecf20Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR 0x1FF00000 10228c2ecf20Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR_S 20 10238c2ecf20Sopenharmony_ci 10248c2ecf20Sopenharmony_ci/* 10258c2ecf20Sopenharmony_ci * SM 2 Register Map 10268c2ecf20Sopenharmony_ci */ 10278c2ecf20Sopenharmony_ci#define AR_SM2_BASE 0xc200 10288c2ecf20Sopenharmony_ci 10298c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_2 (AR_SM2_BASE + 0x84) 10308c2ecf20Sopenharmony_ci#define AR_PHY_FCAL_2_2 (AR_SM2_BASE + 0xd0) 10318c2ecf20Sopenharmony_ci#define AR_PHY_DFT_TONE_CTL_2 (AR_SM2_BASE + 0xd4) 10328c2ecf20Sopenharmony_ci#define AR_PHY_CL_TAB_2 (AR_SM2_BASE + 0x100) 10338c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_2 (AR_SM2_BASE + 0x180) 10348c2ecf20Sopenharmony_ci#define AR_PHY_TPC_4_B2 (AR_SM2_BASE + 0x204) 10358c2ecf20Sopenharmony_ci#define AR_PHY_TPC_5_B2 (AR_SM2_BASE + 0x208) 10368c2ecf20Sopenharmony_ci#define AR_PHY_TPC_6_B2 (AR_SM2_BASE + 0x20c) 10378c2ecf20Sopenharmony_ci#define AR_PHY_TPC_11_B2 (AR_SM2_BASE + 0x220) 10388c2ecf20Sopenharmony_ci#define AR_PHY_TPC_19_B2 (AR_SM2_BASE + 0x240) 10398c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B2 (AR_SM2_BASE + 0x48c) 10408c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_CORR_COEFF_B2(_i) (AR_SM2_BASE + 0x450 + ((_i) << 2)) 10418c2ecf20Sopenharmony_ci 10428c2ecf20Sopenharmony_ci#define AR_PHY_TX_IQCAL_STATUS_B2_FAILED 0x00000001 10438c2ecf20Sopenharmony_ci 10448c2ecf20Sopenharmony_ci/* 10458c2ecf20Sopenharmony_ci * AGC 3 Register Map 10468c2ecf20Sopenharmony_ci */ 10478c2ecf20Sopenharmony_ci#define AR_AGC3_BASE 0xce00 10488c2ecf20Sopenharmony_ci 10498c2ecf20Sopenharmony_ci#define AR_PHY_RSSI_3 (AR_AGC3_BASE + 0x180) 10508c2ecf20Sopenharmony_ci 10518c2ecf20Sopenharmony_ci/* GLB Registers */ 10528c2ecf20Sopenharmony_ci#define AR_GLB_BASE 0x20000 10538c2ecf20Sopenharmony_ci#define AR_GLB_GPIO_CONTROL (AR_GLB_BASE) 10548c2ecf20Sopenharmony_ci#define AR_PHY_GLB_CONTROL (AR_GLB_BASE + 0x44) 10558c2ecf20Sopenharmony_ci#define AR_GLB_SCRATCH(_ah) (AR_GLB_BASE + \ 10568c2ecf20Sopenharmony_ci (AR_SREV_9462_20_OR_LATER(_ah) ? 0x4c : 0x50)) 10578c2ecf20Sopenharmony_ci#define AR_GLB_STATUS (AR_GLB_BASE + 0x48) 10588c2ecf20Sopenharmony_ci 10598c2ecf20Sopenharmony_ci/* 10608c2ecf20Sopenharmony_ci * Misc helper defines 10618c2ecf20Sopenharmony_ci */ 10628c2ecf20Sopenharmony_ci#define AR_PHY_CHAIN_OFFSET (AR_CHAN1_BASE - AR_CHAN_BASE) 10638c2ecf20Sopenharmony_ci 10648c2ecf20Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_GAIN_CORR(_i) (AR_PHY_ADC_GAIN_DC_CORR_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10658c2ecf20Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_GAIN_CORR_9300_10(_i) (AR_PHY_ADC_GAIN_DC_CORR_0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 10668c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN(_i) (AR_PHY_SWITCH_CHAIN_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10678c2ecf20Sopenharmony_ci#define AR_PHY_EXT_ATTEN_CTL(_i) (AR_PHY_EXT_ATTEN_CTL_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10688c2ecf20Sopenharmony_ci 10698c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN(_i) (AR_PHY_FORCEMAX_GAINS_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10708c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5(_i) (AR_PHY_TPC_5_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10718c2ecf20Sopenharmony_ci#define AR_PHY_PDADC_TAB(_i) (AR_PHY_PDADC_TAB_0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10728c2ecf20Sopenharmony_ci 10738c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_0(_i) (AR_PHY_IQ_ADC_MEAS_0_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10748c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_1(_i) (AR_PHY_IQ_ADC_MEAS_1_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10758c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_2(_i) (AR_PHY_IQ_ADC_MEAS_2_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10768c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_3(_i) (AR_PHY_IQ_ADC_MEAS_3_B0 + (AR_PHY_CHAIN_OFFSET * (_i))) 10778c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_0_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_0_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 10788c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_1_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_1_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 10798c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_2_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_2_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 10808c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_3_9300_10(_i) (AR_PHY_IQ_ADC_MEAS_3_B0_9300_10 + (AR_PHY_CHAIN_OFFSET * (_i))) 10818c2ecf20Sopenharmony_ci 10828c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_NON_IDLE_ENABLE 0x00000001 10838c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_IDLE_ENABLE 0x00000002 10848c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_IDLE_MASK 0xFFFF0000 10858c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_NON_IDLE_MASK 0x0000FFFC 10868c2ecf20Sopenharmony_ci 10878c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_RST_ENABLE 0x00000002 10888c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_IRQ_ENABLE 0x00000004 10898c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_CNTL2_MASK 0xFFFFFFF9 10908c2ecf20Sopenharmony_ci 10918c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_INFO 0x00000007 10928c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_INFO_S 0 10938c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_DET_HANG 0x00000008 10948c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_DET_HANG_S 3 10958c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_RADAR_SM 0x000000F0 10968c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_RADAR_SM_S 4 10978c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_OFDM_SM 0x00000F00 10988c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_OFDM_SM_S 8 10998c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_CCK_SM 0x0000F000 11008c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_RX_CCK_SM_S 12 11018c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_OFDM_SM 0x000F0000 11028c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_OFDM_SM_S 16 11038c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_CCK_SM 0x00F00000 11048c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_TX_CCK_SM_S 20 11058c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_AGC_SM 0x0F000000 11068c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_AGC_SM_S 24 11078c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_SRCH_SM 0xF0000000 11088c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_SRCH_SM_S 28 11098c2ecf20Sopenharmony_ci 11108c2ecf20Sopenharmony_ci#define AR_PHY_WATCHDOG_STATUS_CLR 0x00000008 11118c2ecf20Sopenharmony_ci 11128c2ecf20Sopenharmony_ci/* 11138c2ecf20Sopenharmony_ci * PAPRD registers 11148c2ecf20Sopenharmony_ci */ 11158c2ecf20Sopenharmony_ci#define AR_PHY_XPA_TIMING_CTL (AR_SM_BASE + 0x64) 11168c2ecf20Sopenharmony_ci 11178c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_AM2AM (AR_CHAN_BASE + 0xe4) 11188c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_AM2AM_MASK 0x01ffffff 11198c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_AM2AM_MASK_S 0 11208c2ecf20Sopenharmony_ci 11218c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_AM2PM (AR_CHAN_BASE + 0xe8) 11228c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_AM2PM_MASK 0x01ffffff 11238c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_AM2PM_MASK_S 0 11248c2ecf20Sopenharmony_ci 11258c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_HT40 (AR_CHAN_BASE + 0xec) 11268c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_HT40_MASK 0x01ffffff 11278c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_HT40_MASK_S 0 11288c2ecf20Sopenharmony_ci 11298c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_B0 (AR_CHAN_BASE + 0xf0) 11308c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_B1 (AR_CHAN1_BASE + 0xf0) 11318c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_B2 (AR_CHAN2_BASE + 0xf0) 11328c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_ENABLE 0x00000001 11338c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_ENABLE_S 0 11348c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_USE_SINGLE_TABLE_MASK 0x00000002 11358c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_USE_SINGLE_TABLE_MASK_S 1 11368c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_MAG_THRSH 0xf8000000 11378c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL0_PAPRD_MAG_THRSH_S 27 11388c2ecf20Sopenharmony_ci 11398c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_B0 (AR_CHAN_BASE + 0xf4) 11408c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_B1 (AR_CHAN1_BASE + 0xf4) 11418c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_B2 (AR_CHAN2_BASE + 0xf4) 11428c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_SCALING_ENA 0x00000001 11438c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_SCALING_ENA_S 0 11448c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2AM_ENABLE 0x00000002 11458c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2AM_ENABLE_S 1 11468c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2PM_ENABLE 0x00000004 11478c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_ADAPTIVE_AM2PM_ENABLE_S 2 11488c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_POWER_AT_AM2AM_CAL 0x000001f8 11498c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_POWER_AT_AM2AM_CAL_S 3 11508c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PA_GAIN_SCALE_FACT_MASK 0x0001fe00 11518c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PA_GAIN_SCALE_FACT_MASK_S 9 11528c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_MAG_SCALE_FACT 0x0ffe0000 11538c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_CTRL1_PAPRD_MAG_SCALE_FACT_S 17 11548c2ecf20Sopenharmony_ci 11558c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1 (AR_SM_BASE + (AR_SREV_9485(ah) ? 0x580 : 0x490)) 11568c2ecf20Sopenharmony_ci 11578c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE 0x00000001 11588c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE_S 0 11598c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING 0x0000007e 11608c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING_S 1 11618c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_IQCORR_ENABLE 0x00000100 11628c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_IQCORR_ENABLE_S 8 11638c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_RX_BB_GAIN_FORCE 0x00000200 11648c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_RX_BB_GAIN_FORCE_S 9 11658c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_TX_GAIN_FORCE 0x00000400 11668c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_TX_GAIN_FORCE_S 10 11678c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_ENABLE 0x00000800 11688c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_ENABLE_S 11 11698c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_SKIP 0x0003f000 11708c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_LB_SKIP_S 12 11718c2ecf20Sopenharmony_ci 11728c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL2 (AR_SM_BASE + (AR_SREV_9485(ah) ? 0x584 : 0x494)) 11738c2ecf20Sopenharmony_ci 11748c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN 0xFFFFFFFF 11758c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN_S 0 11768c2ecf20Sopenharmony_ci 11778c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3 (AR_SM_BASE + (AR_SREV_9485(ah) ? 0x588 : 0x498)) 11788c2ecf20Sopenharmony_ci 11798c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE 0x0000003f 11808c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE_S 0 11818c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP 0x00000fc0 11828c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP_S 6 11838c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL 0x0001f000 11848c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL_S 12 11858c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES 0x000e0000 11868c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES_S 17 11878c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN 0x00f00000 11888c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_COARSE_CORR_LEN_S 20 11898c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_FINE_CORR_LEN 0x0f000000 11908c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_FINE_CORR_LEN_S 24 11918c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_BBTXMIX_DISABLE 0x20000000 11928c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_BBTXMIX_DISABLE_S 29 11938c2ecf20Sopenharmony_ci 11948c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4 (AR_SM_BASE + (AR_SREV_9485(ah) ? 0x58c : 0x49c)) 11958c2ecf20Sopenharmony_ci 11968c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_NUM_TRAIN_SAMPLES 0x03ff0000 11978c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_NUM_TRAIN_SAMPLES_S 16 11988c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_SAFETY_DELTA 0x0000f000 11998c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_SAFETY_DELTA_S 12 12008c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_MIN_CORR 0x00000fff 12018c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_CNTL4_CF_PAPRD_MIN_CORR_S 0 12028c2ecf20Sopenharmony_ci 12038c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_0_B0 (AR_CHAN_BASE + 0x100) 12048c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_1_B0 (AR_CHAN_BASE + 0x104) 12058c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_2_B0 (AR_CHAN_BASE + 0x108) 12068c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_3_B0 (AR_CHAN_BASE + 0x10c) 12078c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_4_B0 (AR_CHAN_BASE + 0x110) 12088c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_5_B0 (AR_CHAN_BASE + 0x114) 12098c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_6_B0 (AR_CHAN_BASE + 0x118) 12108c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALE_7_B0 (AR_CHAN_BASE + 0x11c) 12118c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALING 0x3FFFF 12128c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_PRE_POST_SCALING_S 0 12138c2ecf20Sopenharmony_ci 12148c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1 (AR_SM_BASE + (AR_SREV_9485(ah) ? 0x590 : 0x4a0)) 12158c2ecf20Sopenharmony_ci 12168c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE 0x00000001 12178c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE_S 0 12188c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_INCOMPLETE 0x00000002 12198c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_INCOMPLETE_S 1 12208c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_CORR_ERR 0x00000004 12218c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_CORR_ERR_S 2 12228c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_ACTIVE 0x00000008 12238c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_ACTIVE_S 3 12248c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_RX_GAIN_IDX 0x000001f0 12258c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_RX_GAIN_IDX_S 4 12268c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR 0x0001fe00 12278c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR_S 9 12288c2ecf20Sopenharmony_ci 12298c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2 (AR_SM_BASE + (AR_SREV_9485(ah) ? 0x594 : 0x4a4)) 12308c2ecf20Sopenharmony_ci 12318c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_VAL 0x0000ffff 12328c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_VAL_S 0 12338c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_COARSE_IDX 0x001f0000 12348c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_COARSE_IDX_S 16 12358c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_IDX 0x00600000 12368c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT2_PAPRD_FINE_IDX_S 21 12378c2ecf20Sopenharmony_ci 12388c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT3 (AR_SM_BASE + (AR_SREV_9485(ah) ? 0x598 : 0x4a8)) 12398c2ecf20Sopenharmony_ci 12408c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT3_PAPRD_TRAIN_SAMPLES_CNT 0x000fffff 12418c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_TRAINER_STAT3_PAPRD_TRAIN_SAMPLES_CNT_S 0 12428c2ecf20Sopenharmony_ci 12438c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_MEM_TAB_B0 (AR_CHAN_BASE + 0x120) 12448c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_MEM_TAB_B1 (AR_CHAN1_BASE + 0x120) 12458c2ecf20Sopenharmony_ci#define AR_PHY_PAPRD_MEM_TAB_B2 (AR_CHAN2_BASE + 0x120) 12468c2ecf20Sopenharmony_ci 12478c2ecf20Sopenharmony_ci#define AR_PHY_PA_GAIN123_B0 (AR_CHAN_BASE + 0xf8) 12488c2ecf20Sopenharmony_ci#define AR_PHY_PA_GAIN123_B1 (AR_CHAN1_BASE + 0xf8) 12498c2ecf20Sopenharmony_ci#define AR_PHY_PA_GAIN123_B2 (AR_CHAN2_BASE + 0xf8) 12508c2ecf20Sopenharmony_ci#define AR_PHY_PA_GAIN123_PA_GAIN1 0x3FF 12518c2ecf20Sopenharmony_ci#define AR_PHY_PA_GAIN123_PA_GAIN1_S 0 12528c2ecf20Sopenharmony_ci 12538c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE5 (AR_SM_BASE + 0x1d0) 12548c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0 0x3F 12558c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE5_POWERTXHT20_0_S 0 12568c2ecf20Sopenharmony_ci 12578c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE6 (AR_SM_BASE + 0x1d4) 12588c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5 0x3F00 12598c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE6_POWERTXHT20_5_S 8 12608c2ecf20Sopenharmony_ci 12618c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE8 (AR_SM_BASE + 0x1dc) 12628c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5 0x3F00 12638c2ecf20Sopenharmony_ci#define AR_PHY_POWERTX_RATE8_POWERTXHT40_5_S 8 12648c2ecf20Sopenharmony_ci 12658c2ecf20Sopenharmony_ci#define AR_PHY_CL_TAB_CL_GAIN_MOD 0x1f 12668c2ecf20Sopenharmony_ci#define AR_PHY_CL_TAB_CL_GAIN_MOD_S 0 12678c2ecf20Sopenharmony_ci 12688c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV 0x1a64 12698c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_PREDICTED_PERIOD 0x00003FFF 12708c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_PREDICTED_PERIOD_S 0 12718c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DPDT_IGNORE_PRIORITY 0x00004000 12728c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DPDT_IGNORE_PRIORITY_S 14 12738c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_FORCE_ON 0x00008000 12748c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_FORCE_ON_S 15 12758c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE_OPTION 0x00030000 12768c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE_OPTION_S 16 12778c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE 0x007c0000 12788c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_MODE_S 18 12798c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_ALLOWED_TX_ANTDIV_WL_TX_REQ 0x00800000 12808c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_ALLOWED_TX_ANTDIV_WL_TX_REQ_S 23 12818c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DISABLE_TX_ANTDIV_ENABLE 0x01000000 12828c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_DISABLE_TX_ANTDIV_ENABLE_S 24 12838c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_CONTINUOUS_BT_ACTIVE_PROTECT 0x02000000 12848c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_CONTINUOUS_BT_ACTIVE_PROTECT_S 25 12858c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_BT_INACTIVE_THRESHOLD 0xFC000000 12868c2ecf20Sopenharmony_ci#define AR_BTCOEX_WL_LNADIV_BT_INACTIVE_THRESHOLD_S 26 12878c2ecf20Sopenharmony_ci 12888c2ecf20Sopenharmony_ci/* Manual Peak detector calibration */ 12898c2ecf20Sopenharmony_ci#define AR_PHY_65NM_BASE 0x16000 12908c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES(i) (AR_PHY_65NM_BASE + \ 12918c2ecf20Sopenharmony_ci (i * 0x400) + 0x8) 12928c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_RX_OVERRIDE 0x80000000 12938c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_RX_OVERRIDE_S 31 12948c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNAON_CALDC 0x00000002 12958c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNAON_CALDC_S 1 12968c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA2G_GAIN_OVR 0x70000000 12978c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA2G_GAIN_OVR_S 28 12988c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA5G_GAIN_OVR 0x03800000 12998c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_GAINSTAGES_LNA5G_GAIN_OVR_S 23 13008c2ecf20Sopenharmony_ci 13018c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXTX2(i) (AR_PHY_65NM_BASE + \ 13028c2ecf20Sopenharmony_ci (i * 0x400) + 0x104) 13038c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON_OVR 0x00001000 13048c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON_OVR_S 12 13058c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON 0x00000800 13068c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXTX2_RXON_S 11 13078c2ecf20Sopenharmony_ci 13088c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC(i) (AR_PHY_65NM_BASE + \ 13098c2ecf20Sopenharmony_ci (i * 0x400) + 0xc) 13108c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OVERRIDE 0x80000000 13118c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OVERRIDE_S 31 13128c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_ON_OVR 0x40000000 13138c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_ON_OVR_S 30 13148c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_CAL_OVR 0x20000000 13158c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_CAL_OVR_S 29 13168c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR 0x1E000000 13178c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR_S 25 13188c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_DBDAC_OVR 0x00078000 13198c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_DBDAC_OVR_S 15 13208c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR 0x01F80000 13218c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR_S 19 13228c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR 0x00007e00 13238c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR_S 9 13248c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OUT 0x00000004 13258c2ecf20Sopenharmony_ci#define AR_PHY_65NM_RXRF_AGC_AGC_OUT_S 2 13268c2ecf20Sopenharmony_ci 13278c2ecf20Sopenharmony_ci#define AR9300_DFS_FIRPWR -28 13288c2ecf20Sopenharmony_ci 13298c2ecf20Sopenharmony_ci#endif /* AR9003_PHY_H */ 1330