xref: /openbmc/linux/drivers/net/wireless/intel/iwlwifi/fw/api/config.h (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
18e99ea8dSJohannes Berg /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
28e99ea8dSJohannes Berg /*
3*c4c95454SJohannes Berg  * Copyright (C) 2012-2014, 2018-2019, 2023 Intel Corporation
48e99ea8dSJohannes Berg  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
58e99ea8dSJohannes Berg  * Copyright (C) 2016-2017 Intel Deutschland GmbH
68e99ea8dSJohannes Berg  */
7d172a5efSJohannes Berg #ifndef __iwl_fw_api_config_h__
8d172a5efSJohannes Berg #define __iwl_fw_api_config_h__
9d172a5efSJohannes Berg 
10d172a5efSJohannes Berg /*
11d172a5efSJohannes Berg  * struct iwl_dqa_enable_cmd
12d172a5efSJohannes Berg  * @cmd_queue: the TXQ number of the command queue
13d172a5efSJohannes Berg  */
14d172a5efSJohannes Berg struct iwl_dqa_enable_cmd {
15d172a5efSJohannes Berg 	__le32 cmd_queue;
16d172a5efSJohannes Berg } __packed; /* DQA_CONTROL_CMD_API_S_VER_1 */
17d172a5efSJohannes Berg 
18d172a5efSJohannes Berg /*
19d172a5efSJohannes Berg  * struct iwl_tx_ant_cfg_cmd
20d172a5efSJohannes Berg  * @valid: valid antenna configuration
21d172a5efSJohannes Berg  */
22d172a5efSJohannes Berg struct iwl_tx_ant_cfg_cmd {
23d172a5efSJohannes Berg 	__le32 valid;
24d172a5efSJohannes Berg } __packed;
25d172a5efSJohannes Berg 
26d172a5efSJohannes Berg /**
27d172a5efSJohannes Berg  * struct iwl_calib_ctrl - Calibration control struct.
28d172a5efSJohannes Berg  * Sent as part of the phy configuration command.
29d172a5efSJohannes Berg  * @flow_trigger: bitmap for which calibrations to perform according to
30d172a5efSJohannes Berg  *		flow triggers, using &enum iwl_calib_cfg
31d172a5efSJohannes Berg  * @event_trigger: bitmap for which calibrations to perform according to
32d172a5efSJohannes Berg  *		event triggers, using &enum iwl_calib_cfg
33d172a5efSJohannes Berg  */
34d172a5efSJohannes Berg struct iwl_calib_ctrl {
35d172a5efSJohannes Berg 	__le32 flow_trigger;
36d172a5efSJohannes Berg 	__le32 event_trigger;
37d172a5efSJohannes Berg } __packed;
38d172a5efSJohannes Berg 
39d172a5efSJohannes Berg /* This enum defines the bitmap of various calibrations to enable in both
40d172a5efSJohannes Berg  * init ucode and runtime ucode through CALIBRATION_CFG_CMD.
41d172a5efSJohannes Berg  */
42d172a5efSJohannes Berg enum iwl_calib_cfg {
43d172a5efSJohannes Berg 	IWL_CALIB_CFG_XTAL_IDX			= BIT(0),
44d172a5efSJohannes Berg 	IWL_CALIB_CFG_TEMPERATURE_IDX		= BIT(1),
45d172a5efSJohannes Berg 	IWL_CALIB_CFG_VOLTAGE_READ_IDX		= BIT(2),
46d172a5efSJohannes Berg 	IWL_CALIB_CFG_PAPD_IDX			= BIT(3),
47d172a5efSJohannes Berg 	IWL_CALIB_CFG_TX_PWR_IDX		= BIT(4),
48d172a5efSJohannes Berg 	IWL_CALIB_CFG_DC_IDX			= BIT(5),
49d172a5efSJohannes Berg 	IWL_CALIB_CFG_BB_FILTER_IDX		= BIT(6),
50d172a5efSJohannes Berg 	IWL_CALIB_CFG_LO_LEAKAGE_IDX		= BIT(7),
51d172a5efSJohannes Berg 	IWL_CALIB_CFG_TX_IQ_IDX			= BIT(8),
52d172a5efSJohannes Berg 	IWL_CALIB_CFG_TX_IQ_SKEW_IDX		= BIT(9),
53d172a5efSJohannes Berg 	IWL_CALIB_CFG_RX_IQ_IDX			= BIT(10),
54d172a5efSJohannes Berg 	IWL_CALIB_CFG_RX_IQ_SKEW_IDX		= BIT(11),
55d172a5efSJohannes Berg 	IWL_CALIB_CFG_SENSITIVITY_IDX		= BIT(12),
56d172a5efSJohannes Berg 	IWL_CALIB_CFG_CHAIN_NOISE_IDX		= BIT(13),
57d172a5efSJohannes Berg 	IWL_CALIB_CFG_DISCONNECTED_ANT_IDX	= BIT(14),
58d172a5efSJohannes Berg 	IWL_CALIB_CFG_ANT_COUPLING_IDX		= BIT(15),
59d172a5efSJohannes Berg 	IWL_CALIB_CFG_DAC_IDX			= BIT(16),
60d172a5efSJohannes Berg 	IWL_CALIB_CFG_ABS_IDX			= BIT(17),
61d172a5efSJohannes Berg 	IWL_CALIB_CFG_AGC_IDX			= BIT(18),
62d172a5efSJohannes Berg };
63d172a5efSJohannes Berg 
64d172a5efSJohannes Berg /**
65c4ace426SGil Adam  * struct iwl_phy_specific_cfg - specific PHY filter configuration
66c4ace426SGil Adam  *
67c4ace426SGil Adam  * Sent as part of the phy configuration command (v3) to configure specific FW
68c4ace426SGil Adam  * defined PHY filters that can be applied to each antenna.
69c4ace426SGil Adam  *
70*c4c95454SJohannes Berg  * @filter_cfg_chains: filter config id for LMAC1 chain A, LMAC1 chain B,
71*c4c95454SJohannes Berg  *	LMAC2 chain A, LMAC2 chain B (in that order)
72*c4c95454SJohannes Berg  *	values: 0: no filter; 0xffffffff: reserved; otherwise: filter id
73c4ace426SGil Adam  */
74c4ace426SGil Adam struct iwl_phy_specific_cfg {
75*c4c95454SJohannes Berg 	__le32 filter_cfg_chains[4];
76c4ace426SGil Adam } __packed; /* PHY_SPECIFIC_CONFIGURATION_API_VER_1*/
77c4ace426SGil Adam 
78c4ace426SGil Adam /**
79d172a5efSJohannes Berg  * struct iwl_phy_cfg_cmd - Phy configuration command
80c4ace426SGil Adam  *
81d172a5efSJohannes Berg  * @phy_cfg: PHY configuration value, uses &enum iwl_fw_phy_cfg
82d172a5efSJohannes Berg  * @calib_control: calibration control data
83d172a5efSJohannes Berg  */
84c4ace426SGil Adam struct iwl_phy_cfg_cmd_v1 {
85d172a5efSJohannes Berg 	__le32	phy_cfg;
86d172a5efSJohannes Berg 	struct iwl_calib_ctrl calib_control;
87d172a5efSJohannes Berg } __packed;
88d172a5efSJohannes Berg 
89c4ace426SGil Adam /**
90c4ace426SGil Adam  * struct iwl_phy_cfg_cmd_v3 - Phy configuration command (v3)
91c4ace426SGil Adam  *
92c4ace426SGil Adam  * @phy_cfg: PHY configuration value, uses &enum iwl_fw_phy_cfg
93c4ace426SGil Adam  * @calib_control: calibration control data
94c4ace426SGil Adam  * @phy_specific_cfg: configure predefined PHY filters
95c4ace426SGil Adam  */
96c4ace426SGil Adam struct iwl_phy_cfg_cmd_v3 {
97c4ace426SGil Adam 	__le32	phy_cfg;
98c4ace426SGil Adam 	struct iwl_calib_ctrl calib_control;
99c4ace426SGil Adam 	struct iwl_phy_specific_cfg phy_specific_cfg;
100c4ace426SGil Adam } __packed; /* PHY_CONFIGURATION_CMD_API_S_VER_3 */
101c4ace426SGil Adam 
102d172a5efSJohannes Berg /*
103d172a5efSJohannes Berg  * enum iwl_dc2dc_config_id - flag ids
104d172a5efSJohannes Berg  *
105d172a5efSJohannes Berg  * Ids of dc2dc configuration flags
106d172a5efSJohannes Berg  */
107d172a5efSJohannes Berg enum iwl_dc2dc_config_id {
108d172a5efSJohannes Berg 	DCDC_LOW_POWER_MODE_MSK_SET  = 0x1, /* not used */
109d172a5efSJohannes Berg 	DCDC_FREQ_TUNE_SET = 0x2,
110d172a5efSJohannes Berg }; /* MARKER_ID_API_E_VER_1 */
111d172a5efSJohannes Berg 
112d172a5efSJohannes Berg #endif /* __iwl_fw_api_config_h__ */
113