18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright (c) 2008-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#ifndef AR9002_PHY_H 178c2ecf20Sopenharmony_ci#define AR9002_PHY_H 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define AR_PHY_TEST 0x9800 208c2ecf20Sopenharmony_ci#define PHY_AGC_CLR 0x10000000 218c2ecf20Sopenharmony_ci#define RFSILENT_BB 0x00002000 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define AR_PHY_TURBO 0x9804 248c2ecf20Sopenharmony_ci#define AR_PHY_FC_TURBO_MODE 0x00000001 258c2ecf20Sopenharmony_ci#define AR_PHY_FC_TURBO_SHORT 0x00000002 268c2ecf20Sopenharmony_ci#define AR_PHY_FC_DYN2040_EN 0x00000004 278c2ecf20Sopenharmony_ci#define AR_PHY_FC_DYN2040_PRI_ONLY 0x00000008 288c2ecf20Sopenharmony_ci#define AR_PHY_FC_DYN2040_PRI_CH 0x00000010 298c2ecf20Sopenharmony_ci/* For 25 MHz channel spacing -- not used but supported by hw */ 308c2ecf20Sopenharmony_ci#define AR_PHY_FC_DYN2040_EXT_CH 0x00000020 318c2ecf20Sopenharmony_ci#define AR_PHY_FC_HT_EN 0x00000040 328c2ecf20Sopenharmony_ci#define AR_PHY_FC_SHORT_GI_40 0x00000080 338c2ecf20Sopenharmony_ci#define AR_PHY_FC_WALSH 0x00000100 348c2ecf20Sopenharmony_ci#define AR_PHY_FC_SINGLE_HT_LTF1 0x00000200 358c2ecf20Sopenharmony_ci#define AR_PHY_FC_ENABLE_DAC_FIFO 0x00000800 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define AR_PHY_TEST2 0x9808 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define AR_PHY_TIMING2 0x9810 408c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3 0x9814 418c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN 0xFFFE0000 428c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_MAN_S 17 438c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP 0x0001E000 448c2ecf20Sopenharmony_ci#define AR_PHY_TIMING3_DSC_EXP_S 13 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#define AR_PHY_CHIP_ID_REV_0 0x80 478c2ecf20Sopenharmony_ci#define AR_PHY_CHIP_ID_REV_1 0x81 488c2ecf20Sopenharmony_ci#define AR_PHY_CHIP_ID_9160_REV_0 0xb0 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#define AR_PHY_ACTIVE 0x981C 518c2ecf20Sopenharmony_ci#define AR_PHY_ACTIVE_EN 0x00000001 528c2ecf20Sopenharmony_ci#define AR_PHY_ACTIVE_DIS 0x00000000 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL2 0x9824 558c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_DATA_START 0x000000FF 568c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_DATA_START_S 0 578c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_PA_ON 0x0000FF00 588c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_PA_ON_S 8 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL3 0x9828 618c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON 0x00FF0000 628c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_TO_A2_RX_ON_S 16 638c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_TO_ADC_ON 0xFF000000 648c2ecf20Sopenharmony_ci#define AR_PHY_TX_END_TO_ADC_ON_S 24 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL 0x982C 678c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_INBUFGAIN 0x00000003 688c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_INBUFGAIN_S 0 698c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_PWDDAC 0x00002000 708c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_PWDBANDGAP 0x00004000 718c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL_OFF_PWDADC 0x00008000 728c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL_ON_INBUFGAIN 0x00030000 738c2ecf20Sopenharmony_ci#define AR_PHY_ADC_CTL_ON_INBUFGAIN_S 16 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci#define AR_PHY_ADC_SERIAL_CTL 0x9830 768c2ecf20Sopenharmony_ci#define AR_PHY_SEL_INTERNAL_ADDAC 0x00000000 778c2ecf20Sopenharmony_ci#define AR_PHY_SEL_EXTERNAL_RADIO 0x00000001 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4 0x9834 808c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAB_OFF 0xFF000000 818c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAB_OFF_S 24 828c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAA_OFF 0x00FF0000 838c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_TX_END_XPAA_OFF_S 16 848c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAB_ON 0x0000FF00 858c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAB_ON_S 8 868c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAA_ON 0x000000FF 878c2ecf20Sopenharmony_ci#define AR_PHY_RF_CTL4_FRAME_XPAA_ON_S 0 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#define AR_PHY_TSTDAC_CONST 0x983c 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci#define AR_PHY_SETTLING 0x9844 928c2ecf20Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH 0x00003F80 938c2ecf20Sopenharmony_ci#define AR_PHY_SETTLING_SWITCH_S 7 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN 0x9848 968c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN 0x0003F000 978c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_ATTEN_S 12 988c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX 0x007C0000 998c2ecf20Sopenharmony_ci#define AR_PHY_RXGAIN_TXRX_RF_MAX_S 18 1008c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN 0x00003F80 1018c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_ATTEN_S 7 1028c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN 0x001FC000 1038c2ecf20Sopenharmony_ci#define AR9280_PHY_RXGAIN_TXRX_MARGIN_S 14 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ 0x9850 1068c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC 0x000000FF 1078c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_ADC_S 0 1088c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA 0x0000FF00 1098c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_PGA_S 8 1108c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES 0x0FF00000 1118c2ecf20Sopenharmony_ci#define AR_PHY_DESIRED_SZ_TOT_DES_S 20 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG 0x9858 1148c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP 0x0003F000 1158c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_S 12 1168c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR 0x03FC0000 1178c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRPWR_S 18 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_LOW 0x9840 1208c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_LOW 0x00000FC0L 1218c2ecf20Sopenharmony_ci#define AR_PHY_FIND_SIG_FIRSTEP_LOW_S 6 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci#define AR_PHY_AGC_CTL1 0x985C 1248c2ecf20Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_LOW 0x00007F80 1258c2ecf20Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_LOW_S 7 1268c2ecf20Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_HIGH 0x003F8000 1278c2ecf20Sopenharmony_ci#define AR_PHY_AGC_CTL1_COARSE_HIGH_S 15 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci#define AR_PHY_CCA 0x9864 1308c2ecf20Sopenharmony_ci#define AR_PHY_MINCCA_PWR 0x0FF80000 1318c2ecf20Sopenharmony_ci#define AR_PHY_MINCCA_PWR_S 19 1328c2ecf20Sopenharmony_ci#define AR_PHY_CCA_THRESH62 0x0007F000 1338c2ecf20Sopenharmony_ci#define AR_PHY_CCA_THRESH62_S 12 1348c2ecf20Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR 0x1FF00000 1358c2ecf20Sopenharmony_ci#define AR9280_PHY_MINCCA_PWR_S 20 1368c2ecf20Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62 0x000FF000 1378c2ecf20Sopenharmony_ci#define AR9280_PHY_CCA_THRESH62_S 12 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW 0x986C 1408c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW 0x00000001 1418c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW 0x00003F00 1428c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW_S 8 1438c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW 0x001FC000 1448c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW_S 14 1458c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW 0x0FE00000 1468c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW_S 21 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR 0x9868 1498c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR 0x0000001F 1508c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2COUNT_THR_S 0 1518c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH 0x00FE0000 1528c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M1_THRESH_S 17 1538c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH 0x7F000000 1548c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_M2_THRESH_S 24 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci#define AR_PHY_SLEEP_CTR_CONTROL 0x9870 1578c2ecf20Sopenharmony_ci#define AR_PHY_SLEEP_CTR_LIMIT 0x9874 1588c2ecf20Sopenharmony_ci#define AR_PHY_SYNTH_CONTROL 0x9874 1598c2ecf20Sopenharmony_ci#define AR_PHY_SLEEP_SCAL 0x9878 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci#define AR_PHY_PLL_CTL 0x987c 1628c2ecf20Sopenharmony_ci#define AR_PHY_PLL_CTL_40 0xaa 1638c2ecf20Sopenharmony_ci#define AR_PHY_PLL_CTL_40_5413 0x04 1648c2ecf20Sopenharmony_ci#define AR_PHY_PLL_CTL_44 0xab 1658c2ecf20Sopenharmony_ci#define AR_PHY_PLL_CTL_44_2133 0xeb 1668c2ecf20Sopenharmony_ci#define AR_PHY_PLL_CTL_40_2133 0xea 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN 0x9910 /* AR9280 spectral scan configuration register */ 1698c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENABLE 0x1 1708c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENA 0x00000001 /* Enable spectral scan, reg 68, bit 0 */ 1718c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ENA_S 0 /* Enable spectral scan, reg 68, bit 0 */ 1728c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE 0x00000002 /* Activate spectral scan reg 68, bit 1*/ 1738c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_ACTIVE_S 1 /* Activate spectral scan reg 68, bit 1*/ 1748c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD 0x000000F0 /* Interval for FFT reports, reg 68, bits 4-7*/ 1758c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD_S 4 1768c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD 0x0000FF00 /* Interval for FFT reports, reg 68, bits 8-15*/ 1778c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PERIOD_S 8 1788c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT 0x00FF0000 /* Number of reports, reg 68, bits 16-23*/ 1798c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_S 16 1808c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_KIWI 0x0FFF0000 /* Number of reports, reg 68, bits 16-27*/ 1818c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_COUNT_KIWI_S 16 1828c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x01000000 /* Short repeat, reg 68, bit 24*/ 1838c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_KIWI 0x10000000 /* Short repeat, reg 68, bit 28*/ 1848c2ecf20Sopenharmony_ci#define AR_PHY_SPECTRAL_SCAN_PHYERR_MASK_SELECT 0x40000000 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci#define AR_PHY_RX_DELAY 0x9914 1878c2ecf20Sopenharmony_ci#define AR_PHY_SEARCH_START_DELAY 0x9918 1888c2ecf20Sopenharmony_ci#define AR_PHY_RX_DELAY_DELAY 0x00003FFF 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4(_i) (0x9920 + ((_i) << 12)) 1918c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF 0x01F 1928c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF_S 0 1938c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF 0x7E0 1948c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF_S 5 1958c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCORR_ENABLE 0x800 1968c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX 0xF000 1978c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX_S 12 1988c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_DO_CAL 0x10000 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_RSSI 0x80000000 2018c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_FILTER 0x40000000 2028c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK 0x20000000 2038c2ecf20Sopenharmony_ci#define AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK 0x10000000 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5 0x9924 2068c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1 0x000000FE 2078c2ecf20Sopenharmony_ci#define AR_PHY_TIMING5_CYCPWR_THR1_S 1 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE1 0x9934 2108c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE2 0x9938 2118c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX 0x993c 2128c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE_MAX_TPC_ENABLE 0x00000040 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci#define AR_PHY_FRAME_CTL 0x9944 2158c2ecf20Sopenharmony_ci#define AR_PHY_FRAME_CTL_TX_CLIP 0x00000038 2168c2ecf20Sopenharmony_ci#define AR_PHY_FRAME_CTL_TX_CLIP_S 3 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci#define AR_PHY_TXPWRADJ 0x994C 2198c2ecf20Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA 0x00000FC0 2208c2ecf20Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_GAIN_DELTA_S 6 2218c2ecf20Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX 0x00FC0000 2228c2ecf20Sopenharmony_ci#define AR_PHY_TXPWRADJ_CCK_PCDAC_INDEX_S 18 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_EXT 0x9940 2258c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_EXT_ENA 0x00004000 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0 0x9954 2288c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_ENA 0x00000001 2298c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_FFT_ENA 0x80000000 2308c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND 0x0000003e 2318c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_INBAND_S 1 2328c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI 0x00000FC0 2338c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_PRSSI_S 6 2348c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT 0x0003F000 2358c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_HEIGHT_S 12 2368c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI 0x00FC0000 2378c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_RRSSI_S 18 2388c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR 0x7F000000 2398c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_0_FIRPWR_S 24 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1 0x9958 2428c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000 2438c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_USE_FIR128 0x00400000 2448c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH 0x003F0000 2458c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELPWR_THRESH_S 16 2468c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_BLOCK_CHECK 0x00008000 2478c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_MAX_RRSSI 0x00004000 2488c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_CHECK 0x00002000 2498c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH 0x00001F00 2508c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_RELSTEP_THRESH_S 8 2518c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN 0x000000FF 2528c2ecf20Sopenharmony_ci#define AR_PHY_RADAR_1_MAXLEN_S 0 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_CHAIN_0 0x9960 2558c2ecf20Sopenharmony_ci#define AR_PHY_SWITCH_COM 0x9964 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA 0x996C 2588c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_SEL 0x00000003 2598c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_SEL_S 0 2608c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT2 0x000000F8 2618c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT2_S 3 2628c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT1 0x00001F00 2638c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_FILT1_S 8 2648c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_CLIP 0x01FFE000 2658c2ecf20Sopenharmony_ci#define AR_PHY_SIGMA_DELTA_ADC_CLIP_S 13 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci#define AR_PHY_RESTART 0x9970 2688c2ecf20Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC 0x001C0000 2698c2ecf20Sopenharmony_ci#define AR_PHY_RESTART_DIV_GC_S 18 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_REQ 0x997C 2728c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_REQ_EN 0x00000001 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci#define AR_PHY_TIMING7 0x9980 2758c2ecf20Sopenharmony_ci#define AR_PHY_TIMING8 0x9984 2768c2ecf20Sopenharmony_ci#define AR_PHY_TIMING8_PILOT_MASK_2 0x000FFFFF 2778c2ecf20Sopenharmony_ci#define AR_PHY_TIMING8_PILOT_MASK_2_S 0 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK2_1 0x9988 2808c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK2_2 0x998c 2818c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK2_3 0x9990 2828c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK2_4 0x9994 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK_1 0x9900 2858c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK_2 0x9904 2868c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK_3 0x9908 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci#define AR_PHY_MASK_CTL 0x990c 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK2_4_MASK_4 0x00003FFF 2918c2ecf20Sopenharmony_ci#define AR_PHY_BIN_MASK2_4_MASK_4_S 0 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci#define AR_PHY_TIMING9 0x9998 2948c2ecf20Sopenharmony_ci#define AR_PHY_TIMING10 0x999c 2958c2ecf20Sopenharmony_ci#define AR_PHY_TIMING10_PILOT_MASK_2 0x000FFFFF 2968c2ecf20Sopenharmony_ci#define AR_PHY_TIMING10_PILOT_MASK_2_S 0 2978c2ecf20Sopenharmony_ci 2988c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11 0x99a0 2998c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE 0x000FFFFF 3008c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_SPUR_DELTA_PHASE_S 0 3018c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_IN_AGC 0x40000000 3028c2ecf20Sopenharmony_ci#define AR_PHY_TIMING11_USE_SPUR_IN_SELFCOR 0x80000000 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_ci#define AR_PHY_RX_CHAINMASK 0x99a4 3058c2ecf20Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_GAIN_CORR(_i) (0x99b4 + ((_i) << 12)) 3068c2ecf20Sopenharmony_ci#define AR_PHY_NEW_ADC_GAIN_CORR_ENABLE 0x40000000 3078c2ecf20Sopenharmony_ci#define AR_PHY_NEW_ADC_DC_OFFSET_CORR_ENABLE 0x80000000 3088c2ecf20Sopenharmony_ci 3098c2ecf20Sopenharmony_ci#define AR_PHY_MULTICHAIN_GAIN_CTL 0x99ac 3108c2ecf20Sopenharmony_ci#define AR_PHY_9285_FAST_DIV_BIAS 0x00007E00 3118c2ecf20Sopenharmony_ci#define AR_PHY_9285_FAST_DIV_BIAS_S 9 3128c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_CTL_ALL 0x7f000000 3138c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_CTL 0x01000000 3148c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_CTL_S 24 3158c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_LNACONF 0x06000000 3168c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_LNACONF_S 25 3178c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_LNACONF 0x18000000 3188c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_LNACONF_S 27 3198c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_GAINTB 0x20000000 3208c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_ALT_GAINTB_S 29 3218c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_GAINTB 0x40000000 3228c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_MAIN_GAINTB_S 30 3238c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_GAINTB_0 0 3248c2ecf20Sopenharmony_ci#define AR_PHY_9285_ANT_DIV_GAINTB_1 1 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL1_ENABLE 0x0b 3278c2ecf20Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL2_ENABLE 0x09 3288c2ecf20Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL1_FIXED_A 0x04 3298c2ecf20Sopenharmony_ci#define ATH_BT_COEX_ANTDIV_CONTROL2_FIXED_A 0x09 3308c2ecf20Sopenharmony_ci#define ATH_BT_COEX_ANT_DIV_SWITCH_COM 0x66666666 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA0 0x99b8 3338c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62 0x000000FF 3348c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA0_THRESH62_S 0 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA 0x99bc 3378c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_CYCPWR_THR1 0x0000FE00 3388c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_CYCPWR_THR1_S 9 3398c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62 0x007F0000 3408c2ecf20Sopenharmony_ci#define AR_PHY_EXT_CCA_THRESH62_S 16 3418c2ecf20Sopenharmony_ci#define AR_PHY_EXT_TIMING5_CYCPWR_THR1 0x0000FE00L 3428c2ecf20Sopenharmony_ci#define AR_PHY_EXT_TIMING5_CYCPWR_THR1_S 9 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR 0xFF800000 3458c2ecf20Sopenharmony_ci#define AR_PHY_EXT_MINCCA_PWR_S 23 3468c2ecf20Sopenharmony_ci#define AR9280_PHY_EXT_MINCCA_PWR 0x01FF0000 3478c2ecf20Sopenharmony_ci#define AR9280_PHY_EXT_MINCCA_PWR_S 16 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT 0x99c0 3508c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH 0x0000007F 3518c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_S 0 3528c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH 0x00003F80 3538c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_S 7 3548c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW 0x001FC000 3558c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW_S 14 3568c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW 0x0FE00000 3578c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW_S 21 3588c2ecf20Sopenharmony_ci#define AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S 28 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ci#define AR_PHY_HALFGI 0x99D0 3618c2ecf20Sopenharmony_ci#define AR_PHY_HALFGI_DSC_MAN 0x0007FFF0 3628c2ecf20Sopenharmony_ci#define AR_PHY_HALFGI_DSC_MAN_S 4 3638c2ecf20Sopenharmony_ci#define AR_PHY_HALFGI_DSC_EXP 0x0000000F 3648c2ecf20Sopenharmony_ci#define AR_PHY_HALFGI_DSC_EXP_S 0 3658c2ecf20Sopenharmony_ci 3668c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY 0x99DC 3678c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_MEMORY_CAPTURE_MASK 0x0001 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci#define AR_PHY_HEAVY_CLIP_ENABLE 0x99E0 3708c2ecf20Sopenharmony_ci 3718c2ecf20Sopenharmony_ci#define AR_PHY_HEAVY_CLIP_FACTOR_RIFS 0x99EC 3728c2ecf20Sopenharmony_ci#define AR_PHY_RIFS_INIT_DELAY 0x03ff0000 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ci#define AR_PHY_M_SLEEP 0x99f0 3758c2ecf20Sopenharmony_ci#define AR_PHY_REFCLKDLY 0x99f4 3768c2ecf20Sopenharmony_ci#define AR_PHY_REFCLKPD 0x99f8 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE 0x99f0 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_IQ 0x00000000 3818c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_ADC_GAIN 0x00000001 3828c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_PER 0x00000002 3838c2ecf20Sopenharmony_ci#define AR_PHY_CALMODE_ADC_DC_INIT 0x00000003 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_0(_i) (0x9c10 + ((_i) << 12)) 3868c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_1(_i) (0x9c14 + ((_i) << 12)) 3878c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_2(_i) (0x9c18 + ((_i) << 12)) 3888c2ecf20Sopenharmony_ci#define AR_PHY_CAL_MEAS_3(_i) (0x9c1c + ((_i) << 12)) 3898c2ecf20Sopenharmony_ci 3908c2ecf20Sopenharmony_ci#define AR_PHY_CURRENT_RSSI 0x9c1c 3918c2ecf20Sopenharmony_ci#define AR9280_PHY_CURRENT_RSSI 0x9c3c 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_GRANT 0x9C20 3948c2ecf20Sopenharmony_ci#define AR_PHY_RFBUS_GRANT_EN 0x00000001 3958c2ecf20Sopenharmony_ci 3968c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF 0x9CF4 3978c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN_DIFF_UPPER_LIMIT 320 3988c2ecf20Sopenharmony_ci 3998c2ecf20Sopenharmony_ci#define AR_PHY_CHAN_INFO_GAIN 0x9CFC 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ci#define AR_PHY_MODE 0xA200 4028c2ecf20Sopenharmony_ci#define AR_PHY_MODE_ASYNCFIFO 0x80 4038c2ecf20Sopenharmony_ci#define AR_PHY_MODE_AR2133 0x08 4048c2ecf20Sopenharmony_ci#define AR_PHY_MODE_AR5111 0x00 4058c2ecf20Sopenharmony_ci#define AR_PHY_MODE_AR5112 0x08 4068c2ecf20Sopenharmony_ci#define AR_PHY_MODE_DYNAMIC 0x04 4078c2ecf20Sopenharmony_ci#define AR_PHY_MODE_RF2GHZ 0x02 4088c2ecf20Sopenharmony_ci#define AR_PHY_MODE_RF5GHZ 0x00 4098c2ecf20Sopenharmony_ci#define AR_PHY_MODE_CCK 0x01 4108c2ecf20Sopenharmony_ci#define AR_PHY_MODE_OFDM 0x00 4118c2ecf20Sopenharmony_ci#define AR_PHY_MODE_DYN_CCK_DISABLE 0x100 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL 0xA204 4148c2ecf20Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_JAPAN 0x00000010 4158c2ecf20Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK 0x0000000C 4168c2ecf20Sopenharmony_ci#define AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK_S 2 4178c2ecf20Sopenharmony_ci 4188c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT 0xA208 4198c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK 0x0000003F 4208c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK_S 0 4218c2ecf20Sopenharmony_ci/* [12:6] settling time for antenna switch */ 4228c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME 0x00001FC0 4238c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_ANT_SWITCH_TIME_S 6 4248c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV 0x2000 4258c2ecf20Sopenharmony_ci#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV_S 13 4268c2ecf20Sopenharmony_ci 4278c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ 0xA20C 4288c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_RXTX_MARGIN 0x00FC0000 4298c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_RXTX_MARGIN_S 18 4308c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_MARGIN 0x00003C00 4318c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_MARGIN_S 10 4328c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_ATTEN 0x0000001F 4338c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_BSW_ATTEN_S 0 4348c2ecf20Sopenharmony_ci 4358c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN 0x003E0000 4368c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN_S 17 4378c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN 0x0001F000 4388c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN_S 12 4398c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_DB 0x00000FC0 4408c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN2_DB_S 6 4418c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_DB 0x0000003F 4428c2ecf20Sopenharmony_ci#define AR_PHY_GAIN_2GHZ_XATTEN1_DB_S 0 4438c2ecf20Sopenharmony_ci 4448c2ecf20Sopenharmony_ci#define AR_PHY_CCK_RXCTRL4 0xA21C 4458c2ecf20Sopenharmony_ci#define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT 0x01F80000 4468c2ecf20Sopenharmony_ci#define AR_PHY_CCK_RXCTRL4_FREQ_EST_SHORT_S 19 4478c2ecf20Sopenharmony_ci 4488c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK 0xA228 4498c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_EN_RSSI_THR 0x00000200 4508c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR 0x0001FC00 4518c2ecf20Sopenharmony_ci#define AR_PHY_DAG_CTRLCCK_RSSI_THR_S 10 4528c2ecf20Sopenharmony_ci 4538c2ecf20Sopenharmony_ci#define AR_PHY_FORCE_CLKEN_CCK 0xA22C 4548c2ecf20Sopenharmony_ci#define AR_PHY_FORCE_CLKEN_CCK_MRC_MUX 0x00000040 4558c2ecf20Sopenharmony_ci 4568c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE3 0xA234 4578c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE4 0xA238 4588c2ecf20Sopenharmony_ci 4598c2ecf20Sopenharmony_ci#define AR_PHY_SCRM_SEQ_XR 0xA23C 4608c2ecf20Sopenharmony_ci#define AR_PHY_HEADER_DETECT_XR 0xA240 4618c2ecf20Sopenharmony_ci#define AR_PHY_CHIRP_DETECTED_XR 0xA244 4628c2ecf20Sopenharmony_ci#define AR_PHY_BLUETOOTH 0xA254 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1 0xA258 4658c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN 0x0000c000 4668c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_NUM_PD_GAIN_S 14 4678c2ecf20Sopenharmony_ci 4688c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1 0x00030000 4698c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_1_S 16 4708c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2 0x000C0000 4718c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_2_S 18 4728c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3 0x00300000 4738c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_GAIN_3_S 20 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE 0x00400000 4768c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG1_PD_CAL_ENABLE_S 22 4778c2ecf20Sopenharmony_ci 4788c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL4 0xa264 4798c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_VALID 0x00000001 4808c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_VALID_S 0 4818c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_OUT 0x000001FE 4828c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_PD_AVG_OUT_S 1 4838c2ecf20Sopenharmony_ci 4848c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL6_0 0xa270 4858c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL6_1 0xb270 4868c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_ERR_EST_MODE 0x03000000 4878c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_ERR_EST_MODE_S 24 4888c2ecf20Sopenharmony_ci 4898c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL7 0xa274 4908c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_INIT_TX_GAIN 0x01F80000 4918c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_INIT_TX_GAIN_S 19 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL8 0xa278 4948c2ecf20Sopenharmony_ci 4958c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL9 0xa27C 4968c2ecf20Sopenharmony_ci 4978c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL10 0xa394 4988c2ecf20Sopenharmony_ci#define AR_PHY_TX_DESIRED_SCALE_CCK 0x00007C00 4998c2ecf20Sopenharmony_ci#define AR_PHY_TX_DESIRED_SCALE_CCK_S 10 5008c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL 0x80000000 5018c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL_S 31 5028c2ecf20Sopenharmony_ci 5038c2ecf20Sopenharmony_ci#define AR_PHY_TX_GAIN_TBL1 0xa300 5048c2ecf20Sopenharmony_ci#define AR_PHY_TX_GAIN 0x0007F000 5058c2ecf20Sopenharmony_ci#define AR_PHY_TX_GAIN_S 12 5068c2ecf20Sopenharmony_ci 5078c2ecf20Sopenharmony_ci#define AR_PHY_CH0_TX_PWRCTRL11 0xa398 5088c2ecf20Sopenharmony_ci#define AR_PHY_CH1_TX_PWRCTRL11 0xb398 5098c2ecf20Sopenharmony_ci#define AR_PHY_CH0_TX_PWRCTRL12 0xa3dc 5108c2ecf20Sopenharmony_ci#define AR_PHY_CH0_TX_PWRCTRL13 0xa3e0 5118c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP 0x0000FC00 5128c2ecf20Sopenharmony_ci#define AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP_S 10 5138c2ecf20Sopenharmony_ci 5148c2ecf20Sopenharmony_ci#define AR_PHY_VIT_MASK2_M_46_61 0xa3a0 5158c2ecf20Sopenharmony_ci#define AR_PHY_MASK2_M_31_45 0xa3a4 5168c2ecf20Sopenharmony_ci#define AR_PHY_MASK2_M_16_30 0xa3a8 5178c2ecf20Sopenharmony_ci#define AR_PHY_MASK2_M_00_15 0xa3ac 5188c2ecf20Sopenharmony_ci#define AR_PHY_MASK2_P_15_01 0xa3b8 5198c2ecf20Sopenharmony_ci#define AR_PHY_MASK2_P_30_16 0xa3bc 5208c2ecf20Sopenharmony_ci#define AR_PHY_MASK2_P_45_31 0xa3c0 5218c2ecf20Sopenharmony_ci#define AR_PHY_MASK2_P_61_45 0xa3c4 5228c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG 0x994c 5238c2ecf20Sopenharmony_ci 5248c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL (0xFF << 18) 5258c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_CNTL_S 18 5268c2ecf20Sopenharmony_ci 5278c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM 0x20000 5288c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_SELECT (0xFF << 9) 5298c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_MASK_RATE_SELECT_S 9 5308c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_ENABLE_VIT_SPUR_RSSI 0x100 5318c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH 0x7F 5328c2ecf20Sopenharmony_ci#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH_S 0 5338c2ecf20Sopenharmony_ci 5348c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_MASK_01_30 0xa3b0 5358c2ecf20Sopenharmony_ci#define AR_PHY_PILOT_MASK_31_60 0xa3b4 5368c2ecf20Sopenharmony_ci 5378c2ecf20Sopenharmony_ci#define AR_PHY_CHANNEL_MASK_01_30 0x99d4 5388c2ecf20Sopenharmony_ci#define AR_PHY_CHANNEL_MASK_31_60 0x99d8 5398c2ecf20Sopenharmony_ci 5408c2ecf20Sopenharmony_ci#define AR_PHY_ANALOG_SWAP 0xa268 5418c2ecf20Sopenharmony_ci#define AR_PHY_SWAP_ALT_CHAIN 0x00000040 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5 0xA26C 5448c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP 0x0000000F 5458c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP_S 0 5468c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1 0x000003F0 5478c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1_S 4 5488c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2 0x0000FC00 5498c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2_S 10 5508c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3 0x003F0000 5518c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3_S 16 5528c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4 0x0FC00000 5538c2ecf20Sopenharmony_ci#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4_S 22 5548c2ecf20Sopenharmony_ci 5558c2ecf20Sopenharmony_ci/* Carrier leak calibration control, do it after AGC calibration */ 5568c2ecf20Sopenharmony_ci#define AR_PHY_CL_CAL_CTL 0xA358 5578c2ecf20Sopenharmony_ci#define AR_PHY_CL_CAL_ENABLE 0x00000002 5588c2ecf20Sopenharmony_ci#define AR_PHY_PARALLEL_CAL_ENABLE 0x00000001 5598c2ecf20Sopenharmony_ci 5608c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE5 0xA38C 5618c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE6 0xA390 5628c2ecf20Sopenharmony_ci 5638c2ecf20Sopenharmony_ci#define AR_PHY_CAL_CHAINMASK 0xA39C 5648c2ecf20Sopenharmony_ci 5658c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_SUB 0xA3C8 5668c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE7 0xA3CC 5678c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE8 0xA3D0 5688c2ecf20Sopenharmony_ci#define AR_PHY_POWER_TX_RATE9 0xA3D4 5698c2ecf20Sopenharmony_ci 5708c2ecf20Sopenharmony_ci#define AR_PHY_XPA_CFG 0xA3D8 5718c2ecf20Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG 0x000000001 5728c2ecf20Sopenharmony_ci#define AR_PHY_FORCE_XPA_CFG_S 0 5738c2ecf20Sopenharmony_ci 5748c2ecf20Sopenharmony_ci#define AR_PHY_CH1_CCA 0xa864 5758c2ecf20Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR 0x0FF80000 5768c2ecf20Sopenharmony_ci#define AR_PHY_CH1_MINCCA_PWR_S 19 5778c2ecf20Sopenharmony_ci#define AR9280_PHY_CH1_MINCCA_PWR 0x1FF00000 5788c2ecf20Sopenharmony_ci#define AR9280_PHY_CH1_MINCCA_PWR_S 20 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_ci#define AR_PHY_CH2_CCA 0xb864 5818c2ecf20Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR 0x0FF80000 5828c2ecf20Sopenharmony_ci#define AR_PHY_CH2_MINCCA_PWR_S 19 5838c2ecf20Sopenharmony_ci 5848c2ecf20Sopenharmony_ci#define AR_PHY_CH1_EXT_CCA 0xa9bc 5858c2ecf20Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR 0xFF800000 5868c2ecf20Sopenharmony_ci#define AR_PHY_CH1_EXT_MINCCA_PWR_S 23 5878c2ecf20Sopenharmony_ci#define AR9280_PHY_CH1_EXT_MINCCA_PWR 0x01FF0000 5888c2ecf20Sopenharmony_ci#define AR9280_PHY_CH1_EXT_MINCCA_PWR_S 16 5898c2ecf20Sopenharmony_ci 5908c2ecf20Sopenharmony_ci#define AR_PHY_CH2_EXT_CCA 0xb9bc 5918c2ecf20Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR 0xFF800000 5928c2ecf20Sopenharmony_ci#define AR_PHY_CH2_EXT_MINCCA_PWR_S 23 5938c2ecf20Sopenharmony_ci 5948c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_5416_2GHZ -90 5958c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_5416_5GHZ -100 5968c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ -100 5978c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ -110 5988c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ -80 5998c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ -90 6008c2ecf20Sopenharmony_ci 6018c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9280_2GHZ -112 6028c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9280_5GHZ -112 6038c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9280_2GHZ -127 6048c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9280_5GHZ -122 6058c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9280_2GHZ -97 6068c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9280_5GHZ -102 6078c2ecf20Sopenharmony_ci 6088c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9285_2GHZ -118 6098c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ -127 6108c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ -108 6118c2ecf20Sopenharmony_ci 6128c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9271_2GHZ -118 6138c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ -127 6148c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ -116 6158c2ecf20Sopenharmony_ci 6168c2ecf20Sopenharmony_ci#define AR_PHY_CCA_NOM_VAL_9287_2GHZ -112 6178c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ -127 6188c2ecf20Sopenharmony_ci#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ -97 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ci#endif 621