1 /******************************************************************************
3 * Copyright(c) 2008 - 2014 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 .wd_timeout
= IWL_DEF_WD_TIMEOUT
,
86 .max_event_log_size
= 512,
87 .shadow_reg_enable
= false, /* TODO: fix bugs using this feature */
90 static const struct iwl_base_params iwl6050_base_params
= {
91 .eeprom_size
= OTP_LOW_IMAGE_SIZE
,
92 .num_of_queues
= IWLAGN_NUM_QUEUES
,
94 .max_ll_items
= OTP_MAX_LL_ITEMS_6x50
,
95 .shadow_ram_support
= true,
96 .led_compensation
= 51,
97 .wd_timeout
= IWL_DEF_WD_TIMEOUT
,
98 .max_event_log_size
= 1024,
99 .shadow_reg_enable
= false, /* TODO: fix bugs using this feature */
102 static const struct iwl_base_params iwl6000_g2_base_params
= {
103 .eeprom_size
= OTP_LOW_IMAGE_SIZE
,
104 .num_of_queues
= IWLAGN_NUM_QUEUES
,
106 .max_ll_items
= OTP_MAX_LL_ITEMS_6x00
,
107 .shadow_ram_support
= true,
108 .led_compensation
= 57,
109 .wd_timeout
= IWL_LONG_WD_TIMEOUT
,
110 .max_event_log_size
= 512,
111 .shadow_reg_enable
= false, /* TODO: fix bugs using this feature */
114 static const struct iwl_ht_params iwl6000_ht_params
= {
115 .ht_greenfield_support
= true,
116 .use_rts_for_aggregation
= true, /* use rts/cts protection */
117 .ht40_bands
= BIT(IEEE80211_BAND_2GHZ
) | BIT(IEEE80211_BAND_5GHZ
),
120 static const struct iwl_eeprom_params iwl6000_eeprom_params
= {
121 .regulatory_bands
= {
122 EEPROM_REG_BAND_1_CHANNELS
,
123 EEPROM_REG_BAND_2_CHANNELS
,
124 EEPROM_REG_BAND_3_CHANNELS
,
125 EEPROM_REG_BAND_4_CHANNELS
,
126 EEPROM_REG_BAND_5_CHANNELS
,
127 EEPROM_6000_REG_BAND_24_HT40_CHANNELS
,
128 EEPROM_REG_BAND_52_HT40_CHANNELS
130 .enhanced_txpower
= true,
133 #define IWL_DEVICE_6005 \
134 .fw_name_pre = IWL6005_FW_PRE, \
135 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
136 .ucode_api_ok = IWL6000G2_UCODE_API_OK, \
137 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
138 .device_family = IWL_DEVICE_FAMILY_6005, \
139 .max_inst_size = IWL60_RTC_INST_SIZE, \
140 .max_data_size = IWL60_RTC_DATA_SIZE, \
141 .nvm_ver = EEPROM_6005_EEPROM_VERSION, \
142 .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
143 .base_params = &iwl6000_g2_base_params, \
144 .eeprom_params = &iwl6000_eeprom_params, \
145 .led_mode = IWL_LED_RF_STATE
147 const struct iwl_cfg iwl6005_2agn_cfg
= {
148 .name
= "Intel(R) Centrino(R) Advanced-N 6205 AGN",
150 .ht_params
= &iwl6000_ht_params
,
153 const struct iwl_cfg iwl6005_2abg_cfg
= {
154 .name
= "Intel(R) Centrino(R) Advanced-N 6205 ABG",
158 const struct iwl_cfg iwl6005_2bg_cfg
= {
159 .name
= "Intel(R) Centrino(R) Advanced-N 6205 BG",
163 const struct iwl_cfg iwl6005_2agn_sff_cfg
= {
164 .name
= "Intel(R) Centrino(R) Advanced-N 6205S AGN",
166 .ht_params
= &iwl6000_ht_params
,
169 const struct iwl_cfg iwl6005_2agn_d_cfg
= {
170 .name
= "Intel(R) Centrino(R) Advanced-N 6205D AGN",
172 .ht_params
= &iwl6000_ht_params
,
175 const struct iwl_cfg iwl6005_2agn_mow1_cfg
= {
176 .name
= "Intel(R) Centrino(R) Advanced-N 6206 AGN",
178 .ht_params
= &iwl6000_ht_params
,
181 const struct iwl_cfg iwl6005_2agn_mow2_cfg
= {
182 .name
= "Intel(R) Centrino(R) Advanced-N 6207 AGN",
184 .ht_params
= &iwl6000_ht_params
,
187 #define IWL_DEVICE_6030 \
188 .fw_name_pre = IWL6030_FW_PRE, \
189 .ucode_api_max = IWL6000G2_UCODE_API_MAX, \
190 .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \
191 .ucode_api_min = IWL6000G2_UCODE_API_MIN, \
192 .device_family = IWL_DEVICE_FAMILY_6030, \
193 .max_inst_size = IWL60_RTC_INST_SIZE, \
194 .max_data_size = IWL60_RTC_DATA_SIZE, \
195 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
196 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
197 .base_params = &iwl6000_g2_base_params, \
198 .eeprom_params = &iwl6000_eeprom_params, \
199 .led_mode = IWL_LED_RF_STATE
201 const struct iwl_cfg iwl6030_2agn_cfg
= {
202 .name
= "Intel(R) Centrino(R) Advanced-N 6230 AGN",
204 .ht_params
= &iwl6000_ht_params
,
207 const struct iwl_cfg iwl6030_2abg_cfg
= {
208 .name
= "Intel(R) Centrino(R) Advanced-N 6230 ABG",
212 const struct iwl_cfg iwl6030_2bgn_cfg
= {
213 .name
= "Intel(R) Centrino(R) Advanced-N 6230 BGN",
215 .ht_params
= &iwl6000_ht_params
,
218 const struct iwl_cfg iwl6030_2bg_cfg
= {
219 .name
= "Intel(R) Centrino(R) Advanced-N 6230 BG",
223 #define IWL_DEVICE_6035 \
224 .fw_name_pre = IWL6030_FW_PRE, \
225 .ucode_api_max = IWL6035_UCODE_API_MAX, \
226 .ucode_api_ok = IWL6035_UCODE_API_OK, \
227 .ucode_api_min = IWL6035_UCODE_API_MIN, \
228 .device_family = IWL_DEVICE_FAMILY_6030, \
229 .max_inst_size = IWL60_RTC_INST_SIZE, \
230 .max_data_size = IWL60_RTC_DATA_SIZE, \
231 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
232 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
233 .base_params = &iwl6000_g2_base_params, \
234 .eeprom_params = &iwl6000_eeprom_params, \
235 .led_mode = IWL_LED_RF_STATE
237 const struct iwl_cfg iwl6035_2agn_cfg
= {
238 .name
= "Intel(R) Centrino(R) Advanced-N 6235 AGN",
240 .ht_params
= &iwl6000_ht_params
,
243 const struct iwl_cfg iwl6035_2agn_sff_cfg
= {
244 .name
= "Intel(R) Centrino(R) Ultimate-N 6235 AGN",
246 .ht_params
= &iwl6000_ht_params
,
249 const struct iwl_cfg iwl1030_bgn_cfg
= {
250 .name
= "Intel(R) Centrino(R) Wireless-N 1030 BGN",
252 .ht_params
= &iwl6000_ht_params
,
255 const struct iwl_cfg iwl1030_bg_cfg
= {
256 .name
= "Intel(R) Centrino(R) Wireless-N 1030 BG",
260 const struct iwl_cfg iwl130_bgn_cfg
= {
261 .name
= "Intel(R) Centrino(R) Wireless-N 130 BGN",
263 .ht_params
= &iwl6000_ht_params
,
264 .rx_with_siso_diversity
= true,
267 const struct iwl_cfg iwl130_bg_cfg
= {
268 .name
= "Intel(R) Centrino(R) Wireless-N 130 BG",
270 .rx_with_siso_diversity
= true,
274 * "i": Internal configuration, use internal Power Amplifier
276 #define IWL_DEVICE_6000i \
277 .fw_name_pre = IWL6000_FW_PRE, \
278 .ucode_api_max = IWL6000_UCODE_API_MAX, \
279 .ucode_api_ok = IWL6000_UCODE_API_OK, \
280 .ucode_api_min = IWL6000_UCODE_API_MIN, \
281 .device_family = IWL_DEVICE_FAMILY_6000i, \
282 .max_inst_size = IWL60_RTC_INST_SIZE, \
283 .max_data_size = IWL60_RTC_DATA_SIZE, \
284 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
285 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
286 .nvm_ver = EEPROM_6000_EEPROM_VERSION, \
287 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
288 .base_params = &iwl6000_base_params, \
289 .eeprom_params = &iwl6000_eeprom_params, \
290 .led_mode = IWL_LED_BLINK
292 const struct iwl_cfg iwl6000i_2agn_cfg
= {
293 .name
= "Intel(R) Centrino(R) Advanced-N 6200 AGN",
295 .ht_params
= &iwl6000_ht_params
,
298 const struct iwl_cfg iwl6000i_2abg_cfg
= {
299 .name
= "Intel(R) Centrino(R) Advanced-N 6200 ABG",
303 const struct iwl_cfg iwl6000i_2bg_cfg
= {
304 .name
= "Intel(R) Centrino(R) Advanced-N 6200 BG",
308 #define IWL_DEVICE_6050 \
309 .fw_name_pre = IWL6050_FW_PRE, \
310 .ucode_api_max = IWL6050_UCODE_API_MAX, \
311 .ucode_api_min = IWL6050_UCODE_API_MIN, \
312 .device_family = IWL_DEVICE_FAMILY_6050, \
313 .max_inst_size = IWL60_RTC_INST_SIZE, \
314 .max_data_size = IWL60_RTC_DATA_SIZE, \
315 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
316 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
317 .nvm_ver = EEPROM_6050_EEPROM_VERSION, \
318 .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
319 .base_params = &iwl6050_base_params, \
320 .eeprom_params = &iwl6000_eeprom_params, \
321 .led_mode = IWL_LED_BLINK, \
322 .internal_wimax_coex = true
324 const struct iwl_cfg iwl6050_2agn_cfg
= {
325 .name
= "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
327 .ht_params
= &iwl6000_ht_params
,
330 const struct iwl_cfg iwl6050_2abg_cfg
= {
331 .name
= "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
335 #define IWL_DEVICE_6150 \
336 .fw_name_pre = IWL6050_FW_PRE, \
337 .ucode_api_max = IWL6050_UCODE_API_MAX, \
338 .ucode_api_min = IWL6050_UCODE_API_MIN, \
339 .device_family = IWL_DEVICE_FAMILY_6150, \
340 .max_inst_size = IWL60_RTC_INST_SIZE, \
341 .max_data_size = IWL60_RTC_DATA_SIZE, \
342 .nvm_ver = EEPROM_6150_EEPROM_VERSION, \
343 .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
344 .base_params = &iwl6050_base_params, \
345 .eeprom_params = &iwl6000_eeprom_params, \
346 .led_mode = IWL_LED_BLINK, \
347 .internal_wimax_coex = true
349 const struct iwl_cfg iwl6150_bgn_cfg
= {
350 .name
= "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
352 .ht_params
= &iwl6000_ht_params
,
355 const struct iwl_cfg iwl6150_bg_cfg
= {
356 .name
= "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
360 const struct iwl_cfg iwl6000_3agn_cfg
= {
361 .name
= "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
362 .fw_name_pre
= IWL6000_FW_PRE
,
363 .ucode_api_max
= IWL6000_UCODE_API_MAX
,
364 .ucode_api_ok
= IWL6000_UCODE_API_OK
,
365 .ucode_api_min
= IWL6000_UCODE_API_MIN
,
366 .device_family
= IWL_DEVICE_FAMILY_6000
,
367 .max_inst_size
= IWL60_RTC_INST_SIZE
,
368 .max_data_size
= IWL60_RTC_DATA_SIZE
,
369 .nvm_ver
= EEPROM_6000_EEPROM_VERSION
,
370 .nvm_calib_ver
= EEPROM_6000_TX_POWER_VERSION
,
371 .base_params
= &iwl6000_base_params
,
372 .eeprom_params
= &iwl6000_eeprom_params
,
373 .ht_params
= &iwl6000_ht_params
,
374 .led_mode
= IWL_LED_BLINK
,
377 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK
));
378 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK
));
379 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK
));
380 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK
));