blob: da58ece2286a108ee85466c52792ca633efa2380 [file] [log] [blame]
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +03001/******************************************************************************
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 *
Haim Dreyfuss2d3d31b2016-03-15 10:51:40 +02008 * Copyright(c) 2015-2016 Intel Deutschland GmbH
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +03009 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * BSD LICENSE
20 *
Haim Dreyfuss2d3d31b2016-03-15 10:51:40 +020021 * Copyright(c) 2015-2016 Intel Deutschland GmbH
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030022 * All rights reserved.
23 *
24 * Redistribution and use in source and binary forms, with or without
25 * modification, are permitted provided that the following conditions
26 * are met:
27 *
28 * * Redistributions of source code must retain the above copyright
29 * notice, this list of conditions and the following disclaimer.
30 * * Redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in
32 * the documentation and/or other materials provided with the
33 * distribution.
34 * * Neither the name Intel Corporation nor the names of its
35 * contributors may be used to endorse or promote products derived
36 * from this software without specific prior written permission.
37 *
38 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
39 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
40 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
41 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
42 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
44 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
45 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
46 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
47 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
48 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 *
50 *****************************************************************************/
51
52#include <linux/module.h>
53#include <linux/stringify.h>
54#include "iwl-config.h"
55#include "iwl-agn-hw.h"
56
57/* Highest firmware API version supported */
Luca Coelho2876e8c2016-12-19 12:00:32 +020058#define IWL9000_UCODE_API_MAX 30
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030059
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030060/* Lowest firmware API version supported */
Luca Coelho4b87e5a2016-09-12 16:03:30 +030061#define IWL9000_UCODE_API_MIN 17
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030062
63/* NVM versions */
64#define IWL9000_NVM_VERSION 0x0a1d
65#define IWL9000_TX_POWER_VERSION 0xffff /* meaningless */
66
67/* Memory offsets and lengths */
68#define IWL9000_DCCM_OFFSET 0x800000
69#define IWL9000_DCCM_LEN 0x18000
70#define IWL9000_DCCM2_OFFSET 0x880000
71#define IWL9000_DCCM2_LEN 0x8000
72#define IWL9000_SMEM_OFFSET 0x400000
73#define IWL9000_SMEM_LEN 0x68000
74
Oren Givon486c96a2016-06-23 14:51:41 +030075#define IWL9000_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-"
Haim Dreyfuss1afb0ae2016-04-03 19:55:59 +030076#define IWL9260_FW_PRE "iwlwifi-9260-th-a0-jf-a0-"
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030077#define IWL9000_MODULE_FIRMWARE(api) \
78 IWL9000_FW_PRE "-" __stringify(api) ".ucode"
Haim Dreyfuss1afb0ae2016-04-03 19:55:59 +030079#define IWL9260_MODULE_FIRMWARE(api) \
80 IWL9260_FW_PRE "-" __stringify(api) ".ucode"
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030081
82#define NVM_HW_SECTION_NUM_FAMILY_9000 10
83
84static const struct iwl_base_params iwl9000_base_params = {
85 .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_9000,
Emmanuel Grumbach6ae57b22015-12-16 10:50:03 +020086 .num_of_queues = 31,
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030087 .shadow_ram_support = true,
88 .led_compensation = 57,
89 .wd_timeout = IWL_LONG_WD_TIMEOUT,
90 .max_event_log_size = 512,
91 .shadow_reg_enable = true,
92 .pcie_l1_allowed = true,
93};
94
95static const struct iwl_ht_params iwl9000_ht_params = {
96 .stbc = true,
97 .ldpc = true,
Johannes Berg57fbcce2016-04-12 15:56:15 +020098 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +030099};
100
101static const struct iwl_tt_params iwl9000_tt_params = {
102 .ct_kill_entry = 115,
103 .ct_kill_exit = 93,
104 .ct_kill_duration = 5,
105 .dynamic_smps_entry = 111,
106 .dynamic_smps_exit = 107,
107 .tx_protection_entry = 112,
108 .tx_protection_exit = 105,
109 .tx_backoff = {
110 {.temperature = 110, .backoff = 200},
111 {.temperature = 111, .backoff = 600},
112 {.temperature = 112, .backoff = 1200},
113 {.temperature = 113, .backoff = 2000},
114 {.temperature = 114, .backoff = 4000},
115 },
116 .support_ct_kill = true,
117 .support_dynamic_smps = true,
118 .support_tx_protection = true,
119 .support_tx_backoff = true,
120};
121
122#define IWL_DEVICE_9000 \
123 .ucode_api_max = IWL9000_UCODE_API_MAX, \
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +0300124 .ucode_api_min = IWL9000_UCODE_API_MIN, \
125 .device_family = IWL_DEVICE_FAMILY_8000, \
126 .max_inst_size = IWL60_RTC_INST_SIZE, \
127 .max_data_size = IWL60_RTC_DATA_SIZE, \
128 .base_params = &iwl9000_base_params, \
129 .led_mode = IWL_LED_RF_STATE, \
130 .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_9000, \
131 .non_shared_ant = ANT_A, \
132 .dccm_offset = IWL9000_DCCM_OFFSET, \
133 .dccm_len = IWL9000_DCCM_LEN, \
134 .dccm2_offset = IWL9000_DCCM2_OFFSET, \
135 .dccm2_len = IWL9000_DCCM2_LEN, \
136 .smem_offset = IWL9000_SMEM_OFFSET, \
137 .smem_len = IWL9000_SMEM_LEN, \
Sara Sharon5e6a98d2016-03-10 17:40:56 +0200138 .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +0300139 .thermal_params = &iwl9000_tt_params, \
Sara Sharon96a64972015-12-23 15:10:03 +0200140 .apmg_not_supported = true, \
Sara Sharone48c9472016-01-27 18:59:48 +0200141 .mq_rx_supported = true, \
Sara Sharon17c867b2016-03-07 14:18:29 +0200142 .vht_mu_mimo_supported = true, \
Haim Dreyfuss1afb0ae2016-04-03 19:55:59 +0300143 .mac_addr_from_csr = true, \
144 .rf_id = true
Dreyfuss, Haim89374fe2015-06-01 08:27:17 +0300145
Oren Givonfe4a7242016-07-07 09:40:12 +0300146const struct iwl_cfg iwl9160_2ac_cfg = {
147 .name = "Intel(R) Dual Band Wireless AC 9160",
148 .fw_name_pre = IWL9260_FW_PRE,
149 IWL_DEVICE_9000,
150 .ht_params = &iwl9000_ht_params,
151 .nvm_ver = IWL9000_NVM_VERSION,
152 .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
153 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
154};
155
Haim Dreyfussaea2a5f2016-04-03 18:56:15 +0300156const struct iwl_cfg iwl9260_2ac_cfg = {
Oren Givon486c96a2016-06-23 14:51:41 +0300157 .name = "Intel(R) Dual Band Wireless AC 9260",
158 .fw_name_pre = IWL9260_FW_PRE,
159 IWL_DEVICE_9000,
160 .ht_params = &iwl9000_ht_params,
161 .nvm_ver = IWL9000_NVM_VERSION,
162 .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
163 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
164};
165
Oren Givon22ccabf2016-07-07 09:23:56 +0300166const struct iwl_cfg iwl9270_2ac_cfg = {
167 .name = "Intel(R) Dual Band Wireless AC 9270",
168 .fw_name_pre = IWL9260_FW_PRE,
169 IWL_DEVICE_9000,
170 .ht_params = &iwl9000_ht_params,
171 .nvm_ver = IWL9000_NVM_VERSION,
172 .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
173 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
174};
175
Oren Givon827e9ab2016-06-26 14:15:27 +0300176const struct iwl_cfg iwl9460_2ac_cfg = {
177 .name = "Intel(R) Dual Band Wireless AC 9460",
Oren Givon486c96a2016-06-23 14:51:41 +0300178 .fw_name_pre = IWL9000_FW_PRE,
179 IWL_DEVICE_9000,
180 .ht_params = &iwl9000_ht_params,
181 .nvm_ver = IWL9000_NVM_VERSION,
182 .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
183 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
184 .integrated = true,
Haim Dreyfuss1afb0ae2016-04-03 19:55:59 +0300185};
186
Oren Givon89e4ad52016-07-07 10:40:27 +0300187const struct iwl_cfg iwl9560_2ac_cfg = {
188 .name = "Intel(R) Dual Band Wireless AC 9560",
189 .fw_name_pre = IWL9000_FW_PRE,
190 IWL_DEVICE_9000,
191 .ht_params = &iwl9000_ht_params,
192 .nvm_ver = IWL9000_NVM_VERSION,
193 .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
194 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
195 .integrated = true,
196};
197
Emmanuel Grumbach9d9b21d2016-03-24 08:44:57 +0200198MODULE_FIRMWARE(IWL9000_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
Haim Dreyfuss1afb0ae2016-04-03 19:55:59 +0300199MODULE_FIRMWARE(IWL9260_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));