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_QU_C_HR_B_FW_PRE "iwlwifi-Qu-c0-hr-b0"
31 #define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0"
32 #define IWL_QU_C_JF_B_FW_PRE "iwlwifi-Qu-c0-jf-b0"
33 #define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0"
34 #define IWL_QUZ_A_JF_B_FW_PRE "iwlwifi-QuZ-a0-jf-b0"
35 #define IWL_CC_A_FW_PRE "iwlwifi-cc-a0"
37 #define IWL_QU_B_HR_B_MODULE_FIRMWARE(api) \
38 IWL_QU_B_HR_B_FW_PRE "-" __stringify(api) ".ucode"
39 #define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \
40 IWL_QUZ_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
41 #define IWL_QUZ_A_JF_B_MODULE_FIRMWARE(api) \
42 IWL_QUZ_A_JF_B_FW_PRE "-" __stringify(api) ".ucode"
43 #define IWL_QU_C_HR_B_MODULE_FIRMWARE(api) \
44 IWL_QU_C_HR_B_FW_PRE "-" __stringify(api) ".ucode"
45 #define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
46 IWL_QU_B_JF_B_FW_PRE "-" __stringify(api) ".ucode"
47 #define IWL_CC_A_MODULE_FIRMWARE(api) \
48 IWL_CC_A_FW_PRE "-" __stringify(api) ".ucode"
50 static const struct iwl_base_params iwl_22000_base_params = {
51 .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
53 .max_tfd_queue_size = 256,
54 .shadow_ram_support = true,
55 .led_compensation = 57,
56 .wd_timeout = IWL_LONG_WD_TIMEOUT,
57 .max_event_log_size = 512,
58 .shadow_reg_enable = true,
59 .pcie_l1_allowed = true,
62 const struct iwl_ht_params iwl_22000_ht_params = {
65 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
66 BIT(NL80211_BAND_6GHZ),
69 #define IWL_DEVICE_22000_COMMON \
70 .ucode_api_min = IWL_22000_UCODE_API_MIN, \
71 .led_mode = IWL_LED_RF_STATE, \
72 .nvm_hw_section_num = 10, \
73 .non_shared_ant = ANT_B, \
74 .dccm_offset = IWL_22000_DCCM_OFFSET, \
75 .dccm_len = IWL_22000_DCCM_LEN, \
76 .dccm2_offset = IWL_22000_DCCM2_OFFSET, \
77 .dccm2_len = IWL_22000_DCCM2_LEN, \
78 .smem_offset = IWL_22000_SMEM_OFFSET, \
79 .smem_len = IWL_22000_SMEM_LEN, \
80 .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
81 .apmg_not_supported = true, \
82 .trans.mq_rx_supported = true, \
83 .vht_mu_mimo_supported = true, \
84 .mac_addr_from_csr = 0x380, \
85 .ht_params = &iwl_22000_ht_params, \
86 .nvm_ver = IWL_22000_NVM_VERSION, \
87 .trans.rf_id = true, \
89 .nvm_type = IWL_NVM_EXT, \
90 .dbgc_supported = true, \
91 .min_umac_error_event_table = 0x400000, \
92 .d3_debug_data_base_addr = 0x401000, \
93 .d3_debug_data_length = 60 * 1024, \
96 .addr = LDBG_M2S_BUF_WPTR, \
97 .mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
100 .addr = LDBG_M2S_BUF_WRAP_CNT, \
101 .mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
105 #define IWL_DEVICE_22500 \
106 IWL_DEVICE_22000_COMMON, \
107 .ucode_api_max = IWL_22000_UCODE_API_MAX, \
108 .trans.device_family = IWL_DEVICE_FAMILY_22000, \
109 .trans.base_params = &iwl_22000_base_params, \
110 .gp2_reg_addr = 0xa02c68, \
113 .addr = MON_BUFF_WRPTR_VER2, \
114 .mask = 0xffffffff, \
117 .addr = MON_BUFF_CYCLE_CNT_VER2, \
118 .mask = 0xffffffff, \
122 const struct iwl_cfg_trans_params iwl_qu_trans_cfg = {
123 .mq_rx_supported = true,
126 .device_family = IWL_DEVICE_FAMILY_22000,
127 .base_params = &iwl_22000_base_params,
130 .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US,
133 const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg = {
134 .mq_rx_supported = true,
137 .device_family = IWL_DEVICE_FAMILY_22000,
138 .base_params = &iwl_22000_base_params,
140 .xtal_latency = 1820,
141 .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_1820US,
144 const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = {
145 .mq_rx_supported = true,
148 .device_family = IWL_DEVICE_FAMILY_22000,
149 .base_params = &iwl_22000_base_params,
151 .xtal_latency = 12000,
152 .low_latency_xtal = true,
153 .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
157 * If the device doesn't support HE, no need to have that many buffers.
158 * 22000 devices can split multiple frames into a single RB, so fewer are
159 * needed; AX210 cannot (but use smaller RBs by default) - these sizes
160 * were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with
161 * additional overhead to account for processing time.
163 #define IWL_NUM_RBDS_NON_HE 512
164 #define IWL_NUM_RBDS_22000_HE 2048
167 * All JF radio modules are part of the 9000 series, but the MAC part
168 * looks more like 22000. That's why this device is here, but called
171 const struct iwl_cfg iwl9560_qu_b0_jf_b0_cfg = {
172 .fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
174 .num_rbds = IWL_NUM_RBDS_NON_HE,
177 const struct iwl_cfg iwl9560_qu_c0_jf_b0_cfg = {
178 .fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
180 .num_rbds = IWL_NUM_RBDS_NON_HE,
183 const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg = {
184 .fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
187 * This device doesn't support receiving BlockAck with a large bitmap
188 * so we need to restrict the size of transmitted aggregation to the
189 * HT size; mac80211 would otherwise pick the HE max (256) by default.
191 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
192 .num_rbds = IWL_NUM_RBDS_NON_HE,
195 const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = {
196 .device_family = IWL_DEVICE_FAMILY_22000,
197 .base_params = &iwl_22000_base_params,
198 .mq_rx_supported = true,
201 .bisr_workaround = 1,
204 const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
205 const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
206 const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
207 const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203";
208 const char iwl_ax204_name[] = "Intel(R) Wi-Fi 6 AX204 160MHz";
210 const char iwl_ax200_killer_1650w_name[] =
211 "Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
212 const char iwl_ax200_killer_1650x_name[] =
213 "Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)";
214 const char iwl_ax201_killer_1650s_name[] =
215 "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)";
216 const char iwl_ax201_killer_1650i_name[] =
217 "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)";
219 const struct iwl_cfg iwl_qu_b0_hr1_b0 = {
220 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
223 * This device doesn't support receiving BlockAck with a large bitmap
224 * so we need to restrict the size of transmitted aggregation to the
225 * HT size; mac80211 would otherwise pick the HE max (256) by default.
227 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
228 .tx_with_siso_diversity = true,
229 .num_rbds = IWL_NUM_RBDS_22000_HE,
232 const struct iwl_cfg iwl_qu_b0_hr_b0 = {
233 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
236 * This device doesn't support receiving BlockAck with a large bitmap
237 * so we need to restrict the size of transmitted aggregation to the
238 * HT size; mac80211 would otherwise pick the HE max (256) by default.
240 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
241 .num_rbds = IWL_NUM_RBDS_22000_HE,
244 const struct iwl_cfg iwl_ax201_cfg_qu_hr = {
245 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
246 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
249 * This device doesn't support receiving BlockAck with a large bitmap
250 * so we need to restrict the size of transmitted aggregation to the
251 * HT size; mac80211 would otherwise pick the HE max (256) by default.
253 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
254 .num_rbds = IWL_NUM_RBDS_22000_HE,
257 const struct iwl_cfg iwl_qu_c0_hr1_b0 = {
258 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
261 * This device doesn't support receiving BlockAck with a large bitmap
262 * so we need to restrict the size of transmitted aggregation to the
263 * HT size; mac80211 would otherwise pick the HE max (256) by default.
265 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
266 .tx_with_siso_diversity = true,
267 .num_rbds = IWL_NUM_RBDS_22000_HE,
270 const struct iwl_cfg iwl_qu_c0_hr_b0 = {
271 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
274 * This device doesn't support receiving BlockAck with a large bitmap
275 * so we need to restrict the size of transmitted aggregation to the
276 * HT size; mac80211 would otherwise pick the HE max (256) by default.
278 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
279 .num_rbds = IWL_NUM_RBDS_22000_HE,
282 const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0 = {
283 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
284 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
287 * This device doesn't support receiving BlockAck with a large bitmap
288 * so we need to restrict the size of transmitted aggregation to the
289 * HT size; mac80211 would otherwise pick the HE max (256) by default.
291 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
292 .num_rbds = IWL_NUM_RBDS_22000_HE,
295 const struct iwl_cfg iwl_quz_a0_hr1_b0 = {
296 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
299 * This device doesn't support receiving BlockAck with a large bitmap
300 * so we need to restrict the size of transmitted aggregation to the
301 * HT size; mac80211 would otherwise pick the HE max (256) by default.
303 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
304 .tx_with_siso_diversity = true,
305 .num_rbds = IWL_NUM_RBDS_22000_HE,
308 const struct iwl_cfg iwl_ax201_cfg_quz_hr = {
309 .name = "Intel(R) Wi-Fi 6 AX201 160MHz",
310 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
313 * This device doesn't support receiving BlockAck with a large bitmap
314 * so we need to restrict the size of transmitted aggregation to the
315 * HT size; mac80211 would otherwise pick the HE max (256) by default.
317 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
318 .num_rbds = IWL_NUM_RBDS_22000_HE,
321 const struct iwl_cfg iwl_ax1650s_cfg_quz_hr = {
322 .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
323 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
326 * This device doesn't support receiving BlockAck with a large bitmap
327 * so we need to restrict the size of transmitted aggregation to the
328 * HT size; mac80211 would otherwise pick the HE max (256) by default.
330 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
331 .num_rbds = IWL_NUM_RBDS_22000_HE,
334 const struct iwl_cfg iwl_ax1650i_cfg_quz_hr = {
335 .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
336 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
339 * This device doesn't support receiving BlockAck with a large bitmap
340 * so we need to restrict the size of transmitted aggregation to the
341 * HT size; mac80211 would otherwise pick the HE max (256) by default.
343 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
344 .num_rbds = IWL_NUM_RBDS_22000_HE,
347 const struct iwl_cfg iwl_ax200_cfg_cc = {
348 .fw_name_pre = IWL_CC_A_FW_PRE,
351 * This device doesn't support receiving BlockAck with a large bitmap
352 * so we need to restrict the size of transmitted aggregation to the
353 * HT size; mac80211 would otherwise pick the HE max (256) by default.
355 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
356 .num_rbds = IWL_NUM_RBDS_22000_HE,
359 const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
360 .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW)",
361 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
364 * This device doesn't support receiving BlockAck with a large bitmap
365 * so we need to restrict the size of transmitted aggregation to the
366 * HT size; mac80211 would otherwise pick the HE max (256) by default.
368 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
369 .num_rbds = IWL_NUM_RBDS_22000_HE,
372 const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = {
373 .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W)",
374 .fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
377 * This device doesn't support receiving BlockAck with a large bitmap
378 * so we need to restrict the size of transmitted aggregation to the
379 * HT size; mac80211 would otherwise pick the HE max (256) by default.
381 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
382 .num_rbds = IWL_NUM_RBDS_22000_HE,
385 const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0 = {
386 .name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW)",
387 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
390 * This device doesn't support receiving BlockAck with a large bitmap
391 * so we need to restrict the size of transmitted aggregation to the
392 * HT size; mac80211 would otherwise pick the HE max (256) by default.
394 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
395 .num_rbds = IWL_NUM_RBDS_22000_HE,
398 const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0 = {
399 .name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W)",
400 .fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
403 * This device doesn't support receiving BlockAck with a large bitmap
404 * so we need to restrict the size of transmitted aggregation to the
405 * HT size; mac80211 would otherwise pick the HE max (256) by default.
407 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
408 .num_rbds = IWL_NUM_RBDS_22000_HE,
411 const struct iwl_cfg iwl_cfg_quz_a0_hr_b0 = {
412 .fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
415 * This device doesn't support receiving BlockAck with a large bitmap
416 * so we need to restrict the size of transmitted aggregation to the
417 * HT size; mac80211 would otherwise pick the HE max (256) by default.
419 .max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
420 .num_rbds = IWL_NUM_RBDS_22000_HE,
423 MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
424 MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
425 MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
426 MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
427 MODULE_FIRMWARE(IWL_QUZ_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
428 MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));