18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/****************************************************************************** 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 58c2ecf20Sopenharmony_ci * Copyright(c) 2018 - 2019 Intel Corporation 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Contact Information: 88c2ecf20Sopenharmony_ci * Intel Linux Wireless <linuxwifi@intel.com> 98c2ecf20Sopenharmony_ci * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci *****************************************************************************/ 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/module.h> 148c2ecf20Sopenharmony_ci#include <linux/stringify.h> 158c2ecf20Sopenharmony_ci#include "iwl-config.h" 168c2ecf20Sopenharmony_ci#include "iwl-agn-hw.h" 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* Highest firmware API version supported */ 198c2ecf20Sopenharmony_ci#define IWL1000_UCODE_API_MAX 5 208c2ecf20Sopenharmony_ci#define IWL100_UCODE_API_MAX 5 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* Lowest firmware API version supported */ 238c2ecf20Sopenharmony_ci#define IWL1000_UCODE_API_MIN 1 248c2ecf20Sopenharmony_ci#define IWL100_UCODE_API_MIN 5 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* EEPROM version */ 278c2ecf20Sopenharmony_ci#define EEPROM_1000_TX_POWER_VERSION (4) 288c2ecf20Sopenharmony_ci#define EEPROM_1000_EEPROM_VERSION (0x15C) 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define IWL1000_FW_PRE "iwlwifi-1000-" 318c2ecf20Sopenharmony_ci#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode" 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#define IWL100_FW_PRE "iwlwifi-100-" 348c2ecf20Sopenharmony_ci#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode" 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_cistatic const struct iwl_base_params iwl1000_base_params = { 388c2ecf20Sopenharmony_ci .num_of_queues = IWLAGN_NUM_QUEUES, 398c2ecf20Sopenharmony_ci .max_tfd_queue_size = 256, 408c2ecf20Sopenharmony_ci .eeprom_size = OTP_LOW_IMAGE_SIZE_2K, 418c2ecf20Sopenharmony_ci .pll_cfg = true, 428c2ecf20Sopenharmony_ci .max_ll_items = OTP_MAX_LL_ITEMS_1000, 438c2ecf20Sopenharmony_ci .shadow_ram_support = false, 448c2ecf20Sopenharmony_ci .led_compensation = 51, 458c2ecf20Sopenharmony_ci .wd_timeout = IWL_WATCHDOG_DISABLED, 468c2ecf20Sopenharmony_ci .max_event_log_size = 128, 478c2ecf20Sopenharmony_ci .scd_chain_ext_wa = true, 488c2ecf20Sopenharmony_ci}; 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_cistatic const struct iwl_ht_params iwl1000_ht_params = { 518c2ecf20Sopenharmony_ci .ht_greenfield_support = true, 528c2ecf20Sopenharmony_ci .use_rts_for_aggregation = true, /* use rts/cts protection */ 538c2ecf20Sopenharmony_ci .ht40_bands = BIT(NL80211_BAND_2GHZ), 548c2ecf20Sopenharmony_ci}; 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_cistatic const struct iwl_eeprom_params iwl1000_eeprom_params = { 578c2ecf20Sopenharmony_ci .regulatory_bands = { 588c2ecf20Sopenharmony_ci EEPROM_REG_BAND_1_CHANNELS, 598c2ecf20Sopenharmony_ci EEPROM_REG_BAND_2_CHANNELS, 608c2ecf20Sopenharmony_ci EEPROM_REG_BAND_3_CHANNELS, 618c2ecf20Sopenharmony_ci EEPROM_REG_BAND_4_CHANNELS, 628c2ecf20Sopenharmony_ci EEPROM_REG_BAND_5_CHANNELS, 638c2ecf20Sopenharmony_ci EEPROM_REG_BAND_24_HT40_CHANNELS, 648c2ecf20Sopenharmony_ci EEPROM_REGULATORY_BAND_NO_HT40, 658c2ecf20Sopenharmony_ci } 668c2ecf20Sopenharmony_ci}; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define IWL_DEVICE_1000 \ 698c2ecf20Sopenharmony_ci .fw_name_pre = IWL1000_FW_PRE, \ 708c2ecf20Sopenharmony_ci .ucode_api_max = IWL1000_UCODE_API_MAX, \ 718c2ecf20Sopenharmony_ci .ucode_api_min = IWL1000_UCODE_API_MIN, \ 728c2ecf20Sopenharmony_ci .trans.device_family = IWL_DEVICE_FAMILY_1000, \ 738c2ecf20Sopenharmony_ci .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 748c2ecf20Sopenharmony_ci .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 758c2ecf20Sopenharmony_ci .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ 768c2ecf20Sopenharmony_ci .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 778c2ecf20Sopenharmony_ci .trans.base_params = &iwl1000_base_params, \ 788c2ecf20Sopenharmony_ci .eeprom_params = &iwl1000_eeprom_params, \ 798c2ecf20Sopenharmony_ci .led_mode = IWL_LED_BLINK, \ 808c2ecf20Sopenharmony_ci .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ciconst struct iwl_cfg iwl1000_bgn_cfg = { 838c2ecf20Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", 848c2ecf20Sopenharmony_ci IWL_DEVICE_1000, 858c2ecf20Sopenharmony_ci .ht_params = &iwl1000_ht_params, 868c2ecf20Sopenharmony_ci}; 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ciconst struct iwl_cfg iwl1000_bg_cfg = { 898c2ecf20Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", 908c2ecf20Sopenharmony_ci IWL_DEVICE_1000, 918c2ecf20Sopenharmony_ci}; 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci#define IWL_DEVICE_100 \ 948c2ecf20Sopenharmony_ci .fw_name_pre = IWL100_FW_PRE, \ 958c2ecf20Sopenharmony_ci .ucode_api_max = IWL100_UCODE_API_MAX, \ 968c2ecf20Sopenharmony_ci .ucode_api_min = IWL100_UCODE_API_MIN, \ 978c2ecf20Sopenharmony_ci .trans.device_family = IWL_DEVICE_FAMILY_100, \ 988c2ecf20Sopenharmony_ci .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 998c2ecf20Sopenharmony_ci .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 1008c2ecf20Sopenharmony_ci .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ 1018c2ecf20Sopenharmony_ci .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 1028c2ecf20Sopenharmony_ci .trans.base_params = &iwl1000_base_params, \ 1038c2ecf20Sopenharmony_ci .eeprom_params = &iwl1000_eeprom_params, \ 1048c2ecf20Sopenharmony_ci .led_mode = IWL_LED_RF_STATE, \ 1058c2ecf20Sopenharmony_ci .rx_with_siso_diversity = true, \ 1068c2ecf20Sopenharmony_ci .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ciconst struct iwl_cfg iwl100_bgn_cfg = { 1098c2ecf20Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 100 BGN", 1108c2ecf20Sopenharmony_ci IWL_DEVICE_100, 1118c2ecf20Sopenharmony_ci .ht_params = &iwl1000_ht_params, 1128c2ecf20Sopenharmony_ci}; 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ciconst struct iwl_cfg iwl100_bg_cfg = { 1158c2ecf20Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 100 BG", 1168c2ecf20Sopenharmony_ci IWL_DEVICE_100, 1178c2ecf20Sopenharmony_ci}; 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ciMODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 1208c2ecf20Sopenharmony_ciMODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); 121