162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/****************************************************************************** 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. 562306a36Sopenharmony_ci * Copyright(c) 2018 - 2020, 2023 Intel Corporation 662306a36Sopenharmony_ci *****************************************************************************/ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#include <linux/module.h> 962306a36Sopenharmony_ci#include <linux/stringify.h> 1062306a36Sopenharmony_ci#include "iwl-config.h" 1162306a36Sopenharmony_ci#include "iwl-agn-hw.h" 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* Highest firmware API version supported */ 1462306a36Sopenharmony_ci#define IWL1000_UCODE_API_MAX 5 1562306a36Sopenharmony_ci#define IWL100_UCODE_API_MAX 5 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci/* Lowest firmware API version supported */ 1862306a36Sopenharmony_ci#define IWL1000_UCODE_API_MIN 1 1962306a36Sopenharmony_ci#define IWL100_UCODE_API_MIN 5 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/* EEPROM version */ 2262306a36Sopenharmony_ci#define EEPROM_1000_TX_POWER_VERSION (4) 2362306a36Sopenharmony_ci#define EEPROM_1000_EEPROM_VERSION (0x15C) 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define IWL1000_FW_PRE "iwlwifi-1000" 2662306a36Sopenharmony_ci#define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE "-" __stringify(api) ".ucode" 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#define IWL100_FW_PRE "iwlwifi-100" 2962306a36Sopenharmony_ci#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE "-" __stringify(api) ".ucode" 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_cistatic const struct iwl_base_params iwl1000_base_params = { 3362306a36Sopenharmony_ci .num_of_queues = IWLAGN_NUM_QUEUES, 3462306a36Sopenharmony_ci .max_tfd_queue_size = 256, 3562306a36Sopenharmony_ci .eeprom_size = OTP_LOW_IMAGE_SIZE_2K, 3662306a36Sopenharmony_ci .pll_cfg = true, 3762306a36Sopenharmony_ci .max_ll_items = OTP_MAX_LL_ITEMS_1000, 3862306a36Sopenharmony_ci .shadow_ram_support = false, 3962306a36Sopenharmony_ci .led_compensation = 51, 4062306a36Sopenharmony_ci .wd_timeout = IWL_WATCHDOG_DISABLED, 4162306a36Sopenharmony_ci .max_event_log_size = 128, 4262306a36Sopenharmony_ci .scd_chain_ext_wa = true, 4362306a36Sopenharmony_ci}; 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_cistatic const struct iwl_ht_params iwl1000_ht_params = { 4662306a36Sopenharmony_ci .ht_greenfield_support = true, 4762306a36Sopenharmony_ci .use_rts_for_aggregation = true, /* use rts/cts protection */ 4862306a36Sopenharmony_ci .ht40_bands = BIT(NL80211_BAND_2GHZ), 4962306a36Sopenharmony_ci}; 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_cistatic const struct iwl_eeprom_params iwl1000_eeprom_params = { 5262306a36Sopenharmony_ci .regulatory_bands = { 5362306a36Sopenharmony_ci EEPROM_REG_BAND_1_CHANNELS, 5462306a36Sopenharmony_ci EEPROM_REG_BAND_2_CHANNELS, 5562306a36Sopenharmony_ci EEPROM_REG_BAND_3_CHANNELS, 5662306a36Sopenharmony_ci EEPROM_REG_BAND_4_CHANNELS, 5762306a36Sopenharmony_ci EEPROM_REG_BAND_5_CHANNELS, 5862306a36Sopenharmony_ci EEPROM_REG_BAND_24_HT40_CHANNELS, 5962306a36Sopenharmony_ci EEPROM_REGULATORY_BAND_NO_HT40, 6062306a36Sopenharmony_ci } 6162306a36Sopenharmony_ci}; 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci#define IWL_DEVICE_1000 \ 6462306a36Sopenharmony_ci .fw_name_pre = IWL1000_FW_PRE, \ 6562306a36Sopenharmony_ci .ucode_api_max = IWL1000_UCODE_API_MAX, \ 6662306a36Sopenharmony_ci .ucode_api_min = IWL1000_UCODE_API_MIN, \ 6762306a36Sopenharmony_ci .trans.device_family = IWL_DEVICE_FAMILY_1000, \ 6862306a36Sopenharmony_ci .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 6962306a36Sopenharmony_ci .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 7062306a36Sopenharmony_ci .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ 7162306a36Sopenharmony_ci .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 7262306a36Sopenharmony_ci .trans.base_params = &iwl1000_base_params, \ 7362306a36Sopenharmony_ci .eeprom_params = &iwl1000_eeprom_params, \ 7462306a36Sopenharmony_ci .led_mode = IWL_LED_BLINK 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ciconst struct iwl_cfg iwl1000_bgn_cfg = { 7762306a36Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", 7862306a36Sopenharmony_ci IWL_DEVICE_1000, 7962306a36Sopenharmony_ci .ht_params = &iwl1000_ht_params, 8062306a36Sopenharmony_ci}; 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ciconst struct iwl_cfg iwl1000_bg_cfg = { 8362306a36Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", 8462306a36Sopenharmony_ci IWL_DEVICE_1000, 8562306a36Sopenharmony_ci}; 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci#define IWL_DEVICE_100 \ 8862306a36Sopenharmony_ci .fw_name_pre = IWL100_FW_PRE, \ 8962306a36Sopenharmony_ci .ucode_api_max = IWL100_UCODE_API_MAX, \ 9062306a36Sopenharmony_ci .ucode_api_min = IWL100_UCODE_API_MIN, \ 9162306a36Sopenharmony_ci .trans.device_family = IWL_DEVICE_FAMILY_100, \ 9262306a36Sopenharmony_ci .max_inst_size = IWLAGN_RTC_INST_SIZE, \ 9362306a36Sopenharmony_ci .max_data_size = IWLAGN_RTC_DATA_SIZE, \ 9462306a36Sopenharmony_ci .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ 9562306a36Sopenharmony_ci .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 9662306a36Sopenharmony_ci .trans.base_params = &iwl1000_base_params, \ 9762306a36Sopenharmony_ci .eeprom_params = &iwl1000_eeprom_params, \ 9862306a36Sopenharmony_ci .led_mode = IWL_LED_RF_STATE, \ 9962306a36Sopenharmony_ci .rx_with_siso_diversity = true 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ciconst struct iwl_cfg iwl100_bgn_cfg = { 10262306a36Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 100 BGN", 10362306a36Sopenharmony_ci IWL_DEVICE_100, 10462306a36Sopenharmony_ci .ht_params = &iwl1000_ht_params, 10562306a36Sopenharmony_ci}; 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ciconst struct iwl_cfg iwl100_bg_cfg = { 10862306a36Sopenharmony_ci .name = "Intel(R) Centrino(R) Wireless-N 100 BG", 10962306a36Sopenharmony_ci IWL_DEVICE_100, 11062306a36Sopenharmony_ci}; 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ciMODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 11362306a36Sopenharmony_ciMODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); 114