1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2015-2017 Intel Deutschland GmbH
4 * Copyright (C) 2018-2023 Intel Corporation
6 #include <linux/module.h>
7 #include <linux/stringify.h>
8 #include "iwl-config.h"
10 #include "fw/api/txq.h"
12 /* Highest firmware API version supported */
13 #define IWL_22000_UCODE_API_MAX 77
15 /* Lowest firmware API version supported */
16 #define IWL_22000_UCODE_API_MIN 50
19 #define IWL_22000_NVM_VERSION 0x0a1d
21 /* Memory offsets and lengths */
22 #define IWL_22000_DCCM_OFFSET 0x800000 /* LMAC1 */
23 #define IWL_22000_DCCM_LEN 0x10000 /* LMAC1 */
24 #define IWL_22000_DCCM2_OFFSET 0x880000
25 #define IWL_22000_DCCM2_LEN 0x8000
26 #define IWL_22000_SMEM_OFFSET 0x400000
27 #define IWL_22000_SMEM_LEN 0xD0000
29 #define IWL_QU_B_HR_B_FW_PRE "iwlwifi-Qu-b0-hr-b0-"
30 #define IWL_QNJ_B_HR_B_FW_PRE "iwlwifi-QuQnj-b0-hr-b0-"
31 #define IWL_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0-"
32 #define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-"
33 #define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0-"
34 #define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-"
35 #define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0-"
36 #define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-"
37 #define IWL_CC_A_FW_PRE "iwlwifi-cc-a0-"
39 #define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \
40 IWL_QU_B_HR_B_FW_PRE __stringify(api) ".ucode"
41 #define IWL_QNJ_B_HR_B_MODULE_FIRMWARE(api) \
42 IWL_QNJ_B_HR_B_FW_PRE __stringify(api) ".ucode"
43 #define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \
44 IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode"
45 #define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \
46 IWL_QUZ_A_JF_B_FW_PRE __stringify(api) ".ucode"
47 #define IWL_QU_C_HR_B_MODULE_FIRMWARE(api) \
48 IWL_QU_C_HR_B_FW_PRE __stringify(api) ".ucode"
49 #define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
50 IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode"
51 #define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \
52 IWL_QNJ_B_JF_B_FW_PRE __stringify(api) ".ucode"
53 #define IWL_CC_A_MODULE_FIRMWARE(api) \
54 IWL_CC_A_FW_PRE __stringify(api) ".ucode"
56 static const struct iwl_base_params iwl_22000_base_params = {
57 .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
59 .max_tfd_queue_size = 256,
60 .shadow_ram_support = true,
61 .led_compensation = 57,
62 .wd_timeout = IWL_LONG_WD_TIMEOUT,
63 .max_event_log_size = 512,
64 .shadow_reg_enable = true,
65 .pcie_l1_allowed = true,
68 const struct iwl_ht_params iwl_22000_ht_params = {
71 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
72 BIT(NL80211_BAND_6GHZ),
75 #define IWL_DEVICE_22000_COMMON \
76 .ucode_api_min = IWL_22000_UCODE_API_MIN, \
77 .led_mode = IWL_LED_RF_STATE, \
78 .nvm_hw_section_num = 10, \
79 .non_shared_ant = ANT_B, \
80 .dccm_offset = IWL_22000_DCCM_OFFSET, \
81 .dccm_len = IWL_22000_DCCM_LEN, \
82 .dccm2_offset = IWL_22000_DCCM2_OFFSET, \
83 .dccm2_len = IWL_22000_DCCM2_LEN, \
84 .smem_offset = IWL_22000_SMEM_OFFSET, \
85 .smem_len = IWL_22000_SMEM_LEN, \
86 .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
87 .apmg_not_supported = true, \
88 .trans.mq_rx_supported = true, \
89 .vht_mu_mimo_supported = true, \
90 .mac_addr_from_csr = 0x380, \
91 .ht_params = &iwl_22000_ht_params, \
92 .nvm_ver = IWL_22000_NVM_VERSION, \
93 .trans.use_tfh = true, \
94 .trans.rf_id = true, \
96 .nvm_type = IWL_NVM_EXT, \
97 .dbgc_supported = true, \
98 .min_umac_error_event_table = 0x400000, \
99 .d3_debug_data_base_addr = 0x401000, \
100 .d3_debug_data_length = 60 * 1024, \
103 .addr = LDBG_M2S_BUF_WPTR, \
104 .mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
107 .addr = LDBG_M2S_BUF_WRAP_CNT, \
108 .mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
112 #define IWL_DEVICE_22500 \
113 IWL_DEVICE_22000_COMMON, \
114 .ucode_api_max = IWL_22000_UCODE_API_MAX, \
115 .trans.device_family = IWL_DEVICE_FAMILY_22000, \
116 .trans.base_params = &iwl_22000_base_params, \
117 .gp2_reg_addr = 0xa02c68, \
120 .addr = MON_BUFF_WRPTR_VER2, \
121 .mask = 0xffffffff, \
124 .addr = MON_BUFF_CYCLE_CNT_VER2, \
125 .mask = 0xffffffff, \
129 const struct iwl_cfg_trans_params iwl_qnj_trans_cfg = {
130 .mq_rx_supported = true,
134 .device_family = IWL_DEVICE_FAMILY_22000,
135 .base_params = &iwl_22000_base_params,
138 const struct iwl_cfg_trans_params iwl_qu_trans_cfg = {
139 .mq_rx_supported = true,
143 .device_family = IWL_DEVICE_FAMILY_22000,
144 .base_params = &iwl_22000_base_params,
147 .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US,
150 const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg = {
151 .mq_rx_supported = true,
155 .device_family = IWL_DEVICE_FAMILY_22000,
156 .base_params = &iwl_22000_base_params,
158 .xtal_latency = 1820,
159 .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_1820US,
162 const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = {
163 .mq_rx_supported = true,
167 .device_family = IWL_DEVICE_FAMILY_22000,
168 .base_params = &iwl_22000_base_params,
170 .xtal_latency = 12000,
171 .low_latency_xtal = true,
172 .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
176 * If the device doesn't support HE, no need to have that many buffers.
177 * 22000 devices can split multiple frames into a single RB, so fewer are
178 * needed; AX210 cannot (but use smaller RBs by default) - these sizes
179 * were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with
180 * additional overhead to account for processing time.
182 #define IWL_NUM_RBDS_NON_HE 512
183 #define IWL_NUM_RBDS_22000_HE 2048
186 * All JF radio modules are part of the 9000 series, but the MAC part
187 * looks more like 22000. That's why this device is here, but called
190 const struct iwl_cfg iwl9560_qu_b0_jf_b0_cfg = {
191 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
193 .num_rbds = IWL_NUM_RBDS_NON_HE,
196 const struct iwl_cfg iwl9560_qu_c0_jf_b0_cfg = {
197 .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
199 .num_rbds = IWL_NUM_RBDS_NON_HE,
202 const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg = {
203 .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
206 * This device doesn't support receiving BlockAck with a large bitmap
207 * so we need to restrict the size of transmitted aggregation to the
208 * HT size; mac80211 would otherwise pick the HE max (256) by default.
210 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
211 .num_rbds = IWL_NUM_RBDS_NON_HE,
214 const struct iwl_cfg iwl9560_qnj_b0_jf_b0_cfg = {
215 .fw_name_pre = IWL_QNJ_B_JF_B_FW_PRE,
218 * This device doesn't support receiving BlockAck with a large bitmap
219 * so we need to restrict the size of transmitted aggregation to the
220 * HT size; mac80211 would otherwise pick the HE max (256) by default.
222 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
223 .num_rbds = IWL_NUM_RBDS_NON_HE,
226 const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = {
227 .device_family = IWL_DEVICE_FAMILY_22000,
228 .base_params = &iwl_22000_base_params,
229 .mq_rx_supported = true,
233 .bisr_workaround = 1,
236 const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
237 const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
238 const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
239 const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203";
240 const char iwl_ax204_name[] = "Intel(R) Wi-Fi 6 AX204 160MHz";
242 const char iwl_ax200_killer_1650w_name[] =
243 "Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
244 const char iwl_ax200_killer_1650x_name[] =
245 "Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)";
246 const char iwl_ax201_killer_1650s_name[] =
247 "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)";
248 const char iwl_ax201_killer_1650i_name[] =
249 "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)";
251 const struct iwl_cfg iwl_qu_b0_hr1_b0 = {
252 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
255 * This device doesn't support receiving BlockAck with a large bitmap
256 * so we need to restrict the size of transmitted aggregation to the
257 * HT size; mac80211 would otherwise pick the HE max (256) by default.
259 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
260 .tx_with_siso_diversity = true,
261 .num_rbds = IWL_NUM_RBDS_22000_HE,
264 const struct iwl_cfg iwl_qu_b0_hr_b0 = {
265 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
268 * This device doesn't support receiving BlockAck with a large bitmap
269 * so we need to restrict the size of transmitted aggregation to the
270 * HT size; mac80211 would otherwise pick the HE max (256) by default.
272 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
273 .num_rbds = IWL_NUM_RBDS_22000_HE,
276 const struct iwl_cfg iwl_ax201_cfg_qu_hr = {
277 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
278 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
281 * This device doesn't support receiving BlockAck with a large bitmap
282 * so we need to restrict the size of transmitted aggregation to the
283 * HT size; mac80211 would otherwise pick the HE max (256) by default.
285 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
286 .num_rbds = IWL_NUM_RBDS_22000_HE,
289 const struct iwl_cfg iwl_qu_c0_hr1_b0 = {
290 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
293 * This device doesn't support receiving BlockAck with a large bitmap
294 * so we need to restrict the size of transmitted aggregation to the
295 * HT size; mac80211 would otherwise pick the HE max (256) by default.
297 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
298 .tx_with_siso_diversity = true,
299 .num_rbds = IWL_NUM_RBDS_22000_HE,
302 const struct iwl_cfg iwl_qu_c0_hr_b0 = {
303 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
306 * This device doesn't support receiving BlockAck with a large bitmap
307 * so we need to restrict the size of transmitted aggregation to the
308 * HT size; mac80211 would otherwise pick the HE max (256) by default.
310 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
311 .num_rbds = IWL_NUM_RBDS_22000_HE,
314 const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0 = {
315 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
316 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
319 * This device doesn't support receiving BlockAck with a large bitmap
320 * so we need to restrict the size of transmitted aggregation to the
321 * HT size; mac80211 would otherwise pick the HE max (256) by default.
323 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
324 .num_rbds = IWL_NUM_RBDS_22000_HE,
327 const struct iwl_cfg iwl_quz_a0_hr1_b0 = {
328 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
331 * This device doesn't support receiving BlockAck with a large bitmap
332 * so we need to restrict the size of transmitted aggregation to the
333 * HT size; mac80211 would otherwise pick the HE max (256) by default.
335 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
336 .tx_with_siso_diversity = true,
337 .num_rbds = IWL_NUM_RBDS_22000_HE,
340 const struct iwl_cfg iwl_ax201_cfg_quz_hr = {
341 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
342 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
345 * This device doesn't support receiving BlockAck with a large bitmap
346 * so we need to restrict the size of transmitted aggregation to the
347 * HT size; mac80211 would otherwise pick the HE max (256) by default.
349 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
350 .num_rbds = IWL_NUM_RBDS_22000_HE,
353 const struct iwl_cfg iwl_ax1650s_cfg_quz_hr = {
354 .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
355 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
358 * This device doesn't support receiving BlockAck with a large bitmap
359 * so we need to restrict the size of transmitted aggregation to the
360 * HT size; mac80211 would otherwise pick the HE max (256) by default.
362 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
363 .num_rbds = IWL_NUM_RBDS_22000_HE,
366 const struct iwl_cfg iwl_ax1650i_cfg_quz_hr = {
367 .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
368 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
371 * This device doesn't support receiving BlockAck with a large bitmap
372 * so we need to restrict the size of transmitted aggregation to the
373 * HT size; mac80211 would otherwise pick the HE max (256) by default.
375 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
376 .num_rbds = IWL_NUM_RBDS_22000_HE,
379 const struct iwl_cfg iwl_ax200_cfg_cc = {
380 .fw_name_pre = IWL_CC_A_FW_PRE,
383 * This device doesn't support receiving BlockAck with a large bitmap
384 * so we need to restrict the size of transmitted aggregation to the
385 * HT size; mac80211 would otherwise pick the HE max (256) by default.
387 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
388 .num_rbds = IWL_NUM_RBDS_22000_HE,
391 const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
392 .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW)",
393 .fw_name_pre = IWL_QU_B_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,
401 .num_rbds = IWL_NUM_RBDS_22000_HE,
404 const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = {
405 .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W)",
406 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
409 * This device doesn't support receiving BlockAck with a large bitmap
410 * so we need to restrict the size of transmitted aggregation to the
411 * HT size; mac80211 would otherwise pick the HE max (256) by default.
413 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
414 .num_rbds = IWL_NUM_RBDS_22000_HE,
417 const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0 = {
418 .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW)",
419 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
422 * This device doesn't support receiving BlockAck with a large bitmap
423 * so we need to restrict the size of transmitted aggregation to the
424 * HT size; mac80211 would otherwise pick the HE max (256) by default.
426 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
427 .num_rbds = IWL_NUM_RBDS_22000_HE,
430 const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0 = {
431 .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W)",
432 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
435 * This device doesn't support receiving BlockAck with a large bitmap
436 * so we need to restrict the size of transmitted aggregation to the
437 * HT size; mac80211 would otherwise pick the HE max (256) by default.
439 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
440 .num_rbds = IWL_NUM_RBDS_22000_HE,
443 const struct iwl_cfg iwl_qnj_b0_hr_b0_cfg = {
444 .fw_name_pre = IWL_QNJ_B_HR_B_FW_PRE,
447 * This device doesn't support receiving BlockAck with a large bitmap
448 * so we need to restrict the size of transmitted aggregation to the
449 * HT size; mac80211 would otherwise pick the HE max (256) by default.
451 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
452 .num_rbds = IWL_NUM_RBDS_22000_HE,
455 const struct iwl_cfg iwl_cfg_quz_a0_hr_b0 = {
456 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
459 * This device doesn't support receiving BlockAck with a large bitmap
460 * so we need to restrict the size of transmitted aggregation to the
461 * HT size; mac80211 would otherwise pick the HE max (256) by default.
463 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
464 .num_rbds = IWL_NUM_RBDS_22000_HE,
467 MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
468 MODULE_FIRMWARE(IWL_QNJ_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
469 MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
470 MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
471 MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
472 MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
473 MODULE_FIRMWARE(IWL_QNJ_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
474 MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));