Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
Wey-Yi Guy | 4e31826 | 2011-12-27 11:21:32 -0800 | [diff] [blame] | 3 | * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved. |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 4 | * |
| 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. |
| 8 | * |
| 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 |
| 12 | * more details. |
| 13 | * |
| 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 |
| 17 | * |
| 18 | * The full GNU General Public License is included in this distribution in the |
| 19 | * file called LICENSE. |
| 20 | * |
| 21 | * Contact Information: |
Wey-Yi Guy | 3d2b162 | 2010-03-17 18:57:13 -0700 | [diff] [blame] | 22 | * Intel Linux Wireless <ilw@linux.intel.com> |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
| 24 | * |
| 25 | *****************************************************************************/ |
| 26 | |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 27 | #include <linux/module.h> |
Evgeni Golov | 8fcbd4dc | 2011-06-12 05:34:31 -0700 | [diff] [blame] | 28 | #include <linux/stringify.h> |
Johannes Berg | e967669 | 2012-04-10 14:10:28 -0700 | [diff] [blame] | 29 | #include "iwl-config.h" |
Johannes Berg | cebcbd7 | 2011-09-15 11:46:46 -0700 | [diff] [blame] | 30 | #include "iwl-cfg.h" |
Johannes Berg | 0db19cd | 2012-04-03 20:57:59 +0200 | [diff] [blame] | 31 | #include "iwl-agn-hw.h" |
| 32 | #include "iwl-csr.h" |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 33 | |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 34 | /* Highest firmware API version supported */ |
Fry, Donald H | 41504cc | 2011-02-16 11:49:34 -0800 | [diff] [blame] | 35 | #define IWL5000_UCODE_API_MAX 5 |
Jay Sternberg | 39e6d22 | 2009-02-27 16:21:19 -0800 | [diff] [blame] | 36 | #define IWL5150_UCODE_API_MAX 2 |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 37 | |
Meenakshi Venkataraman | 78cbcf2 | 2012-04-22 07:55:27 -0700 | [diff] [blame] | 38 | /* Oldest version we won't warn about */ |
| 39 | #define IWL5000_UCODE_API_OK 5 |
| 40 | #define IWL5150_UCODE_API_OK 2 |
| 41 | |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 42 | /* Lowest firmware API version supported */ |
| 43 | #define IWL5000_UCODE_API_MIN 1 |
| 44 | #define IWL5150_UCODE_API_MIN 1 |
| 45 | |
Johannes Berg | 586aed9 | 2012-04-03 20:41:07 +0200 | [diff] [blame] | 46 | /* EEPROM versions */ |
| 47 | #define EEPROM_5000_TX_POWER_VERSION (4) |
| 48 | #define EEPROM_5000_EEPROM_VERSION (0x11A) |
| 49 | #define EEPROM_5050_TX_POWER_VERSION (4) |
| 50 | #define EEPROM_5050_EEPROM_VERSION (0x21E) |
| 51 | |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 52 | #define IWL5000_FW_PRE "iwlwifi-5000-" |
Evgeni Golov | 8fcbd4dc | 2011-06-12 05:34:31 -0700 | [diff] [blame] | 53 | #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode" |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 54 | |
| 55 | #define IWL5150_FW_PRE "iwlwifi-5150-" |
Evgeni Golov | 8fcbd4dc | 2011-06-12 05:34:31 -0700 | [diff] [blame] | 56 | #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode" |
Jay Sternberg | 4e062f9 | 2008-10-14 12:32:41 -0700 | [diff] [blame] | 57 | |
Johannes Berg | 6794f3e | 2012-03-06 13:30:56 -0800 | [diff] [blame] | 58 | static const struct iwl_base_params iwl5000_base_params = { |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 59 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
Wey-Yi Guy | 19e6cda | 2010-03-16 17:41:23 -0700 | [diff] [blame] | 60 | .num_of_queues = IWLAGN_NUM_QUEUES, |
Ben Cahill | fadb358 | 2009-10-23 13:42:21 -0700 | [diff] [blame] | 61 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
Wey-Yi Guy | f2d0d0e | 2009-09-11 10:38:14 -0700 | [diff] [blame] | 62 | .led_compensation = 51, |
Trieu 'Andrew' Nguyen | 3e4fb5f | 2010-01-22 14:22:46 -0800 | [diff] [blame] | 63 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
Ben Cahill | d4fe5ac | 2010-02-05 11:33:46 -0800 | [diff] [blame] | 64 | .chain_noise_scale = 1000, |
Johannes Berg | 7c5ba4a | 2012-04-09 17:46:54 -0700 | [diff] [blame] | 65 | .wd_timeout = IWL_WATCHHDOG_DISABLED, |
Wey-Yi Guy | 678b385 | 2010-03-26 12:54:37 -0700 | [diff] [blame] | 66 | .max_event_log_size = 512, |
Wey-Yi Guy | f352910 | 2011-08-02 09:08:37 -0700 | [diff] [blame] | 67 | .no_idle_support = true, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 68 | }; |
Johannes Berg | 6794f3e | 2012-03-06 13:30:56 -0800 | [diff] [blame] | 69 | |
| 70 | static const struct iwl_ht_params iwl5000_ht_params = { |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 71 | .ht_greenfield_support = true, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 72 | }; |
| 73 | |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 74 | #define IWL_DEVICE_5000 \ |
| 75 | .fw_name_pre = IWL5000_FW_PRE, \ |
| 76 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ |
Meenakshi Venkataraman | 78cbcf2 | 2012-04-22 07:55:27 -0700 | [diff] [blame] | 77 | .ucode_api_ok = IWL5000_UCODE_API_OK, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 78 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ |
Johannes Berg | 2d771cb | 2012-04-09 17:47:00 -0700 | [diff] [blame] | 79 | .device_family = IWL_DEVICE_FAMILY_5000, \ |
Emmanuel Grumbach | dae66d0 | 2012-02-07 12:56:26 +0200 | [diff] [blame] | 80 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
| 81 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 82 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ |
| 83 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 84 | .base_params = &iwl5000_base_params, \ |
| 85 | .led_mode = IWL_LED_BLINK |
| 86 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 87 | const struct iwl_cfg iwl5300_agn_cfg = { |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 88 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 89 | IWL_DEVICE_5000, |
Johannes Berg | 2845fd8 | 2011-04-05 08:55:05 -0700 | [diff] [blame] | 90 | /* at least EEPROM 0x11A has wrong info */ |
| 91 | .valid_tx_ant = ANT_ABC, /* .cfg overwrite */ |
| 92 | .valid_rx_ant = ANT_ABC, /* .cfg overwrite */ |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 93 | .ht_params = &iwl5000_ht_params, |
| 94 | }; |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 95 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 96 | const struct iwl_cfg iwl5100_bgn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 97 | .name = "Intel(R) WiFi Link 5100 BGN", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 98 | IWL_DEVICE_5000, |
Wey-Yi Guy | dbbf175 | 2010-11-15 13:43:07 -0800 | [diff] [blame] | 99 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
| 100 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 101 | .ht_params = &iwl5000_ht_params, |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 102 | }; |
| 103 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 104 | const struct iwl_cfg iwl5100_abg_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 105 | .name = "Intel(R) WiFi Link 5100 ABG", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 106 | IWL_DEVICE_5000, |
Wey-Yi Guy | dbbf175 | 2010-11-15 13:43:07 -0800 | [diff] [blame] | 107 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
| 108 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ |
Esti Kummer | 4740863 | 2008-07-11 11:53:30 +0800 | [diff] [blame] | 109 | }; |
| 110 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 111 | const struct iwl_cfg iwl5100_agn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 112 | .name = "Intel(R) WiFi Link 5100 AGN", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 113 | IWL_DEVICE_5000, |
Wey-Yi Guy | dbbf175 | 2010-11-15 13:43:07 -0800 | [diff] [blame] | 114 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
| 115 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 116 | .ht_params = &iwl5000_ht_params, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 117 | }; |
| 118 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 119 | const struct iwl_cfg iwl5350_agn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 120 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 121 | .fw_name_pre = IWL5000_FW_PRE, |
| 122 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
Meenakshi Venkataraman | 78cbcf2 | 2012-04-22 07:55:27 -0700 | [diff] [blame] | 123 | .ucode_api_ok = IWL5000_UCODE_API_OK, |
Reinette Chatre | a0987a8 | 2008-12-02 12:14:06 -0800 | [diff] [blame] | 124 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
Johannes Berg | 2d771cb | 2012-04-09 17:47:00 -0700 | [diff] [blame] | 125 | .device_family = IWL_DEVICE_FAMILY_5000, |
Emmanuel Grumbach | dae66d0 | 2012-02-07 12:56:26 +0200 | [diff] [blame] | 126 | .max_inst_size = IWLAGN_RTC_INST_SIZE, |
| 127 | .max_data_size = IWLAGN_RTC_DATA_SIZE, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 128 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
| 129 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 130 | .base_params = &iwl5000_base_params, |
| 131 | .ht_params = &iwl5000_ht_params, |
Wey-Yi Guy | 564b344 | 2010-11-09 09:21:34 -0800 | [diff] [blame] | 132 | .led_mode = IWL_LED_BLINK, |
Wey-Yi Guy | 50619ac | 2010-12-07 08:06:31 -0800 | [diff] [blame] | 133 | .internal_wimax_coex = true, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 134 | }; |
| 135 | |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 136 | #define IWL_DEVICE_5150 \ |
| 137 | .fw_name_pre = IWL5150_FW_PRE, \ |
| 138 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ |
Meenakshi Venkataraman | 78cbcf2 | 2012-04-22 07:55:27 -0700 | [diff] [blame] | 139 | .ucode_api_ok = IWL5150_UCODE_API_OK, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 140 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ |
Johannes Berg | 2d771cb | 2012-04-09 17:47:00 -0700 | [diff] [blame] | 141 | .device_family = IWL_DEVICE_FAMILY_5150, \ |
Emmanuel Grumbach | dae66d0 | 2012-02-07 12:56:26 +0200 | [diff] [blame] | 142 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
| 143 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 144 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ |
| 145 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 146 | .base_params = &iwl5000_base_params, \ |
Johannes Berg | c27bdc8 | 2011-11-25 11:11:43 -0800 | [diff] [blame] | 147 | .no_xtal_calib = true, \ |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 148 | .led_mode = IWL_LED_BLINK, \ |
| 149 | .internal_wimax_coex = true |
| 150 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 151 | const struct iwl_cfg iwl5150_agn_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 152 | .name = "Intel(R) WiMAX/WiFi Link 5150 AGN", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 153 | IWL_DEVICE_5150, |
Wey-Yi Guy | 7cb1b08 | 2010-10-06 08:10:00 -0700 | [diff] [blame] | 154 | .ht_params = &iwl5000_ht_params, |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 155 | |
Tomas Winkler | 7100e92 | 2008-12-01 16:32:18 -0800 | [diff] [blame] | 156 | }; |
| 157 | |
Johannes Berg | 706c4ff | 2012-03-05 11:24:33 -0800 | [diff] [blame] | 158 | const struct iwl_cfg iwl5150_abg_cfg = { |
Shanyu Zhao | c11362c | 2010-03-05 17:05:20 -0800 | [diff] [blame] | 159 | .name = "Intel(R) WiMAX/WiFi Link 5150 ABG", |
Wey-Yi Guy | 65af8de | 2010-12-08 07:51:50 -0800 | [diff] [blame] | 160 | IWL_DEVICE_5150, |
Tomas Winkler | 5a6a256 | 2008-04-24 11:55:23 -0700 | [diff] [blame] | 161 | }; |
| 162 | |
Meenakshi Venkataraman | 78cbcf2 | 2012-04-22 07:55:27 -0700 | [diff] [blame] | 163 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK)); |
| 164 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK)); |