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