1 /****************************************************************************** 2 * 3 * This file is provided under a dual BSD/GPLv2 license. When using or 4 * redistributing this file, you may do so under either license. 5 * 6 * GPL LICENSE SUMMARY 7 * 8 * Copyright(c) 2015-2017 Intel Deutschland GmbH 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of version 2 of the GNU General Public License as 12 * published by the Free Software Foundation. 13 * 14 * This program is distributed in the hope that it will be useful, but 15 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * General Public License for more details. 18 * 19 * BSD LICENSE 20 * 21 * Copyright(c) 2015-2017 Intel Deutschland GmbH 22 * All rights reserved. 23 * 24 * Redistribution and use in source and binary forms, with or without 25 * modification, are permitted provided that the following conditions 26 * are met: 27 * 28 * * Redistributions of source code must retain the above copyright 29 * notice, this list of conditions and the following disclaimer. 30 * * Redistributions in binary form must reproduce the above copyright 31 * notice, this list of conditions and the following disclaimer in 32 * the documentation and/or other materials provided with the 33 * distribution. 34 * * Neither the name Intel Corporation nor the names of its 35 * contributors may be used to endorse or promote products derived 36 * from this software without specific prior written permission. 37 * 38 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 44 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 45 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 46 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 47 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 48 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 * 50 *****************************************************************************/ 51 52 #include <linux/module.h> 53 #include <linux/stringify.h> 54 #include "iwl-config.h" 55 #include "iwl-agn-hw.h" 56 #include "fw/file.h" 57 58 /* Highest firmware API version supported */ 59 #define IWL9000_UCODE_API_MAX 34 60 61 /* Lowest firmware API version supported */ 62 #define IWL9000_UCODE_API_MIN 30 63 64 /* NVM versions */ 65 #define IWL9000_NVM_VERSION 0x0a1d 66 #define IWL9000_TX_POWER_VERSION 0xffff /* meaningless */ 67 68 /* Memory offsets and lengths */ 69 #define IWL9000_DCCM_OFFSET 0x800000 70 #define IWL9000_DCCM_LEN 0x18000 71 #define IWL9000_DCCM2_OFFSET 0x880000 72 #define IWL9000_DCCM2_LEN 0x8000 73 #define IWL9000_SMEM_OFFSET 0x400000 74 #define IWL9000_SMEM_LEN 0x68000 75 76 #define IWL9000A_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-" 77 #define IWL9000B_FW_PRE "iwlwifi-9000-pu-b0-jf-b0-" 78 #define IWL9000RFB_FW_PRE "iwlwifi-9000-pu-a0-jf-b0-" 79 #define IWL9260A_FW_PRE "iwlwifi-9260-th-a0-jf-a0-" 80 #define IWL9260B_FW_PRE "iwlwifi-9260-th-b0-jf-b0-" 81 #define IWL9000A_MODULE_FIRMWARE(api) \ 82 IWL9000A_FW_PRE __stringify(api) ".ucode" 83 #define IWL9000B_MODULE_FIRMWARE(api) \ 84 IWL9000B_FW_PRE __stringify(api) ".ucode" 85 #define IWL9000RFB_MODULE_FIRMWARE(api) \ 86 IWL9000RFB_FW_PRE __stringify(api) ".ucode" 87 #define IWL9260A_MODULE_FIRMWARE(api) \ 88 IWL9260A_FW_PRE __stringify(api) ".ucode" 89 #define IWL9260B_MODULE_FIRMWARE(api) \ 90 IWL9260B_FW_PRE __stringify(api) ".ucode" 91 92 #define NVM_HW_SECTION_NUM_FAMILY_9000 10 93 94 static const struct iwl_base_params iwl9000_base_params = { 95 .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_9000, 96 .num_of_queues = 31, 97 .shadow_ram_support = true, 98 .led_compensation = 57, 99 .wd_timeout = IWL_LONG_WD_TIMEOUT, 100 .max_event_log_size = 512, 101 .shadow_reg_enable = true, 102 .pcie_l1_allowed = true, 103 }; 104 105 static const struct iwl_ht_params iwl9000_ht_params = { 106 .stbc = true, 107 .ldpc = true, 108 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), 109 }; 110 111 static const struct iwl_tt_params iwl9000_tt_params = { 112 .ct_kill_entry = 115, 113 .ct_kill_exit = 93, 114 .ct_kill_duration = 5, 115 .dynamic_smps_entry = 111, 116 .dynamic_smps_exit = 107, 117 .tx_protection_entry = 112, 118 .tx_protection_exit = 105, 119 .tx_backoff = { 120 {.temperature = 110, .backoff = 200}, 121 {.temperature = 111, .backoff = 600}, 122 {.temperature = 112, .backoff = 1200}, 123 {.temperature = 113, .backoff = 2000}, 124 {.temperature = 114, .backoff = 4000}, 125 }, 126 .support_ct_kill = true, 127 .support_dynamic_smps = true, 128 .support_tx_protection = true, 129 .support_tx_backoff = true, 130 }; 131 132 #define IWL_DEVICE_9000 \ 133 .ucode_api_max = IWL9000_UCODE_API_MAX, \ 134 .ucode_api_min = IWL9000_UCODE_API_MIN, \ 135 .device_family = IWL_DEVICE_FAMILY_9000, \ 136 .max_inst_size = IWL60_RTC_INST_SIZE, \ 137 .max_data_size = IWL60_RTC_DATA_SIZE, \ 138 .base_params = &iwl9000_base_params, \ 139 .led_mode = IWL_LED_RF_STATE, \ 140 .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_9000, \ 141 .non_shared_ant = ANT_A, \ 142 .dccm_offset = IWL9000_DCCM_OFFSET, \ 143 .dccm_len = IWL9000_DCCM_LEN, \ 144 .dccm2_offset = IWL9000_DCCM2_OFFSET, \ 145 .dccm2_len = IWL9000_DCCM2_LEN, \ 146 .smem_offset = IWL9000_SMEM_OFFSET, \ 147 .smem_len = IWL9000_SMEM_LEN, \ 148 .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \ 149 .thermal_params = &iwl9000_tt_params, \ 150 .apmg_not_supported = true, \ 151 .mq_rx_supported = true, \ 152 .vht_mu_mimo_supported = true, \ 153 .mac_addr_from_csr = true, \ 154 .rf_id = true, \ 155 .nvm_type = IWL_NVM_EXT, \ 156 .dbgc_supported = true 157 158 const struct iwl_cfg iwl9160_2ac_cfg = { 159 .name = "Intel(R) Dual Band Wireless AC 9160", 160 .fw_name_pre = IWL9260A_FW_PRE, 161 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, 162 IWL_DEVICE_9000, 163 .ht_params = &iwl9000_ht_params, 164 .nvm_ver = IWL9000_NVM_VERSION, 165 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 166 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 167 }; 168 169 const struct iwl_cfg iwl9260_2ac_cfg = { 170 .name = "Intel(R) Dual Band Wireless AC 9260", 171 .fw_name_pre = IWL9260A_FW_PRE, 172 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, 173 IWL_DEVICE_9000, 174 .ht_params = &iwl9000_ht_params, 175 .nvm_ver = IWL9000_NVM_VERSION, 176 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 177 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 178 }; 179 180 const struct iwl_cfg iwl9260_killer_2ac_cfg = { 181 .name = "Killer (R) Wireless-AC 1550 Wireless Network Adapter (9260NGW)", 182 .fw_name_pre = IWL9260A_FW_PRE, 183 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, 184 IWL_DEVICE_9000, 185 .ht_params = &iwl9000_ht_params, 186 .nvm_ver = IWL9000_NVM_VERSION, 187 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 188 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 189 }; 190 191 const struct iwl_cfg iwl9270_2ac_cfg = { 192 .name = "Intel(R) Dual Band Wireless AC 9270", 193 .fw_name_pre = IWL9260A_FW_PRE, 194 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, 195 IWL_DEVICE_9000, 196 .ht_params = &iwl9000_ht_params, 197 .nvm_ver = IWL9000_NVM_VERSION, 198 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 199 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 200 }; 201 202 const struct iwl_cfg iwl9460_2ac_cfg = { 203 .name = "Intel(R) Dual Band Wireless AC 9460", 204 .fw_name_pre = IWL9260A_FW_PRE, 205 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, 206 IWL_DEVICE_9000, 207 .ht_params = &iwl9000_ht_params, 208 .nvm_ver = IWL9000_NVM_VERSION, 209 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 210 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 211 }; 212 213 const struct iwl_cfg iwl9460_2ac_cfg_soc = { 214 .name = "Intel(R) Dual Band Wireless AC 9460", 215 .fw_name_pre = IWL9000A_FW_PRE, 216 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 217 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 218 IWL_DEVICE_9000, 219 .ht_params = &iwl9000_ht_params, 220 .nvm_ver = IWL9000_NVM_VERSION, 221 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 222 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 223 .integrated = true, 224 .soc_latency = 5000, 225 }; 226 227 const struct iwl_cfg iwl9461_2ac_cfg_soc = { 228 .name = "Intel(R) Dual Band Wireless AC 9461", 229 .fw_name_pre = IWL9000A_FW_PRE, 230 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 231 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 232 IWL_DEVICE_9000, 233 .ht_params = &iwl9000_ht_params, 234 .nvm_ver = IWL9000_NVM_VERSION, 235 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 236 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 237 .integrated = true, 238 .soc_latency = 5000, 239 }; 240 241 const struct iwl_cfg iwl9462_2ac_cfg_soc = { 242 .name = "Intel(R) Dual Band Wireless AC 9462", 243 .fw_name_pre = IWL9000A_FW_PRE, 244 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 245 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 246 IWL_DEVICE_9000, 247 .ht_params = &iwl9000_ht_params, 248 .nvm_ver = IWL9000_NVM_VERSION, 249 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 250 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 251 .integrated = true, 252 .soc_latency = 5000, 253 }; 254 255 const struct iwl_cfg iwl9560_2ac_cfg = { 256 .name = "Intel(R) Dual Band Wireless AC 9560", 257 .fw_name_pre = IWL9260A_FW_PRE, 258 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE, 259 IWL_DEVICE_9000, 260 .ht_params = &iwl9000_ht_params, 261 .nvm_ver = IWL9000_NVM_VERSION, 262 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 263 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 264 }; 265 266 const struct iwl_cfg iwl9560_2ac_cfg_soc = { 267 .name = "Intel(R) Dual Band Wireless AC 9560", 268 .fw_name_pre = IWL9000A_FW_PRE, 269 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 270 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 271 IWL_DEVICE_9000, 272 .ht_params = &iwl9000_ht_params, 273 .nvm_ver = IWL9000_NVM_VERSION, 274 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 275 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 276 .integrated = true, 277 .soc_latency = 5000, 278 }; 279 280 const struct iwl_cfg iwl9560_killer_2ac_cfg_soc = { 281 .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)", 282 .fw_name_pre = IWL9000A_FW_PRE, 283 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 284 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 285 IWL_DEVICE_9000, 286 .ht_params = &iwl9000_ht_params, 287 .nvm_ver = IWL9000_NVM_VERSION, 288 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 289 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 290 .integrated = true, 291 .soc_latency = 5000, 292 }; 293 294 const struct iwl_cfg iwl9560_killer_s_2ac_cfg_soc = { 295 .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)", 296 .fw_name_pre = IWL9000A_FW_PRE, 297 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 298 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 299 IWL_DEVICE_9000, 300 .ht_params = &iwl9000_ht_params, 301 .nvm_ver = IWL9000_NVM_VERSION, 302 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 303 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 304 .integrated = true, 305 .soc_latency = 5000, 306 }; 307 308 const struct iwl_cfg iwl9460_2ac_cfg_shared_clk = { 309 .name = "Intel(R) Dual Band Wireless AC 9460", 310 .fw_name_pre = IWL9000A_FW_PRE, 311 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 312 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 313 IWL_DEVICE_9000, 314 .ht_params = &iwl9000_ht_params, 315 .nvm_ver = IWL9000_NVM_VERSION, 316 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 317 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 318 .integrated = true, 319 .soc_latency = 5000, 320 .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK 321 }; 322 323 const struct iwl_cfg iwl9461_2ac_cfg_shared_clk = { 324 .name = "Intel(R) Dual Band Wireless AC 9461", 325 .fw_name_pre = IWL9000A_FW_PRE, 326 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 327 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 328 IWL_DEVICE_9000, 329 .ht_params = &iwl9000_ht_params, 330 .nvm_ver = IWL9000_NVM_VERSION, 331 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 332 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 333 .integrated = true, 334 .soc_latency = 5000, 335 .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK 336 }; 337 338 const struct iwl_cfg iwl9462_2ac_cfg_shared_clk = { 339 .name = "Intel(R) Dual Band Wireless AC 9462", 340 .fw_name_pre = IWL9000A_FW_PRE, 341 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 342 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 343 IWL_DEVICE_9000, 344 .ht_params = &iwl9000_ht_params, 345 .nvm_ver = IWL9000_NVM_VERSION, 346 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 347 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 348 .integrated = true, 349 .soc_latency = 5000, 350 .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK 351 }; 352 353 const struct iwl_cfg iwl9560_2ac_cfg_shared_clk = { 354 .name = "Intel(R) Dual Band Wireless AC 9560", 355 .fw_name_pre = IWL9000A_FW_PRE, 356 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 357 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 358 IWL_DEVICE_9000, 359 .ht_params = &iwl9000_ht_params, 360 .nvm_ver = IWL9000_NVM_VERSION, 361 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 362 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 363 .integrated = true, 364 .soc_latency = 5000, 365 .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK 366 }; 367 368 const struct iwl_cfg iwl9560_killer_2ac_cfg_shared_clk = { 369 .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)", 370 .fw_name_pre = IWL9000A_FW_PRE, 371 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 372 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 373 IWL_DEVICE_9000, 374 .ht_params = &iwl9000_ht_params, 375 .nvm_ver = IWL9000_NVM_VERSION, 376 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 377 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 378 .integrated = true, 379 .soc_latency = 5000, 380 .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK 381 }; 382 383 const struct iwl_cfg iwl9560_killer_s_2ac_cfg_shared_clk = { 384 .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)", 385 .fw_name_pre = IWL9000A_FW_PRE, 386 .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE, 387 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 388 IWL_DEVICE_9000, 389 .ht_params = &iwl9000_ht_params, 390 .nvm_ver = IWL9000_NVM_VERSION, 391 .nvm_calib_ver = IWL9000_TX_POWER_VERSION, 392 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, 393 .integrated = true, 394 .soc_latency = 5000, 395 .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK 396 }; 397 398 MODULE_FIRMWARE(IWL9000A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); 399 MODULE_FIRMWARE(IWL9000B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); 400 MODULE_FIRMWARE(IWL9000RFB_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); 401 MODULE_FIRMWARE(IWL9260A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); 402 MODULE_FIRMWARE(IWL9260B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); 403