xref: /linux/drivers/net/wireless/intel/iwlwifi/cfg/22000.c (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2 /*
3  * Copyright (C) 2015-2017 Intel Deutschland GmbH
4  * Copyright (C) 2018-2025 Intel Corporation
5  */
6 #include <linux/module.h>
7 #include <linux/stringify.h>
8 #include "iwl-config.h"
9 #include "iwl-prph.h"
10 #include "fw/api/txq.h"
11 
12 /* Highest firmware API version supported */
13 #define IWL_22000_UCODE_API_MAX	77
14 
15 /* Lowest firmware API version supported */
16 #define IWL_22000_UCODE_API_MIN	77
17 
18 /* Memory offsets and lengths */
19 #define IWL_22000_SMEM_OFFSET		0x400000
20 #define IWL_22000_SMEM_LEN		0xD0000
21 
22 #define IWL_CC_A_FW_PRE			"iwlwifi-cc-a0"
23 
24 #define IWL_CC_A_MODULE_FIRMWARE(api)			\
25 	IWL_CC_A_FW_PRE "-" __stringify(api) ".ucode"
26 
27 static const struct iwl_family_base_params iwl_22000_base = {
28 	.num_of_queues = 512,
29 	.max_tfd_queue_size = 256,
30 	.shadow_ram_support = true,
31 	.led_compensation = 57,
32 	.wd_timeout = IWL_LONG_WD_TIMEOUT,
33 	.max_event_log_size = 512,
34 	.shadow_reg_enable = true,
35 	.pcie_l1_allowed = true,
36 	.smem_offset = IWL_22000_SMEM_OFFSET,
37 	.smem_len = IWL_22000_SMEM_LEN,
38 	.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
39 	.apmg_not_supported = true,
40 	.mac_addr_from_csr = 0x380,
41 	.min_umac_error_event_table = 0x400000,
42 	.d3_debug_data_base_addr = 0x401000,
43 	.d3_debug_data_length = 60 * 1024,
44 	.mon_smem_regs = {
45 		.write_ptr = {
46 			.addr = LDBG_M2S_BUF_WPTR,
47 			.mask = LDBG_M2S_BUF_WPTR_VAL_MSK,
48 	},
49 		.cycle_cnt = {
50 			.addr = LDBG_M2S_BUF_WRAP_CNT,
51 			.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK,
52 		},
53 	},
54 	.gp2_reg_addr = 0xa02c68,
55 	.mon_dram_regs = {
56 		.write_ptr = {
57 			.addr = MON_BUFF_WRPTR_VER2,
58 			.mask = 0xffffffff,
59 		},
60 		.cycle_cnt = {
61 			.addr = MON_BUFF_CYCLE_CNT_VER2,
62 			.mask = 0xffffffff,
63 		},
64 	},
65 	.ucode_api_min = IWL_22000_UCODE_API_MIN,
66 	.ucode_api_max = IWL_22000_UCODE_API_MAX,
67 };
68 
69 const struct iwl_mac_cfg iwl_qu_mac_cfg = {
70 	.mq_rx_supported = true,
71 	.gen2 = true,
72 	.device_family = IWL_DEVICE_FAMILY_22000,
73 	.base = &iwl_22000_base,
74 	.integrated = true,
75 	.xtal_latency = 500,
76 	.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US,
77 };
78 
79 const struct iwl_mac_cfg iwl_qu_medium_latency_mac_cfg = {
80 	.mq_rx_supported = true,
81 	.gen2 = true,
82 	.device_family = IWL_DEVICE_FAMILY_22000,
83 	.base = &iwl_22000_base,
84 	.integrated = true,
85 	.xtal_latency = 1820,
86 	.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_1820US,
87 };
88 
89 const struct iwl_mac_cfg iwl_qu_long_latency_mac_cfg = {
90 	.mq_rx_supported = true,
91 	.gen2 = true,
92 	.device_family = IWL_DEVICE_FAMILY_22000,
93 	.base = &iwl_22000_base,
94 	.integrated = true,
95 	.xtal_latency = 12000,
96 	.low_latency_xtal = true,
97 	.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
98 };
99 
100 const struct iwl_mac_cfg iwl_ax200_mac_cfg = {
101 	.device_family = IWL_DEVICE_FAMILY_22000,
102 	.base = &iwl_22000_base,
103 	.mq_rx_supported = true,
104 	.gen2 = true,
105 	.bisr_workaround = 1,
106 };
107 
108 const char iwl_ax200_killer_1650w_name[] =
109 	"Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
110 const char iwl_ax200_killer_1650x_name[] =
111 	"Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)";
112 const char iwl_ax201_killer_1650s_name[] =
113 	"Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)";
114 const char iwl_ax201_killer_1650i_name[] =
115 	"Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)";
116 
117 MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
118