Loading...
1// SPDX-License-Identifier: GPL-2.0-only
2/******************************************************************************
3 *
4 * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
5 * Copyright(c) 2018 - 2020, 2023 Intel Corporation
6 *****************************************************************************/
7
8#include <linux/module.h>
9#include <linux/stringify.h>
10#include "iwl-config.h"
11#include "iwl-agn-hw.h"
12
13/* Highest firmware API version supported */
14#define IWL5000_UCODE_API_MAX 5
15#define IWL5150_UCODE_API_MAX 2
16
17/* Lowest firmware API version supported */
18#define IWL5000_UCODE_API_MIN 1
19#define IWL5150_UCODE_API_MIN 1
20
21/* EEPROM versions */
22#define EEPROM_5000_TX_POWER_VERSION (4)
23#define EEPROM_5000_EEPROM_VERSION (0x11A)
24#define EEPROM_5050_TX_POWER_VERSION (4)
25#define EEPROM_5050_EEPROM_VERSION (0x21E)
26
27#define IWL5000_FW_PRE "iwlwifi-5000"
28#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE "-" __stringify(api) ".ucode"
29
30#define IWL5150_FW_PRE "iwlwifi-5150"
31#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE "-" __stringify(api) ".ucode"
32
33static const struct iwl_base_params iwl5000_base_params = {
34 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
35 .num_of_queues = IWLAGN_NUM_QUEUES,
36 .max_tfd_queue_size = 256,
37 .pll_cfg = true,
38 .led_compensation = 51,
39 .wd_timeout = IWL_WATCHDOG_DISABLED,
40 .max_event_log_size = 512,
41 .scd_chain_ext_wa = true,
42};
43
44static const struct iwl_ht_params iwl5000_ht_params = {
45 .ht_greenfield_support = true,
46 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
47};
48
49static const struct iwl_eeprom_params iwl5000_eeprom_params = {
50 .regulatory_bands = {
51 EEPROM_REG_BAND_1_CHANNELS,
52 EEPROM_REG_BAND_2_CHANNELS,
53 EEPROM_REG_BAND_3_CHANNELS,
54 EEPROM_REG_BAND_4_CHANNELS,
55 EEPROM_REG_BAND_5_CHANNELS,
56 EEPROM_REG_BAND_24_HT40_CHANNELS,
57 EEPROM_REG_BAND_52_HT40_CHANNELS
58 },
59};
60
61#define IWL_DEVICE_5000 \
62 .fw_name_pre = IWL5000_FW_PRE, \
63 .ucode_api_max = IWL5000_UCODE_API_MAX, \
64 .ucode_api_min = IWL5000_UCODE_API_MIN, \
65 .trans.device_family = IWL_DEVICE_FAMILY_5000, \
66 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
67 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
68 .nvm_ver = EEPROM_5000_EEPROM_VERSION, \
69 .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
70 .trans.base_params = &iwl5000_base_params, \
71 .eeprom_params = &iwl5000_eeprom_params, \
72 .led_mode = IWL_LED_BLINK
73
74const struct iwl_cfg iwl5300_agn_cfg = {
75 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
76 IWL_DEVICE_5000,
77 /* at least EEPROM 0x11A has wrong info */
78 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
79 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
80 .ht_params = &iwl5000_ht_params,
81};
82
83const struct iwl_cfg iwl5100_bgn_cfg = {
84 .name = "Intel(R) WiFi Link 5100 BGN",
85 IWL_DEVICE_5000,
86 .valid_tx_ant = ANT_B, /* .cfg overwrite */
87 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
88 .ht_params = &iwl5000_ht_params,
89};
90
91const struct iwl_cfg iwl5100_abg_cfg = {
92 .name = "Intel(R) WiFi Link 5100 ABG",
93 IWL_DEVICE_5000,
94 .valid_tx_ant = ANT_B, /* .cfg overwrite */
95 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
96};
97
98const struct iwl_cfg iwl5100_agn_cfg = {
99 .name = "Intel(R) WiFi Link 5100 AGN",
100 IWL_DEVICE_5000,
101 .valid_tx_ant = ANT_B, /* .cfg overwrite */
102 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
103 .ht_params = &iwl5000_ht_params,
104};
105
106const struct iwl_cfg iwl5350_agn_cfg = {
107 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
108 .fw_name_pre = IWL5000_FW_PRE,
109 .ucode_api_max = IWL5000_UCODE_API_MAX,
110 .ucode_api_min = IWL5000_UCODE_API_MIN,
111 .trans.device_family = IWL_DEVICE_FAMILY_5000,
112 .max_inst_size = IWLAGN_RTC_INST_SIZE,
113 .max_data_size = IWLAGN_RTC_DATA_SIZE,
114 .nvm_ver = EEPROM_5050_EEPROM_VERSION,
115 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
116 .trans.base_params = &iwl5000_base_params,
117 .eeprom_params = &iwl5000_eeprom_params,
118 .ht_params = &iwl5000_ht_params,
119 .led_mode = IWL_LED_BLINK,
120 .internal_wimax_coex = true,
121};
122
123#define IWL_DEVICE_5150 \
124 .fw_name_pre = IWL5150_FW_PRE, \
125 .ucode_api_max = IWL5150_UCODE_API_MAX, \
126 .ucode_api_min = IWL5150_UCODE_API_MIN, \
127 .trans.device_family = IWL_DEVICE_FAMILY_5150, \
128 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
129 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
130 .nvm_ver = EEPROM_5050_EEPROM_VERSION, \
131 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
132 .trans.base_params = &iwl5000_base_params, \
133 .eeprom_params = &iwl5000_eeprom_params, \
134 .led_mode = IWL_LED_BLINK, \
135 .internal_wimax_coex = true
136
137const struct iwl_cfg iwl5150_agn_cfg = {
138 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
139 IWL_DEVICE_5150,
140 .ht_params = &iwl5000_ht_params,
141
142};
143
144const struct iwl_cfg iwl5150_abg_cfg = {
145 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
146 IWL_DEVICE_5150,
147};
148
149MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
150MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
1// SPDX-License-Identifier: GPL-2.0-only
2/******************************************************************************
3 *
4 * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
5 * Copyright(c) 2018 - 2019 Intel Corporation
6 *
7 * Contact Information:
8 * Intel Linux Wireless <linuxwifi@intel.com>
9 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
10 *
11 *****************************************************************************/
12
13#include <linux/module.h>
14#include <linux/stringify.h>
15#include "iwl-config.h"
16#include "iwl-agn-hw.h"
17
18/* Highest firmware API version supported */
19#define IWL5000_UCODE_API_MAX 5
20#define IWL5150_UCODE_API_MAX 2
21
22/* Lowest firmware API version supported */
23#define IWL5000_UCODE_API_MIN 1
24#define IWL5150_UCODE_API_MIN 1
25
26/* EEPROM versions */
27#define EEPROM_5000_TX_POWER_VERSION (4)
28#define EEPROM_5000_EEPROM_VERSION (0x11A)
29#define EEPROM_5050_TX_POWER_VERSION (4)
30#define EEPROM_5050_EEPROM_VERSION (0x21E)
31
32#define IWL5000_FW_PRE "iwlwifi-5000-"
33#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
34
35#define IWL5150_FW_PRE "iwlwifi-5150-"
36#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
37
38static const struct iwl_base_params iwl5000_base_params = {
39 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
40 .num_of_queues = IWLAGN_NUM_QUEUES,
41 .max_tfd_queue_size = 256,
42 .pll_cfg = true,
43 .led_compensation = 51,
44 .wd_timeout = IWL_WATCHDOG_DISABLED,
45 .max_event_log_size = 512,
46 .scd_chain_ext_wa = true,
47};
48
49static const struct iwl_ht_params iwl5000_ht_params = {
50 .ht_greenfield_support = true,
51 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
52};
53
54static const struct iwl_eeprom_params iwl5000_eeprom_params = {
55 .regulatory_bands = {
56 EEPROM_REG_BAND_1_CHANNELS,
57 EEPROM_REG_BAND_2_CHANNELS,
58 EEPROM_REG_BAND_3_CHANNELS,
59 EEPROM_REG_BAND_4_CHANNELS,
60 EEPROM_REG_BAND_5_CHANNELS,
61 EEPROM_REG_BAND_24_HT40_CHANNELS,
62 EEPROM_REG_BAND_52_HT40_CHANNELS
63 },
64};
65
66#define IWL_DEVICE_5000 \
67 .fw_name_pre = IWL5000_FW_PRE, \
68 .ucode_api_max = IWL5000_UCODE_API_MAX, \
69 .ucode_api_min = IWL5000_UCODE_API_MIN, \
70 .trans.device_family = IWL_DEVICE_FAMILY_5000, \
71 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
72 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
73 .nvm_ver = EEPROM_5000_EEPROM_VERSION, \
74 .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
75 .trans.base_params = &iwl5000_base_params, \
76 .eeprom_params = &iwl5000_eeprom_params, \
77 .led_mode = IWL_LED_BLINK, \
78 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
79 .trans.csr = &iwl_csr_v1
80
81const struct iwl_cfg iwl5300_agn_cfg = {
82 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
83 IWL_DEVICE_5000,
84 /* at least EEPROM 0x11A has wrong info */
85 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
86 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
87 .ht_params = &iwl5000_ht_params,
88};
89
90const struct iwl_cfg iwl5100_bgn_cfg = {
91 .name = "Intel(R) WiFi Link 5100 BGN",
92 IWL_DEVICE_5000,
93 .valid_tx_ant = ANT_B, /* .cfg overwrite */
94 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
95 .ht_params = &iwl5000_ht_params,
96};
97
98const struct iwl_cfg iwl5100_abg_cfg = {
99 .name = "Intel(R) WiFi Link 5100 ABG",
100 IWL_DEVICE_5000,
101 .valid_tx_ant = ANT_B, /* .cfg overwrite */
102 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
103};
104
105const struct iwl_cfg iwl5100_agn_cfg = {
106 .name = "Intel(R) WiFi Link 5100 AGN",
107 IWL_DEVICE_5000,
108 .valid_tx_ant = ANT_B, /* .cfg overwrite */
109 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
110 .ht_params = &iwl5000_ht_params,
111};
112
113const struct iwl_cfg iwl5350_agn_cfg = {
114 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
115 .fw_name_pre = IWL5000_FW_PRE,
116 .ucode_api_max = IWL5000_UCODE_API_MAX,
117 .ucode_api_min = IWL5000_UCODE_API_MIN,
118 .trans.device_family = IWL_DEVICE_FAMILY_5000,
119 .max_inst_size = IWLAGN_RTC_INST_SIZE,
120 .max_data_size = IWLAGN_RTC_DATA_SIZE,
121 .nvm_ver = EEPROM_5050_EEPROM_VERSION,
122 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
123 .trans.base_params = &iwl5000_base_params,
124 .eeprom_params = &iwl5000_eeprom_params,
125 .ht_params = &iwl5000_ht_params,
126 .led_mode = IWL_LED_BLINK,
127 .internal_wimax_coex = true,
128 .trans.csr = &iwl_csr_v1,
129};
130
131#define IWL_DEVICE_5150 \
132 .fw_name_pre = IWL5150_FW_PRE, \
133 .ucode_api_max = IWL5150_UCODE_API_MAX, \
134 .ucode_api_min = IWL5150_UCODE_API_MIN, \
135 .trans.device_family = IWL_DEVICE_FAMILY_5150, \
136 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
137 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
138 .nvm_ver = EEPROM_5050_EEPROM_VERSION, \
139 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
140 .trans.base_params = &iwl5000_base_params, \
141 .eeprom_params = &iwl5000_eeprom_params, \
142 .led_mode = IWL_LED_BLINK, \
143 .internal_wimax_coex = true, \
144 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
145 .trans.csr = &iwl_csr_v1
146
147const struct iwl_cfg iwl5150_agn_cfg = {
148 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
149 IWL_DEVICE_5150,
150 .ht_params = &iwl5000_ht_params,
151
152};
153
154const struct iwl_cfg iwl5150_abg_cfg = {
155 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
156 IWL_DEVICE_5150,
157};
158
159MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
160MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));