Commit | Line | Data |
---|---|---|
89374fe6 DH |
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 | * | |
2d3d31b5 | 8 | * Copyright(c) 2015-2016 Intel Deutschland GmbH |
89374fe6 DH |
9 | * |
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 | * | |
2d3d31b5 | 21 | * Copyright(c) 2015-2016 Intel Deutschland GmbH |
89374fe6 DH |
22 | * 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 */ | |
ad38844b | 58 | #define IWL9000_UCODE_API_MAX 24 |
89374fe6 | 59 | |
89374fe6 | 60 | /* Lowest firmware API version supported */ |
97f95c93 | 61 | #define IWL9000_UCODE_API_MIN 16 |
89374fe6 DH |
62 | |
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 | ||
486c96a7 | 75 | #define IWL9000_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-" |
1afb0ae4 | 76 | #define IWL9260_FW_PRE "iwlwifi-9260-th-a0-jf-a0-" |
486c96a7 | 77 | #define IWL9000LC_FW_PRE "iwlwifi-9000-pu-a0-lc-a0-" |
89374fe6 DH |
78 | #define IWL9000_MODULE_FIRMWARE(api) \ |
79 | IWL9000_FW_PRE "-" __stringify(api) ".ucode" | |
1afb0ae4 HD |
80 | #define IWL9260_MODULE_FIRMWARE(api) \ |
81 | IWL9260_FW_PRE "-" __stringify(api) ".ucode" | |
486c96a7 OG |
82 | #define IWL9000LC_MODULE_FIRMWARE(api) \ |
83 | IWL9000LC_FW_PRE "-" __stringify(api) ".ucode" | |
89374fe6 DH |
84 | |
85 | #define NVM_HW_SECTION_NUM_FAMILY_9000 10 | |
86 | ||
87 | static const struct iwl_base_params iwl9000_base_params = { | |
88 | .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_9000, | |
6ae57b29 | 89 | .num_of_queues = 31, |
89374fe6 DH |
90 | .shadow_ram_support = true, |
91 | .led_compensation = 57, | |
92 | .wd_timeout = IWL_LONG_WD_TIMEOUT, | |
93 | .max_event_log_size = 512, | |
94 | .shadow_reg_enable = true, | |
95 | .pcie_l1_allowed = true, | |
96 | }; | |
97 | ||
98 | static const struct iwl_ht_params iwl9000_ht_params = { | |
99 | .stbc = true, | |
100 | .ldpc = true, | |
57fbcce3 | 101 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
89374fe6 DH |
102 | }; |
103 | ||
104 | static const struct iwl_tt_params iwl9000_tt_params = { | |
105 | .ct_kill_entry = 115, | |
106 | .ct_kill_exit = 93, | |
107 | .ct_kill_duration = 5, | |
108 | .dynamic_smps_entry = 111, | |
109 | .dynamic_smps_exit = 107, | |
110 | .tx_protection_entry = 112, | |
111 | .tx_protection_exit = 105, | |
112 | .tx_backoff = { | |
113 | {.temperature = 110, .backoff = 200}, | |
114 | {.temperature = 111, .backoff = 600}, | |
115 | {.temperature = 112, .backoff = 1200}, | |
116 | {.temperature = 113, .backoff = 2000}, | |
117 | {.temperature = 114, .backoff = 4000}, | |
118 | }, | |
119 | .support_ct_kill = true, | |
120 | .support_dynamic_smps = true, | |
121 | .support_tx_protection = true, | |
122 | .support_tx_backoff = true, | |
123 | }; | |
124 | ||
125 | #define IWL_DEVICE_9000 \ | |
126 | .ucode_api_max = IWL9000_UCODE_API_MAX, \ | |
89374fe6 DH |
127 | .ucode_api_min = IWL9000_UCODE_API_MIN, \ |
128 | .device_family = IWL_DEVICE_FAMILY_8000, \ | |
129 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | |
130 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
131 | .base_params = &iwl9000_base_params, \ | |
132 | .led_mode = IWL_LED_RF_STATE, \ | |
133 | .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_9000, \ | |
134 | .non_shared_ant = ANT_A, \ | |
135 | .dccm_offset = IWL9000_DCCM_OFFSET, \ | |
136 | .dccm_len = IWL9000_DCCM_LEN, \ | |
137 | .dccm2_offset = IWL9000_DCCM2_OFFSET, \ | |
138 | .dccm2_len = IWL9000_DCCM2_LEN, \ | |
139 | .smem_offset = IWL9000_SMEM_OFFSET, \ | |
140 | .smem_len = IWL9000_SMEM_LEN, \ | |
5e6a98dc | 141 | .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \ |
89374fe6 | 142 | .thermal_params = &iwl9000_tt_params, \ |
96a6497b | 143 | .apmg_not_supported = true, \ |
e48c947f | 144 | .mq_rx_supported = true, \ |
17c867bf | 145 | .vht_mu_mimo_supported = true, \ |
1afb0ae4 HD |
146 | .mac_addr_from_csr = true, \ |
147 | .rf_id = true | |
89374fe6 | 148 | |
aea2a5f0 | 149 | const struct iwl_cfg iwl9260_2ac_cfg = { |
486c96a7 OG |
150 | .name = "Intel(R) Dual Band Wireless AC 9260", |
151 | .fw_name_pre = IWL9260_FW_PRE, | |
152 | IWL_DEVICE_9000, | |
153 | .ht_params = &iwl9000_ht_params, | |
154 | .nvm_ver = IWL9000_NVM_VERSION, | |
155 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, | |
22ccabf1 OG |
156 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
157 | }; | |
158 | ||
159 | const struct iwl_cfg iwl9270_2ac_cfg = { | |
160 | .name = "Intel(R) Dual Band Wireless AC 9270", | |
161 | .fw_name_pre = IWL9260_FW_PRE, | |
162 | IWL_DEVICE_9000, | |
163 | .ht_params = &iwl9000_ht_params, | |
164 | .nvm_ver = IWL9000_NVM_VERSION, | |
165 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, | |
486c96a7 OG |
166 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
167 | }; | |
168 | ||
827e9ab8 OG |
169 | const struct iwl_cfg iwl9460_2ac_cfg = { |
170 | .name = "Intel(R) Dual Band Wireless AC 9460", | |
486c96a7 OG |
171 | .fw_name_pre = IWL9000_FW_PRE, |
172 | IWL_DEVICE_9000, | |
173 | .ht_params = &iwl9000_ht_params, | |
174 | .nvm_ver = IWL9000_NVM_VERSION, | |
175 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, | |
176 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, | |
177 | .integrated = true, | |
1afb0ae4 HD |
178 | }; |
179 | ||
180 | /* | |
181 | * TODO the struct below is for internal testing only this should be | |
182 | * removed by EO 2016~ | |
183 | */ | |
486c96a7 OG |
184 | const struct iwl_cfg iwl9000lc_2ac_cfg = { |
185 | .name = "Intel(R) Dual Band Wireless AC 9000", | |
186 | .fw_name_pre = IWL9000LC_FW_PRE, | |
187 | IWL_DEVICE_9000, | |
188 | .ht_params = &iwl9000_ht_params, | |
189 | .nvm_ver = IWL9000_NVM_VERSION, | |
190 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, | |
191 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, | |
192 | .integrated = true, | |
89374fe6 DH |
193 | }; |
194 | ||
9d9b21d1 | 195 | MODULE_FIRMWARE(IWL9000_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
1afb0ae4 | 196 | MODULE_FIRMWARE(IWL9260_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
486c96a7 | 197 | MODULE_FIRMWARE(IWL9000LC_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |