xref: /linux/drivers/net/wireless/intel/iwlwifi/cfg/1000.c (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
14273a380SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
2650aaed3SJohannes Berg /******************************************************************************
3650aaed3SJohannes Berg  *
4650aaed3SJohannes Berg  * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
5*31aeae24SJohannes Berg  * Copyright(c) 2018 - 2020, 2023 Intel Corporation
6650aaed3SJohannes Berg  *****************************************************************************/
7650aaed3SJohannes Berg 
8650aaed3SJohannes Berg #include <linux/module.h>
9650aaed3SJohannes Berg #include <linux/stringify.h>
10650aaed3SJohannes Berg #include "iwl-config.h"
11650aaed3SJohannes Berg #include "iwl-agn-hw.h"
12650aaed3SJohannes Berg 
13650aaed3SJohannes Berg /* Highest firmware API version supported */
14650aaed3SJohannes Berg #define IWL1000_UCODE_API_MAX 5
15650aaed3SJohannes Berg #define IWL100_UCODE_API_MAX 5
16650aaed3SJohannes Berg 
17650aaed3SJohannes Berg /* Lowest firmware API version supported */
18650aaed3SJohannes Berg #define IWL1000_UCODE_API_MIN 1
19650aaed3SJohannes Berg #define IWL100_UCODE_API_MIN 5
20650aaed3SJohannes Berg 
21650aaed3SJohannes Berg /* EEPROM version */
22650aaed3SJohannes Berg #define EEPROM_1000_TX_POWER_VERSION	(4)
23650aaed3SJohannes Berg #define EEPROM_1000_EEPROM_VERSION	(0x15C)
24650aaed3SJohannes Berg 
25*31aeae24SJohannes Berg #define IWL1000_FW_PRE "iwlwifi-1000"
26*31aeae24SJohannes Berg #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE "-" __stringify(api) ".ucode"
27650aaed3SJohannes Berg 
28*31aeae24SJohannes Berg #define IWL100_FW_PRE "iwlwifi-100"
29*31aeae24SJohannes Berg #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE "-" __stringify(api) ".ucode"
30650aaed3SJohannes Berg 
31650aaed3SJohannes Berg 
32650aaed3SJohannes Berg static const struct iwl_base_params iwl1000_base_params = {
33650aaed3SJohannes Berg 	.num_of_queues = IWLAGN_NUM_QUEUES,
343baafeffSPavel Machek 	.max_tfd_queue_size = 256,
353e2b49d6SLuca Coelho 	.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
36650aaed3SJohannes Berg 	.pll_cfg = true,
37650aaed3SJohannes Berg 	.max_ll_items = OTP_MAX_LL_ITEMS_1000,
38650aaed3SJohannes Berg 	.shadow_ram_support = false,
39650aaed3SJohannes Berg 	.led_compensation = 51,
40650aaed3SJohannes Berg 	.wd_timeout = IWL_WATCHDOG_DISABLED,
41650aaed3SJohannes Berg 	.max_event_log_size = 128,
42650aaed3SJohannes Berg 	.scd_chain_ext_wa = true,
43650aaed3SJohannes Berg };
44650aaed3SJohannes Berg 
45650aaed3SJohannes Berg static const struct iwl_ht_params iwl1000_ht_params = {
46650aaed3SJohannes Berg 	.ht_greenfield_support = true,
47650aaed3SJohannes Berg 	.use_rts_for_aggregation = true, /* use rts/cts protection */
48650aaed3SJohannes Berg 	.ht40_bands = BIT(NL80211_BAND_2GHZ),
49650aaed3SJohannes Berg };
50650aaed3SJohannes Berg 
51650aaed3SJohannes Berg static const struct iwl_eeprom_params iwl1000_eeprom_params = {
52650aaed3SJohannes Berg 	.regulatory_bands = {
53650aaed3SJohannes Berg 		EEPROM_REG_BAND_1_CHANNELS,
54650aaed3SJohannes Berg 		EEPROM_REG_BAND_2_CHANNELS,
55650aaed3SJohannes Berg 		EEPROM_REG_BAND_3_CHANNELS,
56650aaed3SJohannes Berg 		EEPROM_REG_BAND_4_CHANNELS,
57650aaed3SJohannes Berg 		EEPROM_REG_BAND_5_CHANNELS,
58650aaed3SJohannes Berg 		EEPROM_REG_BAND_24_HT40_CHANNELS,
59650aaed3SJohannes Berg 		EEPROM_REGULATORY_BAND_NO_HT40,
60650aaed3SJohannes Berg 	}
61650aaed3SJohannes Berg };
62650aaed3SJohannes Berg 
63650aaed3SJohannes Berg #define IWL_DEVICE_1000						\
64650aaed3SJohannes Berg 	.fw_name_pre = IWL1000_FW_PRE,				\
65650aaed3SJohannes Berg 	.ucode_api_max = IWL1000_UCODE_API_MAX,			\
66650aaed3SJohannes Berg 	.ucode_api_min = IWL1000_UCODE_API_MIN,			\
6779b6c8feSLuca Coelho 	.trans.device_family = IWL_DEVICE_FAMILY_1000,		\
68650aaed3SJohannes Berg 	.max_inst_size = IWLAGN_RTC_INST_SIZE,			\
69650aaed3SJohannes Berg 	.max_data_size = IWLAGN_RTC_DATA_SIZE,			\
70650aaed3SJohannes Berg 	.nvm_ver = EEPROM_1000_EEPROM_VERSION,		\
71650aaed3SJohannes Berg 	.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
7279b6c8feSLuca Coelho 	.trans.base_params = &iwl1000_base_params,		\
73650aaed3SJohannes Berg 	.eeprom_params = &iwl1000_eeprom_params,		\
74edba17adSJohannes Berg 	.led_mode = IWL_LED_BLINK
75650aaed3SJohannes Berg 
76650aaed3SJohannes Berg const struct iwl_cfg iwl1000_bgn_cfg = {
77650aaed3SJohannes Berg 	.name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
78650aaed3SJohannes Berg 	IWL_DEVICE_1000,
79650aaed3SJohannes Berg 	.ht_params = &iwl1000_ht_params,
80650aaed3SJohannes Berg };
81650aaed3SJohannes Berg 
82650aaed3SJohannes Berg const struct iwl_cfg iwl1000_bg_cfg = {
83650aaed3SJohannes Berg 	.name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
84650aaed3SJohannes Berg 	IWL_DEVICE_1000,
85650aaed3SJohannes Berg };
86650aaed3SJohannes Berg 
87650aaed3SJohannes Berg #define IWL_DEVICE_100						\
88650aaed3SJohannes Berg 	.fw_name_pre = IWL100_FW_PRE,				\
89650aaed3SJohannes Berg 	.ucode_api_max = IWL100_UCODE_API_MAX,			\
90650aaed3SJohannes Berg 	.ucode_api_min = IWL100_UCODE_API_MIN,			\
9179b6c8feSLuca Coelho 	.trans.device_family = IWL_DEVICE_FAMILY_100,		\
92650aaed3SJohannes Berg 	.max_inst_size = IWLAGN_RTC_INST_SIZE,			\
93650aaed3SJohannes Berg 	.max_data_size = IWLAGN_RTC_DATA_SIZE,			\
94650aaed3SJohannes Berg 	.nvm_ver = EEPROM_1000_EEPROM_VERSION,		\
95650aaed3SJohannes Berg 	.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
9679b6c8feSLuca Coelho 	.trans.base_params = &iwl1000_base_params,		\
97650aaed3SJohannes Berg 	.eeprom_params = &iwl1000_eeprom_params,		\
98650aaed3SJohannes Berg 	.led_mode = IWL_LED_RF_STATE,				\
99edba17adSJohannes Berg 	.rx_with_siso_diversity = true
100650aaed3SJohannes Berg 
101650aaed3SJohannes Berg const struct iwl_cfg iwl100_bgn_cfg = {
102650aaed3SJohannes Berg 	.name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
103650aaed3SJohannes Berg 	IWL_DEVICE_100,
104650aaed3SJohannes Berg 	.ht_params = &iwl1000_ht_params,
105650aaed3SJohannes Berg };
106650aaed3SJohannes Berg 
107650aaed3SJohannes Berg const struct iwl_cfg iwl100_bg_cfg = {
108650aaed3SJohannes Berg 	.name = "Intel(R) Centrino(R) Wireless-N 100 BG",
109650aaed3SJohannes Berg 	IWL_DEVICE_100,
110650aaed3SJohannes Berg };
111650aaed3SJohannes Berg 
112650aaed3SJohannes Berg MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
113650aaed3SJohannes Berg MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));
114