Commit | Line | Data |
---|---|---|
503ab8c5 EH |
1 | /****************************************************************************** |
2 | * | |
3 | * This file is provided under a dual BSD/GPLv2 license. When using or | |
4 | * redistributing this file, you may do so under either license. | |
5 | * | |
6 | * GPL LICENSE SUMMARY | |
7 | * | |
8 | * Copyright(c) 2014 Intel Corporation. All rights reserved. | |
4fb06283 | 9 | * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH |
7e502e5b | 10 | * Copyright(c) 2016 Intel Deutschland GmbH |
503ab8c5 EH |
11 | * |
12 | * This program is free software; you can redistribute it and/or modify | |
13 | * it under the terms of version 2 of the GNU General Public License as | |
14 | * published by the Free Software Foundation. | |
15 | * | |
16 | * This program is distributed in the hope that it will be useful, but | |
17 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | * General Public License for more details. | |
20 | * | |
21 | * You should have received a copy of the GNU General Public License | |
22 | * along with this program; if not, write to the Free Software | |
23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | |
24 | * USA | |
25 | * | |
26 | * The full GNU General Public License is included in this distribution | |
27 | * in the file called COPYING. | |
28 | * | |
29 | * Contact Information: | |
cb2f8277 | 30 | * Intel Linux Wireless <linuxwifi@intel.com> |
503ab8c5 EH |
31 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
32 | * | |
33 | * BSD LICENSE | |
34 | * | |
35 | * Copyright(c) 2014 Intel Corporation. All rights reserved. | |
4fb06283 | 36 | * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH |
503ab8c5 EH |
37 | * All rights reserved. |
38 | * | |
39 | * Redistribution and use in source and binary forms, with or without | |
40 | * modification, are permitted provided that the following conditions | |
41 | * are met: | |
42 | * | |
43 | * * Redistributions of source code must retain the above copyright | |
44 | * notice, this list of conditions and the following disclaimer. | |
45 | * * Redistributions in binary form must reproduce the above copyright | |
46 | * notice, this list of conditions and the following disclaimer in | |
47 | * the documentation and/or other materials provided with the | |
48 | * distribution. | |
49 | * * Neither the name Intel Corporation nor the names of its | |
50 | * contributors may be used to endorse or promote products derived | |
51 | * from this software without specific prior written permission. | |
52 | * | |
53 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
54 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
55 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
56 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
57 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
58 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
59 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
60 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
61 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
62 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
63 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
64 | * | |
65 | *****************************************************************************/ | |
66 | ||
67 | #include <linux/module.h> | |
68 | #include <linux/stringify.h> | |
69 | #include "iwl-config.h" | |
70 | #include "iwl-agn-hw.h" | |
71 | ||
72 | /* Highest firmware API version supported */ | |
5a51c03f EG |
73 | #define IWL8000_UCODE_API_MAX 21 |
74 | #define IWL8265_UCODE_API_MAX 21 | |
503ab8c5 EH |
75 | |
76 | /* Oldest version we won't warn about */ | |
3c1f84a1 | 77 | #define IWL8000_UCODE_API_OK 13 |
7e502e5b | 78 | #define IWL8265_UCODE_API_OK 20 |
503ab8c5 EH |
79 | |
80 | /* Lowest firmware API version supported */ | |
3c1f84a1 | 81 | #define IWL8000_UCODE_API_MIN 13 |
7e502e5b | 82 | #define IWL8265_UCODE_API_MIN 20 |
503ab8c5 EH |
83 | |
84 | /* NVM versions */ | |
85 | #define IWL8000_NVM_VERSION 0x0a1d | |
86 | #define IWL8000_TX_POWER_VERSION 0xffff /* meaningless */ | |
87 | ||
addfaada | 88 | /* Memory offsets and lengths */ |
f53bf4c7 LK |
89 | #define IWL8260_DCCM_OFFSET 0x800000 |
90 | #define IWL8260_DCCM_LEN 0x18000 | |
86138324 IY |
91 | #define IWL8260_DCCM2_OFFSET 0x880000 |
92 | #define IWL8260_DCCM2_LEN 0x8000 | |
addfaada LK |
93 | #define IWL8260_SMEM_OFFSET 0x400000 |
94 | #define IWL8260_SMEM_LEN 0x68000 | |
f53bf4c7 | 95 | |
e1ba684f | 96 | #define IWL8000_FW_PRE "iwlwifi-8000C-" |
405b7338 LK |
97 | #define IWL8000_MODULE_FIRMWARE(api) \ |
98 | IWL8000_FW_PRE "-" __stringify(api) ".ucode" | |
503ab8c5 | 99 | |
7e502e5b OG |
100 | #define IWL8265_FW_PRE "iwlwifi-8265-" |
101 | #define IWL8265_MODULE_FIRMWARE(api) \ | |
102 | IWL8265_FW_PRE __stringify(api) ".ucode" | |
103 | ||
ae2b21b0 | 104 | #define NVM_HW_SECTION_NUM_FAMILY_8000 10 |
d383c740 EH |
105 | #define DEFAULT_NVM_FILE_FAMILY_8000B "nvmData-8000B" |
106 | #define DEFAULT_NVM_FILE_FAMILY_8000C "nvmData-8000C" | |
ae2b21b0 | 107 | |
9d012d0d AB |
108 | /* Max SDIO RX/TX aggregation sizes of the ADDBA request/response */ |
109 | #define MAX_RX_AGG_SIZE_8260_SDIO 21 | |
110 | #define MAX_TX_AGG_SIZE_8260_SDIO 40 | |
745160ee | 111 | |
c064ddf3 EH |
112 | /* Max A-MPDU exponent for HT and VHT */ |
113 | #define MAX_HT_AMPDU_EXPONENT_8260_SDIO IEEE80211_HT_MAX_AMPDU_32K | |
114 | #define MAX_VHT_AMPDU_EXPONENT_8260_SDIO IEEE80211_VHT_MAX_AMPDU_32K | |
115 | ||
503ab8c5 | 116 | static const struct iwl_base_params iwl8000_base_params = { |
30085544 | 117 | .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000, |
79f68280 | 118 | .num_of_queues = 31, |
503ab8c5 EH |
119 | .pll_cfg_val = 0, |
120 | .shadow_ram_support = true, | |
121 | .led_compensation = 57, | |
122 | .wd_timeout = IWL_LONG_WD_TIMEOUT, | |
123 | .max_event_log_size = 512, | |
124 | .shadow_reg_enable = true, | |
125 | .pcie_l1_allowed = true, | |
126 | }; | |
127 | ||
128 | static const struct iwl_ht_params iwl8000_ht_params = { | |
b260362a | 129 | .stbc = true, |
099d8086 | 130 | .ldpc = true, |
503ab8c5 EH |
131 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), |
132 | }; | |
133 | ||
8ce7db48 IY |
134 | static const struct iwl_tt_params iwl8000_tt_params = { |
135 | .ct_kill_entry = 115, | |
136 | .ct_kill_exit = 93, | |
137 | .ct_kill_duration = 5, | |
138 | .dynamic_smps_entry = 111, | |
139 | .dynamic_smps_exit = 107, | |
140 | .tx_protection_entry = 112, | |
141 | .tx_protection_exit = 105, | |
142 | .tx_backoff = { | |
143 | {.temperature = 110, .backoff = 200}, | |
144 | {.temperature = 111, .backoff = 600}, | |
145 | {.temperature = 112, .backoff = 1200}, | |
146 | {.temperature = 113, .backoff = 2000}, | |
147 | {.temperature = 114, .backoff = 4000}, | |
148 | }, | |
149 | .support_ct_kill = true, | |
150 | .support_dynamic_smps = true, | |
151 | .support_tx_protection = true, | |
152 | .support_tx_backoff = true, | |
153 | }; | |
154 | ||
7e502e5b | 155 | #define IWL_DEVICE_8000_COMMON \ |
4fb06283 EH |
156 | .device_family = IWL_DEVICE_FAMILY_8000, \ |
157 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | |
158 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
159 | .base_params = &iwl8000_base_params, \ | |
160 | .led_mode = IWL_LED_RF_STATE, \ | |
161 | .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_8000, \ | |
93190fb0 | 162 | .features = NETIF_F_RXCSUM, \ |
4fb06283 EH |
163 | .non_shared_ant = ANT_A, \ |
164 | .dccm_offset = IWL8260_DCCM_OFFSET, \ | |
165 | .dccm_len = IWL8260_DCCM_LEN, \ | |
166 | .dccm2_offset = IWL8260_DCCM2_OFFSET, \ | |
167 | .dccm2_len = IWL8260_DCCM2_LEN, \ | |
168 | .smem_offset = IWL8260_SMEM_OFFSET, \ | |
169 | .smem_len = IWL8260_SMEM_LEN, \ | |
170 | .default_nvm_file_B_step = DEFAULT_NVM_FILE_FAMILY_8000B, \ | |
8ce7db48 | 171 | .default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C, \ |
95411d04 AA |
172 | .thermal_params = &iwl8000_tt_params, \ |
173 | .apmg_not_supported = true | |
503ab8c5 | 174 | |
7e502e5b OG |
175 | #define IWL_DEVICE_8000 \ |
176 | IWL_DEVICE_8000_COMMON, \ | |
177 | .ucode_api_max = IWL8000_UCODE_API_MAX, \ | |
178 | .ucode_api_ok = IWL8000_UCODE_API_OK, \ | |
179 | .ucode_api_min = IWL8000_UCODE_API_MIN \ | |
180 | ||
181 | #define IWL_DEVICE_8260 \ | |
182 | IWL_DEVICE_8000_COMMON, \ | |
183 | .ucode_api_max = IWL8000_UCODE_API_MAX, \ | |
184 | .ucode_api_ok = IWL8000_UCODE_API_OK, \ | |
185 | .ucode_api_min = IWL8000_UCODE_API_MIN \ | |
186 | ||
187 | #define IWL_DEVICE_8265 \ | |
188 | IWL_DEVICE_8000_COMMON, \ | |
189 | .ucode_api_max = IWL8265_UCODE_API_MAX, \ | |
190 | .ucode_api_ok = IWL8265_UCODE_API_OK, \ | |
191 | .ucode_api_min = IWL8265_UCODE_API_MIN \ | |
192 | ||
d4200cb2 OG |
193 | const struct iwl_cfg iwl8260_2n_cfg = { |
194 | .name = "Intel(R) Dual Band Wireless N 8260", | |
195 | .fw_name_pre = IWL8000_FW_PRE, | |
7e502e5b | 196 | IWL_DEVICE_8260, |
d4200cb2 OG |
197 | .ht_params = &iwl8000_ht_params, |
198 | .nvm_ver = IWL8000_NVM_VERSION, | |
199 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | |
200 | }; | |
201 | ||
503ab8c5 EH |
202 | const struct iwl_cfg iwl8260_2ac_cfg = { |
203 | .name = "Intel(R) Dual Band Wireless AC 8260", | |
204 | .fw_name_pre = IWL8000_FW_PRE, | |
7e502e5b | 205 | IWL_DEVICE_8260, |
503ab8c5 EH |
206 | .ht_params = &iwl8000_ht_params, |
207 | .nvm_ver = IWL8000_NVM_VERSION, | |
208 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | |
c064ddf3 | 209 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
503ab8c5 EH |
210 | }; |
211 | ||
abf10f86 OG |
212 | const struct iwl_cfg iwl8265_2ac_cfg = { |
213 | .name = "Intel(R) Dual Band Wireless AC 8265", | |
7e502e5b OG |
214 | .fw_name_pre = IWL8265_FW_PRE, |
215 | IWL_DEVICE_8265, | |
abf10f86 OG |
216 | .ht_params = &iwl8000_ht_params, |
217 | .nvm_ver = IWL8000_NVM_VERSION, | |
218 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | |
219 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, | |
e48c947f | 220 | .vht_mu_mimo_supported = true, |
abf10f86 OG |
221 | }; |
222 | ||
9b8a7a90 OG |
223 | const struct iwl_cfg iwl4165_2ac_cfg = { |
224 | .name = "Intel(R) Dual Band Wireless AC 4165", | |
225 | .fw_name_pre = IWL8000_FW_PRE, | |
226 | IWL_DEVICE_8000, | |
227 | .ht_params = &iwl8000_ht_params, | |
228 | .nvm_ver = IWL8000_NVM_VERSION, | |
229 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | |
230 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, | |
231 | }; | |
232 | ||
52ab4c86 | 233 | const struct iwl_cfg iwl8260_2ac_sdio_cfg = { |
9d91356b AM |
234 | .name = "Intel(R) Dual Band Wireless-AC 8260", |
235 | .fw_name_pre = IWL8000_FW_PRE, | |
7e502e5b | 236 | IWL_DEVICE_8260, |
9d91356b AM |
237 | .ht_params = &iwl8000_ht_params, |
238 | .nvm_ver = IWL8000_NVM_VERSION, | |
239 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | |
745160ee | 240 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, |
9d012d0d | 241 | .max_tx_agg_size = MAX_TX_AGG_SIZE_8260_SDIO, |
161bdb77 | 242 | .disable_dummy_notification = true, |
c064ddf3 EH |
243 | .max_ht_ampdu_exponent = MAX_HT_AMPDU_EXPONENT_8260_SDIO, |
244 | .max_vht_ampdu_exponent = MAX_VHT_AMPDU_EXPONENT_8260_SDIO, | |
9d91356b AM |
245 | }; |
246 | ||
773cb025 OG |
247 | const struct iwl_cfg iwl4165_2ac_sdio_cfg = { |
248 | .name = "Intel(R) Dual Band Wireless-AC 4165", | |
3c4e2998 OG |
249 | .fw_name_pre = IWL8000_FW_PRE, |
250 | IWL_DEVICE_8000, | |
251 | .ht_params = &iwl8000_ht_params, | |
252 | .nvm_ver = IWL8000_NVM_VERSION, | |
253 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | |
3c4e2998 | 254 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, |
9d012d0d | 255 | .max_tx_agg_size = MAX_TX_AGG_SIZE_8260_SDIO, |
3c4e2998 OG |
256 | .bt_shared_single_ant = true, |
257 | .disable_dummy_notification = true, | |
258 | .max_ht_ampdu_exponent = MAX_HT_AMPDU_EXPONENT_8260_SDIO, | |
259 | .max_vht_ampdu_exponent = MAX_VHT_AMPDU_EXPONENT_8260_SDIO, | |
260 | }; | |
261 | ||
503ab8c5 | 262 | MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_OK)); |
7e502e5b | 263 | MODULE_FIRMWARE(IWL8265_MODULE_FIRMWARE(IWL8265_UCODE_API_OK)); |