9000.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  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) 2015-2017 Intel Deutschland GmbH
  9. * Copyright (C) 2018 Intel Corporation
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of version 2 of the GNU General Public License as
  13. * published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * BSD LICENSE
  21. *
  22. * Copyright(c) 2015-2017 Intel Deutschland GmbH
  23. * Copyright (C) 2018 Intel Corporation
  24. * All rights reserved.
  25. *
  26. * Redistribution and use in source and binary forms, with or without
  27. * modification, are permitted provided that the following conditions
  28. * are met:
  29. *
  30. * * Redistributions of source code must retain the above copyright
  31. * notice, this list of conditions and the following disclaimer.
  32. * * Redistributions in binary form must reproduce the above copyright
  33. * notice, this list of conditions and the following disclaimer in
  34. * the documentation and/or other materials provided with the
  35. * distribution.
  36. * * Neither the name Intel Corporation nor the names of its
  37. * contributors may be used to endorse or promote products derived
  38. * from this software without specific prior written permission.
  39. *
  40. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  41. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  42. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  43. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  44. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  45. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  46. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  47. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  48. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  49. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  50. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  51. *
  52. *****************************************************************************/
  53. #include <linux/module.h>
  54. #include <linux/stringify.h>
  55. #include "iwl-config.h"
  56. #include "fw/file.h"
  57. /* Highest firmware API version supported */
  58. #define IWL9000_UCODE_API_MAX 38
  59. /* Lowest firmware API version supported */
  60. #define IWL9000_UCODE_API_MIN 30
  61. /* NVM versions */
  62. #define IWL9000_NVM_VERSION 0x0a1d
  63. #define IWL9000_TX_POWER_VERSION 0xffff /* meaningless */
  64. /* Memory offsets and lengths */
  65. #define IWL9000_DCCM_OFFSET 0x800000
  66. #define IWL9000_DCCM_LEN 0x18000
  67. #define IWL9000_DCCM2_OFFSET 0x880000
  68. #define IWL9000_DCCM2_LEN 0x8000
  69. #define IWL9000_SMEM_OFFSET 0x400000
  70. #define IWL9000_SMEM_LEN 0x68000
  71. #define IWL9000A_FW_PRE "iwlwifi-9000-pu-a0-jf-a0-"
  72. #define IWL9000B_FW_PRE "iwlwifi-9000-pu-b0-jf-b0-"
  73. #define IWL9000RFB_FW_PRE "iwlwifi-9000-pu-a0-jf-b0-"
  74. #define IWL9260A_FW_PRE "iwlwifi-9260-th-a0-jf-a0-"
  75. #define IWL9260B_FW_PRE "iwlwifi-9260-th-b0-jf-b0-"
  76. #define IWL9000A_MODULE_FIRMWARE(api) \
  77. IWL9000A_FW_PRE __stringify(api) ".ucode"
  78. #define IWL9000B_MODULE_FIRMWARE(api) \
  79. IWL9000B_FW_PRE __stringify(api) ".ucode"
  80. #define IWL9000RFB_MODULE_FIRMWARE(api) \
  81. IWL9000RFB_FW_PRE __stringify(api) ".ucode"
  82. #define IWL9260A_MODULE_FIRMWARE(api) \
  83. IWL9260A_FW_PRE __stringify(api) ".ucode"
  84. #define IWL9260B_MODULE_FIRMWARE(api) \
  85. IWL9260B_FW_PRE __stringify(api) ".ucode"
  86. #define NVM_HW_SECTION_NUM_FAMILY_9000 10
  87. static const struct iwl_base_params iwl9000_base_params = {
  88. .eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_9000,
  89. .num_of_queues = 31,
  90. .max_tfd_queue_size = 256,
  91. .shadow_ram_support = true,
  92. .led_compensation = 57,
  93. .wd_timeout = IWL_LONG_WD_TIMEOUT,
  94. .max_event_log_size = 512,
  95. .shadow_reg_enable = true,
  96. .pcie_l1_allowed = true,
  97. };
  98. static const struct iwl_ht_params iwl9000_ht_params = {
  99. .stbc = true,
  100. .ldpc = true,
  101. .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
  102. };
  103. static const struct iwl_tt_params iwl9000_tt_params = {
  104. .ct_kill_entry = 115,
  105. .ct_kill_exit = 93,
  106. .ct_kill_duration = 5,
  107. .dynamic_smps_entry = 111,
  108. .dynamic_smps_exit = 107,
  109. .tx_protection_entry = 112,
  110. .tx_protection_exit = 105,
  111. .tx_backoff = {
  112. {.temperature = 110, .backoff = 200},
  113. {.temperature = 111, .backoff = 600},
  114. {.temperature = 112, .backoff = 1200},
  115. {.temperature = 113, .backoff = 2000},
  116. {.temperature = 114, .backoff = 4000},
  117. },
  118. .support_ct_kill = true,
  119. .support_dynamic_smps = true,
  120. .support_tx_protection = true,
  121. .support_tx_backoff = true,
  122. };
  123. #define IWL_DEVICE_9000 \
  124. .ucode_api_max = IWL9000_UCODE_API_MAX, \
  125. .ucode_api_min = IWL9000_UCODE_API_MIN, \
  126. .device_family = IWL_DEVICE_FAMILY_9000, \
  127. .base_params = &iwl9000_base_params, \
  128. .led_mode = IWL_LED_RF_STATE, \
  129. .nvm_hw_section_num = NVM_HW_SECTION_NUM_FAMILY_9000, \
  130. .non_shared_ant = ANT_B, \
  131. .dccm_offset = IWL9000_DCCM_OFFSET, \
  132. .dccm_len = IWL9000_DCCM_LEN, \
  133. .dccm2_offset = IWL9000_DCCM2_OFFSET, \
  134. .dccm2_len = IWL9000_DCCM2_LEN, \
  135. .smem_offset = IWL9000_SMEM_OFFSET, \
  136. .smem_len = IWL9000_SMEM_LEN, \
  137. .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
  138. .thermal_params = &iwl9000_tt_params, \
  139. .apmg_not_supported = true, \
  140. .mq_rx_supported = true, \
  141. .vht_mu_mimo_supported = true, \
  142. .mac_addr_from_csr = true, \
  143. .rf_id = true, \
  144. .nvm_type = IWL_NVM_EXT, \
  145. .dbgc_supported = true, \
  146. .min_umac_error_event_table = 0x800000, \
  147. .csr = &iwl_csr_v1
  148. const struct iwl_cfg iwl9160_2ac_cfg = {
  149. .name = "Intel(R) Dual Band Wireless AC 9160",
  150. .fw_name_pre = IWL9260A_FW_PRE,
  151. .fw_name_pre_b_or_c_step = IWL9260B_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,
  156. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  157. };
  158. const struct iwl_cfg iwl9260_2ac_cfg = {
  159. .name = "Intel(R) Dual Band Wireless AC 9260",
  160. .fw_name_pre = IWL9260A_FW_PRE,
  161. .fw_name_pre_b_or_c_step = IWL9260B_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,
  166. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  167. };
  168. const struct iwl_cfg iwl9260_killer_2ac_cfg = {
  169. .name = "Killer (R) Wireless-AC 1550 Wireless Network Adapter (9260NGW)",
  170. .fw_name_pre = IWL9260A_FW_PRE,
  171. .fw_name_pre_b_or_c_step = IWL9260B_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. };
  178. const struct iwl_cfg iwl9270_2ac_cfg = {
  179. .name = "Intel(R) Dual Band Wireless AC 9270",
  180. .fw_name_pre = IWL9260A_FW_PRE,
  181. .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
  182. IWL_DEVICE_9000,
  183. .ht_params = &iwl9000_ht_params,
  184. .nvm_ver = IWL9000_NVM_VERSION,
  185. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  186. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  187. };
  188. const struct iwl_cfg iwl9460_2ac_cfg = {
  189. .name = "Intel(R) Dual Band Wireless AC 9460",
  190. .fw_name_pre = IWL9260A_FW_PRE,
  191. .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
  192. IWL_DEVICE_9000,
  193. .ht_params = &iwl9000_ht_params,
  194. .nvm_ver = IWL9000_NVM_VERSION,
  195. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  196. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  197. };
  198. const struct iwl_cfg iwl9460_2ac_cfg_soc = {
  199. .name = "Intel(R) Dual Band Wireless AC 9460",
  200. .fw_name_pre = IWL9000A_FW_PRE,
  201. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  202. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  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. .soc_latency = 5000,
  210. };
  211. const struct iwl_cfg iwl9461_2ac_cfg_soc = {
  212. .name = "Intel(R) Dual Band Wireless AC 9461",
  213. .fw_name_pre = IWL9000A_FW_PRE,
  214. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  215. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  216. IWL_DEVICE_9000,
  217. .ht_params = &iwl9000_ht_params,
  218. .nvm_ver = IWL9000_NVM_VERSION,
  219. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  220. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  221. .integrated = true,
  222. .soc_latency = 5000,
  223. };
  224. const struct iwl_cfg iwl9462_2ac_cfg_soc = {
  225. .name = "Intel(R) Dual Band Wireless AC 9462",
  226. .fw_name_pre = IWL9000A_FW_PRE,
  227. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  228. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  229. IWL_DEVICE_9000,
  230. .ht_params = &iwl9000_ht_params,
  231. .nvm_ver = IWL9000_NVM_VERSION,
  232. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  233. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  234. .integrated = true,
  235. .soc_latency = 5000,
  236. };
  237. const struct iwl_cfg iwl9560_2ac_cfg = {
  238. .name = "Intel(R) Dual Band Wireless AC 9560",
  239. .fw_name_pre = IWL9260A_FW_PRE,
  240. .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
  241. IWL_DEVICE_9000,
  242. .ht_params = &iwl9000_ht_params,
  243. .nvm_ver = IWL9000_NVM_VERSION,
  244. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  245. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  246. };
  247. const struct iwl_cfg iwl9560_2ac_cfg_soc = {
  248. .name = "Intel(R) Dual Band Wireless AC 9560",
  249. .fw_name_pre = IWL9000A_FW_PRE,
  250. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  251. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  252. IWL_DEVICE_9000,
  253. .ht_params = &iwl9000_ht_params,
  254. .nvm_ver = IWL9000_NVM_VERSION,
  255. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  256. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  257. .integrated = true,
  258. .soc_latency = 5000,
  259. };
  260. const struct iwl_cfg iwl9560_killer_2ac_cfg_soc = {
  261. .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)",
  262. .fw_name_pre = IWL9000A_FW_PRE,
  263. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  264. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  265. IWL_DEVICE_9000,
  266. .ht_params = &iwl9000_ht_params,
  267. .nvm_ver = IWL9000_NVM_VERSION,
  268. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  269. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  270. .integrated = true,
  271. .soc_latency = 5000,
  272. };
  273. const struct iwl_cfg iwl9560_killer_s_2ac_cfg_soc = {
  274. .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)",
  275. .fw_name_pre = IWL9000A_FW_PRE,
  276. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  277. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  278. IWL_DEVICE_9000,
  279. .ht_params = &iwl9000_ht_params,
  280. .nvm_ver = IWL9000_NVM_VERSION,
  281. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  282. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  283. .integrated = true,
  284. .soc_latency = 5000,
  285. };
  286. const struct iwl_cfg iwl9460_2ac_cfg_shared_clk = {
  287. .name = "Intel(R) Dual Band Wireless AC 9460",
  288. .fw_name_pre = IWL9000A_FW_PRE,
  289. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  290. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  291. IWL_DEVICE_9000,
  292. .ht_params = &iwl9000_ht_params,
  293. .nvm_ver = IWL9000_NVM_VERSION,
  294. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  295. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  296. .integrated = true,
  297. .soc_latency = 5000,
  298. .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
  299. };
  300. const struct iwl_cfg iwl9461_2ac_cfg_shared_clk = {
  301. .name = "Intel(R) Dual Band Wireless AC 9461",
  302. .fw_name_pre = IWL9000A_FW_PRE,
  303. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  304. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  305. IWL_DEVICE_9000,
  306. .ht_params = &iwl9000_ht_params,
  307. .nvm_ver = IWL9000_NVM_VERSION,
  308. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  309. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  310. .integrated = true,
  311. .soc_latency = 5000,
  312. .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
  313. };
  314. const struct iwl_cfg iwl9462_2ac_cfg_shared_clk = {
  315. .name = "Intel(R) Dual Band Wireless AC 9462",
  316. .fw_name_pre = IWL9000A_FW_PRE,
  317. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  318. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  319. IWL_DEVICE_9000,
  320. .ht_params = &iwl9000_ht_params,
  321. .nvm_ver = IWL9000_NVM_VERSION,
  322. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  323. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  324. .integrated = true,
  325. .soc_latency = 5000,
  326. .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
  327. };
  328. const struct iwl_cfg iwl9560_2ac_cfg_shared_clk = {
  329. .name = "Intel(R) Dual Band Wireless AC 9560",
  330. .fw_name_pre = IWL9000A_FW_PRE,
  331. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  332. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  333. IWL_DEVICE_9000,
  334. .ht_params = &iwl9000_ht_params,
  335. .nvm_ver = IWL9000_NVM_VERSION,
  336. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  337. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  338. .integrated = true,
  339. .soc_latency = 5000,
  340. .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
  341. };
  342. const struct iwl_cfg iwl9560_killer_2ac_cfg_shared_clk = {
  343. .name = "Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)",
  344. .fw_name_pre = IWL9000A_FW_PRE,
  345. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  346. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  347. IWL_DEVICE_9000,
  348. .ht_params = &iwl9000_ht_params,
  349. .nvm_ver = IWL9000_NVM_VERSION,
  350. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  351. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  352. .integrated = true,
  353. .soc_latency = 5000,
  354. .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
  355. };
  356. const struct iwl_cfg iwl9560_killer_s_2ac_cfg_shared_clk = {
  357. .name = "Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)",
  358. .fw_name_pre = IWL9000A_FW_PRE,
  359. .fw_name_pre_b_or_c_step = IWL9000B_FW_PRE,
  360. .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE,
  361. IWL_DEVICE_9000,
  362. .ht_params = &iwl9000_ht_params,
  363. .nvm_ver = IWL9000_NVM_VERSION,
  364. .nvm_calib_ver = IWL9000_TX_POWER_VERSION,
  365. .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,
  366. .integrated = true,
  367. .soc_latency = 5000,
  368. .extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
  369. };
  370. MODULE_FIRMWARE(IWL9000A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
  371. MODULE_FIRMWARE(IWL9000B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
  372. MODULE_FIRMWARE(IWL9000RFB_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
  373. MODULE_FIRMWARE(IWL9260A_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
  374. MODULE_FIRMWARE(IWL9260B_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));