Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 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 | * |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 8 | * Copyright(c) 2015-2017 Intel Deutschland GmbH |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 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 | * |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 21 | * Copyright(c) 2015-2017 Intel Deutschland GmbH |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 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 */ |
Luca Coelho | ba320dd | 2017-05-19 15:12:07 +0300 | [diff] [blame] | 58 | #define IWL9000_UCODE_API_MAX 33 |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 59 | |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 60 | /* Lowest firmware API version supported */ |
David Spinadel | 0f17e1b | 2017-01-04 09:30:24 +0200 | [diff] [blame] | 61 | #define IWL9000_UCODE_API_MIN 30 |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 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 | |
Oren Givon | 486c96a | 2016-06-23 14:51:41 +0300 | [diff] [blame] | 75 | #define IWL9000_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-" |
Haim Dreyfuss | 0705b95 | 2017-03-09 15:18:58 +0200 | [diff] [blame] | 76 | #define IWL9000RFB_FW_PRE "iwlwifi-9000-pu-a0-jf-b0-" |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 77 | #define IWL9260A_FW_PRE "iwlwifi-9260-th-a0-jf-a0-" |
| 78 | #define IWL9260B_FW_PRE "iwlwifi-9260-th-b0-jf-b0-" |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 79 | #define IWL9000_MODULE_FIRMWARE(api) \ |
| 80 | IWL9000_FW_PRE "-" __stringify(api) ".ucode" |
Haim Dreyfuss | 0705b95 | 2017-03-09 15:18:58 +0200 | [diff] [blame] | 81 | #define IWL9000RFB_MODULE_FIRMWARE(api) \ |
| 82 | IWL9000RFB_FW_PRE "-" __stringify(api) ".ucode" |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 83 | #define IWL9260A_MODULE_FIRMWARE(api) \ |
| 84 | IWL9260A_FW_PRE "-" __stringify(api) ".ucode" |
| 85 | #define IWL9260B_MODULE_FIRMWARE(api) \ |
| 86 | IWL9260B_FW_PRE "-" __stringify(api) ".ucode" |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 87 | |
| 88 | #define NVM_HW_SECTION_NUM_FAMILY_9000 10 |
| 89 | |
| 90 | static const struct iwl_base_params iwl9000_base_params = { |
| 91 | .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_9000, |
Emmanuel Grumbach | 6ae57b2 | 2015-12-16 10:50:03 +0200 | [diff] [blame] | 92 | .num_of_queues = 31, |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 93 | .shadow_ram_support = true, |
| 94 | .led_compensation = 57, |
| 95 | .wd_timeout = IWL_LONG_WD_TIMEOUT, |
| 96 | .max_event_log_size = 512, |
| 97 | .shadow_reg_enable = true, |
| 98 | .pcie_l1_allowed = true, |
| 99 | }; |
| 100 | |
| 101 | static const struct iwl_ht_params iwl9000_ht_params = { |
| 102 | .stbc = true, |
| 103 | .ldpc = true, |
Johannes Berg | 57fbcce | 2016-04-12 15:56:15 +0200 | [diff] [blame] | 104 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 105 | }; |
| 106 | |
| 107 | static const struct iwl_tt_params iwl9000_tt_params = { |
| 108 | .ct_kill_entry = 115, |
| 109 | .ct_kill_exit = 93, |
| 110 | .ct_kill_duration = 5, |
| 111 | .dynamic_smps_entry = 111, |
| 112 | .dynamic_smps_exit = 107, |
| 113 | .tx_protection_entry = 112, |
| 114 | .tx_protection_exit = 105, |
| 115 | .tx_backoff = { |
| 116 | {.temperature = 110, .backoff = 200}, |
| 117 | {.temperature = 111, .backoff = 600}, |
| 118 | {.temperature = 112, .backoff = 1200}, |
| 119 | {.temperature = 113, .backoff = 2000}, |
| 120 | {.temperature = 114, .backoff = 4000}, |
| 121 | }, |
| 122 | .support_ct_kill = true, |
| 123 | .support_dynamic_smps = true, |
| 124 | .support_tx_protection = true, |
| 125 | .support_tx_backoff = true, |
| 126 | }; |
| 127 | |
| 128 | #define IWL_DEVICE_9000 \ |
| 129 | .ucode_api_max = IWL9000_UCODE_API_MAX, \ |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 130 | .ucode_api_min = IWL9000_UCODE_API_MIN, \ |
Sara Sharon | 6e58487 | 2017-03-22 14:07:50 +0200 | [diff] [blame] | 131 | .device_family = IWL_DEVICE_FAMILY_9000, \ |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 132 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
| 133 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
| 134 | .base_params = &iwl9000_base_params, \ |
| 135 | .led_mode = IWL_LED_RF_STATE, \ |
| 136 | .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_9000, \ |
| 137 | .non_shared_ant = ANT_A, \ |
| 138 | .dccm_offset = IWL9000_DCCM_OFFSET, \ |
| 139 | .dccm_len = IWL9000_DCCM_LEN, \ |
| 140 | .dccm2_offset = IWL9000_DCCM2_OFFSET, \ |
| 141 | .dccm2_len = IWL9000_DCCM2_LEN, \ |
| 142 | .smem_offset = IWL9000_SMEM_OFFSET, \ |
| 143 | .smem_len = IWL9000_SMEM_LEN, \ |
Sara Sharon | 5e6a98d | 2016-03-10 17:40:56 +0200 | [diff] [blame] | 144 | .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \ |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 145 | .thermal_params = &iwl9000_tt_params, \ |
Sara Sharon | 96a6497 | 2015-12-23 15:10:03 +0200 | [diff] [blame] | 146 | .apmg_not_supported = true, \ |
Sara Sharon | e48c947 | 2016-01-27 18:59:48 +0200 | [diff] [blame] | 147 | .mq_rx_supported = true, \ |
Sara Sharon | 17c867b | 2016-03-07 14:18:29 +0200 | [diff] [blame] | 148 | .vht_mu_mimo_supported = true, \ |
Haim Dreyfuss | 1afb0ae | 2016-04-03 19:55:59 +0300 | [diff] [blame] | 149 | .mac_addr_from_csr = true, \ |
Sara Sharon | 7042678 | 2017-03-22 12:20:40 +0200 | [diff] [blame] | 150 | .rf_id = true, \ |
Sara Sharon | a02797c | 2017-03-22 14:06:41 +0200 | [diff] [blame] | 151 | .ext_nvm = true, \ |
| 152 | .dbgc_supported = true |
Dreyfuss, Haim | 89374fe | 2015-06-01 08:27:17 +0300 | [diff] [blame] | 153 | |
Oren Givon | fe4a724 | 2016-07-07 09:40:12 +0300 | [diff] [blame] | 154 | const struct iwl_cfg iwl9160_2ac_cfg = { |
| 155 | .name = "Intel(R) Dual Band Wireless AC 9160", |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 156 | .fw_name_pre = IWL9260A_FW_PRE, |
| 157 | .fw_name_pre_next_step = IWL9260B_FW_PRE, |
Oren Givon | fe4a724 | 2016-07-07 09:40:12 +0300 | [diff] [blame] | 158 | IWL_DEVICE_9000, |
| 159 | .ht_params = &iwl9000_ht_params, |
| 160 | .nvm_ver = IWL9000_NVM_VERSION, |
| 161 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
| 162 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
| 163 | }; |
| 164 | |
Haim Dreyfuss | aea2a5f | 2016-04-03 18:56:15 +0300 | [diff] [blame] | 165 | const struct iwl_cfg iwl9260_2ac_cfg = { |
Oren Givon | 486c96a | 2016-06-23 14:51:41 +0300 | [diff] [blame] | 166 | .name = "Intel(R) Dual Band Wireless AC 9260", |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 167 | .fw_name_pre = IWL9260A_FW_PRE, |
| 168 | .fw_name_pre_next_step = IWL9260B_FW_PRE, |
Oren Givon | 486c96a | 2016-06-23 14:51:41 +0300 | [diff] [blame] | 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 Givon | 22ccabf | 2016-07-07 09:23:56 +0300 | [diff] [blame] | 176 | const struct iwl_cfg iwl9270_2ac_cfg = { |
| 177 | .name = "Intel(R) Dual Band Wireless AC 9270", |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 178 | .fw_name_pre = IWL9260A_FW_PRE, |
| 179 | .fw_name_pre_next_step = IWL9260B_FW_PRE, |
Oren Givon | 22ccabf | 2016-07-07 09:23:56 +0300 | [diff] [blame] | 180 | IWL_DEVICE_9000, |
| 181 | .ht_params = &iwl9000_ht_params, |
| 182 | .nvm_ver = IWL9000_NVM_VERSION, |
| 183 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
| 184 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
| 185 | }; |
| 186 | |
Oren Givon | 827e9ab | 2016-06-26 14:15:27 +0300 | [diff] [blame] | 187 | const struct iwl_cfg iwl9460_2ac_cfg = { |
| 188 | .name = "Intel(R) Dual Band Wireless AC 9460", |
Oren Givon | 486c96a | 2016-06-23 14:51:41 +0300 | [diff] [blame] | 189 | .fw_name_pre = IWL9000_FW_PRE, |
Haim Dreyfuss | 0705b95 | 2017-03-09 15:18:58 +0200 | [diff] [blame] | 190 | .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, |
Oren Givon | 486c96a | 2016-06-23 14:51:41 +0300 | [diff] [blame] | 191 | IWL_DEVICE_9000, |
| 192 | .ht_params = &iwl9000_ht_params, |
| 193 | .nvm_ver = IWL9000_NVM_VERSION, |
| 194 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
| 195 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
| 196 | .integrated = true, |
Haim Dreyfuss | 1afb0ae | 2016-04-03 19:55:59 +0300 | [diff] [blame] | 197 | }; |
| 198 | |
Oren Givon | 89e4ad5 | 2016-07-07 10:40:27 +0300 | [diff] [blame] | 199 | const struct iwl_cfg iwl9560_2ac_cfg = { |
| 200 | .name = "Intel(R) Dual Band Wireless AC 9560", |
| 201 | .fw_name_pre = IWL9000_FW_PRE, |
Haim Dreyfuss | 0705b95 | 2017-03-09 15:18:58 +0200 | [diff] [blame] | 202 | .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, |
Oren Givon | 89e4ad5 | 2016-07-07 10:40:27 +0300 | [diff] [blame] | 203 | IWL_DEVICE_9000, |
| 204 | .ht_params = &iwl9000_ht_params, |
| 205 | .nvm_ver = IWL9000_NVM_VERSION, |
| 206 | .nvm_calib_ver = IWL9000_TX_POWER_VERSION, |
| 207 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, |
| 208 | .integrated = true, |
| 209 | }; |
| 210 | |
Emmanuel Grumbach | 9d9b21d | 2016-03-24 08:44:57 +0200 | [diff] [blame] | 211 | MODULE_FIRMWARE(IWL9000_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
Haim Dreyfuss | 0705b95 | 2017-03-09 15:18:58 +0200 | [diff] [blame] | 212 | MODULE_FIRMWARE(IWL9000RFB_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
Liad Kaufman | 5da083d | 2017-01-08 16:52:59 +0200 | [diff] [blame] | 213 | MODULE_FIRMWARE(IWL9260A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |
| 214 | MODULE_FIRMWARE(IWL9260B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); |