Linux Audio

Check our new training course

Loading...
v6.8
  1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
  2/*
  3 * Copyright (C) 2014, 2018-2020, 2023 Intel Corporation
  4 * Copyright (C) 2014-2015 Intel Mobile Communications GmbH
  5 * Copyright (C) 2016 Intel Deutschland GmbH
  6 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  7#include <linux/module.h>
  8#include <linux/stringify.h>
  9#include "iwl-config.h"
 
 10
 11/* Highest firmware API version supported */
 12#define IWL8000_UCODE_API_MAX	36
 13#define IWL8265_UCODE_API_MAX	36
 14
 15/* Lowest firmware API version supported */
 16#define IWL8000_UCODE_API_MIN	22
 17#define IWL8265_UCODE_API_MIN	22
 18
 19/* NVM versions */
 20#define IWL8000_NVM_VERSION		0x0a1d
 
 21
 22/* Memory offsets and lengths */
 23#define IWL8260_DCCM_OFFSET		0x800000
 24#define IWL8260_DCCM_LEN		0x18000
 25#define IWL8260_DCCM2_OFFSET		0x880000
 26#define IWL8260_DCCM2_LEN		0x8000
 27#define IWL8260_SMEM_OFFSET		0x400000
 28#define IWL8260_SMEM_LEN		0x68000
 29
 30#define IWL8000_FW_PRE "iwlwifi-8000C"
 31#define IWL8000_MODULE_FIRMWARE(api) \
 32	IWL8000_FW_PRE "-" __stringify(api) ".ucode"
 33
 34#define IWL8265_FW_PRE "iwlwifi-8265"
 35#define IWL8265_MODULE_FIRMWARE(api) \
 36	IWL8265_FW_PRE "-" __stringify(api) ".ucode"
 37
 
 38#define DEFAULT_NVM_FILE_FAMILY_8000C		"nvmData-8000C"
 39
 40static const struct iwl_base_params iwl8000_base_params = {
 41	.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
 42	.num_of_queues = 31,
 43	.max_tfd_queue_size = 256,
 44	.shadow_ram_support = true,
 45	.led_compensation = 57,
 46	.wd_timeout = IWL_LONG_WD_TIMEOUT,
 47	.max_event_log_size = 512,
 48	.shadow_reg_enable = true,
 49	.pcie_l1_allowed = true,
 50};
 51
 52static const struct iwl_ht_params iwl8000_ht_params = {
 53	.stbc = true,
 54	.ldpc = true,
 55	.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
 56};
 57
 58static const struct iwl_tt_params iwl8000_tt_params = {
 59	.ct_kill_entry = 115,
 60	.ct_kill_exit = 93,
 61	.ct_kill_duration = 5,
 62	.dynamic_smps_entry = 111,
 63	.dynamic_smps_exit = 107,
 64	.tx_protection_entry = 112,
 65	.tx_protection_exit = 105,
 66	.tx_backoff = {
 67		{.temperature = 110, .backoff = 200},
 68		{.temperature = 111, .backoff = 600},
 69		{.temperature = 112, .backoff = 1200},
 70		{.temperature = 113, .backoff = 2000},
 71		{.temperature = 114, .backoff = 4000},
 72	},
 73	.support_ct_kill = true,
 74	.support_dynamic_smps = true,
 75	.support_tx_protection = true,
 76	.support_tx_backoff = true,
 77};
 78
 79#define IWL_DEVICE_8000_COMMON						\
 80	.trans.device_family = IWL_DEVICE_FAMILY_8000,			\
 81	.trans.base_params = &iwl8000_base_params,			\
 
 
 82	.led_mode = IWL_LED_RF_STATE,					\
 83	.nvm_hw_section_num = 10,					\
 84	.features = NETIF_F_RXCSUM,					\
 85	.non_shared_ant = ANT_A,					\
 86	.dccm_offset = IWL8260_DCCM_OFFSET,				\
 87	.dccm_len = IWL8260_DCCM_LEN,					\
 88	.dccm2_offset = IWL8260_DCCM2_OFFSET,				\
 89	.dccm2_len = IWL8260_DCCM2_LEN,					\
 90	.smem_offset = IWL8260_SMEM_OFFSET,				\
 91	.smem_len = IWL8260_SMEM_LEN,					\
 92	.default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C,	\
 93	.thermal_params = &iwl8000_tt_params,				\
 94	.apmg_not_supported = true,					\
 95	.nvm_type = IWL_NVM_EXT,					\
 96	.dbgc_supported = true,						\
 97	.min_umac_error_event_table = 0x800000
 98
 99#define IWL_DEVICE_8000							\
100	IWL_DEVICE_8000_COMMON,						\
101	.ucode_api_max = IWL8000_UCODE_API_MAX,				\
102	.ucode_api_min = IWL8000_UCODE_API_MIN				\
103
104#define IWL_DEVICE_8260							\
105	IWL_DEVICE_8000_COMMON,						\
106	.ucode_api_max = IWL8000_UCODE_API_MAX,				\
107	.ucode_api_min = IWL8000_UCODE_API_MIN				\
108
109#define IWL_DEVICE_8265							\
110	IWL_DEVICE_8000_COMMON,						\
111	.ucode_api_max = IWL8265_UCODE_API_MAX,				\
112	.ucode_api_min = IWL8265_UCODE_API_MIN				\
113
114const struct iwl_cfg iwl8260_2n_cfg = {
115	.name = "Intel(R) Dual Band Wireless N 8260",
116	.fw_name_pre = IWL8000_FW_PRE,
117	IWL_DEVICE_8260,
118	.ht_params = &iwl8000_ht_params,
119	.nvm_ver = IWL8000_NVM_VERSION,
 
120};
121
122const struct iwl_cfg iwl8260_2ac_cfg = {
123	.name = "Intel(R) Dual Band Wireless AC 8260",
124	.fw_name_pre = IWL8000_FW_PRE,
125	IWL_DEVICE_8260,
126	.ht_params = &iwl8000_ht_params,
127	.nvm_ver = IWL8000_NVM_VERSION,
 
 
128};
129
130const struct iwl_cfg iwl8265_2ac_cfg = {
131	.name = "Intel(R) Dual Band Wireless AC 8265",
132	.fw_name_pre = IWL8265_FW_PRE,
133	IWL_DEVICE_8265,
134	.ht_params = &iwl8000_ht_params,
135	.nvm_ver = IWL8000_NVM_VERSION,
 
 
136	.vht_mu_mimo_supported = true,
137};
138
139const struct iwl_cfg iwl8275_2ac_cfg = {
140	.name = "Intel(R) Dual Band Wireless AC 8275",
141	.fw_name_pre = IWL8265_FW_PRE,
142	IWL_DEVICE_8265,
143	.ht_params = &iwl8000_ht_params,
144	.nvm_ver = IWL8000_NVM_VERSION,
 
 
145	.vht_mu_mimo_supported = true,
146};
147
148const struct iwl_cfg iwl4165_2ac_cfg = {
149	.name = "Intel(R) Dual Band Wireless AC 4165",
150	.fw_name_pre = IWL8000_FW_PRE,
151	IWL_DEVICE_8000,
152	.ht_params = &iwl8000_ht_params,
153	.nvm_ver = IWL8000_NVM_VERSION,
 
 
154};
155
156MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_MAX));
157MODULE_FIRMWARE(IWL8265_MODULE_FIRMWARE(IWL8265_UCODE_API_MAX));
v4.17
  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.
  9 * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH
 10 * Copyright(c) 2016 Intel Deutschland GmbH
 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:
 30 *  Intel Linux Wireless <linuxwifi@intel.com>
 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.
 36 * Copyright(c) 2014 - 2015 Intel Mobile Communications GmbH
 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 */
 73#define IWL8000_UCODE_API_MAX	36
 74#define IWL8265_UCODE_API_MAX	36
 75
 76/* Lowest firmware API version supported */
 77#define IWL8000_UCODE_API_MIN	22
 78#define IWL8265_UCODE_API_MIN	22
 79
 80/* NVM versions */
 81#define IWL8000_NVM_VERSION		0x0a1d
 82#define IWL8000_TX_POWER_VERSION	0xffff /* meaningless */
 83
 84/* Memory offsets and lengths */
 85#define IWL8260_DCCM_OFFSET		0x800000
 86#define IWL8260_DCCM_LEN		0x18000
 87#define IWL8260_DCCM2_OFFSET		0x880000
 88#define IWL8260_DCCM2_LEN		0x8000
 89#define IWL8260_SMEM_OFFSET		0x400000
 90#define IWL8260_SMEM_LEN		0x68000
 91
 92#define IWL8000_FW_PRE "iwlwifi-8000C-"
 93#define IWL8000_MODULE_FIRMWARE(api) \
 94	IWL8000_FW_PRE __stringify(api) ".ucode"
 95
 96#define IWL8265_FW_PRE "iwlwifi-8265-"
 97#define IWL8265_MODULE_FIRMWARE(api) \
 98	IWL8265_FW_PRE __stringify(api) ".ucode"
 99
100#define NVM_HW_SECTION_NUM_FAMILY_8000		10
101#define DEFAULT_NVM_FILE_FAMILY_8000C		"nvmData-8000C"
102
103static const struct iwl_base_params iwl8000_base_params = {
104	.eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000,
105	.num_of_queues = 31,
 
106	.shadow_ram_support = true,
107	.led_compensation = 57,
108	.wd_timeout = IWL_LONG_WD_TIMEOUT,
109	.max_event_log_size = 512,
110	.shadow_reg_enable = true,
111	.pcie_l1_allowed = true,
112};
113
114static const struct iwl_ht_params iwl8000_ht_params = {
115	.stbc = true,
116	.ldpc = true,
117	.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
118};
119
120static const struct iwl_tt_params iwl8000_tt_params = {
121	.ct_kill_entry = 115,
122	.ct_kill_exit = 93,
123	.ct_kill_duration = 5,
124	.dynamic_smps_entry = 111,
125	.dynamic_smps_exit = 107,
126	.tx_protection_entry = 112,
127	.tx_protection_exit = 105,
128	.tx_backoff = {
129		{.temperature = 110, .backoff = 200},
130		{.temperature = 111, .backoff = 600},
131		{.temperature = 112, .backoff = 1200},
132		{.temperature = 113, .backoff = 2000},
133		{.temperature = 114, .backoff = 4000},
134	},
135	.support_ct_kill = true,
136	.support_dynamic_smps = true,
137	.support_tx_protection = true,
138	.support_tx_backoff = true,
139};
140
141#define IWL_DEVICE_8000_COMMON						\
142	.device_family = IWL_DEVICE_FAMILY_8000,			\
143	.max_inst_size = IWL60_RTC_INST_SIZE,				\
144	.max_data_size = IWL60_RTC_DATA_SIZE,				\
145	.base_params = &iwl8000_base_params,				\
146	.led_mode = IWL_LED_RF_STATE,					\
147	.nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_8000,		\
148	.features = NETIF_F_RXCSUM,					\
149	.non_shared_ant = ANT_A,					\
150	.dccm_offset = IWL8260_DCCM_OFFSET,				\
151	.dccm_len = IWL8260_DCCM_LEN,					\
152	.dccm2_offset = IWL8260_DCCM2_OFFSET,				\
153	.dccm2_len = IWL8260_DCCM2_LEN,					\
154	.smem_offset = IWL8260_SMEM_OFFSET,				\
155	.smem_len = IWL8260_SMEM_LEN,					\
156	.default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C,	\
157	.thermal_params = &iwl8000_tt_params,				\
158	.apmg_not_supported = true,					\
159	.nvm_type = IWL_NVM_EXT,					\
160	.dbgc_supported = true,						\
161	.min_umac_error_event_table = 0x800000
162
163#define IWL_DEVICE_8000							\
164	IWL_DEVICE_8000_COMMON,						\
165	.ucode_api_max = IWL8000_UCODE_API_MAX,				\
166	.ucode_api_min = IWL8000_UCODE_API_MIN				\
167
168#define IWL_DEVICE_8260							\
169	IWL_DEVICE_8000_COMMON,						\
170	.ucode_api_max = IWL8000_UCODE_API_MAX,				\
171	.ucode_api_min = IWL8000_UCODE_API_MIN				\
172
173#define IWL_DEVICE_8265							\
174	IWL_DEVICE_8000_COMMON,						\
175	.ucode_api_max = IWL8265_UCODE_API_MAX,				\
176	.ucode_api_min = IWL8265_UCODE_API_MIN				\
177
178const struct iwl_cfg iwl8260_2n_cfg = {
179	.name = "Intel(R) Dual Band Wireless N 8260",
180	.fw_name_pre = IWL8000_FW_PRE,
181	IWL_DEVICE_8260,
182	.ht_params = &iwl8000_ht_params,
183	.nvm_ver = IWL8000_NVM_VERSION,
184	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
185};
186
187const struct iwl_cfg iwl8260_2ac_cfg = {
188	.name = "Intel(R) Dual Band Wireless AC 8260",
189	.fw_name_pre = IWL8000_FW_PRE,
190	IWL_DEVICE_8260,
191	.ht_params = &iwl8000_ht_params,
192	.nvm_ver = IWL8000_NVM_VERSION,
193	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
194	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
195};
196
197const struct iwl_cfg iwl8265_2ac_cfg = {
198	.name = "Intel(R) Dual Band Wireless AC 8265",
199	.fw_name_pre = IWL8265_FW_PRE,
200	IWL_DEVICE_8265,
201	.ht_params = &iwl8000_ht_params,
202	.nvm_ver = IWL8000_NVM_VERSION,
203	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
204	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
205	.vht_mu_mimo_supported = true,
206};
207
208const struct iwl_cfg iwl8275_2ac_cfg = {
209	.name = "Intel(R) Dual Band Wireless AC 8275",
210	.fw_name_pre = IWL8265_FW_PRE,
211	IWL_DEVICE_8265,
212	.ht_params = &iwl8000_ht_params,
213	.nvm_ver = IWL8000_NVM_VERSION,
214	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
215	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
216	.vht_mu_mimo_supported = true,
217};
218
219const struct iwl_cfg iwl4165_2ac_cfg = {
220	.name = "Intel(R) Dual Band Wireless AC 4165",
221	.fw_name_pre = IWL8000_FW_PRE,
222	IWL_DEVICE_8000,
223	.ht_params = &iwl8000_ht_params,
224	.nvm_ver = IWL8000_NVM_VERSION,
225	.nvm_calib_ver = IWL8000_TX_POWER_VERSION,
226	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
227};
228
229MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_MAX));
230MODULE_FIRMWARE(IWL8265_MODULE_FIRMWARE(IWL8265_UCODE_API_MAX));