1 /******************************************************************************
3 * Copyright(c) 2008 - 2013 Intel Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25 *****************************************************************************/
27 #include <linux/module.h>
28 #include <linux/stringify.h>
29 #include "iwl-config.h"
30 #include "iwl-agn-hw.h"
31 #include "dvm/commands.h" /* needed for BT for now */
33 /* Highest firmware API version supported */
34 #define IWL6000_UCODE_API_MAX 6
35 #define IWL6050_UCODE_API_MAX 5
36 #define IWL6000G2_UCODE_API_MAX 6
37 #define IWL6035_UCODE_API_MAX 6
39 /* Oldest version we won't warn about */
40 #define IWL6000_UCODE_API_OK 4
41 #define IWL6000G2_UCODE_API_OK 5
42 #define IWL6050_UCODE_API_OK 5
43 #define IWL6000G2B_UCODE_API_OK 6
44 #define IWL6035_UCODE_API_OK 6
46 /* Lowest firmware API version supported */
47 #define IWL6000_UCODE_API_MIN 4
48 #define IWL6050_UCODE_API_MIN 4
49 #define IWL6000G2_UCODE_API_MIN 5
50 #define IWL6035_UCODE_API_MIN 6
53 #define EEPROM_6000_TX_POWER_VERSION (4)
54 #define EEPROM_6000_EEPROM_VERSION (0x423)
55 #define EEPROM_6050_TX_POWER_VERSION (4)
56 #define EEPROM_6050_EEPROM_VERSION (0x532)
57 #define EEPROM_6150_TX_POWER_VERSION (6)
58 #define EEPROM_6150_EEPROM_VERSION (0x553)
59 #define EEPROM_6005_TX_POWER_VERSION (6)
60 #define EEPROM_6005_EEPROM_VERSION (0x709)
61 #define EEPROM_6030_TX_POWER_VERSION (6)
62 #define EEPROM_6030_EEPROM_VERSION (0x709)
63 #define EEPROM_6035_TX_POWER_VERSION (6)
64 #define EEPROM_6035_EEPROM_VERSION (0x753)
66 #define IWL6000_FW_PRE "iwlwifi-6000-"
67 #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
69 #define IWL6050_FW_PRE "iwlwifi-6050-"
70 #define IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE __stringify(api) ".ucode"
72 #define IWL6005_FW_PRE "iwlwifi-6000g2a-"
73 #define IWL6005_MODULE_FIRMWARE(api) IWL6005_FW_PRE __stringify(api) ".ucode"
75 #define IWL6030_FW_PRE "iwlwifi-6000g2b-"
76 #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
78 static const struct iwl_base_params iwl6000_base_params = {
79 .eeprom_size = OTP_LOW_IMAGE_SIZE,
80 .num_of_queues = IWLAGN_NUM_QUEUES,
82 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
83 .shadow_ram_support = true,
84 .led_compensation = 51,
85 .adv_thermal_throttle = true,
86 .support_ct_kill_exit = true,
87 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
88 .chain_noise_scale = 1000,
89 .wd_timeout = IWL_DEF_WD_TIMEOUT,
90 .max_event_log_size = 512,
91 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
94 static const struct iwl_base_params iwl6050_base_params = {
95 .eeprom_size = OTP_LOW_IMAGE_SIZE,
96 .num_of_queues = IWLAGN_NUM_QUEUES,
98 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
99 .shadow_ram_support = true,
100 .led_compensation = 51,
101 .adv_thermal_throttle = true,
102 .support_ct_kill_exit = true,
103 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
104 .chain_noise_scale = 1500,
105 .wd_timeout = IWL_DEF_WD_TIMEOUT,
106 .max_event_log_size = 1024,
107 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
110 static const struct iwl_base_params iwl6000_g2_base_params = {
111 .eeprom_size = OTP_LOW_IMAGE_SIZE,
112 .num_of_queues = IWLAGN_NUM_QUEUES,
114 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
115 .shadow_ram_support = true,
116 .led_compensation = 57,
117 .adv_thermal_throttle = true,
118 .support_ct_kill_exit = true,
119 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
120 .chain_noise_scale = 1000,
121 .wd_timeout = IWL_LONG_WD_TIMEOUT,
122 .max_event_log_size = 512,
123 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
126 static const struct iwl_ht_params iwl6000_ht_params = {
127 .ht_greenfield_support = true,
128 .use_rts_for_aggregation = true, /* use rts/cts protection */
129 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
132 static const struct iwl_bt_params iwl6000_bt_params = {
133 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
134 .advanced_bt_coexist = true,
135 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
136 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
137 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
138 .bt_sco_disable = true,
141 static const struct iwl_eeprom_params iwl6000_eeprom_params = {
142 .regulatory_bands = {
143 EEPROM_REG_BAND_1_CHANNELS,
144 EEPROM_REG_BAND_2_CHANNELS,
145 EEPROM_REG_BAND_3_CHANNELS,
146 EEPROM_REG_BAND_4_CHANNELS,
147 EEPROM_REG_BAND_5_CHANNELS,
148 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
149 EEPROM_REG_BAND_52_HT40_CHANNELS
151 .enhanced_txpower = true,
154 #define IWL_DEVICE_6005 \
155 .fw_name_pre = IWL6005_FW_PRE, \
156 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
157 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
158 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
159 .device_family = IWL_DEVICE_FAMILY_6005, \
160 .max_inst_size = IWL60_RTC_INST_SIZE, \
161 .max_data_size = IWL60_RTC_DATA_SIZE, \
162 .nvm_ver = EEPROM_6005_EEPROM_VERSION, \
163 .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
164 .base_params = &iwl6000_g2_base_params, \
165 .eeprom_params = &iwl6000_eeprom_params, \
166 .need_temp_offset_calib = true, \
167 .led_mode = IWL_LED_RF_STATE
169 const struct iwl_cfg iwl6005_2agn_cfg = {
170 .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
172 .ht_params = &iwl6000_ht_params,
175 const struct iwl_cfg iwl6005_2abg_cfg = {
176 .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
180 const struct iwl_cfg iwl6005_2bg_cfg = {
181 .name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
185 const struct iwl_cfg iwl6005_2agn_sff_cfg = {
186 .name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
188 .ht_params = &iwl6000_ht_params,
191 const struct iwl_cfg iwl6005_2agn_d_cfg = {
192 .name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
194 .ht_params = &iwl6000_ht_params,
197 const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
198 .name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
200 .ht_params = &iwl6000_ht_params,
203 const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
204 .name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
206 .ht_params = &iwl6000_ht_params,
209 #define IWL_DEVICE_6030 \
210 .fw_name_pre = IWL6030_FW_PRE, \
211 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
212 .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \
213 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
214 .device_family = IWL_DEVICE_FAMILY_6030, \
215 .max_inst_size = IWL60_RTC_INST_SIZE, \
216 .max_data_size = IWL60_RTC_DATA_SIZE, \
217 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
218 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
219 .base_params = &iwl6000_g2_base_params, \
220 .bt_params = &iwl6000_bt_params, \
221 .eeprom_params = &iwl6000_eeprom_params, \
222 .need_temp_offset_calib = true, \
223 .led_mode = IWL_LED_RF_STATE, \
226 const struct iwl_cfg iwl6030_2agn_cfg = {
227 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
229 .ht_params = &iwl6000_ht_params,
232 const struct iwl_cfg iwl6030_2abg_cfg = {
233 .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
237 const struct iwl_cfg iwl6030_2bgn_cfg = {
238 .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
240 .ht_params = &iwl6000_ht_params,
243 const struct iwl_cfg iwl6030_2bg_cfg = {
244 .name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
248 #define IWL_DEVICE_6035 \
249 .fw_name_pre = IWL6030_FW_PRE, \
250 .ucode_api_max = IWL6035_UCODE_API_MAX, \
251 .ucode_api_ok = IWL6035_UCODE_API_OK, \
252 .ucode_api_min = IWL6035_UCODE_API_MIN, \
253 .device_family = IWL_DEVICE_FAMILY_6030, \
254 .max_inst_size = IWL60_RTC_INST_SIZE, \
255 .max_data_size = IWL60_RTC_DATA_SIZE, \
256 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
257 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
258 .base_params = &iwl6000_g2_base_params, \
259 .bt_params = &iwl6000_bt_params, \
260 .eeprom_params = &iwl6000_eeprom_params, \
261 .need_temp_offset_calib = true, \
262 .led_mode = IWL_LED_RF_STATE, \
265 const struct iwl_cfg iwl6035_2agn_cfg = {
266 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
268 .ht_params = &iwl6000_ht_params,
271 const struct iwl_cfg iwl6035_2agn_sff_cfg = {
272 .name = "Intel(R) Centrino(R) Ultimate-N 6235 AGN",
274 .ht_params = &iwl6000_ht_params,
277 const struct iwl_cfg iwl1030_bgn_cfg = {
278 .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
280 .ht_params = &iwl6000_ht_params,
283 const struct iwl_cfg iwl1030_bg_cfg = {
284 .name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
288 const struct iwl_cfg iwl130_bgn_cfg = {
289 .name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
291 .ht_params = &iwl6000_ht_params,
292 .rx_with_siso_diversity = true,
295 const struct iwl_cfg iwl130_bg_cfg = {
296 .name = "Intel(R) Centrino(R) Wireless-N 130 BG",
298 .rx_with_siso_diversity = true,
302 * "i": Internal configuration, use internal Power Amplifier
304 #define IWL_DEVICE_6000i \
305 .fw_name_pre = IWL6000_FW_PRE, \
306 .ucode_api_max = IWL6000_UCODE_API_MAX, \
307 .ucode_api_ok = IWL6000_UCODE_API_OK, \
308 .ucode_api_min = IWL6000_UCODE_API_MIN, \
309 .device_family = IWL_DEVICE_FAMILY_6000i, \
310 .max_inst_size = IWL60_RTC_INST_SIZE, \
311 .max_data_size = IWL60_RTC_DATA_SIZE, \
312 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
313 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
314 .nvm_ver = EEPROM_6000_EEPROM_VERSION, \
315 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
316 .base_params = &iwl6000_base_params, \
317 .eeprom_params = &iwl6000_eeprom_params, \
318 .led_mode = IWL_LED_BLINK
320 const struct iwl_cfg iwl6000i_2agn_cfg = {
321 .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
323 .ht_params = &iwl6000_ht_params,
326 const struct iwl_cfg iwl6000i_2abg_cfg = {
327 .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
331 const struct iwl_cfg iwl6000i_2bg_cfg = {
332 .name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
336 #define IWL_DEVICE_6050 \
337 .fw_name_pre = IWL6050_FW_PRE, \
338 .ucode_api_max = IWL6050_UCODE_API_MAX, \
339 .ucode_api_min = IWL6050_UCODE_API_MIN, \
340 .device_family = IWL_DEVICE_FAMILY_6050, \
341 .max_inst_size = IWL60_RTC_INST_SIZE, \
342 .max_data_size = IWL60_RTC_DATA_SIZE, \
343 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
344 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
345 .nvm_ver = EEPROM_6050_EEPROM_VERSION, \
346 .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
347 .base_params = &iwl6050_base_params, \
348 .eeprom_params = &iwl6000_eeprom_params, \
349 .led_mode = IWL_LED_BLINK, \
350 .internal_wimax_coex = true
352 const struct iwl_cfg iwl6050_2agn_cfg = {
353 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
355 .ht_params = &iwl6000_ht_params,
358 const struct iwl_cfg iwl6050_2abg_cfg = {
359 .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
363 #define IWL_DEVICE_6150 \
364 .fw_name_pre = IWL6050_FW_PRE, \
365 .ucode_api_max = IWL6050_UCODE_API_MAX, \
366 .ucode_api_min = IWL6050_UCODE_API_MIN, \
367 .device_family = IWL_DEVICE_FAMILY_6150, \
368 .max_inst_size = IWL60_RTC_INST_SIZE, \
369 .max_data_size = IWL60_RTC_DATA_SIZE, \
370 .nvm_ver = EEPROM_6150_EEPROM_VERSION, \
371 .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
372 .base_params = &iwl6050_base_params, \
373 .eeprom_params = &iwl6000_eeprom_params, \
374 .led_mode = IWL_LED_BLINK, \
375 .internal_wimax_coex = true
377 const struct iwl_cfg iwl6150_bgn_cfg = {
378 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
380 .ht_params = &iwl6000_ht_params,
383 const struct iwl_cfg iwl6150_bg_cfg = {
384 .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
388 const struct iwl_cfg iwl6000_3agn_cfg = {
389 .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
390 .fw_name_pre = IWL6000_FW_PRE,
391 .ucode_api_max = IWL6000_UCODE_API_MAX,
392 .ucode_api_ok = IWL6000_UCODE_API_OK,
393 .ucode_api_min = IWL6000_UCODE_API_MIN,
394 .device_family = IWL_DEVICE_FAMILY_6000,
395 .max_inst_size = IWL60_RTC_INST_SIZE,
396 .max_data_size = IWL60_RTC_DATA_SIZE,
397 .nvm_ver = EEPROM_6000_EEPROM_VERSION,
398 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION,
399 .base_params = &iwl6000_base_params,
400 .eeprom_params = &iwl6000_eeprom_params,
401 .ht_params = &iwl6000_ht_params,
402 .led_mode = IWL_LED_BLINK,
405 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK));
406 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK));
407 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK));
408 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK));