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 .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 iwl1030_bgn_cfg
= {
244 .name
= "Intel(R) Centrino(R) Wireless-N 1030 BGN",
246 .ht_params
= &iwl6000_ht_params
,
249 const struct iwl_cfg iwl1030_bg_cfg
= {
250 .name
= "Intel(R) Centrino(R) Wireless-N 1030 BG",
254 const struct iwl_cfg iwl130_bgn_cfg
= {
255 .name
= "Intel(R) Centrino(R) Wireless-N 130 BGN",
257 .ht_params
= &iwl6000_ht_params
,
258 .rx_with_siso_diversity
= true,
261 const struct iwl_cfg iwl130_bg_cfg
= {
262 .name
= "Intel(R) Centrino(R) Wireless-N 130 BG",
264 .rx_with_siso_diversity
= true,
268 * "i": Internal configuration, use internal Power Amplifier
270 #define IWL_DEVICE_6000i \
271 .fw_name_pre = IWL6000_FW_PRE, \
272 .ucode_api_max = IWL6000_UCODE_API_MAX, \
273 .ucode_api_ok = IWL6000_UCODE_API_OK, \
274 .ucode_api_min = IWL6000_UCODE_API_MIN, \
275 .device_family = IWL_DEVICE_FAMILY_6000i, \
276 .max_inst_size = IWL60_RTC_INST_SIZE, \
277 .max_data_size = IWL60_RTC_DATA_SIZE, \
278 .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
279 .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
280 .nvm_ver = EEPROM_6000_EEPROM_VERSION, \
281 .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
282 .base_params = &iwl6000_base_params, \
283 .eeprom_params = &iwl6000_eeprom_params, \
284 .led_mode = IWL_LED_BLINK
286 const struct iwl_cfg iwl6000i_2agn_cfg
= {
287 .name
= "Intel(R) Centrino(R) Advanced-N 6200 AGN",
289 .ht_params
= &iwl6000_ht_params
,
292 const struct iwl_cfg iwl6000i_2abg_cfg
= {
293 .name
= "Intel(R) Centrino(R) Advanced-N 6200 ABG",
297 const struct iwl_cfg iwl6000i_2bg_cfg
= {
298 .name
= "Intel(R) Centrino(R) Advanced-N 6200 BG",
302 #define IWL_DEVICE_6050 \
303 .fw_name_pre = IWL6050_FW_PRE, \
304 .ucode_api_max = IWL6050_UCODE_API_MAX, \
305 .ucode_api_min = IWL6050_UCODE_API_MIN, \
306 .device_family = IWL_DEVICE_FAMILY_6050, \
307 .max_inst_size = IWL60_RTC_INST_SIZE, \
308 .max_data_size = IWL60_RTC_DATA_SIZE, \
309 .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
310 .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
311 .nvm_ver = EEPROM_6050_EEPROM_VERSION, \
312 .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
313 .base_params = &iwl6050_base_params, \
314 .eeprom_params = &iwl6000_eeprom_params, \
315 .led_mode = IWL_LED_BLINK, \
316 .internal_wimax_coex = true
318 const struct iwl_cfg iwl6050_2agn_cfg
= {
319 .name
= "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
321 .ht_params
= &iwl6000_ht_params
,
324 const struct iwl_cfg iwl6050_2abg_cfg
= {
325 .name
= "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
329 #define IWL_DEVICE_6150 \
330 .fw_name_pre = IWL6050_FW_PRE, \
331 .ucode_api_max = IWL6050_UCODE_API_MAX, \
332 .ucode_api_min = IWL6050_UCODE_API_MIN, \
333 .device_family = IWL_DEVICE_FAMILY_6150, \
334 .max_inst_size = IWL60_RTC_INST_SIZE, \
335 .max_data_size = IWL60_RTC_DATA_SIZE, \
336 .nvm_ver = EEPROM_6150_EEPROM_VERSION, \
337 .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
338 .base_params = &iwl6050_base_params, \
339 .eeprom_params = &iwl6000_eeprom_params, \
340 .led_mode = IWL_LED_BLINK, \
341 .internal_wimax_coex = true
343 const struct iwl_cfg iwl6150_bgn_cfg
= {
344 .name
= "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
346 .ht_params
= &iwl6000_ht_params
,
349 const struct iwl_cfg iwl6150_bg_cfg
= {
350 .name
= "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
354 const struct iwl_cfg iwl6000_3agn_cfg
= {
355 .name
= "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
356 .fw_name_pre
= IWL6000_FW_PRE
,
357 .ucode_api_max
= IWL6000_UCODE_API_MAX
,
358 .ucode_api_ok
= IWL6000_UCODE_API_OK
,
359 .ucode_api_min
= IWL6000_UCODE_API_MIN
,
360 .device_family
= IWL_DEVICE_FAMILY_6000
,
361 .max_inst_size
= IWL60_RTC_INST_SIZE
,
362 .max_data_size
= IWL60_RTC_DATA_SIZE
,
363 .nvm_ver
= EEPROM_6000_EEPROM_VERSION
,
364 .nvm_calib_ver
= EEPROM_6000_TX_POWER_VERSION
,
365 .base_params
= &iwl6000_base_params
,
366 .eeprom_params
= &iwl6000_eeprom_params
,
367 .ht_params
= &iwl6000_ht_params
,
368 .led_mode
= IWL_LED_BLINK
,
371 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK
));
372 MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK
));
373 MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK
));
374 MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK
));