1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2bfcc09ddSBjoern A. Zeeb /* 3*a4128aadSBjoern A. Zeeb * Copyright (C) 2012-2014, 2018-2024 Intel Corporation 4bfcc09ddSBjoern A. Zeeb * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5bfcc09ddSBjoern A. Zeeb * Copyright (C) 2016-2017 Intel Deutschland GmbH 6bfcc09ddSBjoern A. Zeeb */ 7bfcc09ddSBjoern A. Zeeb #ifndef __iwl_fw_api_nvm_reg_h__ 8bfcc09ddSBjoern A. Zeeb #define __iwl_fw_api_nvm_reg_h__ 9bfcc09ddSBjoern A. Zeeb 10bfcc09ddSBjoern A. Zeeb /** 11bfcc09ddSBjoern A. Zeeb * enum iwl_regulatory_and_nvm_subcmd_ids - regulatory/NVM commands 12bfcc09ddSBjoern A. Zeeb */ 13bfcc09ddSBjoern A. Zeeb enum iwl_regulatory_and_nvm_subcmd_ids { 14bfcc09ddSBjoern A. Zeeb /** 15bfcc09ddSBjoern A. Zeeb * @NVM_ACCESS_COMPLETE: &struct iwl_nvm_access_complete_cmd 16bfcc09ddSBjoern A. Zeeb */ 17bfcc09ddSBjoern A. Zeeb NVM_ACCESS_COMPLETE = 0x0, 18bfcc09ddSBjoern A. Zeeb 19bfcc09ddSBjoern A. Zeeb /** 209af1bba4SBjoern A. Zeeb * @LARI_CONFIG_CHANGE: &struct iwl_lari_config_change_cmd_v1, 219af1bba4SBjoern A. Zeeb * &struct iwl_lari_config_change_cmd_v2, 229af1bba4SBjoern A. Zeeb * &struct iwl_lari_config_change_cmd_v3, 239af1bba4SBjoern A. Zeeb * &struct iwl_lari_config_change_cmd_v4, 24*a4128aadSBjoern A. Zeeb * &struct iwl_lari_config_change_cmd_v5, 25*a4128aadSBjoern A. Zeeb * &struct iwl_lari_config_change_cmd_v6, 26*a4128aadSBjoern A. Zeeb * &struct iwl_lari_config_change_cmd_v7, 27*a4128aadSBjoern A. Zeeb * &struct iwl_lari_config_change_cmd_v10 or 28*a4128aadSBjoern A. Zeeb * &struct iwl_lari_config_change_cmd 29bfcc09ddSBjoern A. Zeeb */ 30bfcc09ddSBjoern A. Zeeb LARI_CONFIG_CHANGE = 0x1, 31bfcc09ddSBjoern A. Zeeb 32bfcc09ddSBjoern A. Zeeb /** 33bfcc09ddSBjoern A. Zeeb * @NVM_GET_INFO: 34bfcc09ddSBjoern A. Zeeb * Command is &struct iwl_nvm_get_info, 35bfcc09ddSBjoern A. Zeeb * response is &struct iwl_nvm_get_info_rsp 36bfcc09ddSBjoern A. Zeeb */ 37bfcc09ddSBjoern A. Zeeb NVM_GET_INFO = 0x2, 38bfcc09ddSBjoern A. Zeeb 39bfcc09ddSBjoern A. Zeeb /** 409af1bba4SBjoern A. Zeeb * @TAS_CONFIG: &union iwl_tas_config_cmd 41bfcc09ddSBjoern A. Zeeb */ 42bfcc09ddSBjoern A. Zeeb TAS_CONFIG = 0x3, 43bfcc09ddSBjoern A. Zeeb 44bfcc09ddSBjoern A. Zeeb /** 459af1bba4SBjoern A. Zeeb * @SAR_OFFSET_MAPPING_TABLE_CMD: &struct iwl_sar_offset_mapping_cmd 46d9836fb4SBjoern A. Zeeb */ 47d9836fb4SBjoern A. Zeeb SAR_OFFSET_MAPPING_TABLE_CMD = 0x4, 48d9836fb4SBjoern A. Zeeb 49d9836fb4SBjoern A. Zeeb /** 50*a4128aadSBjoern A. Zeeb * @MCC_ALLOWED_AP_TYPE_CMD: &struct iwl_mcc_allowed_ap_type_cmd 51*a4128aadSBjoern A. Zeeb */ 52*a4128aadSBjoern A. Zeeb MCC_ALLOWED_AP_TYPE_CMD = 0x5, 53*a4128aadSBjoern A. Zeeb 54*a4128aadSBjoern A. Zeeb /** 55bfcc09ddSBjoern A. Zeeb * @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy 56bfcc09ddSBjoern A. Zeeb */ 57bfcc09ddSBjoern A. Zeeb PNVM_INIT_COMPLETE_NTFY = 0xFE, 58bfcc09ddSBjoern A. Zeeb }; 59bfcc09ddSBjoern A. Zeeb 60bfcc09ddSBjoern A. Zeeb /** 61bfcc09ddSBjoern A. Zeeb * enum iwl_nvm_access_op - NVM access opcode 62bfcc09ddSBjoern A. Zeeb * @IWL_NVM_READ: read NVM 63bfcc09ddSBjoern A. Zeeb * @IWL_NVM_WRITE: write NVM 64bfcc09ddSBjoern A. Zeeb */ 65bfcc09ddSBjoern A. Zeeb enum iwl_nvm_access_op { 66bfcc09ddSBjoern A. Zeeb IWL_NVM_READ = 0, 67bfcc09ddSBjoern A. Zeeb IWL_NVM_WRITE = 1, 68bfcc09ddSBjoern A. Zeeb }; 69bfcc09ddSBjoern A. Zeeb 70bfcc09ddSBjoern A. Zeeb /** 71bfcc09ddSBjoern A. Zeeb * enum iwl_nvm_access_target - target of the NVM_ACCESS_CMD 72bfcc09ddSBjoern A. Zeeb * @NVM_ACCESS_TARGET_CACHE: access the cache 73bfcc09ddSBjoern A. Zeeb * @NVM_ACCESS_TARGET_OTP: access the OTP 74bfcc09ddSBjoern A. Zeeb * @NVM_ACCESS_TARGET_EEPROM: access the EEPROM 75bfcc09ddSBjoern A. Zeeb */ 76bfcc09ddSBjoern A. Zeeb enum iwl_nvm_access_target { 77bfcc09ddSBjoern A. Zeeb NVM_ACCESS_TARGET_CACHE = 0, 78bfcc09ddSBjoern A. Zeeb NVM_ACCESS_TARGET_OTP = 1, 79bfcc09ddSBjoern A. Zeeb NVM_ACCESS_TARGET_EEPROM = 2, 80bfcc09ddSBjoern A. Zeeb }; 81bfcc09ddSBjoern A. Zeeb 82bfcc09ddSBjoern A. Zeeb /** 83bfcc09ddSBjoern A. Zeeb * enum iwl_nvm_section_type - section types for NVM_ACCESS_CMD 84bfcc09ddSBjoern A. Zeeb * @NVM_SECTION_TYPE_SW: software section 85bfcc09ddSBjoern A. Zeeb * @NVM_SECTION_TYPE_REGULATORY: regulatory section 86bfcc09ddSBjoern A. Zeeb * @NVM_SECTION_TYPE_CALIBRATION: calibration section 87bfcc09ddSBjoern A. Zeeb * @NVM_SECTION_TYPE_PRODUCTION: production section 88bfcc09ddSBjoern A. Zeeb * @NVM_SECTION_TYPE_REGULATORY_SDP: regulatory section used by 3168 series 89bfcc09ddSBjoern A. Zeeb * @NVM_SECTION_TYPE_MAC_OVERRIDE: MAC override section 90bfcc09ddSBjoern A. Zeeb * @NVM_SECTION_TYPE_PHY_SKU: PHY SKU section 91bfcc09ddSBjoern A. Zeeb * @NVM_MAX_NUM_SECTIONS: number of sections 92bfcc09ddSBjoern A. Zeeb */ 93bfcc09ddSBjoern A. Zeeb enum iwl_nvm_section_type { 94bfcc09ddSBjoern A. Zeeb NVM_SECTION_TYPE_SW = 1, 95bfcc09ddSBjoern A. Zeeb NVM_SECTION_TYPE_REGULATORY = 3, 96bfcc09ddSBjoern A. Zeeb NVM_SECTION_TYPE_CALIBRATION = 4, 97bfcc09ddSBjoern A. Zeeb NVM_SECTION_TYPE_PRODUCTION = 5, 98bfcc09ddSBjoern A. Zeeb NVM_SECTION_TYPE_REGULATORY_SDP = 8, 99bfcc09ddSBjoern A. Zeeb NVM_SECTION_TYPE_MAC_OVERRIDE = 11, 100bfcc09ddSBjoern A. Zeeb NVM_SECTION_TYPE_PHY_SKU = 12, 101bfcc09ddSBjoern A. Zeeb NVM_MAX_NUM_SECTIONS = 13, 102bfcc09ddSBjoern A. Zeeb }; 103bfcc09ddSBjoern A. Zeeb 104bfcc09ddSBjoern A. Zeeb /** 105bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_access_cmd - Request the device to send an NVM section 106bfcc09ddSBjoern A. Zeeb * @op_code: &enum iwl_nvm_access_op 107bfcc09ddSBjoern A. Zeeb * @target: &enum iwl_nvm_access_target 108bfcc09ddSBjoern A. Zeeb * @type: &enum iwl_nvm_section_type 109bfcc09ddSBjoern A. Zeeb * @offset: offset in bytes into the section 110bfcc09ddSBjoern A. Zeeb * @length: in bytes, to read/write 111bfcc09ddSBjoern A. Zeeb * @data: if write operation, the data to write. On read its empty 112bfcc09ddSBjoern A. Zeeb */ 113bfcc09ddSBjoern A. Zeeb struct iwl_nvm_access_cmd { 114bfcc09ddSBjoern A. Zeeb u8 op_code; 115bfcc09ddSBjoern A. Zeeb u8 target; 116bfcc09ddSBjoern A. Zeeb __le16 type; 117bfcc09ddSBjoern A. Zeeb __le16 offset; 118bfcc09ddSBjoern A. Zeeb __le16 length; 119bfcc09ddSBjoern A. Zeeb u8 data[]; 120bfcc09ddSBjoern A. Zeeb } __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */ 121bfcc09ddSBjoern A. Zeeb 122bfcc09ddSBjoern A. Zeeb /** 123*a4128aadSBjoern A. Zeeb * struct iwl_nvm_access_resp - response to NVM_ACCESS_CMD 124bfcc09ddSBjoern A. Zeeb * @offset: offset in bytes into the section 125bfcc09ddSBjoern A. Zeeb * @length: in bytes, either how much was written or read 126bfcc09ddSBjoern A. Zeeb * @type: NVM_SECTION_TYPE_* 127bfcc09ddSBjoern A. Zeeb * @status: 0 for success, fail otherwise 128bfcc09ddSBjoern A. Zeeb * @data: if read operation, the data returned. Empty on write. 129bfcc09ddSBjoern A. Zeeb */ 130bfcc09ddSBjoern A. Zeeb struct iwl_nvm_access_resp { 131bfcc09ddSBjoern A. Zeeb __le16 offset; 132bfcc09ddSBjoern A. Zeeb __le16 length; 133bfcc09ddSBjoern A. Zeeb __le16 type; 134bfcc09ddSBjoern A. Zeeb __le16 status; 135bfcc09ddSBjoern A. Zeeb u8 data[]; 136bfcc09ddSBjoern A. Zeeb } __packed; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */ 137bfcc09ddSBjoern A. Zeeb 138bfcc09ddSBjoern A. Zeeb /* 139bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_get_info - request to get NVM data 140bfcc09ddSBjoern A. Zeeb */ 141bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info { 142bfcc09ddSBjoern A. Zeeb __le32 reserved; 143bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_CMD_API_S_VER_1 */ 144bfcc09ddSBjoern A. Zeeb 145bfcc09ddSBjoern A. Zeeb /** 146bfcc09ddSBjoern A. Zeeb * enum iwl_nvm_info_general_flags - flags in NVM_GET_INFO resp 147bfcc09ddSBjoern A. Zeeb * @NVM_GENERAL_FLAGS_EMPTY_OTP: 1 if OTP is empty 148bfcc09ddSBjoern A. Zeeb */ 149bfcc09ddSBjoern A. Zeeb enum iwl_nvm_info_general_flags { 150bfcc09ddSBjoern A. Zeeb NVM_GENERAL_FLAGS_EMPTY_OTP = BIT(0), 151bfcc09ddSBjoern A. Zeeb }; 152bfcc09ddSBjoern A. Zeeb 153bfcc09ddSBjoern A. Zeeb /** 154bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_get_info_general - general NVM data 155bfcc09ddSBjoern A. Zeeb * @flags: bit 0: 1 - empty, 0 - non-empty 156bfcc09ddSBjoern A. Zeeb * @nvm_version: nvm version 157bfcc09ddSBjoern A. Zeeb * @board_type: board type 158bfcc09ddSBjoern A. Zeeb * @n_hw_addrs: number of reserved MAC addresses 159bfcc09ddSBjoern A. Zeeb */ 160bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_general { 161bfcc09ddSBjoern A. Zeeb __le32 flags; 162bfcc09ddSBjoern A. Zeeb __le16 nvm_version; 163bfcc09ddSBjoern A. Zeeb u8 board_type; 164bfcc09ddSBjoern A. Zeeb u8 n_hw_addrs; 165bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_GENERAL_S_VER_2 */ 166bfcc09ddSBjoern A. Zeeb 167bfcc09ddSBjoern A. Zeeb /** 168bfcc09ddSBjoern A. Zeeb * enum iwl_nvm_mac_sku_flags - flags in &iwl_nvm_get_info_sku 169bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED: true if 2.4 band enabled 170bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED: true if 5.2 band enabled 171bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_802_11N_ENABLED: true if 11n enabled 172bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_802_11AC_ENABLED: true if 11ac enabled 173bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_MIMO_DISABLED: true if MIMO disabled 174bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_WAPI_ENABLED: true if WAPI enabled 175bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED: true if regulatory checker enabled 176bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED: true if API lock enabled 177bfcc09ddSBjoern A. Zeeb */ 178bfcc09ddSBjoern A. Zeeb enum iwl_nvm_mac_sku_flags { 179bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED = BIT(0), 180bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED = BIT(1), 181bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_802_11N_ENABLED = BIT(2), 182bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_802_11AC_ENABLED = BIT(3), 183bfcc09ddSBjoern A. Zeeb /** 184bfcc09ddSBjoern A. Zeeb * @NVM_MAC_SKU_FLAGS_802_11AX_ENABLED: true if 11ax enabled 185bfcc09ddSBjoern A. Zeeb */ 186bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_802_11AX_ENABLED = BIT(4), 187bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_MIMO_DISABLED = BIT(5), 188bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_WAPI_ENABLED = BIT(8), 189bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED = BIT(14), 190bfcc09ddSBjoern A. Zeeb NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED = BIT(15), 191bfcc09ddSBjoern A. Zeeb }; 192bfcc09ddSBjoern A. Zeeb 193bfcc09ddSBjoern A. Zeeb /** 194bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_get_info_sku - mac information 195bfcc09ddSBjoern A. Zeeb * @mac_sku_flags: flags for SKU, see &enum iwl_nvm_mac_sku_flags 196bfcc09ddSBjoern A. Zeeb */ 197bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_sku { 198bfcc09ddSBjoern A. Zeeb __le32 mac_sku_flags; 199bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_MAC_SKU_SECTION_S_VER_2 */ 200bfcc09ddSBjoern A. Zeeb 201bfcc09ddSBjoern A. Zeeb /** 202bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_get_info_phy - phy information 203bfcc09ddSBjoern A. Zeeb * @tx_chains: BIT 0 chain A, BIT 1 chain B 204bfcc09ddSBjoern A. Zeeb * @rx_chains: BIT 0 chain A, BIT 1 chain B 205bfcc09ddSBjoern A. Zeeb */ 206bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_phy { 207bfcc09ddSBjoern A. Zeeb __le32 tx_chains; 208bfcc09ddSBjoern A. Zeeb __le32 rx_chains; 209bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */ 210bfcc09ddSBjoern A. Zeeb 211bfcc09ddSBjoern A. Zeeb #define IWL_NUM_CHANNELS_V1 51 212bfcc09ddSBjoern A. Zeeb #define IWL_NUM_CHANNELS 110 213bfcc09ddSBjoern A. Zeeb 214bfcc09ddSBjoern A. Zeeb /** 215*a4128aadSBjoern A. Zeeb * struct iwl_nvm_get_info_regulatory_v1 - regulatory information 216bfcc09ddSBjoern A. Zeeb * @lar_enabled: is LAR enabled 217bfcc09ddSBjoern A. Zeeb * @channel_profile: regulatory data of this channel 218bfcc09ddSBjoern A. Zeeb * @reserved: reserved 219bfcc09ddSBjoern A. Zeeb */ 220bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_regulatory_v1 { 221bfcc09ddSBjoern A. Zeeb __le32 lar_enabled; 222bfcc09ddSBjoern A. Zeeb __le16 channel_profile[IWL_NUM_CHANNELS_V1]; 223bfcc09ddSBjoern A. Zeeb __le16 reserved; 224bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */ 225bfcc09ddSBjoern A. Zeeb 226bfcc09ddSBjoern A. Zeeb /** 227bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_get_info_regulatory - regulatory information 228bfcc09ddSBjoern A. Zeeb * @lar_enabled: is LAR enabled 229bfcc09ddSBjoern A. Zeeb * @n_channels: number of valid channels in the array 230bfcc09ddSBjoern A. Zeeb * @channel_profile: regulatory data of this channel 231bfcc09ddSBjoern A. Zeeb */ 232bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_regulatory { 233bfcc09ddSBjoern A. Zeeb __le32 lar_enabled; 234bfcc09ddSBjoern A. Zeeb __le32 n_channels; 235bfcc09ddSBjoern A. Zeeb __le32 channel_profile[IWL_NUM_CHANNELS]; 236bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_2 */ 237bfcc09ddSBjoern A. Zeeb 238bfcc09ddSBjoern A. Zeeb /** 239bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_get_info_rsp_v3 - response to get NVM data 240bfcc09ddSBjoern A. Zeeb * @general: general NVM data 241bfcc09ddSBjoern A. Zeeb * @mac_sku: data relating to MAC sku 242bfcc09ddSBjoern A. Zeeb * @phy_sku: data relating to PHY sku 243bfcc09ddSBjoern A. Zeeb * @regulatory: regulatory data 244bfcc09ddSBjoern A. Zeeb */ 245bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_rsp_v3 { 246bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_general general; 247bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_sku mac_sku; 248bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_phy phy_sku; 249bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_regulatory_v1 regulatory; 250bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */ 251bfcc09ddSBjoern A. Zeeb 252bfcc09ddSBjoern A. Zeeb /** 253bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_get_info_rsp - response to get NVM data 254bfcc09ddSBjoern A. Zeeb * @general: general NVM data 255bfcc09ddSBjoern A. Zeeb * @mac_sku: data relating to MAC sku 256bfcc09ddSBjoern A. Zeeb * @phy_sku: data relating to PHY sku 257bfcc09ddSBjoern A. Zeeb * @regulatory: regulatory data 258bfcc09ddSBjoern A. Zeeb */ 259bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_rsp { 260bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_general general; 261bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_sku mac_sku; 262bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_phy phy_sku; 263bfcc09ddSBjoern A. Zeeb struct iwl_nvm_get_info_regulatory regulatory; 264bfcc09ddSBjoern A. Zeeb } __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_4 */ 265bfcc09ddSBjoern A. Zeeb 266bfcc09ddSBjoern A. Zeeb /** 267bfcc09ddSBjoern A. Zeeb * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed 268bfcc09ddSBjoern A. Zeeb * @reserved: reserved 269bfcc09ddSBjoern A. Zeeb */ 270bfcc09ddSBjoern A. Zeeb struct iwl_nvm_access_complete_cmd { 271bfcc09ddSBjoern A. Zeeb __le32 reserved; 272bfcc09ddSBjoern A. Zeeb } __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */ 273bfcc09ddSBjoern A. Zeeb 274*a4128aadSBjoern A. Zeeb #define IWL_MCC_US 0x5553 275*a4128aadSBjoern A. Zeeb #define IWL_MCC_CANADA 0x4341 276*a4128aadSBjoern A. Zeeb 277bfcc09ddSBjoern A. Zeeb /** 278bfcc09ddSBjoern A. Zeeb * struct iwl_mcc_update_cmd - Request the device to update geographic 279bfcc09ddSBjoern A. Zeeb * regulatory profile according to the given MCC (Mobile Country Code). 280bfcc09ddSBjoern A. Zeeb * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain. 281bfcc09ddSBjoern A. Zeeb * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the 282bfcc09ddSBjoern A. Zeeb * MCC in the cmd response will be the relevant MCC in the NVM. 283bfcc09ddSBjoern A. Zeeb * @mcc: given mobile country code 284bfcc09ddSBjoern A. Zeeb * @source_id: the source from where we got the MCC, see iwl_mcc_source 285bfcc09ddSBjoern A. Zeeb * @reserved: reserved for alignment 286bfcc09ddSBjoern A. Zeeb * @key: integrity key for MCC API OEM testing 287bfcc09ddSBjoern A. Zeeb * @reserved2: reserved 288bfcc09ddSBjoern A. Zeeb */ 289bfcc09ddSBjoern A. Zeeb struct iwl_mcc_update_cmd { 290bfcc09ddSBjoern A. Zeeb __le16 mcc; 291bfcc09ddSBjoern A. Zeeb u8 source_id; 292bfcc09ddSBjoern A. Zeeb u8 reserved; 293bfcc09ddSBjoern A. Zeeb __le32 key; 294bfcc09ddSBjoern A. Zeeb u8 reserved2[20]; 295bfcc09ddSBjoern A. Zeeb } __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */ 296bfcc09ddSBjoern A. Zeeb 297bfcc09ddSBjoern A. Zeeb /** 298bfcc09ddSBjoern A. Zeeb * enum iwl_geo_information - geographic information. 299bfcc09ddSBjoern A. Zeeb * @GEO_NO_INFO: no special info for this geo profile. 300bfcc09ddSBjoern A. Zeeb * @GEO_WMM_ETSI_5GHZ_INFO: this geo profile limits the WMM params 301bfcc09ddSBjoern A. Zeeb * for the 5 GHz band. 302bfcc09ddSBjoern A. Zeeb */ 303bfcc09ddSBjoern A. Zeeb enum iwl_geo_information { 304bfcc09ddSBjoern A. Zeeb GEO_NO_INFO = 0, 305bfcc09ddSBjoern A. Zeeb GEO_WMM_ETSI_5GHZ_INFO = BIT(0), 306bfcc09ddSBjoern A. Zeeb }; 307bfcc09ddSBjoern A. Zeeb 308bfcc09ddSBjoern A. Zeeb /** 309bfcc09ddSBjoern A. Zeeb * struct iwl_mcc_update_resp_v3 - response to MCC_UPDATE_CMD. 310bfcc09ddSBjoern A. Zeeb * Contains the new channel control profile map, if changed, and the new MCC 311bfcc09ddSBjoern A. Zeeb * (mobile country code). 312bfcc09ddSBjoern A. Zeeb * The new MCC may be different than what was requested in MCC_UPDATE_CMD. 313bfcc09ddSBjoern A. Zeeb * @status: see &enum iwl_mcc_update_status 314bfcc09ddSBjoern A. Zeeb * @mcc: the new applied MCC 315bfcc09ddSBjoern A. Zeeb * @cap: capabilities for all channels which matches the MCC 316bfcc09ddSBjoern A. Zeeb * @source_id: the MCC source, see iwl_mcc_source 317bfcc09ddSBjoern A. Zeeb * @time: time elapsed from the MCC test start (in units of 30 seconds) 318bfcc09ddSBjoern A. Zeeb * @geo_info: geographic specific profile information 319bfcc09ddSBjoern A. Zeeb * see &enum iwl_geo_information. 320bfcc09ddSBjoern A. Zeeb * @n_channels: number of channels in @channels_data. 321bfcc09ddSBjoern A. Zeeb * @channels: channel control data map, DWORD for each channel. Only the first 322bfcc09ddSBjoern A. Zeeb * 16bits are used. 323bfcc09ddSBjoern A. Zeeb */ 324bfcc09ddSBjoern A. Zeeb struct iwl_mcc_update_resp_v3 { 325bfcc09ddSBjoern A. Zeeb __le32 status; 326bfcc09ddSBjoern A. Zeeb __le16 mcc; 327bfcc09ddSBjoern A. Zeeb u8 cap; 328bfcc09ddSBjoern A. Zeeb u8 source_id; 329bfcc09ddSBjoern A. Zeeb __le16 time; 330bfcc09ddSBjoern A. Zeeb __le16 geo_info; 331bfcc09ddSBjoern A. Zeeb __le32 n_channels; 332bfcc09ddSBjoern A. Zeeb __le32 channels[]; 333bfcc09ddSBjoern A. Zeeb } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */ 334bfcc09ddSBjoern A. Zeeb 335bfcc09ddSBjoern A. Zeeb /** 3369af1bba4SBjoern A. Zeeb * struct iwl_mcc_update_resp_v4 - response to MCC_UPDATE_CMD. 337bfcc09ddSBjoern A. Zeeb * Contains the new channel control profile map, if changed, and the new MCC 338bfcc09ddSBjoern A. Zeeb * (mobile country code). 339bfcc09ddSBjoern A. Zeeb * The new MCC may be different than what was requested in MCC_UPDATE_CMD. 340bfcc09ddSBjoern A. Zeeb * @status: see &enum iwl_mcc_update_status 341bfcc09ddSBjoern A. Zeeb * @mcc: the new applied MCC 342bfcc09ddSBjoern A. Zeeb * @cap: capabilities for all channels which matches the MCC 343bfcc09ddSBjoern A. Zeeb * @time: time elapsed from the MCC test start (in units of 30 seconds) 344bfcc09ddSBjoern A. Zeeb * @geo_info: geographic specific profile information 345bfcc09ddSBjoern A. Zeeb * see &enum iwl_geo_information. 346bfcc09ddSBjoern A. Zeeb * @source_id: the MCC source, see iwl_mcc_source 347bfcc09ddSBjoern A. Zeeb * @reserved: for four bytes alignment. 348bfcc09ddSBjoern A. Zeeb * @n_channels: number of channels in @channels_data. 349bfcc09ddSBjoern A. Zeeb * @channels: channel control data map, DWORD for each channel. Only the first 350bfcc09ddSBjoern A. Zeeb * 16bits are used. 351bfcc09ddSBjoern A. Zeeb */ 3529af1bba4SBjoern A. Zeeb struct iwl_mcc_update_resp_v4 { 353bfcc09ddSBjoern A. Zeeb __le32 status; 354bfcc09ddSBjoern A. Zeeb __le16 mcc; 355bfcc09ddSBjoern A. Zeeb __le16 cap; 356bfcc09ddSBjoern A. Zeeb __le16 time; 357bfcc09ddSBjoern A. Zeeb __le16 geo_info; 358bfcc09ddSBjoern A. Zeeb u8 source_id; 359bfcc09ddSBjoern A. Zeeb u8 reserved[3]; 360bfcc09ddSBjoern A. Zeeb __le32 n_channels; 361bfcc09ddSBjoern A. Zeeb __le32 channels[]; 362bfcc09ddSBjoern A. Zeeb } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */ 363bfcc09ddSBjoern A. Zeeb 364bfcc09ddSBjoern A. Zeeb /** 3659af1bba4SBjoern A. Zeeb * struct iwl_mcc_update_resp_v8 - response to MCC_UPDATE_CMD. 3669af1bba4SBjoern A. Zeeb * Contains the new channel control profile map, if changed, and the new MCC 3679af1bba4SBjoern A. Zeeb * (mobile country code). 3689af1bba4SBjoern A. Zeeb * The new MCC may be different than what was requested in MCC_UPDATE_CMD. 3699af1bba4SBjoern A. Zeeb * @status: see &enum iwl_mcc_update_status 3709af1bba4SBjoern A. Zeeb * @mcc: the new applied MCC 3719af1bba4SBjoern A. Zeeb * @padding: padding for 2 bytes. 3729af1bba4SBjoern A. Zeeb * @cap: capabilities for all channels which matches the MCC 3739af1bba4SBjoern A. Zeeb * @time: time elapsed from the MCC test start (in units of 30 seconds) 3749af1bba4SBjoern A. Zeeb * @geo_info: geographic specific profile information 3759af1bba4SBjoern A. Zeeb * see &enum iwl_geo_information. 3769af1bba4SBjoern A. Zeeb * @source_id: the MCC source, see iwl_mcc_source 3779af1bba4SBjoern A. Zeeb * @reserved: for four bytes alignment. 3789af1bba4SBjoern A. Zeeb * @n_channels: number of channels in @channels_data. 3799af1bba4SBjoern A. Zeeb * @channels: channel control data map, DWORD for each channel. Only the first 3809af1bba4SBjoern A. Zeeb * 16bits are used. 3819af1bba4SBjoern A. Zeeb */ 3829af1bba4SBjoern A. Zeeb struct iwl_mcc_update_resp_v8 { 3839af1bba4SBjoern A. Zeeb __le32 status; 3849af1bba4SBjoern A. Zeeb __le16 mcc; 3859af1bba4SBjoern A. Zeeb u8 padding[2]; 3869af1bba4SBjoern A. Zeeb __le32 cap; 3879af1bba4SBjoern A. Zeeb __le16 time; 3889af1bba4SBjoern A. Zeeb __le16 geo_info; 3899af1bba4SBjoern A. Zeeb u8 source_id; 3909af1bba4SBjoern A. Zeeb u8 reserved[3]; 3919af1bba4SBjoern A. Zeeb __le32 n_channels; 3929af1bba4SBjoern A. Zeeb __le32 channels[]; 3939af1bba4SBjoern A. Zeeb } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_8 */ 3949af1bba4SBjoern A. Zeeb 3959af1bba4SBjoern A. Zeeb /** 396bfcc09ddSBjoern A. Zeeb * struct iwl_mcc_chub_notif - chub notifies of mcc change 397bfcc09ddSBjoern A. Zeeb * (MCC_CHUB_UPDATE_CMD = 0xc9) 398bfcc09ddSBjoern A. Zeeb * The Chub (Communication Hub, CommsHUB) is a HW component that connects to 399bfcc09ddSBjoern A. Zeeb * the cellular and connectivity cores that gets updates of the mcc, and 400bfcc09ddSBjoern A. Zeeb * notifies the ucode directly of any mcc change. 401bfcc09ddSBjoern A. Zeeb * The ucode requests the driver to request the device to update geographic 402bfcc09ddSBjoern A. Zeeb * regulatory profile according to the given MCC (Mobile Country Code). 403bfcc09ddSBjoern A. Zeeb * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain. 404bfcc09ddSBjoern A. Zeeb * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the 405bfcc09ddSBjoern A. Zeeb * MCC in the cmd response will be the relevant MCC in the NVM. 406bfcc09ddSBjoern A. Zeeb * @mcc: given mobile country code 407bfcc09ddSBjoern A. Zeeb * @source_id: identity of the change originator, see iwl_mcc_source 408bfcc09ddSBjoern A. Zeeb * @reserved1: reserved for alignment 409bfcc09ddSBjoern A. Zeeb */ 410bfcc09ddSBjoern A. Zeeb struct iwl_mcc_chub_notif { 411bfcc09ddSBjoern A. Zeeb __le16 mcc; 412bfcc09ddSBjoern A. Zeeb u8 source_id; 413bfcc09ddSBjoern A. Zeeb u8 reserved1; 414bfcc09ddSBjoern A. Zeeb } __packed; /* LAR_MCC_NOTIFY_S */ 415bfcc09ddSBjoern A. Zeeb 416bfcc09ddSBjoern A. Zeeb enum iwl_mcc_update_status { 417bfcc09ddSBjoern A. Zeeb MCC_RESP_NEW_CHAN_PROFILE, 418bfcc09ddSBjoern A. Zeeb MCC_RESP_SAME_CHAN_PROFILE, 419bfcc09ddSBjoern A. Zeeb MCC_RESP_INVALID, 420bfcc09ddSBjoern A. Zeeb MCC_RESP_NVM_DISABLED, 421bfcc09ddSBjoern A. Zeeb MCC_RESP_ILLEGAL, 422bfcc09ddSBjoern A. Zeeb MCC_RESP_LOW_PRIORITY, 423bfcc09ddSBjoern A. Zeeb MCC_RESP_TEST_MODE_ACTIVE, 424bfcc09ddSBjoern A. Zeeb MCC_RESP_TEST_MODE_NOT_ACTIVE, 425bfcc09ddSBjoern A. Zeeb MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE, 426bfcc09ddSBjoern A. Zeeb }; 427bfcc09ddSBjoern A. Zeeb 428bfcc09ddSBjoern A. Zeeb enum iwl_mcc_source { 429bfcc09ddSBjoern A. Zeeb MCC_SOURCE_OLD_FW = 0, 430bfcc09ddSBjoern A. Zeeb MCC_SOURCE_ME = 1, 431bfcc09ddSBjoern A. Zeeb MCC_SOURCE_BIOS = 2, 432bfcc09ddSBjoern A. Zeeb MCC_SOURCE_3G_LTE_HOST = 3, 433bfcc09ddSBjoern A. Zeeb MCC_SOURCE_3G_LTE_DEVICE = 4, 434bfcc09ddSBjoern A. Zeeb MCC_SOURCE_WIFI = 5, 435bfcc09ddSBjoern A. Zeeb MCC_SOURCE_RESERVED = 6, 436bfcc09ddSBjoern A. Zeeb MCC_SOURCE_DEFAULT = 7, 437bfcc09ddSBjoern A. Zeeb MCC_SOURCE_UNINITIALIZED = 8, 438bfcc09ddSBjoern A. Zeeb MCC_SOURCE_MCC_API = 9, 439bfcc09ddSBjoern A. Zeeb MCC_SOURCE_GET_CURRENT = 0x10, 440bfcc09ddSBjoern A. Zeeb MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11, 441bfcc09ddSBjoern A. Zeeb }; 442bfcc09ddSBjoern A. Zeeb 443*a4128aadSBjoern A. Zeeb #define IWL_WTAS_BLACK_LIST_MAX 16 444bfcc09ddSBjoern A. Zeeb /** 445*a4128aadSBjoern A. Zeeb * struct iwl_tas_config_cmd_common - configures the TAS. 446*a4128aadSBjoern A. Zeeb * This is also the v2 structure. 447bfcc09ddSBjoern A. Zeeb * @block_list_size: size of relevant field in block_list_array 448d9836fb4SBjoern A. Zeeb * @block_list_array: list of countries where TAS must be disabled 449bfcc09ddSBjoern A. Zeeb */ 450*a4128aadSBjoern A. Zeeb struct iwl_tas_config_cmd_common { 451bfcc09ddSBjoern A. Zeeb __le32 block_list_size; 452*a4128aadSBjoern A. Zeeb __le32 block_list_array[IWL_WTAS_BLACK_LIST_MAX]; 453bfcc09ddSBjoern A. Zeeb } __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */ 454bfcc09ddSBjoern A. Zeeb 455bfcc09ddSBjoern A. Zeeb /** 456d9836fb4SBjoern A. Zeeb * struct iwl_tas_config_cmd_v3 - configures the TAS 457d9836fb4SBjoern A. Zeeb * @override_tas_iec: indicates whether to override default value of IEC regulatory 458d9836fb4SBjoern A. Zeeb * @enable_tas_iec: in case override_tas_iec is set - 459d9836fb4SBjoern A. Zeeb * indicates whether IEC regulatory is enabled or disabled 460d9836fb4SBjoern A. Zeeb */ 461d9836fb4SBjoern A. Zeeb struct iwl_tas_config_cmd_v3 { 462d9836fb4SBjoern A. Zeeb __le16 override_tas_iec; 463d9836fb4SBjoern A. Zeeb __le16 enable_tas_iec; 464d9836fb4SBjoern A. Zeeb } __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */ 465d9836fb4SBjoern A. Zeeb 466d9836fb4SBjoern A. Zeeb /** 467*a4128aadSBjoern A. Zeeb * struct iwl_tas_config_cmd_v4 - configures the TAS 468d9836fb4SBjoern A. Zeeb * @override_tas_iec: indicates whether to override default value of IEC regulatory 469d9836fb4SBjoern A. Zeeb * @enable_tas_iec: in case override_tas_iec is set - 470d9836fb4SBjoern A. Zeeb * indicates whether IEC regulatory is enabled or disabled 471d9836fb4SBjoern A. Zeeb * @usa_tas_uhb_allowed: if set, allow TAS UHB in the USA 472d9836fb4SBjoern A. Zeeb * @reserved: reserved 473d9836fb4SBjoern A. Zeeb */ 474d9836fb4SBjoern A. Zeeb struct iwl_tas_config_cmd_v4 { 475d9836fb4SBjoern A. Zeeb u8 override_tas_iec; 476d9836fb4SBjoern A. Zeeb u8 enable_tas_iec; 477d9836fb4SBjoern A. Zeeb u8 usa_tas_uhb_allowed; 478d9836fb4SBjoern A. Zeeb u8 reserved; 479d9836fb4SBjoern A. Zeeb } __packed; /* TAS_CONFIG_CMD_API_S_VER_4 */ 480d9836fb4SBjoern A. Zeeb 481*a4128aadSBjoern A. Zeeb struct iwl_tas_config_cmd { 482*a4128aadSBjoern A. Zeeb struct iwl_tas_config_cmd_common common; 483*a4128aadSBjoern A. Zeeb union { 484d9836fb4SBjoern A. Zeeb struct iwl_tas_config_cmd_v3 v3; 485d9836fb4SBjoern A. Zeeb struct iwl_tas_config_cmd_v4 v4; 486d9836fb4SBjoern A. Zeeb }; 487*a4128aadSBjoern A. Zeeb }; 488*a4128aadSBjoern A. Zeeb 489d9836fb4SBjoern A. Zeeb /** 490*a4128aadSBjoern A. Zeeb * enum iwl_lari_config_masks - bit masks for the various LARI config operations 491bfcc09ddSBjoern A. Zeeb * @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine 492bfcc09ddSBjoern A. Zeeb * @LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK: ETSI 5.8GHz SRD passive scan 493bfcc09ddSBjoern A. Zeeb * @LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK: ETSI 5.8GHz SRD disabled 494bfcc09ddSBjoern A. Zeeb * @LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK: enable 5.15/5.35GHz bands in 495bfcc09ddSBjoern A. Zeeb * Indonesia 496*a4128aadSBjoern A. Zeeb * @LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK: enable 2022 china regulatory 497bfcc09ddSBjoern A. Zeeb */ 498bfcc09ddSBjoern A. Zeeb enum iwl_lari_config_masks { 499bfcc09ddSBjoern A. Zeeb LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK = BIT(0), 500bfcc09ddSBjoern A. Zeeb LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK = BIT(1), 501bfcc09ddSBjoern A. Zeeb LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK = BIT(2), 502bfcc09ddSBjoern A. Zeeb LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK = BIT(3), 503*a4128aadSBjoern A. Zeeb LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK = BIT(7), 504bfcc09ddSBjoern A. Zeeb }; 505bfcc09ddSBjoern A. Zeeb 506bfcc09ddSBjoern A. Zeeb #define IWL_11AX_UKRAINE_MASK 3 507bfcc09ddSBjoern A. Zeeb #define IWL_11AX_UKRAINE_SHIFT 8 508bfcc09ddSBjoern A. Zeeb 509bfcc09ddSBjoern A. Zeeb /** 510bfcc09ddSBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v1 - change LARI configuration 511bfcc09ddSBjoern A. Zeeb * @config_bitmap: bit map of the config commands. each bit will trigger a 512bfcc09ddSBjoern A. Zeeb * different predefined FW config operation 513bfcc09ddSBjoern A. Zeeb */ 514bfcc09ddSBjoern A. Zeeb struct iwl_lari_config_change_cmd_v1 { 515bfcc09ddSBjoern A. Zeeb __le32 config_bitmap; 516bfcc09ddSBjoern A. Zeeb } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_1 */ 517bfcc09ddSBjoern A. Zeeb 518bfcc09ddSBjoern A. Zeeb /** 519bfcc09ddSBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v2 - change LARI configuration 520bfcc09ddSBjoern A. Zeeb * @config_bitmap: bit map of the config commands. each bit will trigger a 521bfcc09ddSBjoern A. Zeeb * different predefined FW config operation 522bfcc09ddSBjoern A. Zeeb * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets 523bfcc09ddSBjoern A. Zeeb */ 524bfcc09ddSBjoern A. Zeeb struct iwl_lari_config_change_cmd_v2 { 525bfcc09ddSBjoern A. Zeeb __le32 config_bitmap; 526bfcc09ddSBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 527bfcc09ddSBjoern A. Zeeb } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_2 */ 528bfcc09ddSBjoern A. Zeeb 529bfcc09ddSBjoern A. Zeeb /** 530bfcc09ddSBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v3 - change LARI configuration 531bfcc09ddSBjoern A. Zeeb * @config_bitmap: bit map of the config commands. each bit will trigger a 532bfcc09ddSBjoern A. Zeeb * different predefined FW config operation 533bfcc09ddSBjoern A. Zeeb * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets 534bfcc09ddSBjoern A. Zeeb * @oem_11ax_allow_bitmap: bitmap of 11ax allowed MCCs. 535bfcc09ddSBjoern A. Zeeb * For each supported country, a pair of regulatory override bit and 11ax mode exist 536bfcc09ddSBjoern A. Zeeb * in the bit field. 537bfcc09ddSBjoern A. Zeeb */ 538bfcc09ddSBjoern A. Zeeb struct iwl_lari_config_change_cmd_v3 { 539bfcc09ddSBjoern A. Zeeb __le32 config_bitmap; 540bfcc09ddSBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 541bfcc09ddSBjoern A. Zeeb __le32 oem_11ax_allow_bitmap; 542bfcc09ddSBjoern A. Zeeb } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_3 */ 543bfcc09ddSBjoern A. Zeeb 544bfcc09ddSBjoern A. Zeeb /** 545bfcc09ddSBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v4 - change LARI configuration 546bfcc09ddSBjoern A. Zeeb * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 547bfcc09ddSBjoern A. Zeeb * different predefined FW config operation. 548bfcc09ddSBjoern A. Zeeb * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 549bfcc09ddSBjoern A. Zeeb * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 550bfcc09ddSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 551bfcc09ddSBjoern A. Zeeb * indicate the value to use. 552bfcc09ddSBjoern A. Zeeb * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 553bfcc09ddSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 554bfcc09ddSBjoern A. Zeeb * indicate allow/disallow unii4 channels. 555bfcc09ddSBjoern A. Zeeb */ 556bfcc09ddSBjoern A. Zeeb struct iwl_lari_config_change_cmd_v4 { 557bfcc09ddSBjoern A. Zeeb __le32 config_bitmap; 558bfcc09ddSBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 559bfcc09ddSBjoern A. Zeeb __le32 oem_11ax_allow_bitmap; 560bfcc09ddSBjoern A. Zeeb __le32 oem_unii4_allow_bitmap; 561bfcc09ddSBjoern A. Zeeb } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_4 */ 562bfcc09ddSBjoern A. Zeeb 563bfcc09ddSBjoern A. Zeeb /** 564bfcc09ddSBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v5 - change LARI configuration 565bfcc09ddSBjoern A. Zeeb * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 566bfcc09ddSBjoern A. Zeeb * different predefined FW config operation. 567bfcc09ddSBjoern A. Zeeb * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 568bfcc09ddSBjoern A. Zeeb * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 569bfcc09ddSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 570bfcc09ddSBjoern A. Zeeb * indicate the value to use. 571bfcc09ddSBjoern A. Zeeb * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 572bfcc09ddSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 573bfcc09ddSBjoern A. Zeeb * indicate allow/disallow unii4 channels. 574bfcc09ddSBjoern A. Zeeb * @chan_state_active_bitmap: Bitmap for overriding channel state to active. 575bfcc09ddSBjoern A. Zeeb * Each bit represents a country or region to activate, according to the BIOS 576bfcc09ddSBjoern A. Zeeb * definitions. 577bfcc09ddSBjoern A. Zeeb */ 578bfcc09ddSBjoern A. Zeeb struct iwl_lari_config_change_cmd_v5 { 579bfcc09ddSBjoern A. Zeeb __le32 config_bitmap; 580bfcc09ddSBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 581bfcc09ddSBjoern A. Zeeb __le32 oem_11ax_allow_bitmap; 582bfcc09ddSBjoern A. Zeeb __le32 oem_unii4_allow_bitmap; 583bfcc09ddSBjoern A. Zeeb __le32 chan_state_active_bitmap; 584bfcc09ddSBjoern A. Zeeb } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_5 */ 585bfcc09ddSBjoern A. Zeeb 586bfcc09ddSBjoern A. Zeeb /** 587d9836fb4SBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v6 - change LARI configuration 588d9836fb4SBjoern A. Zeeb * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 589d9836fb4SBjoern A. Zeeb * different predefined FW config operation. 590d9836fb4SBjoern A. Zeeb * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 591d9836fb4SBjoern A. Zeeb * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 592d9836fb4SBjoern A. Zeeb * per country, one to indicate whether to override and the other to 593d9836fb4SBjoern A. Zeeb * indicate the value to use. 594d9836fb4SBjoern A. Zeeb * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 595d9836fb4SBjoern A. Zeeb * per country, one to indicate whether to override and the other to 596d9836fb4SBjoern A. Zeeb * indicate allow/disallow unii4 channels. 597d9836fb4SBjoern A. Zeeb * @chan_state_active_bitmap: Bitmap for overriding channel state to active. 598d9836fb4SBjoern A. Zeeb * Each bit represents a country or region to activate, according to the BIOS 599d9836fb4SBjoern A. Zeeb * definitions. 600d9836fb4SBjoern A. Zeeb * @force_disable_channels_bitmap: Bitmap of disabled bands/channels. 601d9836fb4SBjoern A. Zeeb * Each bit represents a set of channels in a specific band that should be disabled 602d9836fb4SBjoern A. Zeeb */ 603d9836fb4SBjoern A. Zeeb struct iwl_lari_config_change_cmd_v6 { 604d9836fb4SBjoern A. Zeeb __le32 config_bitmap; 605d9836fb4SBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 606d9836fb4SBjoern A. Zeeb __le32 oem_11ax_allow_bitmap; 607d9836fb4SBjoern A. Zeeb __le32 oem_unii4_allow_bitmap; 608d9836fb4SBjoern A. Zeeb __le32 chan_state_active_bitmap; 609d9836fb4SBjoern A. Zeeb __le32 force_disable_channels_bitmap; 610d9836fb4SBjoern A. Zeeb } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_6 */ 611d9836fb4SBjoern A. Zeeb 612d9836fb4SBjoern A. Zeeb /** 613*a4128aadSBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v7 - change LARI configuration 614*a4128aadSBjoern A. Zeeb * This structure is used also for lari cmd version 8 and 9. 615*a4128aadSBjoern A. Zeeb * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 616*a4128aadSBjoern A. Zeeb * different predefined FW config operation. 617*a4128aadSBjoern A. Zeeb * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 618*a4128aadSBjoern A. Zeeb * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 619*a4128aadSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 620*a4128aadSBjoern A. Zeeb * indicate the value to use. 621*a4128aadSBjoern A. Zeeb * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 622*a4128aadSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 623*a4128aadSBjoern A. Zeeb * indicate allow/disallow unii4 channels. 624*a4128aadSBjoern A. Zeeb * For LARI cmd version 4 to 8 - bits 0:3 are supported. 625*a4128aadSBjoern A. Zeeb * For LARI cmd version 9 - bits 0:5 are supported. 626*a4128aadSBjoern A. Zeeb * @chan_state_active_bitmap: Bitmap to enable different bands per country 627*a4128aadSBjoern A. Zeeb * or region. 628*a4128aadSBjoern A. Zeeb * Each bit represents a country or region, and a band to activate 629*a4128aadSBjoern A. Zeeb * according to the BIOS definitions. 630*a4128aadSBjoern A. Zeeb * For LARI cmd version 7 - bits 0:3 are supported. 631*a4128aadSBjoern A. Zeeb * For LARI cmd version 8 - bits 0:4 are supported. 632*a4128aadSBjoern A. Zeeb * @force_disable_channels_bitmap: Bitmap of disabled bands/channels. 633*a4128aadSBjoern A. Zeeb * Each bit represents a set of channels in a specific band that should be 634*a4128aadSBjoern A. Zeeb * disabled 635*a4128aadSBjoern A. Zeeb * @edt_bitmap: Bitmap of energy detection threshold table. 636*a4128aadSBjoern A. Zeeb * Disable/enable the EDT optimization method for different band. 637*a4128aadSBjoern A. Zeeb */ 638*a4128aadSBjoern A. Zeeb struct iwl_lari_config_change_cmd_v7 { 639*a4128aadSBjoern A. Zeeb __le32 config_bitmap; 640*a4128aadSBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 641*a4128aadSBjoern A. Zeeb __le32 oem_11ax_allow_bitmap; 642*a4128aadSBjoern A. Zeeb __le32 oem_unii4_allow_bitmap; 643*a4128aadSBjoern A. Zeeb __le32 chan_state_active_bitmap; 644*a4128aadSBjoern A. Zeeb __le32 force_disable_channels_bitmap; 645*a4128aadSBjoern A. Zeeb __le32 edt_bitmap; 646*a4128aadSBjoern A. Zeeb } __packed; 647*a4128aadSBjoern A. Zeeb /* LARI_CHANGE_CONF_CMD_S_VER_7 */ 648*a4128aadSBjoern A. Zeeb /* LARI_CHANGE_CONF_CMD_S_VER_8 */ 649*a4128aadSBjoern A. Zeeb /* LARI_CHANGE_CONF_CMD_S_VER_9 */ 650*a4128aadSBjoern A. Zeeb 651*a4128aadSBjoern A. Zeeb /** 652*a4128aadSBjoern A. Zeeb * struct iwl_lari_config_change_cmd_v10 - change LARI configuration 653*a4128aadSBjoern A. Zeeb * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 654*a4128aadSBjoern A. Zeeb * different predefined FW config operation. 655*a4128aadSBjoern A. Zeeb * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 656*a4128aadSBjoern A. Zeeb * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 657*a4128aadSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 658*a4128aadSBjoern A. Zeeb * indicate the value to use. 659*a4128aadSBjoern A. Zeeb * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 660*a4128aadSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 661*a4128aadSBjoern A. Zeeb * indicate allow/disallow unii4 channels. 662*a4128aadSBjoern A. Zeeb * For LARI cmd version 10 - bits 0:5 are supported. 663*a4128aadSBjoern A. Zeeb * @chan_state_active_bitmap: Bitmap to enable different bands per country 664*a4128aadSBjoern A. Zeeb * or region. 665*a4128aadSBjoern A. Zeeb * Each bit represents a country or region, and a band to activate 666*a4128aadSBjoern A. Zeeb * according to the BIOS definitions. 667*a4128aadSBjoern A. Zeeb * For LARI cmd version 10 - bits 0:4 are supported. 668*a4128aadSBjoern A. Zeeb * @force_disable_channels_bitmap: Bitmap of disabled bands/channels. 669*a4128aadSBjoern A. Zeeb * Each bit represents a set of channels in a specific band that should be 670*a4128aadSBjoern A. Zeeb * disabled 671*a4128aadSBjoern A. Zeeb * @edt_bitmap: Bitmap of energy detection threshold table. 672*a4128aadSBjoern A. Zeeb * Disable/enable the EDT optimization method for different band. 673*a4128aadSBjoern A. Zeeb * @oem_320mhz_allow_bitmap: 320Mhz bandwidth enablement bitmap per MCC. 674*a4128aadSBjoern A. Zeeb * bit0: enable 320Mhz in Japan. 675*a4128aadSBjoern A. Zeeb * bit1: enable 320Mhz in South Korea. 676*a4128aadSBjoern A. Zeeb * bit 2 - 31: reserved. 677*a4128aadSBjoern A. Zeeb */ 678*a4128aadSBjoern A. Zeeb struct iwl_lari_config_change_cmd_v10 { 679*a4128aadSBjoern A. Zeeb __le32 config_bitmap; 680*a4128aadSBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 681*a4128aadSBjoern A. Zeeb __le32 oem_11ax_allow_bitmap; 682*a4128aadSBjoern A. Zeeb __le32 oem_unii4_allow_bitmap; 683*a4128aadSBjoern A. Zeeb __le32 chan_state_active_bitmap; 684*a4128aadSBjoern A. Zeeb __le32 force_disable_channels_bitmap; 685*a4128aadSBjoern A. Zeeb __le32 edt_bitmap; 686*a4128aadSBjoern A. Zeeb __le32 oem_320mhz_allow_bitmap; 687*a4128aadSBjoern A. Zeeb } __packed; 688*a4128aadSBjoern A. Zeeb /* LARI_CHANGE_CONF_CMD_S_VER_10 */ 689*a4128aadSBjoern A. Zeeb 690*a4128aadSBjoern A. Zeeb /** 691*a4128aadSBjoern A. Zeeb * struct iwl_lari_config_change_cmd - change LARI configuration 692*a4128aadSBjoern A. Zeeb * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 693*a4128aadSBjoern A. Zeeb * different predefined FW config operation. 694*a4128aadSBjoern A. Zeeb * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 695*a4128aadSBjoern A. Zeeb * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 696*a4128aadSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 697*a4128aadSBjoern A. Zeeb * indicate the value to use. 698*a4128aadSBjoern A. Zeeb * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 699*a4128aadSBjoern A. Zeeb * per country, one to indicate whether to override and the other to 700*a4128aadSBjoern A. Zeeb * indicate allow/disallow unii4 channels. 701*a4128aadSBjoern A. Zeeb * For LARI cmd version 11 - bits 0:5 are supported. 702*a4128aadSBjoern A. Zeeb * @chan_state_active_bitmap: Bitmap to enable different bands per country 703*a4128aadSBjoern A. Zeeb * or region. 704*a4128aadSBjoern A. Zeeb * Each bit represents a country or region, and a band to activate 705*a4128aadSBjoern A. Zeeb * according to the BIOS definitions. 706*a4128aadSBjoern A. Zeeb * For LARI cmd version 11 - bits 0:4 are supported. 707*a4128aadSBjoern A. Zeeb * For LARI cmd version 12 - bits 0:6 are supported and bits 7:31 are 708*a4128aadSBjoern A. Zeeb * reserved. No need to mask out the reserved bits. 709*a4128aadSBjoern A. Zeeb * @force_disable_channels_bitmap: Bitmap of disabled bands/channels. 710*a4128aadSBjoern A. Zeeb * Each bit represents a set of channels in a specific band that should be 711*a4128aadSBjoern A. Zeeb * disabled 712*a4128aadSBjoern A. Zeeb * @edt_bitmap: Bitmap of energy detection threshold table. 713*a4128aadSBjoern A. Zeeb * Disable/enable the EDT optimization method for different band. 714*a4128aadSBjoern A. Zeeb * @oem_320mhz_allow_bitmap: 320Mhz bandwidth enablement bitmap per MCC. 715*a4128aadSBjoern A. Zeeb * bit0: enable 320Mhz in Japan. 716*a4128aadSBjoern A. Zeeb * bit1: enable 320Mhz in South Korea. 717*a4128aadSBjoern A. Zeeb * bit 2 - 31: reserved. 718*a4128aadSBjoern A. Zeeb * @oem_11be_allow_bitmap: Bitmap of 11be allowed MCCs. No need to mask out the 719*a4128aadSBjoern A. Zeeb * unsupported bits 720*a4128aadSBjoern A. Zeeb * bit0: enable 11be in China(CB/CN). 721*a4128aadSBjoern A. Zeeb * bit1: enable 11be in South Korea. 722*a4128aadSBjoern A. Zeeb * bit 2 - 31: reserved. 723*a4128aadSBjoern A. Zeeb */ 724*a4128aadSBjoern A. Zeeb struct iwl_lari_config_change_cmd { 725*a4128aadSBjoern A. Zeeb __le32 config_bitmap; 726*a4128aadSBjoern A. Zeeb __le32 oem_uhb_allow_bitmap; 727*a4128aadSBjoern A. Zeeb __le32 oem_11ax_allow_bitmap; 728*a4128aadSBjoern A. Zeeb __le32 oem_unii4_allow_bitmap; 729*a4128aadSBjoern A. Zeeb __le32 chan_state_active_bitmap; 730*a4128aadSBjoern A. Zeeb __le32 force_disable_channels_bitmap; 731*a4128aadSBjoern A. Zeeb __le32 edt_bitmap; 732*a4128aadSBjoern A. Zeeb __le32 oem_320mhz_allow_bitmap; 733*a4128aadSBjoern A. Zeeb __le32 oem_11be_allow_bitmap; 734*a4128aadSBjoern A. Zeeb } __packed; 735*a4128aadSBjoern A. Zeeb /* LARI_CHANGE_CONF_CMD_S_VER_11 */ 736*a4128aadSBjoern A. Zeeb /* LARI_CHANGE_CONF_CMD_S_VER_12 */ 737*a4128aadSBjoern A. Zeeb 738*a4128aadSBjoern A. Zeeb /* Activate UNII-1 (5.2GHz) for World Wide */ 739*a4128aadSBjoern A. Zeeb #define ACTIVATE_5G2_IN_WW_MASK BIT(4) 740*a4128aadSBjoern A. Zeeb #define CHAN_STATE_ACTIVE_BITMAP_CMD_V11 0x1F 741*a4128aadSBjoern A. Zeeb 742*a4128aadSBjoern A. Zeeb /** 743bfcc09ddSBjoern A. Zeeb * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete 744bfcc09ddSBjoern A. Zeeb * @status: PNVM image loading status 745bfcc09ddSBjoern A. Zeeb */ 746bfcc09ddSBjoern A. Zeeb struct iwl_pnvm_init_complete_ntfy { 747bfcc09ddSBjoern A. Zeeb __le32 status; 748bfcc09ddSBjoern A. Zeeb } __packed; /* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */ 749bfcc09ddSBjoern A. Zeeb 750*a4128aadSBjoern A. Zeeb #define UATS_TABLE_ROW_SIZE 26 751*a4128aadSBjoern A. Zeeb #define UATS_TABLE_COL_SIZE 13 752*a4128aadSBjoern A. Zeeb 753*a4128aadSBjoern A. Zeeb /** 754*a4128aadSBjoern A. Zeeb * struct iwl_mcc_allowed_ap_type_cmd - struct for MCC_ALLOWED_AP_TYPE_CMD 755*a4128aadSBjoern A. Zeeb * @offset_map: mapping a mcc to UHB AP type support (UATS) allowed 756*a4128aadSBjoern A. Zeeb * @reserved: reserved 757*a4128aadSBjoern A. Zeeb */ 758*a4128aadSBjoern A. Zeeb struct iwl_mcc_allowed_ap_type_cmd { 759*a4128aadSBjoern A. Zeeb u8 offset_map[UATS_TABLE_ROW_SIZE][UATS_TABLE_COL_SIZE]; 760*a4128aadSBjoern A. Zeeb __le16 reserved; 761*a4128aadSBjoern A. Zeeb } __packed; /* MCC_ALLOWED_AP_TYPE_CMD_API_S_VER_1 */ 762*a4128aadSBjoern A. Zeeb 763bfcc09ddSBjoern A. Zeeb #endif /* __iwl_fw_api_nvm_reg_h__ */ 764