1 /******************************************************************************
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.
8 * Copyright(c) 2015-2017 Intel Deutschland GmbH
9 * Copyright (C) 2018-2019 Intel Corporation
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.
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.
22 * Copyright(c) 2015-2017 Intel Deutschland GmbH
23 * Copyright (C) 2018-2019 Intel Corporation
24 * All rights reserved.
26 * Redistribution and use in source and binary forms, with or without
27 * modification, are permitted provided that the following conditions
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
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.
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.
52 *****************************************************************************/
54 #include <linux/module.h>
55 #include <linux/stringify.h>
56 #include "iwl-config.h"
58 /* Highest firmware API version supported */
59 #define IWL_22000_UCODE_API_MAX 46
61 /* Lowest firmware API version supported */
62 #define IWL_22000_UCODE_API_MIN 39
65 #define IWL_22000_NVM_VERSION 0x0a1d
67 /* Memory offsets and lengths */
68 #define IWL_22000_DCCM_OFFSET 0x800000 /* LMAC1 */
69 #define IWL_22000_DCCM_LEN 0x10000 /* LMAC1 */
70 #define IWL_22000_DCCM2_OFFSET 0x880000
71 #define IWL_22000_DCCM2_LEN 0x8000
72 #define IWL_22000_SMEM_OFFSET 0x400000
73 #define IWL_22000_SMEM_LEN 0xD0000
75 #define IWL_22000_JF_FW_PRE "iwlwifi-Qu-a0-jf-b0-"
76 #define IWL_22000_HR_FW_PRE "iwlwifi-Qu-a0-hr-a0-"
77 #define IWL_22000_HR_CDB_FW_PRE "iwlwifi-QuIcp-z0-hrcdb-a0-"
78 #define IWL_22000_HR_A_F0_FW_PRE "iwlwifi-QuQnj-f0-hr-a0-"
79 #define IWL_22000_HR_B_F0_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
80 #define IWL_22000_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
81 #define IWL_22000_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-"
82 #define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-"
83 #define IWL_22000_SU_Z0_FW_PRE "iwlwifi-su-z0-"
84 #define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-"
85 #define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-"
86 #define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-"
87 #define IWL_CC_A_FW_PRE "iwlwifi-cc-a0-"
88 #define IWL_22000_SO_A_JF_B_FW_PRE "iwlwifi-so-a0-jf-b0-"
89 #define IWL_22000_SO_A_HR_B_FW_PRE "iwlwifi-so-a0-hr-b0-"
90 #define IWL_22000_SO_A_GF_A_FW_PRE "iwlwifi-so-a0-gf-a0-"
91 #define IWL_22000_TY_A_GF_A_FW_PRE "iwlwifi-ty-a0-gf-a0-"
93 #define IWL_22000_HR_MODULE_FIRMWARE(api) \
94 IWL_22000_HR_FW_PRE __stringify(api) ".ucode"
95 #define IWL_22000_JF_MODULE_FIRMWARE(api) \
96 IWL_22000_JF_FW_PRE __stringify(api) ".ucode"
97 #define IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(api) \
98 IWL_22000_HR_A_F0_FW_PRE __stringify(api) ".ucode"
99 #define IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(api) \
100 IWL_22000_HR_B_F0_FW_PRE __stringify(api) ".ucode"
101 #define IWL_22000_QU_B_HR_B_MODULE_FIRMWARE(api) \
102 IWL_22000_QU_B_HR_B_FW_PRE __stringify(api) ".ucode"
103 #define IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(api) \
104 IWL_22000_HR_B_FW_PRE __stringify(api) ".ucode"
105 #define IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(api) \
106 IWL_22000_HR_A0_FW_PRE __stringify(api) ".ucode"
107 #define IWL_22000_SU_Z0_MODULE_FIRMWARE(api) \
108 IWL_22000_SU_Z0_FW_PRE __stringify(api) ".ucode"
109 #define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \
110 IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode"
111 #define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
112 IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode"
113 #define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \
114 IWL_QNJ_B_JF_B_FW_PRE __stringify(api) ".ucode"
115 #define IWL_CC_A_MODULE_FIRMWARE(api) \
116 IWL_CC_A_FW_PRE __stringify(api) ".ucode"
117 #define IWL_22000_SO_A_JF_B_MODULE_FIRMWARE(api) \
118 IWL_22000_SO_A_JF_B_FW_PRE __stringify(api) ".ucode"
119 #define IWL_22000_SO_A_HR_B_MODULE_FIRMWARE(api) \
120 IWL_22000_SO_A_HR_B_FW_PRE __stringify(api) ".ucode"
121 #define IWL_22000_SO_A_GF_A_MODULE_FIRMWARE(api) \
122 IWL_22000_SO_A_GF_A_FW_PRE __stringify(api) ".ucode"
123 #define IWL_22000_TY_A_GF_A_MODULE_FIRMWARE(api) \
124 IWL_22000_TY_A_GF_A_FW_PRE __stringify(api) ".ucode"
126 static const struct iwl_base_params iwl_22000_base_params = {
127 .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
128 .num_of_queues = 512,
129 .max_tfd_queue_size = 256,
130 .shadow_ram_support = true,
131 .led_compensation = 57,
132 .wd_timeout = IWL_LONG_WD_TIMEOUT,
133 .max_event_log_size = 512,
134 .shadow_reg_enable = true,
135 .pcie_l1_allowed = true,
138 static const struct iwl_base_params iwl_22560_base_params = {
139 .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
140 .num_of_queues = 512,
141 .max_tfd_queue_size = 65536,
142 .shadow_ram_support = true,
143 .led_compensation = 57,
144 .wd_timeout = IWL_LONG_WD_TIMEOUT,
145 .max_event_log_size = 512,
146 .shadow_reg_enable = true,
147 .pcie_l1_allowed = true,
150 static const struct iwl_ht_params iwl_22000_ht_params = {
153 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
156 #define IWL_DEVICE_22000_COMMON \
157 .ucode_api_max = IWL_22000_UCODE_API_MAX, \
158 .ucode_api_min = IWL_22000_UCODE_API_MIN, \
159 .led_mode = IWL_LED_RF_STATE, \
160 .nvm_hw_section_num = 10, \
161 .non_shared_ant = ANT_B, \
162 .dccm_offset = IWL_22000_DCCM_OFFSET, \
163 .dccm_len = IWL_22000_DCCM_LEN, \
164 .dccm2_offset = IWL_22000_DCCM2_OFFSET, \
165 .dccm2_len = IWL_22000_DCCM2_LEN, \
166 .smem_offset = IWL_22000_SMEM_OFFSET, \
167 .smem_len = IWL_22000_SMEM_LEN, \
168 .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
169 .apmg_not_supported = true, \
170 .mq_rx_supported = true, \
171 .vht_mu_mimo_supported = true, \
172 .mac_addr_from_csr = true, \
173 .ht_params = &iwl_22000_ht_params, \
174 .nvm_ver = IWL_22000_NVM_VERSION, \
175 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
179 .nvm_type = IWL_NVM_EXT, \
180 .dbgc_supported = true, \
181 .min_umac_error_event_table = 0x400000, \
182 .d3_debug_data_base_addr = 0x401000, \
183 .d3_debug_data_length = 60 * 1024
185 #define IWL_DEVICE_AX200_COMMON \
186 IWL_DEVICE_22000_COMMON, \
187 .umac_prph_offset = 0x300000
189 #define IWL_DEVICE_22500 \
190 IWL_DEVICE_22000_COMMON, \
191 .device_family = IWL_DEVICE_FAMILY_22000, \
192 .base_params = &iwl_22000_base_params, \
195 #define IWL_DEVICE_22560 \
196 IWL_DEVICE_22000_COMMON, \
197 .device_family = IWL_DEVICE_FAMILY_22560, \
198 .base_params = &iwl_22560_base_params, \
201 #define IWL_DEVICE_AX210 \
202 IWL_DEVICE_AX200_COMMON, \
203 .device_family = IWL_DEVICE_FAMILY_AX210, \
204 .base_params = &iwl_22560_base_params, \
205 .csr = &iwl_csr_v1, \
208 const struct iwl_cfg iwl22000_2ac_cfg_hr = {
209 .name = "Intel(R) Dual Band Wireless AC 22000",
210 .fw_name_pre = IWL_22000_HR_FW_PRE,
214 const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb = {
215 .name = "Intel(R) Dual Band Wireless AC 22000",
216 .fw_name_pre = IWL_22000_HR_CDB_FW_PRE,
221 const struct iwl_cfg iwl22000_2ac_cfg_jf = {
222 .name = "Intel(R) Dual Band Wireless AC 22000",
223 .fw_name_pre = IWL_22000_JF_FW_PRE,
227 const struct iwl_cfg iwl_ax101_cfg_qu_hr = {
228 .name = "Intel(R) Wi-Fi 6 AX101",
229 .fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
232 * This device doesn't support receiving BlockAck with a large bitmap
233 * so we need to restrict the size of transmitted aggregation to the
234 * HT size; mac80211 would otherwise pick the HE max (256) by default.
236 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
239 const struct iwl_cfg iwl_ax101_cfg_quz_hr = {
240 .name = "Intel(R) Wi-Fi 6 AX101",
241 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
244 * This device doesn't support receiving BlockAck with a large bitmap
245 * so we need to restrict the size of transmitted aggregation to the
246 * HT size; mac80211 would otherwise pick the HE max (256) by default.
248 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
251 const struct iwl_cfg iwl_ax200_cfg_cc = {
252 .name = "Intel(R) Wi-Fi 6 AX200 160MHz",
253 .fw_name_pre = IWL_CC_A_FW_PRE,
256 * This device doesn't support receiving BlockAck with a large bitmap
257 * so we need to restrict the size of transmitted aggregation to the
258 * HT size; mac80211 would otherwise pick the HE max (256) by default.
260 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
261 .bisr_workaround = 1,
264 const struct iwl_cfg killer1650x_2ax_cfg = {
265 .name = "Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)",
266 .fw_name_pre = IWL_CC_A_FW_PRE,
269 * This device doesn't support receiving BlockAck with a large bitmap
270 * so we need to restrict the size of transmitted aggregation to the
271 * HT size; mac80211 would otherwise pick the HE max (256) by default.
273 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
274 .bisr_workaround = 1,
277 const struct iwl_cfg killer1650w_2ax_cfg = {
278 .name = "Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)",
279 .fw_name_pre = IWL_CC_A_FW_PRE,
282 * This device doesn't support receiving BlockAck with a large bitmap
283 * so we need to restrict the size of transmitted aggregation to the
284 * HT size; mac80211 would otherwise pick the HE max (256) by default.
286 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
287 .bisr_workaround = 1,
291 * All JF radio modules are part of the 9000 series, but the MAC part
292 * looks more like 22000. That's why this device is here, but called
295 const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0 = {
296 .name = "Intel(R) Wireless-AC 9461",
297 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
301 const struct iwl_cfg iwl9462_2ac_cfg_qu_b0_jf_b0 = {
302 .name = "Intel(R) Wireless-AC 9462",
303 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
307 const struct iwl_cfg iwl9560_2ac_cfg_qu_b0_jf_b0 = {
308 .name = "Intel(R) Wireless-AC 9560",
309 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
313 const struct iwl_cfg iwl9560_2ac_160_cfg_qu_b0_jf_b0 = {
314 .name = "Intel(R) Wireless-AC 9560 160MHz",
315 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
319 const struct iwl_cfg iwl9560_2ac_cfg_qnj_jf_b0 = {
320 .name = "Intel(R) Wireless-AC 9560 160MHz",
321 .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE,
324 * This device doesn't support receiving BlockAck with a large bitmap
325 * so we need to restrict the size of transmitted aggregation to the
326 * HT size; mac80211 would otherwise pick the HE max (256) by default.
328 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
331 const struct iwl_cfg killer1550i_2ac_cfg_qu_b0_jf_b0 = {
332 .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)",
333 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
337 const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0 = {
338 .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)",
339 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
343 const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
344 .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
345 .fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
348 * This device doesn't support receiving BlockAck with a large bitmap
349 * so we need to restrict the size of transmitted aggregation to the
350 * HT size; mac80211 would otherwise pick the HE max (256) by default.
352 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
355 const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = {
356 .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
357 .fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
360 * This device doesn't support receiving BlockAck with a large bitmap
361 * so we need to restrict the size of transmitted aggregation to the
362 * HT size; mac80211 would otherwise pick the HE max (256) by default.
364 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
367 const struct iwl_cfg iwl22000_2ax_cfg_jf = {
368 .name = "Intel(R) Dual Band Wireless AX 22000",
369 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
372 * This device doesn't support receiving BlockAck with a large bitmap
373 * so we need to restrict the size of transmitted aggregation to the
374 * HT size; mac80211 would otherwise pick the HE max (256) by default.
376 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
379 const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0_f0 = {
380 .name = "Intel(R) Dual Band Wireless AX 22000",
381 .fw_name_pre = IWL_22000_HR_A_F0_FW_PRE,
384 * This device doesn't support receiving BlockAck with a large bitmap
385 * so we need to restrict the size of transmitted aggregation to the
386 * HT size; mac80211 would otherwise pick the HE max (256) by default.
388 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
391 const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_b0 = {
392 .name = "Intel(R) Dual Band Wireless AX 22000",
393 .fw_name_pre = IWL_22000_HR_B_FW_PRE,
396 * This device doesn't support receiving BlockAck with a large bitmap
397 * so we need to restrict the size of transmitted aggregation to the
398 * HT size; mac80211 would otherwise pick the HE max (256) by default.
400 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
403 const struct iwl_cfg iwl22000_2ax_cfg_qnj_hr_a0 = {
404 .name = "Intel(R) Dual Band Wireless AX 22000",
405 .fw_name_pre = IWL_22000_HR_A0_FW_PRE,
408 * This device doesn't support receiving BlockAck with a large bitmap
409 * so we need to restrict the size of transmitted aggregation to the
410 * HT size; mac80211 would otherwise pick the HE max (256) by default.
412 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
415 const struct iwl_cfg iwl22560_2ax_cfg_su_cdb = {
416 .name = "Intel(R) Dual Band Wireless AX 22560",
417 .fw_name_pre = IWL_22000_SU_Z0_FW_PRE,
421 * This device doesn't support receiving BlockAck with a large bitmap
422 * so we need to restrict the size of transmitted aggregation to the
423 * HT size; mac80211 would otherwise pick the HE max (256) by default.
425 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
428 const struct iwl_cfg iwlax210_2ax_cfg_so_jf_a0 = {
429 .name = "Intel(R) Wireless-AC 9560 160MHz",
430 .fw_name_pre = IWL_22000_SO_A_JF_B_FW_PRE,
434 const struct iwl_cfg iwlax210_2ax_cfg_so_hr_a0 = {
435 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
436 .fw_name_pre = IWL_22000_SO_A_HR_B_FW_PRE,
440 const struct iwl_cfg iwlax210_2ax_cfg_so_gf_a0 = {
441 .name = "Intel(R) Wi-Fi 7 AX211 160MHz",
442 .fw_name_pre = IWL_22000_SO_A_GF_A_FW_PRE,
446 const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
447 .name = "Intel(R) Wi-Fi 7 AX210 160MHz",
448 .fw_name_pre = IWL_22000_TY_A_GF_A_FW_PRE,
452 MODULE_FIRMWARE(IWL_22000_HR_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
453 MODULE_FIRMWARE(IWL_22000_JF_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
454 MODULE_FIRMWARE(IWL_22000_HR_A_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
455 MODULE_FIRMWARE(IWL_22000_HR_B_F0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
456 MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
457 MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
458 MODULE_FIRMWARE(IWL_22000_SU_Z0_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
459 MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
460 MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
461 MODULE_FIRMWARE(IWL_QNJ_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
462 MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
463 MODULE_FIRMWARE(IWL_22000_SO_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
464 MODULE_FIRMWARE(IWL_22000_SO_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
465 MODULE_FIRMWARE(IWL_22000_SO_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
466 MODULE_FIRMWARE(IWL_22000_TY_A_GF_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));