]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - drivers/net/wireless/intel/iwlwifi/cfg/6000.c
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-jammy-kernel.git] / drivers / net / wireless / intel / iwlwifi / cfg / 6000.c
CommitLineData
4273a380 1// SPDX-License-Identifier: GPL-2.0-only
e1228374
JS
2/******************************************************************************
3 *
51368bf7 4 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
a8cbb46f 5 * Copyright(c) 2018 Intel Corporation
e1228374 6 *
e1228374 7 * Contact Information:
d01c5366 8 * Intel Linux Wireless <linuxwifi@intel.com>
e1228374
JS
9 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
10 *
11 *****************************************************************************/
12
e1228374 13#include <linux/module.h>
8fcbd4dc 14#include <linux/stringify.h>
e9676695 15#include "iwl-config.h"
0db19cde 16#include "iwl-agn-hw.h"
1023fdc4 17#include "dvm/commands.h" /* needed for BT for now */
e1228374
JS
18
19/* Highest firmware API version supported */
b9148115 20#define IWL6000_UCODE_API_MAX 6
62cb3c6a 21#define IWL6050_UCODE_API_MAX 5
ca9a4605 22#define IWL6000G2_UCODE_API_MAX 6
d2c8b15d 23#define IWL6035_UCODE_API_MAX 6
ca9a4605 24
e1228374 25/* Lowest firmware API version supported */
44246421
WYG
26#define IWL6000_UCODE_API_MIN 4
27#define IWL6050_UCODE_API_MIN 4
d2c8b15d
MV
28#define IWL6000G2_UCODE_API_MIN 5
29#define IWL6035_UCODE_API_MIN 6
e1228374 30
586aed96
JB
31/* EEPROM versions */
32#define EEPROM_6000_TX_POWER_VERSION (4)
33#define EEPROM_6000_EEPROM_VERSION (0x423)
34#define EEPROM_6050_TX_POWER_VERSION (4)
35#define EEPROM_6050_EEPROM_VERSION (0x532)
36#define EEPROM_6150_TX_POWER_VERSION (6)
37#define EEPROM_6150_EEPROM_VERSION (0x553)
38#define EEPROM_6005_TX_POWER_VERSION (6)
39#define EEPROM_6005_EEPROM_VERSION (0x709)
40#define EEPROM_6030_TX_POWER_VERSION (6)
41#define EEPROM_6030_EEPROM_VERSION (0x709)
42#define EEPROM_6035_TX_POWER_VERSION (6)
43#define EEPROM_6035_EEPROM_VERSION (0x753)
44
e1228374 45#define IWL6000_FW_PRE "iwlwifi-6000-"
8fcbd4dc 46#define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
e1228374
JS
47
48#define IWL6050_FW_PRE "iwlwifi-6050-"
8fcbd4dc 49#define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
e1228374 50
1956e1ad 51#define IWL6005_FW_PRE "iwlwifi-6000g2a-"
8fcbd4dc 52#define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
95b13014 53
1956e1ad 54#define IWL6030_FW_PRE "iwlwifi-6000g2b-"
8fcbd4dc 55#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
1808972f 56
6794f3ee 57static const struct iwl_base_params iwl6000_base_params = {
3e2b49d6 58 .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
0b5af201 59 .num_of_queues = IWLAGN_NUM_QUEUES,
7b3e42ea 60 .max_tfd_queue_size = 256,
0b5af201
JS
61 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
62 .shadow_ram_support = true,
0b5af201 63 .led_compensation = 51,
22de94de 64 .wd_timeout = IWL_DEF_WD_TIMEOUT,
95b13014 65 .max_event_log_size = 512,
66a77072 66 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
e03bbb62 67 .scd_chain_ext_wa = true,
0b5af201
JS
68};
69
6794f3ee 70static const struct iwl_base_params iwl6050_base_params = {
3e2b49d6 71 .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
1808972f 72 .num_of_queues = IWLAGN_NUM_QUEUES,
7b3e42ea 73 .max_tfd_queue_size = 256,
7cb1b088 74 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
1808972f
SZ
75 .shadow_ram_support = true,
76 .led_compensation = 51,
22de94de 77 .wd_timeout = IWL_DEF_WD_TIMEOUT,
7cb1b088 78 .max_event_log_size = 1024,
66a77072 79 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
e03bbb62 80 .scd_chain_ext_wa = true,
7cb1b088 81};
6794f3ee
JB
82
83static const struct iwl_base_params iwl6000_g2_base_params = {
3e2b49d6 84 .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
de05ead8 85 .num_of_queues = IWLAGN_NUM_QUEUES,
7b3e42ea 86 .max_tfd_queue_size = 256,
de05ead8
WYG
87 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
88 .shadow_ram_support = true,
4fb33244 89 .led_compensation = 57,
22de94de 90 .wd_timeout = IWL_LONG_WD_TIMEOUT,
de05ead8 91 .max_event_log_size = 512,
66a77072 92 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
e03bbb62 93 .scd_chain_ext_wa = true,
de05ead8 94};
7cb1b088 95
6794f3ee 96static const struct iwl_ht_params iwl6000_ht_params = {
7cb1b088
WYG
97 .ht_greenfield_support = true,
98 .use_rts_for_aggregation = true, /* use rts/cts protection */
57fbcce3 99 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
7cb1b088
WYG
100};
101
26a7ca9a
JB
102static const struct iwl_eeprom_params iwl6000_eeprom_params = {
103 .regulatory_bands = {
104 EEPROM_REG_BAND_1_CHANNELS,
105 EEPROM_REG_BAND_2_CHANNELS,
106 EEPROM_REG_BAND_3_CHANNELS,
107 EEPROM_REG_BAND_4_CHANNELS,
108 EEPROM_REG_BAND_5_CHANNELS,
109 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
110 EEPROM_REG_BAND_52_HT40_CHANNELS
111 },
112 .enhanced_txpower = true,
113};
114
65af8dea 115#define IWL_DEVICE_6005 \
ca9a4605 116 .fw_name_pre = IWL6005_FW_PRE, \
65af8dea
WYG
117 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
118 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
2d771cb6 119 .device_family = IWL_DEVICE_FAMILY_6005, \
dae66d0d
EG
120 .max_inst_size = IWL60_RTC_INST_SIZE, \
121 .max_data_size = IWL60_RTC_DATA_SIZE, \
b7998c8b
EL
122 .nvm_ver = EEPROM_6005_EEPROM_VERSION, \
123 .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
65af8dea 124 .base_params = &iwl6000_g2_base_params, \
26a7ca9a 125 .eeprom_params = &iwl6000_eeprom_params, \
540623ca 126 .led_mode = IWL_LED_RF_STATE, \
a8cbb46f
GBA
127 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
128 .csr = &iwl_csr_v1
65af8dea 129
706c4ff6 130const struct iwl_cfg iwl6005_2agn_cfg = {
55017ab8 131 .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
65af8dea 132 IWL_DEVICE_6005,
7cb1b088 133 .ht_params = &iwl6000_ht_params,
7cb1b088
WYG
134};
135
706c4ff6 136const struct iwl_cfg iwl6005_2abg_cfg = {
55017ab8 137 .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
65af8dea 138 IWL_DEVICE_6005,
1808972f
SZ
139};
140
706c4ff6 141const struct iwl_cfg iwl6005_2bg_cfg = {
55017ab8 142 .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
65af8dea
WYG
143 IWL_DEVICE_6005,
144};
145
706c4ff6 146const struct iwl_cfg iwl6005_2agn_sff_cfg = {
6a9ae0dc
WYG
147 .name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
148 IWL_DEVICE_6005,
149 .ht_params = &iwl6000_ht_params,
150};
151
706c4ff6 152const struct iwl_cfg iwl6005_2agn_d_cfg = {
5131a600
WYG
153 .name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
154 IWL_DEVICE_6005,
155 .ht_params = &iwl6000_ht_params,
156};
157
706c4ff6 158const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
37891123
WYG
159 .name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
160 IWL_DEVICE_6005,
161 .ht_params = &iwl6000_ht_params,
162};
706c4ff6
JB
163
164const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
37891123
WYG
165 .name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
166 IWL_DEVICE_6005,
167 .ht_params = &iwl6000_ht_params,
168};
169
65af8dea 170#define IWL_DEVICE_6030 \
ca9a4605 171 .fw_name_pre = IWL6030_FW_PRE, \
65af8dea
WYG
172 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
173 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
2d771cb6 174 .device_family = IWL_DEVICE_FAMILY_6030, \
dae66d0d
EG
175 .max_inst_size = IWL60_RTC_INST_SIZE, \
176 .max_data_size = IWL60_RTC_DATA_SIZE, \
b7998c8b
EL
177 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
178 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
65af8dea 179 .base_params = &iwl6000_g2_base_params, \
26a7ca9a 180 .eeprom_params = &iwl6000_eeprom_params, \
540623ca 181 .led_mode = IWL_LED_RF_STATE, \
a8cbb46f
GBA
182 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
183 .csr = &iwl_csr_v1
1808972f 184
706c4ff6 185const struct iwl_cfg iwl6030_2agn_cfg = {
d2eceef0 186 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
65af8dea 187 IWL_DEVICE_6030,
7cb1b088 188 .ht_params = &iwl6000_ht_params,
1808972f
SZ
189};
190
706c4ff6 191const struct iwl_cfg iwl6030_2abg_cfg = {
d2eceef0 192 .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
65af8dea 193 IWL_DEVICE_6030,
1808972f
SZ
194};
195
706c4ff6 196const struct iwl_cfg iwl6030_2bgn_cfg = {
d2eceef0 197 .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
65af8dea 198 IWL_DEVICE_6030,
7cb1b088 199 .ht_params = &iwl6000_ht_params,
9f6e1baf
SZ
200};
201
706c4ff6 202const struct iwl_cfg iwl6030_2bg_cfg = {
d2eceef0 203 .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
65af8dea 204 IWL_DEVICE_6030,
1808972f
SZ
205};
206
d2c8b15d
MV
207#define IWL_DEVICE_6035 \
208 .fw_name_pre = IWL6030_FW_PRE, \
209 .ucode_api_max = IWL6035_UCODE_API_MAX, \
d2c8b15d
MV
210 .ucode_api_min = IWL6035_UCODE_API_MIN, \
211 .device_family = IWL_DEVICE_FAMILY_6030, \
212 .max_inst_size = IWL60_RTC_INST_SIZE, \
213 .max_data_size = IWL60_RTC_DATA_SIZE, \
b7998c8b
EL
214 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
215 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
d2c8b15d 216 .base_params = &iwl6000_g2_base_params, \
3c70d087 217 .eeprom_params = &iwl6000_eeprom_params, \
540623ca 218 .led_mode = IWL_LED_RF_STATE, \
a8cbb46f
GBA
219 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
220 .csr = &iwl_csr_v1
d2c8b15d 221
706c4ff6 222const struct iwl_cfg iwl6035_2agn_cfg = {
6195d135 223 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
d2c8b15d 224 IWL_DEVICE_6035,
d103e344
WYG
225 .ht_params = &iwl6000_ht_params,
226};
227
08a5dd38
EG
228const struct iwl_cfg iwl6035_2agn_sff_cfg = {
229 .name = "Intel(R) Centrino(R) Ultimate-N 6235 AGN",
230 IWL_DEVICE_6035,
231 .ht_params = &iwl6000_ht_params,
232};
233
706c4ff6 234const struct iwl_cfg iwl1030_bgn_cfg = {
d2eceef0 235 .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
65af8dea 236 IWL_DEVICE_6030,
7cb1b088 237 .ht_params = &iwl6000_ht_params,
1808972f
SZ
238};
239
706c4ff6 240const struct iwl_cfg iwl1030_bg_cfg = {
d2eceef0 241 .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
65af8dea
WYG
242 IWL_DEVICE_6030,
243};
244
706c4ff6 245const struct iwl_cfg iwl130_bgn_cfg = {
65af8dea
WYG
246 .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
247 IWL_DEVICE_6030,
248 .ht_params = &iwl6000_ht_params,
249 .rx_with_siso_diversity = true,
250};
251
706c4ff6 252const struct iwl_cfg iwl130_bg_cfg = {
65af8dea
WYG
253 .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
254 IWL_DEVICE_6030,
255 .rx_with_siso_diversity = true,
1808972f
SZ
256};
257
95b13014
SZ
258/*
259 * "i": Internal configuration, use internal Power Amplifier
260 */
65af8dea
WYG
261#define IWL_DEVICE_6000i \
262 .fw_name_pre = IWL6000_FW_PRE, \
263 .ucode_api_max = IWL6000_UCODE_API_MAX, \
264 .ucode_api_min = IWL6000_UCODE_API_MIN, \
2d771cb6 265 .device_family = IWL_DEVICE_FAMILY_6000i, \
dae66d0d
EG
266 .max_inst_size = IWL60_RTC_INST_SIZE, \
267 .max_data_size = IWL60_RTC_DATA_SIZE, \
65af8dea
WYG
268 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
269 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
b7998c8b
EL
270 .nvm_ver = EEPROM_6000_EEPROM_VERSION, \
271 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
65af8dea 272 .base_params = &iwl6000_base_params, \
26a7ca9a 273 .eeprom_params = &iwl6000_eeprom_params, \
540623ca 274 .led_mode = IWL_LED_BLINK, \
a8cbb46f
GBA
275 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
276 .csr = &iwl_csr_v1
65af8dea 277
706c4ff6 278const struct iwl_cfg iwl6000i_2agn_cfg = {
c11362c0 279 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
65af8dea 280 IWL_DEVICE_6000i,
7cb1b088 281 .ht_params = &iwl6000_ht_params,
e1228374
JS
282};
283
706c4ff6 284const struct iwl_cfg iwl6000i_2abg_cfg = {
c11362c0 285 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
65af8dea 286 IWL_DEVICE_6000i,
5953a62e
WYG
287};
288
706c4ff6 289const struct iwl_cfg iwl6000i_2bg_cfg = {
c11362c0 290 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
65af8dea
WYG
291 IWL_DEVICE_6000i,
292};
293
294#define IWL_DEVICE_6050 \
295 .fw_name_pre = IWL6050_FW_PRE, \
296 .ucode_api_max = IWL6050_UCODE_API_MAX, \
297 .ucode_api_min = IWL6050_UCODE_API_MIN, \
2d771cb6 298 .device_family = IWL_DEVICE_FAMILY_6050, \
dae66d0d
EG
299 .max_inst_size = IWL60_RTC_INST_SIZE, \
300 .max_data_size = IWL60_RTC_DATA_SIZE, \
ff458edc
WYG
301 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
302 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
b7998c8b
EL
303 .nvm_ver = EEPROM_6050_EEPROM_VERSION, \
304 .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
65af8dea 305 .base_params = &iwl6050_base_params, \
26a7ca9a 306 .eeprom_params = &iwl6000_eeprom_params, \
65af8dea 307 .led_mode = IWL_LED_BLINK, \
540623ca 308 .internal_wimax_coex = true, \
a8cbb46f
GBA
309 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
310 .csr = &iwl_csr_v1
5953a62e 311
706c4ff6 312const struct iwl_cfg iwl6050_2agn_cfg = {
c11362c0 313 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
65af8dea 314 IWL_DEVICE_6050,
7cb1b088 315 .ht_params = &iwl6000_ht_params,
65af8dea
WYG
316};
317
706c4ff6 318const struct iwl_cfg iwl6050_2abg_cfg = {
65af8dea
WYG
319 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
320 IWL_DEVICE_6050,
03264339
SZ
321};
322
1144181c
WYG
323#define IWL_DEVICE_6150 \
324 .fw_name_pre = IWL6050_FW_PRE, \
325 .ucode_api_max = IWL6050_UCODE_API_MAX, \
326 .ucode_api_min = IWL6050_UCODE_API_MIN, \
2d771cb6 327 .device_family = IWL_DEVICE_FAMILY_6150, \
dae66d0d
EG
328 .max_inst_size = IWL60_RTC_INST_SIZE, \
329 .max_data_size = IWL60_RTC_DATA_SIZE, \
b7998c8b
EL
330 .nvm_ver = EEPROM_6150_EEPROM_VERSION, \
331 .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
1144181c 332 .base_params = &iwl6050_base_params, \
26a7ca9a 333 .eeprom_params = &iwl6000_eeprom_params, \
1144181c 334 .led_mode = IWL_LED_BLINK, \
540623ca 335 .internal_wimax_coex = true, \
a8cbb46f
GBA
336 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
337 .csr = &iwl_csr_v1
1144181c 338
706c4ff6 339const struct iwl_cfg iwl6150_bgn_cfg = {
f9dc6467 340 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
1144181c 341 IWL_DEVICE_6150,
7cb1b088 342 .ht_params = &iwl6000_ht_params,
1144181c
WYG
343};
344
706c4ff6 345const struct iwl_cfg iwl6150_bg_cfg = {
1144181c
WYG
346 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
347 IWL_DEVICE_6150,
e1228374
JS
348};
349
706c4ff6 350const struct iwl_cfg iwl6000_3agn_cfg = {
c11362c0 351 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
e1228374
JS
352 .fw_name_pre = IWL6000_FW_PRE,
353 .ucode_api_max = IWL6000_UCODE_API_MAX,
354 .ucode_api_min = IWL6000_UCODE_API_MIN,
2d771cb6 355 .device_family = IWL_DEVICE_FAMILY_6000,
dae66d0d
EG
356 .max_inst_size = IWL60_RTC_INST_SIZE,
357 .max_data_size = IWL60_RTC_DATA_SIZE,
b7998c8b
EL
358 .nvm_ver = EEPROM_6000_EEPROM_VERSION,
359 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION,
7cb1b088 360 .base_params = &iwl6000_base_params,
26a7ca9a 361 .eeprom_params = &iwl6000_eeprom_params,
7cb1b088 362 .ht_params = &iwl6000_ht_params,
564b344c 363 .led_mode = IWL_LED_BLINK,
0513c083 364 .csr = &iwl_csr_v1,
e1228374
JS
365};
366
9d9b21d1
EG
367MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
368MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
369MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
d8320d75 370MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));