18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Initial register settings functions 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (c) 2004-2007 Reyk Floeter <reyk@openbsd.org> 58c2ecf20Sopenharmony_ci * Copyright (c) 2006-2009 Nick Kossifidis <mickflemm@gmail.com> 68c2ecf20Sopenharmony_ci * Copyright (c) 2007-2008 Jiri Slaby <jirislaby@gmail.com> 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and distribute this software for any 98c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 108c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 138c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 148c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 158c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 168c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 178c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 188c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 198c2ecf20Sopenharmony_ci * 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#include "ath5k.h" 258c2ecf20Sopenharmony_ci#include "reg.h" 268c2ecf20Sopenharmony_ci#include "debug.h" 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/** 298c2ecf20Sopenharmony_ci * struct ath5k_ini - Mode-independent initial register writes 308c2ecf20Sopenharmony_ci * @ini_register: Register address 318c2ecf20Sopenharmony_ci * @ini_value: Default value 328c2ecf20Sopenharmony_ci * @ini_mode: 0 to write 1 to read (and clear) 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_cistruct ath5k_ini { 358c2ecf20Sopenharmony_ci u16 ini_register; 368c2ecf20Sopenharmony_ci u32 ini_value; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci enum { 398c2ecf20Sopenharmony_ci AR5K_INI_WRITE = 0, /* Default */ 408c2ecf20Sopenharmony_ci AR5K_INI_READ = 1, 418c2ecf20Sopenharmony_ci } ini_mode; 428c2ecf20Sopenharmony_ci}; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/** 458c2ecf20Sopenharmony_ci * struct ath5k_ini_mode - Mode specific initial register values 468c2ecf20Sopenharmony_ci * @mode_register: Register address 478c2ecf20Sopenharmony_ci * @mode_value: Set of values for each enum ath5k_driver_mode 488c2ecf20Sopenharmony_ci */ 498c2ecf20Sopenharmony_cistruct ath5k_ini_mode { 508c2ecf20Sopenharmony_ci u16 mode_register; 518c2ecf20Sopenharmony_ci u32 mode_value[3]; 528c2ecf20Sopenharmony_ci}; 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci/* Initial register settings for AR5210 */ 558c2ecf20Sopenharmony_cistatic const struct ath5k_ini ar5210_ini[] = { 568c2ecf20Sopenharmony_ci /* PCU and MAC registers */ 578c2ecf20Sopenharmony_ci { AR5K_NOQCU_TXDP0, 0 }, 588c2ecf20Sopenharmony_ci { AR5K_NOQCU_TXDP1, 0 }, 598c2ecf20Sopenharmony_ci { AR5K_RXDP, 0 }, 608c2ecf20Sopenharmony_ci { AR5K_CR, 0 }, 618c2ecf20Sopenharmony_ci { AR5K_ISR, 0, AR5K_INI_READ }, 628c2ecf20Sopenharmony_ci { AR5K_IMR, 0 }, 638c2ecf20Sopenharmony_ci { AR5K_IER, AR5K_IER_DISABLE }, 648c2ecf20Sopenharmony_ci { AR5K_BSR, 0, AR5K_INI_READ }, 658c2ecf20Sopenharmony_ci { AR5K_TXCFG, AR5K_DMASIZE_128B }, 668c2ecf20Sopenharmony_ci { AR5K_RXCFG, AR5K_DMASIZE_128B }, 678c2ecf20Sopenharmony_ci { AR5K_CFG, AR5K_INIT_CFG }, 688c2ecf20Sopenharmony_ci { AR5K_TOPS, 8 }, 698c2ecf20Sopenharmony_ci { AR5K_RXNOFRM, 8 }, 708c2ecf20Sopenharmony_ci { AR5K_RPGTO, 0 }, 718c2ecf20Sopenharmony_ci { AR5K_TXNOFRM, 0 }, 728c2ecf20Sopenharmony_ci { AR5K_SFR, 0 }, 738c2ecf20Sopenharmony_ci { AR5K_MIBC, 0 }, 748c2ecf20Sopenharmony_ci { AR5K_MISC, 0 }, 758c2ecf20Sopenharmony_ci { AR5K_RX_FILTER_5210, 0 }, 768c2ecf20Sopenharmony_ci { AR5K_MCAST_FILTER0_5210, 0 }, 778c2ecf20Sopenharmony_ci { AR5K_MCAST_FILTER1_5210, 0 }, 788c2ecf20Sopenharmony_ci { AR5K_TX_MASK0, 0 }, 798c2ecf20Sopenharmony_ci { AR5K_TX_MASK1, 0 }, 808c2ecf20Sopenharmony_ci { AR5K_CLR_TMASK, 0 }, 818c2ecf20Sopenharmony_ci { AR5K_TRIG_LVL, AR5K_TUNE_MIN_TX_FIFO_THRES }, 828c2ecf20Sopenharmony_ci { AR5K_DIAG_SW_5210, 0 }, 838c2ecf20Sopenharmony_ci { AR5K_RSSI_THR, AR5K_TUNE_RSSI_THRES }, 848c2ecf20Sopenharmony_ci { AR5K_TSF_L32_5210, 0 }, 858c2ecf20Sopenharmony_ci { AR5K_TIMER0_5210, 0 }, 868c2ecf20Sopenharmony_ci { AR5K_TIMER1_5210, 0xffffffff }, 878c2ecf20Sopenharmony_ci { AR5K_TIMER2_5210, 0xffffffff }, 888c2ecf20Sopenharmony_ci { AR5K_TIMER3_5210, 1 }, 898c2ecf20Sopenharmony_ci { AR5K_CFP_DUR_5210, 0 }, 908c2ecf20Sopenharmony_ci { AR5K_CFP_PERIOD_5210, 0 }, 918c2ecf20Sopenharmony_ci /* PHY registers */ 928c2ecf20Sopenharmony_ci { AR5K_PHY(0), 0x00000047 }, 938c2ecf20Sopenharmony_ci { AR5K_PHY_AGC, 0x00000000 }, 948c2ecf20Sopenharmony_ci { AR5K_PHY(3), 0x09848ea6 }, 958c2ecf20Sopenharmony_ci { AR5K_PHY(4), 0x3d32e000 }, 968c2ecf20Sopenharmony_ci { AR5K_PHY(5), 0x0000076b }, 978c2ecf20Sopenharmony_ci { AR5K_PHY_ACT, AR5K_PHY_ACT_DISABLE }, 988c2ecf20Sopenharmony_ci { AR5K_PHY(8), 0x02020200 }, 998c2ecf20Sopenharmony_ci { AR5K_PHY(9), 0x00000e0e }, 1008c2ecf20Sopenharmony_ci { AR5K_PHY(10), 0x0a020201 }, 1018c2ecf20Sopenharmony_ci { AR5K_PHY(11), 0x00036ffc }, 1028c2ecf20Sopenharmony_ci { AR5K_PHY(12), 0x00000000 }, 1038c2ecf20Sopenharmony_ci { AR5K_PHY(13), 0x00000e0e }, 1048c2ecf20Sopenharmony_ci { AR5K_PHY(14), 0x00000007 }, 1058c2ecf20Sopenharmony_ci { AR5K_PHY(15), 0x00020100 }, 1068c2ecf20Sopenharmony_ci { AR5K_PHY(16), 0x89630000 }, 1078c2ecf20Sopenharmony_ci { AR5K_PHY(17), 0x1372169c }, 1088c2ecf20Sopenharmony_ci { AR5K_PHY(18), 0x0018b633 }, 1098c2ecf20Sopenharmony_ci { AR5K_PHY(19), 0x1284613c }, 1108c2ecf20Sopenharmony_ci { AR5K_PHY(20), 0x0de8b8e0 }, 1118c2ecf20Sopenharmony_ci { AR5K_PHY(21), 0x00074859 }, 1128c2ecf20Sopenharmony_ci { AR5K_PHY(22), 0x7e80beba }, 1138c2ecf20Sopenharmony_ci { AR5K_PHY(23), 0x313a665e }, 1148c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCTL, 0x00001d08 }, 1158c2ecf20Sopenharmony_ci { AR5K_PHY(25), 0x0001ce00 }, 1168c2ecf20Sopenharmony_ci { AR5K_PHY(26), 0x409a4190 }, 1178c2ecf20Sopenharmony_ci { AR5K_PHY(28), 0x0000000f }, 1188c2ecf20Sopenharmony_ci { AR5K_PHY(29), 0x00000080 }, 1198c2ecf20Sopenharmony_ci { AR5K_PHY(30), 0x00000004 }, 1208c2ecf20Sopenharmony_ci { AR5K_PHY(31), 0x00000018 }, /* 0x987c */ 1218c2ecf20Sopenharmony_ci { AR5K_PHY(64), 0x00000000 }, /* 0x9900 */ 1228c2ecf20Sopenharmony_ci { AR5K_PHY(65), 0x00000000 }, 1238c2ecf20Sopenharmony_ci { AR5K_PHY(66), 0x00000000 }, 1248c2ecf20Sopenharmony_ci { AR5K_PHY(67), 0x00800000 }, 1258c2ecf20Sopenharmony_ci { AR5K_PHY(68), 0x00000003 }, 1268c2ecf20Sopenharmony_ci /* BB gain table (64bytes) */ 1278c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(0), 0x00000000 }, 1288c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(1), 0x00000020 }, 1298c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(2), 0x00000010 }, 1308c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(3), 0x00000030 }, 1318c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(4), 0x00000008 }, 1328c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(5), 0x00000028 }, 1338c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(6), 0x00000028 }, 1348c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(7), 0x00000004 }, 1358c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(8), 0x00000024 }, 1368c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(9), 0x00000014 }, 1378c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(10), 0x00000034 }, 1388c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(11), 0x0000000c }, 1398c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(12), 0x0000002c }, 1408c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(13), 0x00000002 }, 1418c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(14), 0x00000022 }, 1428c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(15), 0x00000012 }, 1438c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(16), 0x00000032 }, 1448c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(17), 0x0000000a }, 1458c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(18), 0x0000002a }, 1468c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(19), 0x00000001 }, 1478c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(20), 0x00000021 }, 1488c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(21), 0x00000011 }, 1498c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(22), 0x00000031 }, 1508c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(23), 0x00000009 }, 1518c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(24), 0x00000029 }, 1528c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(25), 0x00000005 }, 1538c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(26), 0x00000025 }, 1548c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(27), 0x00000015 }, 1558c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(28), 0x00000035 }, 1568c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(29), 0x0000000d }, 1578c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(30), 0x0000002d }, 1588c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(31), 0x00000003 }, 1598c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(32), 0x00000023 }, 1608c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(33), 0x00000013 }, 1618c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(34), 0x00000033 }, 1628c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(35), 0x0000000b }, 1638c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(36), 0x0000002b }, 1648c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(37), 0x00000007 }, 1658c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(38), 0x00000027 }, 1668c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(39), 0x00000017 }, 1678c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(40), 0x00000037 }, 1688c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(41), 0x0000000f }, 1698c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(42), 0x0000002f }, 1708c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(43), 0x0000002f }, 1718c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(44), 0x0000002f }, 1728c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(45), 0x0000002f }, 1738c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(46), 0x0000002f }, 1748c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(47), 0x0000002f }, 1758c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(48), 0x0000002f }, 1768c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(49), 0x0000002f }, 1778c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(50), 0x0000002f }, 1788c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(51), 0x0000002f }, 1798c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(52), 0x0000002f }, 1808c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(53), 0x0000002f }, 1818c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(54), 0x0000002f }, 1828c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(55), 0x0000002f }, 1838c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(56), 0x0000002f }, 1848c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(57), 0x0000002f }, 1858c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(58), 0x0000002f }, 1868c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(59), 0x0000002f }, 1878c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(60), 0x0000002f }, 1888c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(61), 0x0000002f }, 1898c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(62), 0x0000002f }, 1908c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(63), 0x0000002f }, 1918c2ecf20Sopenharmony_ci /* 5110 RF gain table (64btes) */ 1928c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(0), 0x0000001d }, 1938c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(1), 0x0000005d }, 1948c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(2), 0x0000009d }, 1958c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(3), 0x000000dd }, 1968c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(4), 0x0000011d }, 1978c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(5), 0x00000021 }, 1988c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(6), 0x00000061 }, 1998c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(7), 0x000000a1 }, 2008c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(8), 0x000000e1 }, 2018c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(9), 0x00000031 }, 2028c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(10), 0x00000071 }, 2038c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(11), 0x000000b1 }, 2048c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(12), 0x0000001c }, 2058c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(13), 0x0000005c }, 2068c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(14), 0x00000029 }, 2078c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(15), 0x00000069 }, 2088c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(16), 0x000000a9 }, 2098c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(17), 0x00000020 }, 2108c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(18), 0x00000019 }, 2118c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(19), 0x00000059 }, 2128c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(20), 0x00000099 }, 2138c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(21), 0x00000030 }, 2148c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(22), 0x00000005 }, 2158c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(23), 0x00000025 }, 2168c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(24), 0x00000065 }, 2178c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(25), 0x000000a5 }, 2188c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(26), 0x00000028 }, 2198c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(27), 0x00000068 }, 2208c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(28), 0x0000001f }, 2218c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(29), 0x0000001e }, 2228c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(30), 0x00000018 }, 2238c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(31), 0x00000058 }, 2248c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(32), 0x00000098 }, 2258c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(33), 0x00000003 }, 2268c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(34), 0x00000004 }, 2278c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(35), 0x00000044 }, 2288c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(36), 0x00000084 }, 2298c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(37), 0x00000013 }, 2308c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(38), 0x00000012 }, 2318c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(39), 0x00000052 }, 2328c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(40), 0x00000092 }, 2338c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(41), 0x000000d2 }, 2348c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(42), 0x0000002b }, 2358c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(43), 0x0000002a }, 2368c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(44), 0x0000006a }, 2378c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(45), 0x000000aa }, 2388c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(46), 0x0000001b }, 2398c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(47), 0x0000001a }, 2408c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(48), 0x0000005a }, 2418c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(49), 0x0000009a }, 2428c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(50), 0x000000da }, 2438c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(51), 0x00000006 }, 2448c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(52), 0x00000006 }, 2458c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(53), 0x00000006 }, 2468c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(54), 0x00000006 }, 2478c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(55), 0x00000006 }, 2488c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(56), 0x00000006 }, 2498c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(57), 0x00000006 }, 2508c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(58), 0x00000006 }, 2518c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(59), 0x00000006 }, 2528c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(60), 0x00000006 }, 2538c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(61), 0x00000006 }, 2548c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(62), 0x00000006 }, 2558c2ecf20Sopenharmony_ci { AR5K_RF_GAIN(63), 0x00000006 }, 2568c2ecf20Sopenharmony_ci /* PHY activation */ 2578c2ecf20Sopenharmony_ci { AR5K_PHY(53), 0x00000020 }, 2588c2ecf20Sopenharmony_ci { AR5K_PHY(51), 0x00000004 }, 2598c2ecf20Sopenharmony_ci { AR5K_PHY(50), 0x00060106 }, 2608c2ecf20Sopenharmony_ci { AR5K_PHY(39), 0x0000006d }, 2618c2ecf20Sopenharmony_ci { AR5K_PHY(48), 0x00000000 }, 2628c2ecf20Sopenharmony_ci { AR5K_PHY(52), 0x00000014 }, 2638c2ecf20Sopenharmony_ci { AR5K_PHY_ACT, AR5K_PHY_ACT_ENABLE }, 2648c2ecf20Sopenharmony_ci}; 2658c2ecf20Sopenharmony_ci 2668c2ecf20Sopenharmony_ci/* Initial register settings for AR5211 */ 2678c2ecf20Sopenharmony_cistatic const struct ath5k_ini ar5211_ini[] = { 2688c2ecf20Sopenharmony_ci { AR5K_RXDP, 0x00000000 }, 2698c2ecf20Sopenharmony_ci { AR5K_RTSD0, 0x84849c9c }, 2708c2ecf20Sopenharmony_ci { AR5K_RTSD1, 0x7c7c7c7c }, 2718c2ecf20Sopenharmony_ci { AR5K_RXCFG, 0x00000005 }, 2728c2ecf20Sopenharmony_ci { AR5K_MIBC, 0x00000000 }, 2738c2ecf20Sopenharmony_ci { AR5K_TOPS, 0x00000008 }, 2748c2ecf20Sopenharmony_ci { AR5K_RXNOFRM, 0x00000008 }, 2758c2ecf20Sopenharmony_ci { AR5K_TXNOFRM, 0x00000010 }, 2768c2ecf20Sopenharmony_ci { AR5K_RPGTO, 0x00000000 }, 2778c2ecf20Sopenharmony_ci { AR5K_RFCNT, 0x0000001f }, 2788c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(0), 0x00000000 }, 2798c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(1), 0x00000000 }, 2808c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(2), 0x00000000 }, 2818c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(3), 0x00000000 }, 2828c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(4), 0x00000000 }, 2838c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(5), 0x00000000 }, 2848c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(6), 0x00000000 }, 2858c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(7), 0x00000000 }, 2868c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(8), 0x00000000 }, 2878c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(9), 0x00000000 }, 2888c2ecf20Sopenharmony_ci { AR5K_DCU_FP, 0x00000000 }, 2898c2ecf20Sopenharmony_ci { AR5K_STA_ID1, 0x00000000 }, 2908c2ecf20Sopenharmony_ci { AR5K_BSS_ID0, 0x00000000 }, 2918c2ecf20Sopenharmony_ci { AR5K_BSS_ID1, 0x00000000 }, 2928c2ecf20Sopenharmony_ci { AR5K_RSSI_THR, 0x00000000 }, 2938c2ecf20Sopenharmony_ci { AR5K_CFP_PERIOD_5211, 0x00000000 }, 2948c2ecf20Sopenharmony_ci { AR5K_TIMER0_5211, 0x00000030 }, 2958c2ecf20Sopenharmony_ci { AR5K_TIMER1_5211, 0x0007ffff }, 2968c2ecf20Sopenharmony_ci { AR5K_TIMER2_5211, 0x01ffffff }, 2978c2ecf20Sopenharmony_ci { AR5K_TIMER3_5211, 0x00000031 }, 2988c2ecf20Sopenharmony_ci { AR5K_CFP_DUR_5211, 0x00000000 }, 2998c2ecf20Sopenharmony_ci { AR5K_RX_FILTER_5211, 0x00000000 }, 3008c2ecf20Sopenharmony_ci { AR5K_MCAST_FILTER0_5211, 0x00000000 }, 3018c2ecf20Sopenharmony_ci { AR5K_MCAST_FILTER1_5211, 0x00000002 }, 3028c2ecf20Sopenharmony_ci { AR5K_DIAG_SW_5211, 0x00000000 }, 3038c2ecf20Sopenharmony_ci { AR5K_ADDAC_TEST, 0x00000000 }, 3048c2ecf20Sopenharmony_ci { AR5K_DEFAULT_ANTENNA, 0x00000000 }, 3058c2ecf20Sopenharmony_ci /* PHY registers */ 3068c2ecf20Sopenharmony_ci { AR5K_PHY_AGC, 0x00000000 }, 3078c2ecf20Sopenharmony_ci { AR5K_PHY(3), 0x2d849093 }, 3088c2ecf20Sopenharmony_ci { AR5K_PHY(4), 0x7d32e000 }, 3098c2ecf20Sopenharmony_ci { AR5K_PHY(5), 0x00000f6b }, 3108c2ecf20Sopenharmony_ci { AR5K_PHY_ACT, 0x00000000 }, 3118c2ecf20Sopenharmony_ci { AR5K_PHY(11), 0x00026ffe }, 3128c2ecf20Sopenharmony_ci { AR5K_PHY(12), 0x00000000 }, 3138c2ecf20Sopenharmony_ci { AR5K_PHY(15), 0x00020100 }, 3148c2ecf20Sopenharmony_ci { AR5K_PHY(16), 0x206a017a }, 3158c2ecf20Sopenharmony_ci { AR5K_PHY(19), 0x1284613c }, 3168c2ecf20Sopenharmony_ci { AR5K_PHY(21), 0x00000859 }, 3178c2ecf20Sopenharmony_ci { AR5K_PHY(26), 0x409a4190 }, /* 0x9868 */ 3188c2ecf20Sopenharmony_ci { AR5K_PHY(27), 0x050cb081 }, 3198c2ecf20Sopenharmony_ci { AR5K_PHY(28), 0x0000000f }, 3208c2ecf20Sopenharmony_ci { AR5K_PHY(29), 0x00000080 }, 3218c2ecf20Sopenharmony_ci { AR5K_PHY(30), 0x0000000c }, 3228c2ecf20Sopenharmony_ci { AR5K_PHY(64), 0x00000000 }, 3238c2ecf20Sopenharmony_ci { AR5K_PHY(65), 0x00000000 }, 3248c2ecf20Sopenharmony_ci { AR5K_PHY(66), 0x00000000 }, 3258c2ecf20Sopenharmony_ci { AR5K_PHY(67), 0x00800000 }, 3268c2ecf20Sopenharmony_ci { AR5K_PHY(68), 0x00000001 }, 3278c2ecf20Sopenharmony_ci { AR5K_PHY(71), 0x0000092a }, 3288c2ecf20Sopenharmony_ci { AR5K_PHY_IQ, 0x00000000 }, 3298c2ecf20Sopenharmony_ci { AR5K_PHY(73), 0x00058a05 }, 3308c2ecf20Sopenharmony_ci { AR5K_PHY(74), 0x00000001 }, 3318c2ecf20Sopenharmony_ci { AR5K_PHY(75), 0x00000000 }, 3328c2ecf20Sopenharmony_ci { AR5K_PHY_PAPD_PROBE, 0x00000000 }, 3338c2ecf20Sopenharmony_ci { AR5K_PHY(77), 0x00000000 }, /* 0x9934 */ 3348c2ecf20Sopenharmony_ci { AR5K_PHY(78), 0x00000000 }, /* 0x9938 */ 3358c2ecf20Sopenharmony_ci { AR5K_PHY(79), 0x0000003f }, /* 0x993c */ 3368c2ecf20Sopenharmony_ci { AR5K_PHY(80), 0x00000004 }, 3378c2ecf20Sopenharmony_ci { AR5K_PHY(82), 0x00000000 }, 3388c2ecf20Sopenharmony_ci { AR5K_PHY(83), 0x00000000 }, 3398c2ecf20Sopenharmony_ci { AR5K_PHY(84), 0x00000000 }, 3408c2ecf20Sopenharmony_ci { AR5K_PHY_RADAR, 0x5d50f14c }, 3418c2ecf20Sopenharmony_ci { AR5K_PHY(86), 0x00000018 }, 3428c2ecf20Sopenharmony_ci { AR5K_PHY(87), 0x004b6a8e }, 3438c2ecf20Sopenharmony_ci /* Initial Power table (32bytes) 3448c2ecf20Sopenharmony_ci * common on all cards/modes. 3458c2ecf20Sopenharmony_ci * Note: Table is rewritten during 3468c2ecf20Sopenharmony_ci * txpower setup later using calibration 3478c2ecf20Sopenharmony_ci * data etc. so next write is non-common */ 3488c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(1), 0x06ff05ff }, 3498c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(2), 0x07ff07ff }, 3508c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(3), 0x08ff08ff }, 3518c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(4), 0x09ff09ff }, 3528c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(5), 0x0aff0aff }, 3538c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(6), 0x0bff0bff }, 3548c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(7), 0x0cff0cff }, 3558c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(8), 0x0dff0dff }, 3568c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(9), 0x0fff0eff }, 3578c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(10), 0x12ff12ff }, 3588c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(11), 0x14ff13ff }, 3598c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(12), 0x16ff15ff }, 3608c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(13), 0x19ff17ff }, 3618c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(14), 0x1bff1aff }, 3628c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(15), 0x1eff1dff }, 3638c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(16), 0x23ff20ff }, 3648c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(17), 0x27ff25ff }, 3658c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(18), 0x2cff29ff }, 3668c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(19), 0x31ff2fff }, 3678c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(20), 0x37ff34ff }, 3688c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(21), 0x3aff3aff }, 3698c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(22), 0x3aff3aff }, 3708c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(23), 0x3aff3aff }, 3718c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(24), 0x3aff3aff }, 3728c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(25), 0x3aff3aff }, 3738c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(26), 0x3aff3aff }, 3748c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(27), 0x3aff3aff }, 3758c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(28), 0x3aff3aff }, 3768c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(29), 0x3aff3aff }, 3778c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(30), 0x3aff3aff }, 3788c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER(31), 0x3aff3aff }, 3798c2ecf20Sopenharmony_ci { AR5K_PHY_CCKTXCTL, 0x00000000 }, 3808c2ecf20Sopenharmony_ci { AR5K_PHY(642), 0x503e4646 }, 3818c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_2GHZ, 0x6480416c }, 3828c2ecf20Sopenharmony_ci { AR5K_PHY(644), 0x0199a003 }, 3838c2ecf20Sopenharmony_ci { AR5K_PHY(645), 0x044cd610 }, 3848c2ecf20Sopenharmony_ci { AR5K_PHY(646), 0x13800040 }, 3858c2ecf20Sopenharmony_ci { AR5K_PHY(647), 0x1be00060 }, 3868c2ecf20Sopenharmony_ci { AR5K_PHY(648), 0x0c53800a }, 3878c2ecf20Sopenharmony_ci { AR5K_PHY(649), 0x0014df3b }, 3888c2ecf20Sopenharmony_ci { AR5K_PHY(650), 0x000001b5 }, 3898c2ecf20Sopenharmony_ci { AR5K_PHY(651), 0x00000020 }, 3908c2ecf20Sopenharmony_ci}; 3918c2ecf20Sopenharmony_ci 3928c2ecf20Sopenharmony_ci/* Initial mode-specific settings for AR5211 3938c2ecf20Sopenharmony_ci * 5211 supports OFDM-only g (draft g) but we 3948c2ecf20Sopenharmony_ci * need to test it ! */ 3958c2ecf20Sopenharmony_cistatic const struct ath5k_ini_mode ar5211_ini_mode[] = { 3968c2ecf20Sopenharmony_ci { AR5K_TXCFG, 3978c2ecf20Sopenharmony_ci /* A B G */ 3988c2ecf20Sopenharmony_ci { 0x00000015, 0x0000001d, 0x00000015 } }, 3998c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(0), 4008c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4018c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(1), 4028c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4038c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(2), 4048c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4058c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(3), 4068c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4078c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(4), 4088c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4098c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(5), 4108c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4118c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(6), 4128c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4138c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(7), 4148c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4158c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(8), 4168c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4178c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(9), 4188c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 4198c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_SLOT, 4208c2ecf20Sopenharmony_ci { 0x00000168, 0x000001b8, 0x00000168 } }, 4218c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_SIFS, 4228c2ecf20Sopenharmony_ci { 0x00000230, 0x000000b0, 0x00000230 } }, 4238c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_EIFS, 4248c2ecf20Sopenharmony_ci { 0x00000d98, 0x00001f48, 0x00000d98 } }, 4258c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_MISC, 4268c2ecf20Sopenharmony_ci { 0x0000a0e0, 0x00005880, 0x0000a0e0 } }, 4278c2ecf20Sopenharmony_ci { AR5K_TIME_OUT, 4288c2ecf20Sopenharmony_ci { 0x04000400, 0x20003000, 0x04000400 } }, 4298c2ecf20Sopenharmony_ci { AR5K_USEC_5211, 4308c2ecf20Sopenharmony_ci { 0x0e8d8fa7, 0x01608f95, 0x0e8d8fa7 } }, 4318c2ecf20Sopenharmony_ci { AR5K_PHY(8), 4328c2ecf20Sopenharmony_ci { 0x02020200, 0x02010200, 0x02020200 } }, 4338c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL2, 4348c2ecf20Sopenharmony_ci { 0x00000e0e, 0x00000707, 0x00000e0e } }, 4358c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL3, 4368c2ecf20Sopenharmony_ci { 0x0a020001, 0x05010000, 0x0a020001 } }, 4378c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL4, 4388c2ecf20Sopenharmony_ci { 0x00000e0e, 0x00000e0e, 0x00000e0e } }, 4398c2ecf20Sopenharmony_ci { AR5K_PHY_PA_CTL, 4408c2ecf20Sopenharmony_ci { 0x00000007, 0x0000000b, 0x0000000b } }, 4418c2ecf20Sopenharmony_ci { AR5K_PHY_SETTLING, 4428c2ecf20Sopenharmony_ci { 0x1372169c, 0x137216a8, 0x1372169c } }, 4438c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN, 4448c2ecf20Sopenharmony_ci { 0x0018ba67, 0x0018ba69, 0x0018ba69 } }, 4458c2ecf20Sopenharmony_ci { AR5K_PHY_DESIRED_SIZE, 4468c2ecf20Sopenharmony_ci { 0x0c28b4e0, 0x0c28b4e0, 0x0c28b4e0 } }, 4478c2ecf20Sopenharmony_ci { AR5K_PHY_SIG, 4488c2ecf20Sopenharmony_ci { 0x7e800d2e, 0x7ec00d2e, 0x7e800d2e } }, 4498c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCOARSE, 4508c2ecf20Sopenharmony_ci { 0x31375d5e, 0x313a5d5e, 0x31375d5e } }, 4518c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCTL, 4528c2ecf20Sopenharmony_ci { 0x0000bd10, 0x0000bd38, 0x0000bd10 } }, 4538c2ecf20Sopenharmony_ci { AR5K_PHY_NF, 4548c2ecf20Sopenharmony_ci { 0x0001ce00, 0x0001ce00, 0x0001ce00 } }, 4558c2ecf20Sopenharmony_ci { AR5K_PHY_RX_DELAY, 4568c2ecf20Sopenharmony_ci { 0x00002710, 0x0000157c, 0x00002710 } }, 4578c2ecf20Sopenharmony_ci { AR5K_PHY(70), 4588c2ecf20Sopenharmony_ci { 0x00000190, 0x00000084, 0x00000190 } }, 4598c2ecf20Sopenharmony_ci { AR5K_PHY_FRAME_CTL_5211, 4608c2ecf20Sopenharmony_ci { 0x6fe01020, 0x6fe00920, 0x6fe01020 } }, 4618c2ecf20Sopenharmony_ci { AR5K_PHY_PCDAC_TXPOWER_BASE, 4628c2ecf20Sopenharmony_ci { 0x05ff14ff, 0x05ff14ff, 0x05ff19ff } }, 4638c2ecf20Sopenharmony_ci { AR5K_RF_BUFFER_CONTROL_4, 4648c2ecf20Sopenharmony_ci { 0x00000010, 0x00000010, 0x00000010 } }, 4658c2ecf20Sopenharmony_ci}; 4668c2ecf20Sopenharmony_ci 4678c2ecf20Sopenharmony_ci/* Initial register settings for AR5212 and newer chips */ 4688c2ecf20Sopenharmony_cistatic const struct ath5k_ini ar5212_ini_common_start[] = { 4698c2ecf20Sopenharmony_ci { AR5K_RXDP, 0x00000000 }, 4708c2ecf20Sopenharmony_ci { AR5K_RXCFG, 0x00000005 }, 4718c2ecf20Sopenharmony_ci { AR5K_MIBC, 0x00000000 }, 4728c2ecf20Sopenharmony_ci { AR5K_TOPS, 0x00000008 }, 4738c2ecf20Sopenharmony_ci { AR5K_RXNOFRM, 0x00000008 }, 4748c2ecf20Sopenharmony_ci { AR5K_TXNOFRM, 0x00000010 }, 4758c2ecf20Sopenharmony_ci { AR5K_RPGTO, 0x00000000 }, 4768c2ecf20Sopenharmony_ci { AR5K_RFCNT, 0x0000001f }, 4778c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(0), 0x00000000 }, 4788c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(1), 0x00000000 }, 4798c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(2), 0x00000000 }, 4808c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(3), 0x00000000 }, 4818c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(4), 0x00000000 }, 4828c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(5), 0x00000000 }, 4838c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(6), 0x00000000 }, 4848c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(7), 0x00000000 }, 4858c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(8), 0x00000000 }, 4868c2ecf20Sopenharmony_ci { AR5K_QUEUE_TXDP(9), 0x00000000 }, 4878c2ecf20Sopenharmony_ci { AR5K_DCU_FP, 0x00000000 }, 4888c2ecf20Sopenharmony_ci { AR5K_DCU_TXP, 0x00000000 }, 4898c2ecf20Sopenharmony_ci /* Tx filter table 0 (32 entries) */ 4908c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(0), 0x00000000 }, /* DCU 0 */ 4918c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(1), 0x00000000 }, 4928c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(2), 0x00000000 }, 4938c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(3), 0x00000000 }, 4948c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(4), 0x00000000 }, /* DCU 1 */ 4958c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(5), 0x00000000 }, 4968c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(6), 0x00000000 }, 4978c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(7), 0x00000000 }, 4988c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(8), 0x00000000 }, /* DCU 2 */ 4998c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(9), 0x00000000 }, 5008c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(10), 0x00000000 }, 5018c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(11), 0x00000000 }, 5028c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(12), 0x00000000 }, /* DCU 3 */ 5038c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(13), 0x00000000 }, 5048c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(14), 0x00000000 }, 5058c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(15), 0x00000000 }, 5068c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(16), 0x00000000 }, /* DCU 4 */ 5078c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(17), 0x00000000 }, 5088c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(18), 0x00000000 }, 5098c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(19), 0x00000000 }, 5108c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(20), 0x00000000 }, /* DCU 5 */ 5118c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(21), 0x00000000 }, 5128c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(22), 0x00000000 }, 5138c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(23), 0x00000000 }, 5148c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(24), 0x00000000 }, /* DCU 6 */ 5158c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(25), 0x00000000 }, 5168c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(26), 0x00000000 }, 5178c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(27), 0x00000000 }, 5188c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(28), 0x00000000 }, /* DCU 7 */ 5198c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(29), 0x00000000 }, 5208c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(30), 0x00000000 }, 5218c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_0(31), 0x00000000 }, 5228c2ecf20Sopenharmony_ci /* Tx filter table 1 (16 entries) */ 5238c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(0), 0x00000000 }, 5248c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(1), 0x00000000 }, 5258c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(2), 0x00000000 }, 5268c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(3), 0x00000000 }, 5278c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(4), 0x00000000 }, 5288c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(5), 0x00000000 }, 5298c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(6), 0x00000000 }, 5308c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(7), 0x00000000 }, 5318c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(8), 0x00000000 }, 5328c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(9), 0x00000000 }, 5338c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(10), 0x00000000 }, 5348c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(11), 0x00000000 }, 5358c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(12), 0x00000000 }, 5368c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(13), 0x00000000 }, 5378c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(14), 0x00000000 }, 5388c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_1(15), 0x00000000 }, 5398c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_CLR, 0x00000000 }, 5408c2ecf20Sopenharmony_ci { AR5K_DCU_TX_FILTER_SET, 0x00000000 }, 5418c2ecf20Sopenharmony_ci { AR5K_STA_ID1, 0x00000000 }, 5428c2ecf20Sopenharmony_ci { AR5K_BSS_ID0, 0x00000000 }, 5438c2ecf20Sopenharmony_ci { AR5K_BSS_ID1, 0x00000000 }, 5448c2ecf20Sopenharmony_ci { AR5K_BEACON_5211, 0x00000000 }, 5458c2ecf20Sopenharmony_ci { AR5K_CFP_PERIOD_5211, 0x00000000 }, 5468c2ecf20Sopenharmony_ci { AR5K_TIMER0_5211, 0x00000030 }, 5478c2ecf20Sopenharmony_ci { AR5K_TIMER1_5211, 0x0007ffff }, 5488c2ecf20Sopenharmony_ci { AR5K_TIMER2_5211, 0x01ffffff }, 5498c2ecf20Sopenharmony_ci { AR5K_TIMER3_5211, 0x00000031 }, 5508c2ecf20Sopenharmony_ci { AR5K_CFP_DUR_5211, 0x00000000 }, 5518c2ecf20Sopenharmony_ci { AR5K_RX_FILTER_5211, 0x00000000 }, 5528c2ecf20Sopenharmony_ci { AR5K_DIAG_SW_5211, 0x00000000 }, 5538c2ecf20Sopenharmony_ci { AR5K_ADDAC_TEST, 0x00000000 }, 5548c2ecf20Sopenharmony_ci { AR5K_DEFAULT_ANTENNA, 0x00000000 }, 5558c2ecf20Sopenharmony_ci { AR5K_FRAME_CTL_QOSM, 0x000fc78f }, 5568c2ecf20Sopenharmony_ci { AR5K_XRMODE, 0x2a82301a }, 5578c2ecf20Sopenharmony_ci { AR5K_XRDELAY, 0x05dc01e0 }, 5588c2ecf20Sopenharmony_ci { AR5K_XRTIMEOUT, 0x1f402710 }, 5598c2ecf20Sopenharmony_ci { AR5K_XRCHIRP, 0x01f40000 }, 5608c2ecf20Sopenharmony_ci { AR5K_XRSTOMP, 0x00001e1c }, 5618c2ecf20Sopenharmony_ci { AR5K_SLEEP0, 0x0002aaaa }, 5628c2ecf20Sopenharmony_ci { AR5K_SLEEP1, 0x02005555 }, 5638c2ecf20Sopenharmony_ci { AR5K_SLEEP2, 0x00000000 }, 5648c2ecf20Sopenharmony_ci { AR_BSSMSKL, 0xffffffff }, 5658c2ecf20Sopenharmony_ci { AR_BSSMSKU, 0x0000ffff }, 5668c2ecf20Sopenharmony_ci { AR5K_TXPC, 0x00000000 }, 5678c2ecf20Sopenharmony_ci { AR5K_PROFCNT_TX, 0x00000000 }, 5688c2ecf20Sopenharmony_ci { AR5K_PROFCNT_RX, 0x00000000 }, 5698c2ecf20Sopenharmony_ci { AR5K_PROFCNT_RXCLR, 0x00000000 }, 5708c2ecf20Sopenharmony_ci { AR5K_PROFCNT_CYCLE, 0x00000000 }, 5718c2ecf20Sopenharmony_ci { AR5K_QUIET_CTL1, 0x00000088 }, 5728c2ecf20Sopenharmony_ci /* Initial rate duration table (32 entries )*/ 5738c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(0), 0x00000000 }, 5748c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(1), 0x0000008c }, 5758c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(2), 0x000000e4 }, 5768c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(3), 0x000002d5 }, 5778c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(4), 0x00000000 }, 5788c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(5), 0x00000000 }, 5798c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(6), 0x000000a0 }, 5808c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(7), 0x000001c9 }, 5818c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(8), 0x0000002c }, 5828c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(9), 0x0000002c }, 5838c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(10), 0x00000030 }, 5848c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(11), 0x0000003c }, 5858c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(12), 0x0000002c }, 5868c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(13), 0x0000002c }, 5878c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(14), 0x00000030 }, 5888c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(15), 0x0000003c }, 5898c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(16), 0x00000000 }, 5908c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(17), 0x00000000 }, 5918c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(18), 0x00000000 }, 5928c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(19), 0x00000000 }, 5938c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(20), 0x00000000 }, 5948c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(21), 0x00000000 }, 5958c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(22), 0x00000000 }, 5968c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(23), 0x00000000 }, 5978c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(24), 0x000000d5 }, 5988c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(25), 0x000000df }, 5998c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(26), 0x00000102 }, 6008c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(27), 0x0000013a }, 6018c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(28), 0x00000075 }, 6028c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(29), 0x0000007f }, 6038c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(30), 0x000000a2 }, 6048c2ecf20Sopenharmony_ci { AR5K_RATE_DUR(31), 0x00000000 }, 6058c2ecf20Sopenharmony_ci { AR5K_QUIET_CTL2, 0x00010002 }, 6068c2ecf20Sopenharmony_ci { AR5K_TSF_PARM, 0x00000001 }, 6078c2ecf20Sopenharmony_ci { AR5K_QOS_NOACK, 0x000000c0 }, 6088c2ecf20Sopenharmony_ci { AR5K_PHY_ERR_FIL, 0x00000000 }, 6098c2ecf20Sopenharmony_ci { AR5K_XRLAT_TX, 0x00000168 }, 6108c2ecf20Sopenharmony_ci { AR5K_ACKSIFS, 0x00000000 }, 6118c2ecf20Sopenharmony_ci /* Rate -> db table 6128c2ecf20Sopenharmony_ci * notice ...03<-02<-01<-00 ! */ 6138c2ecf20Sopenharmony_ci { AR5K_RATE2DB(0), 0x03020100 }, 6148c2ecf20Sopenharmony_ci { AR5K_RATE2DB(1), 0x07060504 }, 6158c2ecf20Sopenharmony_ci { AR5K_RATE2DB(2), 0x0b0a0908 }, 6168c2ecf20Sopenharmony_ci { AR5K_RATE2DB(3), 0x0f0e0d0c }, 6178c2ecf20Sopenharmony_ci { AR5K_RATE2DB(4), 0x13121110 }, 6188c2ecf20Sopenharmony_ci { AR5K_RATE2DB(5), 0x17161514 }, 6198c2ecf20Sopenharmony_ci { AR5K_RATE2DB(6), 0x1b1a1918 }, 6208c2ecf20Sopenharmony_ci { AR5K_RATE2DB(7), 0x1f1e1d1c }, 6218c2ecf20Sopenharmony_ci /* Db -> Rate table */ 6228c2ecf20Sopenharmony_ci { AR5K_DB2RATE(0), 0x03020100 }, 6238c2ecf20Sopenharmony_ci { AR5K_DB2RATE(1), 0x07060504 }, 6248c2ecf20Sopenharmony_ci { AR5K_DB2RATE(2), 0x0b0a0908 }, 6258c2ecf20Sopenharmony_ci { AR5K_DB2RATE(3), 0x0f0e0d0c }, 6268c2ecf20Sopenharmony_ci { AR5K_DB2RATE(4), 0x13121110 }, 6278c2ecf20Sopenharmony_ci { AR5K_DB2RATE(5), 0x17161514 }, 6288c2ecf20Sopenharmony_ci { AR5K_DB2RATE(6), 0x1b1a1918 }, 6298c2ecf20Sopenharmony_ci { AR5K_DB2RATE(7), 0x1f1e1d1c }, 6308c2ecf20Sopenharmony_ci /* PHY registers (Common settings 6318c2ecf20Sopenharmony_ci * for all chips/modes) */ 6328c2ecf20Sopenharmony_ci { AR5K_PHY(3), 0xad848e19 }, 6338c2ecf20Sopenharmony_ci { AR5K_PHY(4), 0x7d28e000 }, 6348c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_3, 0x9c0a9f6b }, 6358c2ecf20Sopenharmony_ci { AR5K_PHY_ACT, 0x00000000 }, 6368c2ecf20Sopenharmony_ci { AR5K_PHY(16), 0x206a017a }, 6378c2ecf20Sopenharmony_ci { AR5K_PHY(21), 0x00000859 }, 6388c2ecf20Sopenharmony_ci { AR5K_PHY_BIN_MASK_1, 0x00000000 }, 6398c2ecf20Sopenharmony_ci { AR5K_PHY_BIN_MASK_2, 0x00000000 }, 6408c2ecf20Sopenharmony_ci { AR5K_PHY_BIN_MASK_3, 0x00000000 }, 6418c2ecf20Sopenharmony_ci { AR5K_PHY_BIN_MASK_CTL, 0x00800000 }, 6428c2ecf20Sopenharmony_ci { AR5K_PHY_ANT_CTL, 0x00000001 }, 6438c2ecf20Sopenharmony_ci /*{ AR5K_PHY(71), 0x0000092a },*/ /* Old value */ 6448c2ecf20Sopenharmony_ci { AR5K_PHY_MAX_RX_LEN, 0x00000c80 }, 6458c2ecf20Sopenharmony_ci { AR5K_PHY_IQ, 0x05100000 }, 6468c2ecf20Sopenharmony_ci { AR5K_PHY_WARM_RESET, 0x00000001 }, 6478c2ecf20Sopenharmony_ci { AR5K_PHY_CTL, 0x00000004 }, 6488c2ecf20Sopenharmony_ci { AR5K_PHY_TXPOWER_RATE1, 0x1e1f2022 }, 6498c2ecf20Sopenharmony_ci { AR5K_PHY_TXPOWER_RATE2, 0x0a0b0c0d }, 6508c2ecf20Sopenharmony_ci { AR5K_PHY_TXPOWER_RATE_MAX, 0x0000003f }, 6518c2ecf20Sopenharmony_ci { AR5K_PHY(82), 0x9280b212 }, 6528c2ecf20Sopenharmony_ci { AR5K_PHY_RADAR, 0x5d50e188 }, 6538c2ecf20Sopenharmony_ci /*{ AR5K_PHY(86), 0x000000ff },*/ 6548c2ecf20Sopenharmony_ci { AR5K_PHY(87), 0x004b6a8e }, 6558c2ecf20Sopenharmony_ci { AR5K_PHY_NFTHRES, 0x000003ce }, 6568c2ecf20Sopenharmony_ci { AR5K_PHY_RESTART, 0x192fb515 }, 6578c2ecf20Sopenharmony_ci { AR5K_PHY(94), 0x00000001 }, 6588c2ecf20Sopenharmony_ci { AR5K_PHY_RFBUS_REQ, 0x00000000 }, 6598c2ecf20Sopenharmony_ci /*{ AR5K_PHY(644), 0x0080a333 },*/ /* Old value */ 6608c2ecf20Sopenharmony_ci /*{ AR5K_PHY(645), 0x00206c10 },*/ /* Old value */ 6618c2ecf20Sopenharmony_ci { AR5K_PHY(644), 0x00806333 }, 6628c2ecf20Sopenharmony_ci { AR5K_PHY(645), 0x00106c10 }, 6638c2ecf20Sopenharmony_ci { AR5K_PHY(646), 0x009c4060 }, 6648c2ecf20Sopenharmony_ci /* { AR5K_PHY(647), 0x1483800a }, */ 6658c2ecf20Sopenharmony_ci /* { AR5K_PHY(648), 0x01831061 }, */ /* Old value */ 6668c2ecf20Sopenharmony_ci { AR5K_PHY(648), 0x018830c6 }, 6678c2ecf20Sopenharmony_ci { AR5K_PHY(649), 0x00000400 }, 6688c2ecf20Sopenharmony_ci /*{ AR5K_PHY(650), 0x000001b5 },*/ 6698c2ecf20Sopenharmony_ci { AR5K_PHY(651), 0x00000000 }, 6708c2ecf20Sopenharmony_ci { AR5K_PHY_TXPOWER_RATE3, 0x20202020 }, 6718c2ecf20Sopenharmony_ci { AR5K_PHY_TXPOWER_RATE4, 0x20202020 }, 6728c2ecf20Sopenharmony_ci /*{ AR5K_PHY(655), 0x13c889af },*/ 6738c2ecf20Sopenharmony_ci { AR5K_PHY(656), 0x38490a20 }, 6748c2ecf20Sopenharmony_ci { AR5K_PHY(657), 0x00007bb6 }, 6758c2ecf20Sopenharmony_ci { AR5K_PHY(658), 0x0fff3ffc }, 6768c2ecf20Sopenharmony_ci}; 6778c2ecf20Sopenharmony_ci 6788c2ecf20Sopenharmony_ci/* Initial mode-specific settings for AR5212 (Written before ar5212_ini) */ 6798c2ecf20Sopenharmony_cistatic const struct ath5k_ini_mode ar5212_ini_mode_start[] = { 6808c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(0), 6818c2ecf20Sopenharmony_ci /* A/XR B G */ 6828c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6838c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(1), 6848c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6858c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(2), 6868c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6878c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(3), 6888c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6898c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(4), 6908c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6918c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(5), 6928c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6938c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(6), 6948c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6958c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(7), 6968c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6978c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(8), 6988c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 6998c2ecf20Sopenharmony_ci { AR5K_QUEUE_DFS_LOCAL_IFS(9), 7008c2ecf20Sopenharmony_ci { 0x002ffc0f, 0x002ffc1f, 0x002ffc0f } }, 7018c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_SIFS, 7028c2ecf20Sopenharmony_ci { 0x00000230, 0x000000b0, 0x00000160 } }, 7038c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_SLOT, 7048c2ecf20Sopenharmony_ci { 0x00000168, 0x000001b8, 0x0000018c } }, 7058c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_EIFS, 7068c2ecf20Sopenharmony_ci { 0x00000e60, 0x00001f1c, 0x00003e38 } }, 7078c2ecf20Sopenharmony_ci { AR5K_DCU_GBL_IFS_MISC, 7088c2ecf20Sopenharmony_ci { 0x0000a0e0, 0x00005880, 0x0000b0e0 } }, 7098c2ecf20Sopenharmony_ci { AR5K_TIME_OUT, 7108c2ecf20Sopenharmony_ci { 0x03e803e8, 0x04200420, 0x08400840 } }, 7118c2ecf20Sopenharmony_ci { AR5K_PHY(8), 7128c2ecf20Sopenharmony_ci { 0x02020200, 0x02010200, 0x02020200 } }, 7138c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL2, 7148c2ecf20Sopenharmony_ci { 0x00000e0e, 0x00000707, 0x00000e0e } }, 7158c2ecf20Sopenharmony_ci { AR5K_PHY_SETTLING, 7168c2ecf20Sopenharmony_ci { 0x1372161c, 0x13721722, 0x137216a2 } }, 7178c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCTL, 7188c2ecf20Sopenharmony_ci { 0x00009d10, 0x00009d18, 0x00009d18 } }, 7198c2ecf20Sopenharmony_ci { AR5K_PHY_NF, 7208c2ecf20Sopenharmony_ci { 0x0001ce00, 0x0001ce00, 0x0001ce00 } }, 7218c2ecf20Sopenharmony_ci { AR5K_PHY_WEAK_OFDM_HIGH_THR, 7228c2ecf20Sopenharmony_ci { 0x409a4190, 0x409a4190, 0x409a4190 } }, 7238c2ecf20Sopenharmony_ci { AR5K_PHY(70), 7248c2ecf20Sopenharmony_ci { 0x000001b8, 0x00000084, 0x00000108 } }, 7258c2ecf20Sopenharmony_ci { AR5K_PHY_OFDM_SELFCORR, 7268c2ecf20Sopenharmony_ci { 0x10058a05, 0x10058a05, 0x10058a05 } }, 7278c2ecf20Sopenharmony_ci { 0xa230, 7288c2ecf20Sopenharmony_ci { 0x00000000, 0x00000000, 0x00000108 } }, 7298c2ecf20Sopenharmony_ci}; 7308c2ecf20Sopenharmony_ci 7318c2ecf20Sopenharmony_ci/* Initial mode-specific settings for AR5212 + RF5111 7328c2ecf20Sopenharmony_ci * (Written after ar5212_ini) */ 7338c2ecf20Sopenharmony_cistatic const struct ath5k_ini_mode rf5111_ini_mode_end[] = { 7348c2ecf20Sopenharmony_ci { AR5K_TXCFG, 7358c2ecf20Sopenharmony_ci /* A/XR B G */ 7368c2ecf20Sopenharmony_ci { 0x00008015, 0x00008015, 0x00008015 } }, 7378c2ecf20Sopenharmony_ci { AR5K_USEC_5211, 7388c2ecf20Sopenharmony_ci { 0x128d8fa7, 0x04e00f95, 0x12e00fab } }, 7398c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL3, 7408c2ecf20Sopenharmony_ci { 0x0a020001, 0x05010100, 0x0a020001 } }, 7418c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL4, 7428c2ecf20Sopenharmony_ci { 0x00000e0e, 0x00000e0e, 0x00000e0e } }, 7438c2ecf20Sopenharmony_ci { AR5K_PHY_PA_CTL, 7448c2ecf20Sopenharmony_ci { 0x00000007, 0x0000000b, 0x0000000b } }, 7458c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN, 7468c2ecf20Sopenharmony_ci { 0x0018da5a, 0x0018ca69, 0x0018ca69 } }, 7478c2ecf20Sopenharmony_ci { AR5K_PHY_DESIRED_SIZE, 7488c2ecf20Sopenharmony_ci { 0x0de8b4e0, 0x0de8b4e0, 0x0de8b4e0 } }, 7498c2ecf20Sopenharmony_ci { AR5K_PHY_SIG, 7508c2ecf20Sopenharmony_ci { 0x7e800d2e, 0x7ee84d2e, 0x7ee84d2e } }, 7518c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCOARSE, 7528c2ecf20Sopenharmony_ci { 0x3137665e, 0x3137665e, 0x3137665e } }, 7538c2ecf20Sopenharmony_ci { AR5K_PHY_WEAK_OFDM_LOW_THR, 7548c2ecf20Sopenharmony_ci { 0x050cb081, 0x050cb081, 0x050cb080 } }, 7558c2ecf20Sopenharmony_ci { AR5K_PHY_RX_DELAY, 7568c2ecf20Sopenharmony_ci { 0x00002710, 0x0000157c, 0x00002af8 } }, 7578c2ecf20Sopenharmony_ci { AR5K_PHY_FRAME_CTL_5211, 7588c2ecf20Sopenharmony_ci { 0xf7b81020, 0xf7b80d20, 0xf7b81020 } }, 7598c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_2GHZ, 7608c2ecf20Sopenharmony_ci { 0x642c416a, 0x6440416a, 0x6440416a } }, 7618c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_RX_CTL_4, 7628c2ecf20Sopenharmony_ci { 0x1883800a, 0x1873800a, 0x1883800a } }, 7638c2ecf20Sopenharmony_ci}; 7648c2ecf20Sopenharmony_ci 7658c2ecf20Sopenharmony_ci/* Common for all modes */ 7668c2ecf20Sopenharmony_cistatic const struct ath5k_ini rf5111_ini_common_end[] = { 7678c2ecf20Sopenharmony_ci { AR5K_DCU_FP, 0x00000000 }, 7688c2ecf20Sopenharmony_ci { AR5K_PHY_AGC, 0x00000000 }, 7698c2ecf20Sopenharmony_ci { AR5K_PHY_ADC_CTL, 0x00022ffe }, 7708c2ecf20Sopenharmony_ci { 0x983c, 0x00020100 }, 7718c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_OFFSET, 0x1284613c }, 7728c2ecf20Sopenharmony_ci { AR5K_PHY_PAPD_PROBE, 0x00004883 }, 7738c2ecf20Sopenharmony_ci { 0x9940, 0x00000004 }, 7748c2ecf20Sopenharmony_ci { 0x9958, 0x000000ff }, 7758c2ecf20Sopenharmony_ci { 0x9974, 0x00000000 }, 7768c2ecf20Sopenharmony_ci { AR5K_PHY_SPENDING, 0x00000018 }, 7778c2ecf20Sopenharmony_ci { AR5K_PHY_CCKTXCTL, 0x00000000 }, 7788c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_CROSSCORR, 0xd03e6788 }, 7798c2ecf20Sopenharmony_ci { AR5K_PHY_DAG_CCK_CTL, 0x000001b5 }, 7808c2ecf20Sopenharmony_ci { 0xa23c, 0x13c889af }, 7818c2ecf20Sopenharmony_ci}; 7828c2ecf20Sopenharmony_ci 7838c2ecf20Sopenharmony_ci 7848c2ecf20Sopenharmony_ci/* Initial mode-specific settings for AR5212 + RF5112 7858c2ecf20Sopenharmony_ci * (Written after ar5212_ini) */ 7868c2ecf20Sopenharmony_cistatic const struct ath5k_ini_mode rf5112_ini_mode_end[] = { 7878c2ecf20Sopenharmony_ci { AR5K_TXCFG, 7888c2ecf20Sopenharmony_ci /* A/XR B G */ 7898c2ecf20Sopenharmony_ci { 0x00008015, 0x00008015, 0x00008015 } }, 7908c2ecf20Sopenharmony_ci { AR5K_USEC_5211, 7918c2ecf20Sopenharmony_ci { 0x128d93a7, 0x04e01395, 0x12e013ab } }, 7928c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL3, 7938c2ecf20Sopenharmony_ci { 0x0a020001, 0x05020100, 0x0a020001 } }, 7948c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL4, 7958c2ecf20Sopenharmony_ci { 0x00000e0e, 0x00000e0e, 0x00000e0e } }, 7968c2ecf20Sopenharmony_ci { AR5K_PHY_PA_CTL, 7978c2ecf20Sopenharmony_ci { 0x00000007, 0x0000000b, 0x0000000b } }, 7988c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN, 7998c2ecf20Sopenharmony_ci { 0x0018da6d, 0x0018ca75, 0x0018ca75 } }, 8008c2ecf20Sopenharmony_ci { AR5K_PHY_DESIRED_SIZE, 8018c2ecf20Sopenharmony_ci { 0x0de8b4e0, 0x0de8b4e0, 0x0de8b4e0 } }, 8028c2ecf20Sopenharmony_ci { AR5K_PHY_SIG, 8038c2ecf20Sopenharmony_ci { 0x7e800d2e, 0x7ee80d2e, 0x7ee80d2e } }, 8048c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCOARSE, 8058c2ecf20Sopenharmony_ci { 0x3137665e, 0x3137665e, 0x3137665e } }, 8068c2ecf20Sopenharmony_ci { AR5K_PHY_WEAK_OFDM_LOW_THR, 8078c2ecf20Sopenharmony_ci { 0x050cb081, 0x050cb081, 0x050cb081 } }, 8088c2ecf20Sopenharmony_ci { AR5K_PHY_RX_DELAY, 8098c2ecf20Sopenharmony_ci { 0x000007d0, 0x0000044c, 0x00000898 } }, 8108c2ecf20Sopenharmony_ci { AR5K_PHY_FRAME_CTL_5211, 8118c2ecf20Sopenharmony_ci { 0xf7b81020, 0xf7b80d10, 0xf7b81010 } }, 8128c2ecf20Sopenharmony_ci { AR5K_PHY_CCKTXCTL, 8138c2ecf20Sopenharmony_ci { 0x00000000, 0x00000008, 0x00000008 } }, 8148c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_CROSSCORR, 8158c2ecf20Sopenharmony_ci { 0xd6be6788, 0xd03e6788, 0xd03e6788 } }, 8168c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_2GHZ, 8178c2ecf20Sopenharmony_ci { 0x642c0140, 0x6442c160, 0x6442c160 } }, 8188c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_RX_CTL_4, 8198c2ecf20Sopenharmony_ci { 0x1883800a, 0x1873800a, 0x1883800a } }, 8208c2ecf20Sopenharmony_ci}; 8218c2ecf20Sopenharmony_ci 8228c2ecf20Sopenharmony_cistatic const struct ath5k_ini rf5112_ini_common_end[] = { 8238c2ecf20Sopenharmony_ci { AR5K_DCU_FP, 0x00000000 }, 8248c2ecf20Sopenharmony_ci { AR5K_PHY_AGC, 0x00000000 }, 8258c2ecf20Sopenharmony_ci { AR5K_PHY_ADC_CTL, 0x00022ffe }, 8268c2ecf20Sopenharmony_ci { 0x983c, 0x00020100 }, 8278c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_OFFSET, 0x1284613c }, 8288c2ecf20Sopenharmony_ci { AR5K_PHY_PAPD_PROBE, 0x00004882 }, 8298c2ecf20Sopenharmony_ci { 0x9940, 0x00000004 }, 8308c2ecf20Sopenharmony_ci { 0x9958, 0x000000ff }, 8318c2ecf20Sopenharmony_ci { 0x9974, 0x00000000 }, 8328c2ecf20Sopenharmony_ci { AR5K_PHY_DAG_CCK_CTL, 0x000001b5 }, 8338c2ecf20Sopenharmony_ci { 0xa23c, 0x13c889af }, 8348c2ecf20Sopenharmony_ci}; 8358c2ecf20Sopenharmony_ci 8368c2ecf20Sopenharmony_ci 8378c2ecf20Sopenharmony_ci/* Initial mode-specific settings for RF5413/5414 8388c2ecf20Sopenharmony_ci * (Written after ar5212_ini) */ 8398c2ecf20Sopenharmony_cistatic const struct ath5k_ini_mode rf5413_ini_mode_end[] = { 8408c2ecf20Sopenharmony_ci { AR5K_TXCFG, 8418c2ecf20Sopenharmony_ci /* A/XR B G */ 8428c2ecf20Sopenharmony_ci { 0x00000015, 0x00000015, 0x00000015 } }, 8438c2ecf20Sopenharmony_ci { AR5K_USEC_5211, 8448c2ecf20Sopenharmony_ci { 0x128d93a7, 0x04e01395, 0x12e013ab } }, 8458c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL3, 8468c2ecf20Sopenharmony_ci { 0x0a020001, 0x05020100, 0x0a020001 } }, 8478c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL4, 8488c2ecf20Sopenharmony_ci { 0x00000e0e, 0x00000e0e, 0x00000e0e } }, 8498c2ecf20Sopenharmony_ci { AR5K_PHY_PA_CTL, 8508c2ecf20Sopenharmony_ci { 0x00000007, 0x0000000b, 0x0000000b } }, 8518c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN, 8528c2ecf20Sopenharmony_ci { 0x0018fa61, 0x001a1a63, 0x001a1a63 } }, 8538c2ecf20Sopenharmony_ci { AR5K_PHY_DESIRED_SIZE, 8548c2ecf20Sopenharmony_ci { 0x0c98b4e0, 0x0c98b0da, 0x0c98b0da } }, 8558c2ecf20Sopenharmony_ci { AR5K_PHY_SIG, 8568c2ecf20Sopenharmony_ci { 0x7ec80d2e, 0x7ec80d2e, 0x7ec80d2e } }, 8578c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCOARSE, 8588c2ecf20Sopenharmony_ci { 0x3139605e, 0x3139605e, 0x3139605e } }, 8598c2ecf20Sopenharmony_ci { AR5K_PHY_WEAK_OFDM_LOW_THR, 8608c2ecf20Sopenharmony_ci { 0x050cb081, 0x050cb081, 0x050cb081 } }, 8618c2ecf20Sopenharmony_ci { AR5K_PHY_RX_DELAY, 8628c2ecf20Sopenharmony_ci { 0x000007d0, 0x0000044c, 0x00000898 } }, 8638c2ecf20Sopenharmony_ci { AR5K_PHY_FRAME_CTL_5211, 8648c2ecf20Sopenharmony_ci { 0xf7b81000, 0xf7b80d00, 0xf7b81000 } }, 8658c2ecf20Sopenharmony_ci { AR5K_PHY_CCKTXCTL, 8668c2ecf20Sopenharmony_ci { 0x00000000, 0x00000000, 0x00000000 } }, 8678c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_CROSSCORR, 8688c2ecf20Sopenharmony_ci { 0xd6be6788, 0xd03e6788, 0xd03e6788 } }, 8698c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_2GHZ, 8708c2ecf20Sopenharmony_ci { 0x002ec1e0, 0x002ac120, 0x002ac120 } }, 8718c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_RX_CTL_4, 8728c2ecf20Sopenharmony_ci { 0x1883800a, 0x1863800a, 0x1883800a } }, 8738c2ecf20Sopenharmony_ci { 0xa300, 8748c2ecf20Sopenharmony_ci { 0x18010000, 0x18010000, 0x18010000 } }, 8758c2ecf20Sopenharmony_ci { 0xa304, 8768c2ecf20Sopenharmony_ci { 0x30032602, 0x30032602, 0x30032602 } }, 8778c2ecf20Sopenharmony_ci { 0xa308, 8788c2ecf20Sopenharmony_ci { 0x48073e06, 0x48073e06, 0x48073e06 } }, 8798c2ecf20Sopenharmony_ci { 0xa30c, 8808c2ecf20Sopenharmony_ci { 0x560b4c0a, 0x560b4c0a, 0x560b4c0a } }, 8818c2ecf20Sopenharmony_ci { 0xa310, 8828c2ecf20Sopenharmony_ci { 0x641a600f, 0x641a600f, 0x641a600f } }, 8838c2ecf20Sopenharmony_ci { 0xa314, 8848c2ecf20Sopenharmony_ci { 0x784f6e1b, 0x784f6e1b, 0x784f6e1b } }, 8858c2ecf20Sopenharmony_ci { 0xa318, 8868c2ecf20Sopenharmony_ci { 0x868f7c5a, 0x868f7c5a, 0x868f7c5a } }, 8878c2ecf20Sopenharmony_ci { 0xa31c, 8888c2ecf20Sopenharmony_ci { 0x90cf865b, 0x8ecf865b, 0x8ecf865b } }, 8898c2ecf20Sopenharmony_ci { 0xa320, 8908c2ecf20Sopenharmony_ci { 0x9d4f970f, 0x9b4f970f, 0x9b4f970f } }, 8918c2ecf20Sopenharmony_ci { 0xa324, 8928c2ecf20Sopenharmony_ci { 0xa7cfa38f, 0xa3cf9f8f, 0xa3cf9f8f } }, 8938c2ecf20Sopenharmony_ci { 0xa328, 8948c2ecf20Sopenharmony_ci { 0xb55faf1f, 0xb35faf1f, 0xb35faf1f } }, 8958c2ecf20Sopenharmony_ci { 0xa32c, 8968c2ecf20Sopenharmony_ci { 0xbddfb99f, 0xbbdfb99f, 0xbbdfb99f } }, 8978c2ecf20Sopenharmony_ci { 0xa330, 8988c2ecf20Sopenharmony_ci { 0xcb7fc53f, 0xcb7fc73f, 0xcb7fc73f } }, 8998c2ecf20Sopenharmony_ci { 0xa334, 9008c2ecf20Sopenharmony_ci { 0xd5ffd1bf, 0xd3ffd1bf, 0xd3ffd1bf } }, 9018c2ecf20Sopenharmony_ci}; 9028c2ecf20Sopenharmony_ci 9038c2ecf20Sopenharmony_cistatic const struct ath5k_ini rf5413_ini_common_end[] = { 9048c2ecf20Sopenharmony_ci { AR5K_DCU_FP, 0x000003e0 }, 9058c2ecf20Sopenharmony_ci { AR5K_5414_CBCFG, 0x00000010 }, 9068c2ecf20Sopenharmony_ci { AR5K_SEQ_MASK, 0x0000000f }, 9078c2ecf20Sopenharmony_ci { 0x809c, 0x00000000 }, 9088c2ecf20Sopenharmony_ci { 0x80a0, 0x00000000 }, 9098c2ecf20Sopenharmony_ci { AR5K_MIC_QOS_CTL, 0x00000000 }, 9108c2ecf20Sopenharmony_ci { AR5K_MIC_QOS_SEL, 0x00000000 }, 9118c2ecf20Sopenharmony_ci { AR5K_MISC_MODE, 0x00000000 }, 9128c2ecf20Sopenharmony_ci { AR5K_OFDM_FIL_CNT, 0x00000000 }, 9138c2ecf20Sopenharmony_ci { AR5K_CCK_FIL_CNT, 0x00000000 }, 9148c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT1, 0x00000000 }, 9158c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT1_MASK, 0x00000000 }, 9168c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT2, 0x00000000 }, 9178c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT2_MASK, 0x00000000 }, 9188c2ecf20Sopenharmony_ci { AR5K_TSF_THRES, 0x00000000 }, 9198c2ecf20Sopenharmony_ci { 0x8140, 0x800003f9 }, 9208c2ecf20Sopenharmony_ci { 0x8144, 0x00000000 }, 9218c2ecf20Sopenharmony_ci { AR5K_PHY_AGC, 0x00000000 }, 9228c2ecf20Sopenharmony_ci { AR5K_PHY_ADC_CTL, 0x0000a000 }, 9238c2ecf20Sopenharmony_ci { 0x983c, 0x00200400 }, 9248c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_OFFSET, 0x1284233c }, 9258c2ecf20Sopenharmony_ci { AR5K_PHY_SCR, 0x0000001f }, 9268c2ecf20Sopenharmony_ci { AR5K_PHY_SLMT, 0x00000080 }, 9278c2ecf20Sopenharmony_ci { AR5K_PHY_SCAL, 0x0000000e }, 9288c2ecf20Sopenharmony_ci { 0x9958, 0x00081fff }, 9298c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_7, 0x00000000 }, 9308c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_8, 0x02800000 }, 9318c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_11, 0x00000000 }, 9328c2ecf20Sopenharmony_ci { AR5K_PHY_HEAVY_CLIP_ENABLE, 0x00000000 }, 9338c2ecf20Sopenharmony_ci { 0x99e4, 0xaaaaaaaa }, 9348c2ecf20Sopenharmony_ci { 0x99e8, 0x3c466478 }, 9358c2ecf20Sopenharmony_ci { 0x99ec, 0x000000aa }, 9368c2ecf20Sopenharmony_ci { AR5K_PHY_SCLOCK, 0x0000000c }, 9378c2ecf20Sopenharmony_ci { AR5K_PHY_SDELAY, 0x000000ff }, 9388c2ecf20Sopenharmony_ci { AR5K_PHY_SPENDING, 0x00000014 }, 9398c2ecf20Sopenharmony_ci { AR5K_PHY_DAG_CCK_CTL, 0x000009b5 }, 9408c2ecf20Sopenharmony_ci { 0xa23c, 0x93c889af }, 9418c2ecf20Sopenharmony_ci { AR5K_PHY_FAST_ADC, 0x00000001 }, 9428c2ecf20Sopenharmony_ci { 0xa250, 0x0000a000 }, 9438c2ecf20Sopenharmony_ci { AR5K_PHY_BLUETOOTH, 0x00000000 }, 9448c2ecf20Sopenharmony_ci { AR5K_PHY_TPC_RG1, 0x0cc75380 }, 9458c2ecf20Sopenharmony_ci { 0xa25c, 0x0f0f0f01 }, 9468c2ecf20Sopenharmony_ci { 0xa260, 0x5f690f01 }, 9478c2ecf20Sopenharmony_ci { 0xa264, 0x00418a11 }, 9488c2ecf20Sopenharmony_ci { 0xa268, 0x00000000 }, 9498c2ecf20Sopenharmony_ci { AR5K_PHY_TPC_RG5, 0x0c30c16a }, 9508c2ecf20Sopenharmony_ci { 0xa270, 0x00820820 }, 9518c2ecf20Sopenharmony_ci { 0xa274, 0x081b7caa }, 9528c2ecf20Sopenharmony_ci { 0xa278, 0x1ce739ce }, 9538c2ecf20Sopenharmony_ci { 0xa27c, 0x051701ce }, 9548c2ecf20Sopenharmony_ci { 0xa338, 0x00000000 }, 9558c2ecf20Sopenharmony_ci { 0xa33c, 0x00000000 }, 9568c2ecf20Sopenharmony_ci { 0xa340, 0x00000000 }, 9578c2ecf20Sopenharmony_ci { 0xa344, 0x00000000 }, 9588c2ecf20Sopenharmony_ci { 0xa348, 0x3fffffff }, 9598c2ecf20Sopenharmony_ci { 0xa34c, 0x3fffffff }, 9608c2ecf20Sopenharmony_ci { 0xa350, 0x3fffffff }, 9618c2ecf20Sopenharmony_ci { 0xa354, 0x0003ffff }, 9628c2ecf20Sopenharmony_ci { 0xa358, 0x79a8aa1f }, 9638c2ecf20Sopenharmony_ci { 0xa35c, 0x066c420f }, 9648c2ecf20Sopenharmony_ci { 0xa360, 0x0f282207 }, 9658c2ecf20Sopenharmony_ci { 0xa364, 0x17601685 }, 9668c2ecf20Sopenharmony_ci { 0xa368, 0x1f801104 }, 9678c2ecf20Sopenharmony_ci { 0xa36c, 0x37a00c03 }, 9688c2ecf20Sopenharmony_ci { 0xa370, 0x3fc40883 }, 9698c2ecf20Sopenharmony_ci { 0xa374, 0x57c00803 }, 9708c2ecf20Sopenharmony_ci { 0xa378, 0x5fd80682 }, 9718c2ecf20Sopenharmony_ci { 0xa37c, 0x7fe00482 }, 9728c2ecf20Sopenharmony_ci { 0xa380, 0x7f3c7bba }, 9738c2ecf20Sopenharmony_ci { 0xa384, 0xf3307ff0 }, 9748c2ecf20Sopenharmony_ci}; 9758c2ecf20Sopenharmony_ci 9768c2ecf20Sopenharmony_ci/* Initial mode-specific settings for RF2413/2414 9778c2ecf20Sopenharmony_ci * (Written after ar5212_ini) */ 9788c2ecf20Sopenharmony_ci/* XXX: a mode ? */ 9798c2ecf20Sopenharmony_cistatic const struct ath5k_ini_mode rf2413_ini_mode_end[] = { 9808c2ecf20Sopenharmony_ci { AR5K_TXCFG, 9818c2ecf20Sopenharmony_ci /* A/XR B G */ 9828c2ecf20Sopenharmony_ci { 0x00000015, 0x00000015, 0x00000015 } }, 9838c2ecf20Sopenharmony_ci { AR5K_USEC_5211, 9848c2ecf20Sopenharmony_ci { 0x128d93a7, 0x04e01395, 0x12e013ab } }, 9858c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL3, 9868c2ecf20Sopenharmony_ci { 0x0a020001, 0x05020000, 0x0a020001 } }, 9878c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL4, 9888c2ecf20Sopenharmony_ci { 0x00000e00, 0x00000e00, 0x00000e00 } }, 9898c2ecf20Sopenharmony_ci { AR5K_PHY_PA_CTL, 9908c2ecf20Sopenharmony_ci { 0x00000002, 0x0000000a, 0x0000000a } }, 9918c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN, 9928c2ecf20Sopenharmony_ci { 0x0018da6d, 0x001a6a64, 0x001a6a64 } }, 9938c2ecf20Sopenharmony_ci { AR5K_PHY_DESIRED_SIZE, 9948c2ecf20Sopenharmony_ci { 0x0de8b4e0, 0x0de8b0da, 0x0c98b0da } }, 9958c2ecf20Sopenharmony_ci { AR5K_PHY_SIG, 9968c2ecf20Sopenharmony_ci { 0x7e800d2e, 0x7ee80d2e, 0x7ec80d2e } }, 9978c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCOARSE, 9988c2ecf20Sopenharmony_ci { 0x3137665e, 0x3137665e, 0x3139605e } }, 9998c2ecf20Sopenharmony_ci { AR5K_PHY_WEAK_OFDM_LOW_THR, 10008c2ecf20Sopenharmony_ci { 0x050cb081, 0x050cb081, 0x050cb081 } }, 10018c2ecf20Sopenharmony_ci { AR5K_PHY_RX_DELAY, 10028c2ecf20Sopenharmony_ci { 0x000007d0, 0x0000044c, 0x00000898 } }, 10038c2ecf20Sopenharmony_ci { AR5K_PHY_FRAME_CTL_5211, 10048c2ecf20Sopenharmony_ci { 0xf7b81000, 0xf7b80d00, 0xf7b81000 } }, 10058c2ecf20Sopenharmony_ci { AR5K_PHY_CCKTXCTL, 10068c2ecf20Sopenharmony_ci { 0x00000000, 0x00000000, 0x00000000 } }, 10078c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_CROSSCORR, 10088c2ecf20Sopenharmony_ci { 0xd6be6788, 0xd03e6788, 0xd03e6788 } }, 10098c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_2GHZ, 10108c2ecf20Sopenharmony_ci { 0x002c0140, 0x0042c140, 0x0042c140 } }, 10118c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_RX_CTL_4, 10128c2ecf20Sopenharmony_ci { 0x1883800a, 0x1863800a, 0x1883800a } }, 10138c2ecf20Sopenharmony_ci}; 10148c2ecf20Sopenharmony_ci 10158c2ecf20Sopenharmony_cistatic const struct ath5k_ini rf2413_ini_common_end[] = { 10168c2ecf20Sopenharmony_ci { AR5K_DCU_FP, 0x000003e0 }, 10178c2ecf20Sopenharmony_ci { AR5K_SEQ_MASK, 0x0000000f }, 10188c2ecf20Sopenharmony_ci { AR5K_MIC_QOS_CTL, 0x00000000 }, 10198c2ecf20Sopenharmony_ci { AR5K_MIC_QOS_SEL, 0x00000000 }, 10208c2ecf20Sopenharmony_ci { AR5K_MISC_MODE, 0x00000000 }, 10218c2ecf20Sopenharmony_ci { AR5K_OFDM_FIL_CNT, 0x00000000 }, 10228c2ecf20Sopenharmony_ci { AR5K_CCK_FIL_CNT, 0x00000000 }, 10238c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT1, 0x00000000 }, 10248c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT1_MASK, 0x00000000 }, 10258c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT2, 0x00000000 }, 10268c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT2_MASK, 0x00000000 }, 10278c2ecf20Sopenharmony_ci { AR5K_TSF_THRES, 0x00000000 }, 10288c2ecf20Sopenharmony_ci { 0x8140, 0x800000a8 }, 10298c2ecf20Sopenharmony_ci { 0x8144, 0x00000000 }, 10308c2ecf20Sopenharmony_ci { AR5K_PHY_AGC, 0x00000000 }, 10318c2ecf20Sopenharmony_ci { AR5K_PHY_ADC_CTL, 0x0000a000 }, 10328c2ecf20Sopenharmony_ci { 0x983c, 0x00200400 }, 10338c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_OFFSET, 0x1284233c }, 10348c2ecf20Sopenharmony_ci { AR5K_PHY_SCR, 0x0000001f }, 10358c2ecf20Sopenharmony_ci { AR5K_PHY_SLMT, 0x00000080 }, 10368c2ecf20Sopenharmony_ci { AR5K_PHY_SCAL, 0x0000000e }, 10378c2ecf20Sopenharmony_ci { 0x9958, 0x000000ff }, 10388c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_7, 0x00000000 }, 10398c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_8, 0x02800000 }, 10408c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_11, 0x00000000 }, 10418c2ecf20Sopenharmony_ci { AR5K_PHY_HEAVY_CLIP_ENABLE, 0x00000000 }, 10428c2ecf20Sopenharmony_ci { 0x99e4, 0xaaaaaaaa }, 10438c2ecf20Sopenharmony_ci { 0x99e8, 0x3c466478 }, 10448c2ecf20Sopenharmony_ci { 0x99ec, 0x000000aa }, 10458c2ecf20Sopenharmony_ci { AR5K_PHY_SCLOCK, 0x0000000c }, 10468c2ecf20Sopenharmony_ci { AR5K_PHY_SDELAY, 0x000000ff }, 10478c2ecf20Sopenharmony_ci { AR5K_PHY_SPENDING, 0x00000014 }, 10488c2ecf20Sopenharmony_ci { AR5K_PHY_DAG_CCK_CTL, 0x000009b5 }, 10498c2ecf20Sopenharmony_ci { 0xa23c, 0x93c889af }, 10508c2ecf20Sopenharmony_ci { AR5K_PHY_FAST_ADC, 0x00000001 }, 10518c2ecf20Sopenharmony_ci { 0xa250, 0x0000a000 }, 10528c2ecf20Sopenharmony_ci { AR5K_PHY_BLUETOOTH, 0x00000000 }, 10538c2ecf20Sopenharmony_ci { AR5K_PHY_TPC_RG1, 0x0cc75380 }, 10548c2ecf20Sopenharmony_ci { 0xa25c, 0x0f0f0f01 }, 10558c2ecf20Sopenharmony_ci { 0xa260, 0x5f690f01 }, 10568c2ecf20Sopenharmony_ci { 0xa264, 0x00418a11 }, 10578c2ecf20Sopenharmony_ci { 0xa268, 0x00000000 }, 10588c2ecf20Sopenharmony_ci { AR5K_PHY_TPC_RG5, 0x0c30c16a }, 10598c2ecf20Sopenharmony_ci { 0xa270, 0x00820820 }, 10608c2ecf20Sopenharmony_ci { 0xa274, 0x001b7caa }, 10618c2ecf20Sopenharmony_ci { 0xa278, 0x1ce739ce }, 10628c2ecf20Sopenharmony_ci { 0xa27c, 0x051701ce }, 10638c2ecf20Sopenharmony_ci { 0xa300, 0x18010000 }, 10648c2ecf20Sopenharmony_ci { 0xa304, 0x30032602 }, 10658c2ecf20Sopenharmony_ci { 0xa308, 0x48073e06 }, 10668c2ecf20Sopenharmony_ci { 0xa30c, 0x560b4c0a }, 10678c2ecf20Sopenharmony_ci { 0xa310, 0x641a600f }, 10688c2ecf20Sopenharmony_ci { 0xa314, 0x784f6e1b }, 10698c2ecf20Sopenharmony_ci { 0xa318, 0x868f7c5a }, 10708c2ecf20Sopenharmony_ci { 0xa31c, 0x8ecf865b }, 10718c2ecf20Sopenharmony_ci { 0xa320, 0x9d4f970f }, 10728c2ecf20Sopenharmony_ci { 0xa324, 0xa5cfa18f }, 10738c2ecf20Sopenharmony_ci { 0xa328, 0xb55faf1f }, 10748c2ecf20Sopenharmony_ci { 0xa32c, 0xbddfb99f }, 10758c2ecf20Sopenharmony_ci { 0xa330, 0xcd7fc73f }, 10768c2ecf20Sopenharmony_ci { 0xa334, 0xd5ffd1bf }, 10778c2ecf20Sopenharmony_ci { 0xa338, 0x00000000 }, 10788c2ecf20Sopenharmony_ci { 0xa33c, 0x00000000 }, 10798c2ecf20Sopenharmony_ci { 0xa340, 0x00000000 }, 10808c2ecf20Sopenharmony_ci { 0xa344, 0x00000000 }, 10818c2ecf20Sopenharmony_ci { 0xa348, 0x3fffffff }, 10828c2ecf20Sopenharmony_ci { 0xa34c, 0x3fffffff }, 10838c2ecf20Sopenharmony_ci { 0xa350, 0x3fffffff }, 10848c2ecf20Sopenharmony_ci { 0xa354, 0x0003ffff }, 10858c2ecf20Sopenharmony_ci { 0xa358, 0x79a8aa1f }, 10868c2ecf20Sopenharmony_ci { 0xa35c, 0x066c420f }, 10878c2ecf20Sopenharmony_ci { 0xa360, 0x0f282207 }, 10888c2ecf20Sopenharmony_ci { 0xa364, 0x17601685 }, 10898c2ecf20Sopenharmony_ci { 0xa368, 0x1f801104 }, 10908c2ecf20Sopenharmony_ci { 0xa36c, 0x37a00c03 }, 10918c2ecf20Sopenharmony_ci { 0xa370, 0x3fc40883 }, 10928c2ecf20Sopenharmony_ci { 0xa374, 0x57c00803 }, 10938c2ecf20Sopenharmony_ci { 0xa378, 0x5fd80682 }, 10948c2ecf20Sopenharmony_ci { 0xa37c, 0x7fe00482 }, 10958c2ecf20Sopenharmony_ci { 0xa380, 0x7f3c7bba }, 10968c2ecf20Sopenharmony_ci { 0xa384, 0xf3307ff0 }, 10978c2ecf20Sopenharmony_ci}; 10988c2ecf20Sopenharmony_ci 10998c2ecf20Sopenharmony_ci/* Initial mode-specific settings for RF2425 11008c2ecf20Sopenharmony_ci * (Written after ar5212_ini) */ 11018c2ecf20Sopenharmony_ci/* XXX: a mode ? */ 11028c2ecf20Sopenharmony_cistatic const struct ath5k_ini_mode rf2425_ini_mode_end[] = { 11038c2ecf20Sopenharmony_ci { AR5K_TXCFG, 11048c2ecf20Sopenharmony_ci /* A/XR B G */ 11058c2ecf20Sopenharmony_ci { 0x00000015, 0x00000015, 0x00000015 } }, 11068c2ecf20Sopenharmony_ci { AR5K_USEC_5211, 11078c2ecf20Sopenharmony_ci { 0x128d93a7, 0x04e01395, 0x12e013ab } }, 11088c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL3, 11098c2ecf20Sopenharmony_ci { 0x0a020001, 0x05020100, 0x0a020001 } }, 11108c2ecf20Sopenharmony_ci { AR5K_PHY_RF_CTL4, 11118c2ecf20Sopenharmony_ci { 0x00000e0e, 0x00000e0e, 0x00000e0e } }, 11128c2ecf20Sopenharmony_ci { AR5K_PHY_PA_CTL, 11138c2ecf20Sopenharmony_ci { 0x00000003, 0x0000000b, 0x0000000b } }, 11148c2ecf20Sopenharmony_ci { AR5K_PHY_SETTLING, 11158c2ecf20Sopenharmony_ci { 0x1372161c, 0x13721722, 0x13721422 } }, 11168c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN, 11178c2ecf20Sopenharmony_ci { 0x0018fa61, 0x00199a65, 0x00199a65 } }, 11188c2ecf20Sopenharmony_ci { AR5K_PHY_DESIRED_SIZE, 11198c2ecf20Sopenharmony_ci { 0x0c98b4e0, 0x0c98b0da, 0x0c98b0da } }, 11208c2ecf20Sopenharmony_ci { AR5K_PHY_SIG, 11218c2ecf20Sopenharmony_ci { 0x7ec80d2e, 0x7ec80d2e, 0x7ec80d2e } }, 11228c2ecf20Sopenharmony_ci { AR5K_PHY_AGCCOARSE, 11238c2ecf20Sopenharmony_ci { 0x3139605e, 0x3139605e, 0x3139605e } }, 11248c2ecf20Sopenharmony_ci { AR5K_PHY_WEAK_OFDM_LOW_THR, 11258c2ecf20Sopenharmony_ci { 0x050cb081, 0x050cb081, 0x050cb081 } }, 11268c2ecf20Sopenharmony_ci { AR5K_PHY_RX_DELAY, 11278c2ecf20Sopenharmony_ci { 0x000007d0, 0x0000044c, 0x00000898 } }, 11288c2ecf20Sopenharmony_ci { AR5K_PHY_FRAME_CTL_5211, 11298c2ecf20Sopenharmony_ci { 0xf7b81000, 0xf7b80d00, 0xf7b81000 } }, 11308c2ecf20Sopenharmony_ci { AR5K_PHY_CCKTXCTL, 11318c2ecf20Sopenharmony_ci { 0x00000000, 0x00000000, 0x00000000 } }, 11328c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_CROSSCORR, 11338c2ecf20Sopenharmony_ci { 0xd6be6788, 0xd03e6788, 0xd03e6788 } }, 11348c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_2GHZ, 11358c2ecf20Sopenharmony_ci { 0x00000140, 0x0052c140, 0x0052c140 } }, 11368c2ecf20Sopenharmony_ci { AR5K_PHY_CCK_RX_CTL_4, 11378c2ecf20Sopenharmony_ci { 0x1883800a, 0x1863800a, 0x1883800a } }, 11388c2ecf20Sopenharmony_ci { 0xa324, 11398c2ecf20Sopenharmony_ci { 0xa7cfa7cf, 0xa7cfa7cf, 0xa7cfa7cf } }, 11408c2ecf20Sopenharmony_ci { 0xa328, 11418c2ecf20Sopenharmony_ci { 0xa7cfa7cf, 0xa7cfa7cf, 0xa7cfa7cf } }, 11428c2ecf20Sopenharmony_ci { 0xa32c, 11438c2ecf20Sopenharmony_ci { 0xa7cfa7cf, 0xa7cfa7cf, 0xa7cfa7cf } }, 11448c2ecf20Sopenharmony_ci { 0xa330, 11458c2ecf20Sopenharmony_ci { 0xa7cfa7cf, 0xa7cfa7cf, 0xa7cfa7cf } }, 11468c2ecf20Sopenharmony_ci { 0xa334, 11478c2ecf20Sopenharmony_ci { 0xa7cfa7cf, 0xa7cfa7cf, 0xa7cfa7cf } }, 11488c2ecf20Sopenharmony_ci}; 11498c2ecf20Sopenharmony_ci 11508c2ecf20Sopenharmony_cistatic const struct ath5k_ini rf2425_ini_common_end[] = { 11518c2ecf20Sopenharmony_ci { AR5K_DCU_FP, 0x000003e0 }, 11528c2ecf20Sopenharmony_ci { AR5K_SEQ_MASK, 0x0000000f }, 11538c2ecf20Sopenharmony_ci { 0x809c, 0x00000000 }, 11548c2ecf20Sopenharmony_ci { 0x80a0, 0x00000000 }, 11558c2ecf20Sopenharmony_ci { AR5K_MIC_QOS_CTL, 0x00000000 }, 11568c2ecf20Sopenharmony_ci { AR5K_MIC_QOS_SEL, 0x00000000 }, 11578c2ecf20Sopenharmony_ci { AR5K_MISC_MODE, 0x00000000 }, 11588c2ecf20Sopenharmony_ci { AR5K_OFDM_FIL_CNT, 0x00000000 }, 11598c2ecf20Sopenharmony_ci { AR5K_CCK_FIL_CNT, 0x00000000 }, 11608c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT1, 0x00000000 }, 11618c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT1_MASK, 0x00000000 }, 11628c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT2, 0x00000000 }, 11638c2ecf20Sopenharmony_ci { AR5K_PHYERR_CNT2_MASK, 0x00000000 }, 11648c2ecf20Sopenharmony_ci { AR5K_TSF_THRES, 0x00000000 }, 11658c2ecf20Sopenharmony_ci { 0x8140, 0x800003f9 }, 11668c2ecf20Sopenharmony_ci { 0x8144, 0x00000000 }, 11678c2ecf20Sopenharmony_ci { AR5K_PHY_AGC, 0x00000000 }, 11688c2ecf20Sopenharmony_ci { AR5K_PHY_ADC_CTL, 0x0000a000 }, 11698c2ecf20Sopenharmony_ci { 0x983c, 0x00200400 }, 11708c2ecf20Sopenharmony_ci { AR5K_PHY_GAIN_OFFSET, 0x1284233c }, 11718c2ecf20Sopenharmony_ci { AR5K_PHY_SCR, 0x0000001f }, 11728c2ecf20Sopenharmony_ci { AR5K_PHY_SLMT, 0x00000080 }, 11738c2ecf20Sopenharmony_ci { AR5K_PHY_SCAL, 0x0000000e }, 11748c2ecf20Sopenharmony_ci { 0x9958, 0x00081fff }, 11758c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_7, 0x00000000 }, 11768c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_8, 0x02800000 }, 11778c2ecf20Sopenharmony_ci { AR5K_PHY_TIMING_11, 0x00000000 }, 11788c2ecf20Sopenharmony_ci { 0x99dc, 0xfebadbe8 }, 11798c2ecf20Sopenharmony_ci { AR5K_PHY_HEAVY_CLIP_ENABLE, 0x00000000 }, 11808c2ecf20Sopenharmony_ci { 0x99e4, 0xaaaaaaaa }, 11818c2ecf20Sopenharmony_ci { 0x99e8, 0x3c466478 }, 11828c2ecf20Sopenharmony_ci { 0x99ec, 0x000000aa }, 11838c2ecf20Sopenharmony_ci { AR5K_PHY_SCLOCK, 0x0000000c }, 11848c2ecf20Sopenharmony_ci { AR5K_PHY_SDELAY, 0x000000ff }, 11858c2ecf20Sopenharmony_ci { AR5K_PHY_SPENDING, 0x00000014 }, 11868c2ecf20Sopenharmony_ci { AR5K_PHY_DAG_CCK_CTL, 0x000009b5 }, 11878c2ecf20Sopenharmony_ci { AR5K_PHY_TXPOWER_RATE3, 0x20202020 }, 11888c2ecf20Sopenharmony_ci { AR5K_PHY_TXPOWER_RATE4, 0x20202020 }, 11898c2ecf20Sopenharmony_ci { 0xa23c, 0x93c889af }, 11908c2ecf20Sopenharmony_ci { AR5K_PHY_FAST_ADC, 0x00000001 }, 11918c2ecf20Sopenharmony_ci { 0xa250, 0x0000a000 }, 11928c2ecf20Sopenharmony_ci { AR5K_PHY_BLUETOOTH, 0x00000000 }, 11938c2ecf20Sopenharmony_ci { AR5K_PHY_TPC_RG1, 0x0cc75380 }, 11948c2ecf20Sopenharmony_ci { 0xa25c, 0x0f0f0f01 }, 11958c2ecf20Sopenharmony_ci { 0xa260, 0x5f690f01 }, 11968c2ecf20Sopenharmony_ci { 0xa264, 0x00418a11 }, 11978c2ecf20Sopenharmony_ci { 0xa268, 0x00000000 }, 11988c2ecf20Sopenharmony_ci { AR5K_PHY_TPC_RG5, 0x0c30c166 }, 11998c2ecf20Sopenharmony_ci { 0xa270, 0x00820820 }, 12008c2ecf20Sopenharmony_ci { 0xa274, 0x081a3caa }, 12018c2ecf20Sopenharmony_ci { 0xa278, 0x1ce739ce }, 12028c2ecf20Sopenharmony_ci { 0xa27c, 0x051701ce }, 12038c2ecf20Sopenharmony_ci { 0xa300, 0x16010000 }, 12048c2ecf20Sopenharmony_ci { 0xa304, 0x2c032402 }, 12058c2ecf20Sopenharmony_ci { 0xa308, 0x48433e42 }, 12068c2ecf20Sopenharmony_ci { 0xa30c, 0x5a0f500b }, 12078c2ecf20Sopenharmony_ci { 0xa310, 0x6c4b624a }, 12088c2ecf20Sopenharmony_ci { 0xa314, 0x7e8b748a }, 12098c2ecf20Sopenharmony_ci { 0xa318, 0x96cf8ccb }, 12108c2ecf20Sopenharmony_ci { 0xa31c, 0xa34f9d0f }, 12118c2ecf20Sopenharmony_ci { 0xa320, 0xa7cfa58f }, 12128c2ecf20Sopenharmony_ci { 0xa348, 0x3fffffff }, 12138c2ecf20Sopenharmony_ci { 0xa34c, 0x3fffffff }, 12148c2ecf20Sopenharmony_ci { 0xa350, 0x3fffffff }, 12158c2ecf20Sopenharmony_ci { 0xa354, 0x0003ffff }, 12168c2ecf20Sopenharmony_ci { 0xa358, 0x79a8aa1f }, 12178c2ecf20Sopenharmony_ci { 0xa35c, 0x066c420f }, 12188c2ecf20Sopenharmony_ci { 0xa360, 0x0f282207 }, 12198c2ecf20Sopenharmony_ci { 0xa364, 0x17601685 }, 12208c2ecf20Sopenharmony_ci { 0xa368, 0x1f801104 }, 12218c2ecf20Sopenharmony_ci { 0xa36c, 0x37a00c03 }, 12228c2ecf20Sopenharmony_ci { 0xa370, 0x3fc40883 }, 12238c2ecf20Sopenharmony_ci { 0xa374, 0x57c00803 }, 12248c2ecf20Sopenharmony_ci { 0xa378, 0x5fd80682 }, 12258c2ecf20Sopenharmony_ci { 0xa37c, 0x7fe00482 }, 12268c2ecf20Sopenharmony_ci { 0xa380, 0x7f3c7bba }, 12278c2ecf20Sopenharmony_ci { 0xa384, 0xf3307ff0 }, 12288c2ecf20Sopenharmony_ci}; 12298c2ecf20Sopenharmony_ci 12308c2ecf20Sopenharmony_ci/* 12318c2ecf20Sopenharmony_ci * Initial BaseBand Gain settings for RF5111/5112 (AR5210 comes with 12328c2ecf20Sopenharmony_ci * RF5110 only so initial BB Gain settings are included in AR5K_AR5210_INI) 12338c2ecf20Sopenharmony_ci */ 12348c2ecf20Sopenharmony_ci 12358c2ecf20Sopenharmony_ci/* RF5111 Initial BaseBand Gain settings */ 12368c2ecf20Sopenharmony_cistatic const struct ath5k_ini rf5111_ini_bbgain[] = { 12378c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(0), 0x00000000 }, 12388c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(1), 0x00000020 }, 12398c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(2), 0x00000010 }, 12408c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(3), 0x00000030 }, 12418c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(4), 0x00000008 }, 12428c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(5), 0x00000028 }, 12438c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(6), 0x00000004 }, 12448c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(7), 0x00000024 }, 12458c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(8), 0x00000014 }, 12468c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(9), 0x00000034 }, 12478c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(10), 0x0000000c }, 12488c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(11), 0x0000002c }, 12498c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(12), 0x00000002 }, 12508c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(13), 0x00000022 }, 12518c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(14), 0x00000012 }, 12528c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(15), 0x00000032 }, 12538c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(16), 0x0000000a }, 12548c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(17), 0x0000002a }, 12558c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(18), 0x00000006 }, 12568c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(19), 0x00000026 }, 12578c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(20), 0x00000016 }, 12588c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(21), 0x00000036 }, 12598c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(22), 0x0000000e }, 12608c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(23), 0x0000002e }, 12618c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(24), 0x00000001 }, 12628c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(25), 0x00000021 }, 12638c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(26), 0x00000011 }, 12648c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(27), 0x00000031 }, 12658c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(28), 0x00000009 }, 12668c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(29), 0x00000029 }, 12678c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(30), 0x00000005 }, 12688c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(31), 0x00000025 }, 12698c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(32), 0x00000015 }, 12708c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(33), 0x00000035 }, 12718c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(34), 0x0000000d }, 12728c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(35), 0x0000002d }, 12738c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(36), 0x00000003 }, 12748c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(37), 0x00000023 }, 12758c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(38), 0x00000013 }, 12768c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(39), 0x00000033 }, 12778c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(40), 0x0000000b }, 12788c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(41), 0x0000002b }, 12798c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(42), 0x0000002b }, 12808c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(43), 0x0000002b }, 12818c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(44), 0x0000002b }, 12828c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(45), 0x0000002b }, 12838c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(46), 0x0000002b }, 12848c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(47), 0x0000002b }, 12858c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(48), 0x0000002b }, 12868c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(49), 0x0000002b }, 12878c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(50), 0x0000002b }, 12888c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(51), 0x0000002b }, 12898c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(52), 0x0000002b }, 12908c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(53), 0x0000002b }, 12918c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(54), 0x0000002b }, 12928c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(55), 0x0000002b }, 12938c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(56), 0x0000002b }, 12948c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(57), 0x0000002b }, 12958c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(58), 0x0000002b }, 12968c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(59), 0x0000002b }, 12978c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(60), 0x0000002b }, 12988c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(61), 0x0000002b }, 12998c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(62), 0x00000002 }, 13008c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(63), 0x00000016 }, 13018c2ecf20Sopenharmony_ci}; 13028c2ecf20Sopenharmony_ci 13038c2ecf20Sopenharmony_ci/* RF5112 Initial BaseBand Gain settings (Same for RF5413/5414+) */ 13048c2ecf20Sopenharmony_cistatic const struct ath5k_ini rf5112_ini_bbgain[] = { 13058c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(0), 0x00000000 }, 13068c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(1), 0x00000001 }, 13078c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(2), 0x00000002 }, 13088c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(3), 0x00000003 }, 13098c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(4), 0x00000004 }, 13108c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(5), 0x00000005 }, 13118c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(6), 0x00000008 }, 13128c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(7), 0x00000009 }, 13138c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(8), 0x0000000a }, 13148c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(9), 0x0000000b }, 13158c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(10), 0x0000000c }, 13168c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(11), 0x0000000d }, 13178c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(12), 0x00000010 }, 13188c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(13), 0x00000011 }, 13198c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(14), 0x00000012 }, 13208c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(15), 0x00000013 }, 13218c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(16), 0x00000014 }, 13228c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(17), 0x00000015 }, 13238c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(18), 0x00000018 }, 13248c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(19), 0x00000019 }, 13258c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(20), 0x0000001a }, 13268c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(21), 0x0000001b }, 13278c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(22), 0x0000001c }, 13288c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(23), 0x0000001d }, 13298c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(24), 0x00000020 }, 13308c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(25), 0x00000021 }, 13318c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(26), 0x00000022 }, 13328c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(27), 0x00000023 }, 13338c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(28), 0x00000024 }, 13348c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(29), 0x00000025 }, 13358c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(30), 0x00000028 }, 13368c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(31), 0x00000029 }, 13378c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(32), 0x0000002a }, 13388c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(33), 0x0000002b }, 13398c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(34), 0x0000002c }, 13408c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(35), 0x0000002d }, 13418c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(36), 0x00000030 }, 13428c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(37), 0x00000031 }, 13438c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(38), 0x00000032 }, 13448c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(39), 0x00000033 }, 13458c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(40), 0x00000034 }, 13468c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(41), 0x00000035 }, 13478c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(42), 0x00000035 }, 13488c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(43), 0x00000035 }, 13498c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(44), 0x00000035 }, 13508c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(45), 0x00000035 }, 13518c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(46), 0x00000035 }, 13528c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(47), 0x00000035 }, 13538c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(48), 0x00000035 }, 13548c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(49), 0x00000035 }, 13558c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(50), 0x00000035 }, 13568c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(51), 0x00000035 }, 13578c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(52), 0x00000035 }, 13588c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(53), 0x00000035 }, 13598c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(54), 0x00000035 }, 13608c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(55), 0x00000035 }, 13618c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(56), 0x00000035 }, 13628c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(57), 0x00000035 }, 13638c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(58), 0x00000035 }, 13648c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(59), 0x00000035 }, 13658c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(60), 0x00000035 }, 13668c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(61), 0x00000035 }, 13678c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(62), 0x00000010 }, 13688c2ecf20Sopenharmony_ci { AR5K_BB_GAIN(63), 0x0000001a }, 13698c2ecf20Sopenharmony_ci}; 13708c2ecf20Sopenharmony_ci 13718c2ecf20Sopenharmony_ci 13728c2ecf20Sopenharmony_ci/** 13738c2ecf20Sopenharmony_ci * ath5k_hw_ini_registers() - Write initial register dump common for all modes 13748c2ecf20Sopenharmony_ci * @ah: The &struct ath5k_hw 13758c2ecf20Sopenharmony_ci * @size: Dump size 13768c2ecf20Sopenharmony_ci * @ini_regs: The array of &struct ath5k_ini 13778c2ecf20Sopenharmony_ci * @skip_pcu: Skip PCU registers 13788c2ecf20Sopenharmony_ci */ 13798c2ecf20Sopenharmony_cistatic void 13808c2ecf20Sopenharmony_ciath5k_hw_ini_registers(struct ath5k_hw *ah, unsigned int size, 13818c2ecf20Sopenharmony_ci const struct ath5k_ini *ini_regs, bool skip_pcu) 13828c2ecf20Sopenharmony_ci{ 13838c2ecf20Sopenharmony_ci unsigned int i; 13848c2ecf20Sopenharmony_ci 13858c2ecf20Sopenharmony_ci /* Write initial registers */ 13868c2ecf20Sopenharmony_ci for (i = 0; i < size; i++) { 13878c2ecf20Sopenharmony_ci /* Skip PCU registers if 13888c2ecf20Sopenharmony_ci * requested */ 13898c2ecf20Sopenharmony_ci if (skip_pcu && 13908c2ecf20Sopenharmony_ci ini_regs[i].ini_register >= AR5K_PCU_MIN && 13918c2ecf20Sopenharmony_ci ini_regs[i].ini_register <= AR5K_PCU_MAX) 13928c2ecf20Sopenharmony_ci continue; 13938c2ecf20Sopenharmony_ci 13948c2ecf20Sopenharmony_ci switch (ini_regs[i].ini_mode) { 13958c2ecf20Sopenharmony_ci case AR5K_INI_READ: 13968c2ecf20Sopenharmony_ci /* Cleared on read */ 13978c2ecf20Sopenharmony_ci ath5k_hw_reg_read(ah, ini_regs[i].ini_register); 13988c2ecf20Sopenharmony_ci break; 13998c2ecf20Sopenharmony_ci case AR5K_INI_WRITE: 14008c2ecf20Sopenharmony_ci default: 14018c2ecf20Sopenharmony_ci AR5K_REG_WAIT(i); 14028c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, ini_regs[i].ini_value, 14038c2ecf20Sopenharmony_ci ini_regs[i].ini_register); 14048c2ecf20Sopenharmony_ci } 14058c2ecf20Sopenharmony_ci } 14068c2ecf20Sopenharmony_ci} 14078c2ecf20Sopenharmony_ci 14088c2ecf20Sopenharmony_ci/** 14098c2ecf20Sopenharmony_ci * ath5k_hw_ini_mode_registers() - Write initial mode-specific register dump 14108c2ecf20Sopenharmony_ci * @ah: The &struct ath5k_hw 14118c2ecf20Sopenharmony_ci * @size: Dump size 14128c2ecf20Sopenharmony_ci * @ini_mode: The array of &struct ath5k_ini_mode 14138c2ecf20Sopenharmony_ci * @mode: One of enum ath5k_driver_mode 14148c2ecf20Sopenharmony_ci */ 14158c2ecf20Sopenharmony_cistatic void 14168c2ecf20Sopenharmony_ciath5k_hw_ini_mode_registers(struct ath5k_hw *ah, 14178c2ecf20Sopenharmony_ci unsigned int size, const struct ath5k_ini_mode *ini_mode, 14188c2ecf20Sopenharmony_ci u8 mode) 14198c2ecf20Sopenharmony_ci{ 14208c2ecf20Sopenharmony_ci unsigned int i; 14218c2ecf20Sopenharmony_ci 14228c2ecf20Sopenharmony_ci for (i = 0; i < size; i++) { 14238c2ecf20Sopenharmony_ci AR5K_REG_WAIT(i); 14248c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, ini_mode[i].mode_value[mode], 14258c2ecf20Sopenharmony_ci (u32)ini_mode[i].mode_register); 14268c2ecf20Sopenharmony_ci } 14278c2ecf20Sopenharmony_ci 14288c2ecf20Sopenharmony_ci} 14298c2ecf20Sopenharmony_ci 14308c2ecf20Sopenharmony_ci/** 14318c2ecf20Sopenharmony_ci * ath5k_hw_write_initvals() - Write initial chip-specific register dump 14328c2ecf20Sopenharmony_ci * @ah: The &struct ath5k_hw 14338c2ecf20Sopenharmony_ci * @mode: One of enum ath5k_driver_mode 14348c2ecf20Sopenharmony_ci * @skip_pcu: Skip PCU registers 14358c2ecf20Sopenharmony_ci * 14368c2ecf20Sopenharmony_ci * Write initial chip-specific register dump, to get the chipset on a 14378c2ecf20Sopenharmony_ci * clean and ready-to-work state after warm reset. 14388c2ecf20Sopenharmony_ci */ 14398c2ecf20Sopenharmony_ciint 14408c2ecf20Sopenharmony_ciath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool skip_pcu) 14418c2ecf20Sopenharmony_ci{ 14428c2ecf20Sopenharmony_ci /* 14438c2ecf20Sopenharmony_ci * Write initial register settings 14448c2ecf20Sopenharmony_ci */ 14458c2ecf20Sopenharmony_ci 14468c2ecf20Sopenharmony_ci /* For AR5212 and compatible */ 14478c2ecf20Sopenharmony_ci if (ah->ah_version == AR5K_AR5212) { 14488c2ecf20Sopenharmony_ci 14498c2ecf20Sopenharmony_ci /* First set of mode-specific settings */ 14508c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, 14518c2ecf20Sopenharmony_ci ARRAY_SIZE(ar5212_ini_mode_start), 14528c2ecf20Sopenharmony_ci ar5212_ini_mode_start, mode); 14538c2ecf20Sopenharmony_ci 14548c2ecf20Sopenharmony_ci /* 14558c2ecf20Sopenharmony_ci * Write initial settings common for all modes 14568c2ecf20Sopenharmony_ci */ 14578c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, ARRAY_SIZE(ar5212_ini_common_start), 14588c2ecf20Sopenharmony_ci ar5212_ini_common_start, skip_pcu); 14598c2ecf20Sopenharmony_ci 14608c2ecf20Sopenharmony_ci /* Second set of mode-specific settings */ 14618c2ecf20Sopenharmony_ci switch (ah->ah_radio) { 14628c2ecf20Sopenharmony_ci case AR5K_RF5111: 14638c2ecf20Sopenharmony_ci 14648c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, 14658c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5111_ini_mode_end), 14668c2ecf20Sopenharmony_ci rf5111_ini_mode_end, mode); 14678c2ecf20Sopenharmony_ci 14688c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 14698c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5111_ini_common_end), 14708c2ecf20Sopenharmony_ci rf5111_ini_common_end, skip_pcu); 14718c2ecf20Sopenharmony_ci 14728c2ecf20Sopenharmony_ci /* Baseband gain table */ 14738c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 14748c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5111_ini_bbgain), 14758c2ecf20Sopenharmony_ci rf5111_ini_bbgain, skip_pcu); 14768c2ecf20Sopenharmony_ci 14778c2ecf20Sopenharmony_ci break; 14788c2ecf20Sopenharmony_ci case AR5K_RF5112: 14798c2ecf20Sopenharmony_ci 14808c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, 14818c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5112_ini_mode_end), 14828c2ecf20Sopenharmony_ci rf5112_ini_mode_end, mode); 14838c2ecf20Sopenharmony_ci 14848c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 14858c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5112_ini_common_end), 14868c2ecf20Sopenharmony_ci rf5112_ini_common_end, skip_pcu); 14878c2ecf20Sopenharmony_ci 14888c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 14898c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5112_ini_bbgain), 14908c2ecf20Sopenharmony_ci rf5112_ini_bbgain, skip_pcu); 14918c2ecf20Sopenharmony_ci 14928c2ecf20Sopenharmony_ci break; 14938c2ecf20Sopenharmony_ci case AR5K_RF5413: 14948c2ecf20Sopenharmony_ci 14958c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, 14968c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5413_ini_mode_end), 14978c2ecf20Sopenharmony_ci rf5413_ini_mode_end, mode); 14988c2ecf20Sopenharmony_ci 14998c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15008c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5413_ini_common_end), 15018c2ecf20Sopenharmony_ci rf5413_ini_common_end, skip_pcu); 15028c2ecf20Sopenharmony_ci 15038c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15048c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5112_ini_bbgain), 15058c2ecf20Sopenharmony_ci rf5112_ini_bbgain, skip_pcu); 15068c2ecf20Sopenharmony_ci 15078c2ecf20Sopenharmony_ci break; 15088c2ecf20Sopenharmony_ci case AR5K_RF2316: 15098c2ecf20Sopenharmony_ci case AR5K_RF2413: 15108c2ecf20Sopenharmony_ci 15118c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, 15128c2ecf20Sopenharmony_ci ARRAY_SIZE(rf2413_ini_mode_end), 15138c2ecf20Sopenharmony_ci rf2413_ini_mode_end, mode); 15148c2ecf20Sopenharmony_ci 15158c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15168c2ecf20Sopenharmony_ci ARRAY_SIZE(rf2413_ini_common_end), 15178c2ecf20Sopenharmony_ci rf2413_ini_common_end, skip_pcu); 15188c2ecf20Sopenharmony_ci 15198c2ecf20Sopenharmony_ci /* Override settings from rf2413_ini_common_end */ 15208c2ecf20Sopenharmony_ci if (ah->ah_radio == AR5K_RF2316) { 15218c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, 0x00004000, 15228c2ecf20Sopenharmony_ci AR5K_PHY_AGC); 15238c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, 0x081b7caa, 15248c2ecf20Sopenharmony_ci 0xa274); 15258c2ecf20Sopenharmony_ci } 15268c2ecf20Sopenharmony_ci 15278c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15288c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5112_ini_bbgain), 15298c2ecf20Sopenharmony_ci rf5112_ini_bbgain, skip_pcu); 15308c2ecf20Sopenharmony_ci break; 15318c2ecf20Sopenharmony_ci case AR5K_RF2317: 15328c2ecf20Sopenharmony_ci 15338c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, 15348c2ecf20Sopenharmony_ci ARRAY_SIZE(rf2413_ini_mode_end), 15358c2ecf20Sopenharmony_ci rf2413_ini_mode_end, mode); 15368c2ecf20Sopenharmony_ci 15378c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15388c2ecf20Sopenharmony_ci ARRAY_SIZE(rf2425_ini_common_end), 15398c2ecf20Sopenharmony_ci rf2425_ini_common_end, skip_pcu); 15408c2ecf20Sopenharmony_ci 15418c2ecf20Sopenharmony_ci /* Override settings from rf2413_ini_mode_end */ 15428c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, 0x00180a65, AR5K_PHY_GAIN); 15438c2ecf20Sopenharmony_ci 15448c2ecf20Sopenharmony_ci /* Override settings from rf2413_ini_common_end */ 15458c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, 0x00004000, AR5K_PHY_AGC); 15468c2ecf20Sopenharmony_ci AR5K_REG_WRITE_BITS(ah, AR5K_PHY_TPC_RG5, 15478c2ecf20Sopenharmony_ci AR5K_PHY_TPC_RG5_PD_GAIN_OVERLAP, 0xa); 15488c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, 0x800000a8, 0x8140); 15498c2ecf20Sopenharmony_ci ath5k_hw_reg_write(ah, 0x000000ff, 0x9958); 15508c2ecf20Sopenharmony_ci 15518c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15528c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5112_ini_bbgain), 15538c2ecf20Sopenharmony_ci rf5112_ini_bbgain, skip_pcu); 15548c2ecf20Sopenharmony_ci break; 15558c2ecf20Sopenharmony_ci case AR5K_RF2425: 15568c2ecf20Sopenharmony_ci 15578c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, 15588c2ecf20Sopenharmony_ci ARRAY_SIZE(rf2425_ini_mode_end), 15598c2ecf20Sopenharmony_ci rf2425_ini_mode_end, mode); 15608c2ecf20Sopenharmony_ci 15618c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15628c2ecf20Sopenharmony_ci ARRAY_SIZE(rf2425_ini_common_end), 15638c2ecf20Sopenharmony_ci rf2425_ini_common_end, skip_pcu); 15648c2ecf20Sopenharmony_ci 15658c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, 15668c2ecf20Sopenharmony_ci ARRAY_SIZE(rf5112_ini_bbgain), 15678c2ecf20Sopenharmony_ci rf5112_ini_bbgain, skip_pcu); 15688c2ecf20Sopenharmony_ci break; 15698c2ecf20Sopenharmony_ci default: 15708c2ecf20Sopenharmony_ci return -EINVAL; 15718c2ecf20Sopenharmony_ci 15728c2ecf20Sopenharmony_ci } 15738c2ecf20Sopenharmony_ci 15748c2ecf20Sopenharmony_ci /* For AR5211 */ 15758c2ecf20Sopenharmony_ci } else if (ah->ah_version == AR5K_AR5211) { 15768c2ecf20Sopenharmony_ci 15778c2ecf20Sopenharmony_ci /* AR5K_MODE_11B */ 15788c2ecf20Sopenharmony_ci if (mode > 2) { 15798c2ecf20Sopenharmony_ci ATH5K_ERR(ah, "unsupported channel mode: %d\n", mode); 15808c2ecf20Sopenharmony_ci return -EINVAL; 15818c2ecf20Sopenharmony_ci } 15828c2ecf20Sopenharmony_ci 15838c2ecf20Sopenharmony_ci /* Mode-specific settings */ 15848c2ecf20Sopenharmony_ci ath5k_hw_ini_mode_registers(ah, ARRAY_SIZE(ar5211_ini_mode), 15858c2ecf20Sopenharmony_ci ar5211_ini_mode, mode); 15868c2ecf20Sopenharmony_ci 15878c2ecf20Sopenharmony_ci /* 15888c2ecf20Sopenharmony_ci * Write initial settings common for all modes 15898c2ecf20Sopenharmony_ci */ 15908c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, ARRAY_SIZE(ar5211_ini), 15918c2ecf20Sopenharmony_ci ar5211_ini, skip_pcu); 15928c2ecf20Sopenharmony_ci 15938c2ecf20Sopenharmony_ci /* AR5211 only comes with 5111 */ 15948c2ecf20Sopenharmony_ci 15958c2ecf20Sopenharmony_ci /* Baseband gain table */ 15968c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, ARRAY_SIZE(rf5111_ini_bbgain), 15978c2ecf20Sopenharmony_ci rf5111_ini_bbgain, skip_pcu); 15988c2ecf20Sopenharmony_ci /* For AR5210 (for mode settings check out ath5k_hw_reset_tx_queue) */ 15998c2ecf20Sopenharmony_ci } else if (ah->ah_version == AR5K_AR5210) { 16008c2ecf20Sopenharmony_ci ath5k_hw_ini_registers(ah, ARRAY_SIZE(ar5210_ini), 16018c2ecf20Sopenharmony_ci ar5210_ini, skip_pcu); 16028c2ecf20Sopenharmony_ci } 16038c2ecf20Sopenharmony_ci 16048c2ecf20Sopenharmony_ci return 0; 16058c2ecf20Sopenharmony_ci} 1606