blob: 63a4183c0de7e0ba6230742f856b4c9a3fb3cfdb [file] [log] [blame]
Haim Dreyfusse34d9752016-05-31 11:13:09 +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 *
Sara Sharon386f4932017-01-22 17:17:19 +02008 * Copyright(c) 2015-2017 Intel Deutschland GmbH
Haim Dreyfusse34d9752016-05-31 11:13:09 +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 *
Sara Sharon386f4932017-01-22 17:17:19 +020021 * Copyright(c) 2015-2017 Intel Deutschland GmbH
Haim Dreyfusse34d9752016-05-31 11:13:09 +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 Coelhob7e94ba2017-06-05 23:21:19 +030058#define IWL_A000_UCODE_API_MAX 31
Haim Dreyfusse34d9752016-05-31 11:13:09 +030059
60/* Lowest firmware API version supported */
61#define IWL_A000_UCODE_API_MIN 24
62
63/* NVM versions */
64#define IWL_A000_NVM_VERSION 0x0a1d
65#define IWL_A000_TX_POWER_VERSION 0xffff /* meaningless */
66
67/* Memory offsets and lengths */
Liad Kaufmanf4d10472017-02-19 10:42:40 +020068#define IWL_A000_DCCM_OFFSET 0x800000 /* LMAC1 */
69#define IWL_A000_DCCM_LEN 0x10000 /* LMAC1 */
Haim Dreyfusse34d9752016-05-31 11:13:09 +030070#define IWL_A000_DCCM2_OFFSET 0x880000
71#define IWL_A000_DCCM2_LEN 0x8000
72#define IWL_A000_SMEM_OFFSET 0x400000
Liad Kaufmanf4d10472017-02-19 10:42:40 +020073#define IWL_A000_SMEM_LEN 0xD0000
Haim Dreyfusse34d9752016-05-31 11:13:09 +030074
Sara Sharon386f4932017-01-22 17:17:19 +020075#define IWL_A000_JF_FW_PRE "iwlwifi-Qu-a0-jf-b0-"
76#define IWL_A000_HR_FW_PRE "iwlwifi-Qu-a0-hr-a0-"
77#define IWL_A000_HR_CDB_FW_PRE "iwlwifi-QuIcp-a0-hrcdb-a0-"
Sara Sharon5594d802016-11-23 17:08:20 +020078
79#define IWL_A000_HR_MODULE_FIRMWARE(api) \
80 IWL_A000_HR_FW_PRE "-" __stringify(api) ".ucode"
81#define IWL_A000_JF_MODULE_FIRMWARE(api) \
82 IWL_A000_JF_FW_PRE "-" __stringify(api) ".ucode"
Haim Dreyfusse34d9752016-05-31 11:13:09 +030083
84#define NVM_HW_SECTION_NUM_FAMILY_A000 10
85
86static const struct iwl_base_params iwl_a000_base_params = {
87 .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_A000,
Sara Sharone982bc22017-02-23 14:19:45 +020088 .num_of_queues = 512,
Haim Dreyfusse34d9752016-05-31 11:13:09 +030089 .shadow_ram_support = true,
90 .led_compensation = 57,
91 .wd_timeout = IWL_LONG_WD_TIMEOUT,
92 .max_event_log_size = 512,
93 .shadow_reg_enable = true,
94 .pcie_l1_allowed = true,
95};
96
97static const struct iwl_ht_params iwl_a000_ht_params = {
98 .stbc = true,
99 .ldpc = true,
100 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
101};
102
103#define IWL_DEVICE_A000 \
104 .ucode_api_max = IWL_A000_UCODE_API_MAX, \
105 .ucode_api_min = IWL_A000_UCODE_API_MIN, \
Sara Sharon6e584872017-03-22 14:07:50 +0200106 .device_family = IWL_DEVICE_FAMILY_A000, \
Haim Dreyfusse34d9752016-05-31 11:13:09 +0300107 .max_inst_size = IWL60_RTC_INST_SIZE, \
108 .max_data_size = IWL60_RTC_DATA_SIZE, \
109 .base_params = &iwl_a000_base_params, \
110 .led_mode = IWL_LED_RF_STATE, \
111 .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_A000, \
112 .non_shared_ant = ANT_A, \
113 .dccm_offset = IWL_A000_DCCM_OFFSET, \
114 .dccm_len = IWL_A000_DCCM_LEN, \
115 .dccm2_offset = IWL_A000_DCCM2_OFFSET, \
116 .dccm2_len = IWL_A000_DCCM2_LEN, \
117 .smem_offset = IWL_A000_SMEM_OFFSET, \
118 .smem_len = IWL_A000_SMEM_LEN, \
119 .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
120 .apmg_not_supported = true, \
121 .mq_rx_supported = true, \
122 .vht_mu_mimo_supported = true, \
Sara Sharone22744a2016-06-22 17:23:34 +0300123 .mac_addr_from_csr = true, \
Sara Sharon5594d802016-11-23 17:08:20 +0200124 .use_tfh = true, \
Sara Sharon623e7762016-09-28 15:52:21 +0300125 .rf_id = true, \
Sara Sharon70426782017-03-22 12:20:40 +0200126 .gen2 = true, \
Sara Sharona02797c2017-03-22 14:06:41 +0200127 .ext_nvm = true, \
128 .dbgc_supported = true
Haim Dreyfusse34d9752016-05-31 11:13:09 +0300129
Sara Sharon5594d802016-11-23 17:08:20 +0200130const struct iwl_cfg iwla000_2ac_cfg_hr = {
Haim Dreyfusse34d9752016-05-31 11:13:09 +0300131 .name = "Intel(R) Dual Band Wireless AC a000",
Sara Sharon5594d802016-11-23 17:08:20 +0200132 .fw_name_pre = IWL_A000_HR_FW_PRE,
Haim Dreyfusse34d9752016-05-31 11:13:09 +0300133 IWL_DEVICE_A000,
134 .ht_params = &iwl_a000_ht_params,
135 .nvm_ver = IWL_A000_NVM_VERSION,
136 .nvm_calib_ver = IWL_A000_TX_POWER_VERSION,
137 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
138};
139
Sara Sharon386f4932017-01-22 17:17:19 +0200140const struct iwl_cfg iwla000_2ac_cfg_hr_cdb = {
141 .name = "Intel(R) Dual Band Wireless AC a000",
142 .fw_name_pre = IWL_A000_HR_CDB_FW_PRE,
143 IWL_DEVICE_A000,
144 .ht_params = &iwl_a000_ht_params,
145 .nvm_ver = IWL_A000_NVM_VERSION,
146 .nvm_calib_ver = IWL_A000_TX_POWER_VERSION,
147 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
148 .cdb = true,
149};
150
Sara Sharon5594d802016-11-23 17:08:20 +0200151const struct iwl_cfg iwla000_2ac_cfg_jf = {
152 .name = "Intel(R) Dual Band Wireless AC a000",
153 .fw_name_pre = IWL_A000_JF_FW_PRE,
154 IWL_DEVICE_A000,
155 .ht_params = &iwl_a000_ht_params,
156 .nvm_ver = IWL_A000_NVM_VERSION,
157 .nvm_calib_ver = IWL_A000_TX_POWER_VERSION,
158 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
159};
160
161MODULE_FIRMWARE(IWL_A000_HR_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));
162MODULE_FIRMWARE(IWL_A000_JF_MODULE_FIRMWARE(IWL_A000_UCODE_API_MAX));