![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 0002 /* 0003 * Copyright (C) 2012-2014, 2019-2021 Intel Corporation 0004 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 0005 * Copyright (C) 2016-2017 Intel Deutschland GmbH 0006 */ 0007 #ifndef __iwl_fw_api_phy_h__ 0008 #define __iwl_fw_api_phy_h__ 0009 0010 /** 0011 * enum iwl_phy_ops_subcmd_ids - PHY group commands 0012 */ 0013 enum iwl_phy_ops_subcmd_ids { 0014 /** 0015 * @CMD_DTS_MEASUREMENT_TRIGGER_WIDE: 0016 * Uses either &struct iwl_dts_measurement_cmd or 0017 * &struct iwl_ext_dts_measurement_cmd 0018 */ 0019 CMD_DTS_MEASUREMENT_TRIGGER_WIDE = 0x0, 0020 0021 /** 0022 * @CTDP_CONFIG_CMD: &struct iwl_mvm_ctdp_cmd 0023 */ 0024 CTDP_CONFIG_CMD = 0x03, 0025 0026 /** 0027 * @TEMP_REPORTING_THRESHOLDS_CMD: &struct temp_report_ths_cmd 0028 */ 0029 TEMP_REPORTING_THRESHOLDS_CMD = 0x04, 0030 0031 /** 0032 * @PER_CHAIN_LIMIT_OFFSET_CMD: &struct iwl_geo_tx_power_profiles_cmd 0033 */ 0034 PER_CHAIN_LIMIT_OFFSET_CMD = 0x05, 0035 0036 /** 0037 * @PER_PLATFORM_ANT_GAIN_CMD: &struct iwl_ppag_table_cmd 0038 */ 0039 PER_PLATFORM_ANT_GAIN_CMD = 0x07, 0040 0041 /** 0042 * @CT_KILL_NOTIFICATION: &struct ct_kill_notif 0043 */ 0044 CT_KILL_NOTIFICATION = 0xFE, 0045 0046 /** 0047 * @DTS_MEASUREMENT_NOTIF_WIDE: 0048 * &struct iwl_dts_measurement_notif_v1 or 0049 * &struct iwl_dts_measurement_notif_v2 0050 */ 0051 DTS_MEASUREMENT_NOTIF_WIDE = 0xFF, 0052 }; 0053 0054 /* DTS measurements */ 0055 0056 enum iwl_dts_measurement_flags { 0057 DTS_TRIGGER_CMD_FLAGS_TEMP = BIT(0), 0058 DTS_TRIGGER_CMD_FLAGS_VOLT = BIT(1), 0059 }; 0060 0061 /** 0062 * struct iwl_dts_measurement_cmd - request DTS temp and/or voltage measurements 0063 * 0064 * @flags: indicates which measurements we want as specified in 0065 * &enum iwl_dts_measurement_flags 0066 */ 0067 struct iwl_dts_measurement_cmd { 0068 __le32 flags; 0069 } __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_CMD_S */ 0070 0071 /** 0072 * enum iwl_dts_control_measurement_mode - DTS measurement type 0073 * @DTS_AUTOMATIC: Automatic mode (full SW control). Provide temperature read 0074 * back (latest value. Not waiting for new value). Use automatic 0075 * SW DTS configuration. 0076 * @DTS_REQUEST_READ: Request DTS read. Configure DTS with manual settings, 0077 * trigger DTS reading and provide read back temperature read 0078 * when available. 0079 * @DTS_OVER_WRITE: over-write the DTS temperatures in the SW until next read 0080 * @DTS_DIRECT_WITHOUT_MEASURE: DTS returns its latest temperature result, 0081 * without measurement trigger. 0082 */ 0083 enum iwl_dts_control_measurement_mode { 0084 DTS_AUTOMATIC = 0, 0085 DTS_REQUEST_READ = 1, 0086 DTS_OVER_WRITE = 2, 0087 DTS_DIRECT_WITHOUT_MEASURE = 3, 0088 }; 0089 0090 /** 0091 * enum iwl_dts_used - DTS to use or used for measurement in the DTS request 0092 * @DTS_USE_TOP: Top 0093 * @DTS_USE_CHAIN_A: chain A 0094 * @DTS_USE_CHAIN_B: chain B 0095 * @DTS_USE_CHAIN_C: chain C 0096 * @XTAL_TEMPERATURE: read temperature from xtal 0097 */ 0098 enum iwl_dts_used { 0099 DTS_USE_TOP = 0, 0100 DTS_USE_CHAIN_A = 1, 0101 DTS_USE_CHAIN_B = 2, 0102 DTS_USE_CHAIN_C = 3, 0103 XTAL_TEMPERATURE = 4, 0104 }; 0105 0106 /** 0107 * enum iwl_dts_bit_mode - bit-mode to use in DTS request read mode 0108 * @DTS_BIT6_MODE: bit 6 mode 0109 * @DTS_BIT8_MODE: bit 8 mode 0110 */ 0111 enum iwl_dts_bit_mode { 0112 DTS_BIT6_MODE = 0, 0113 DTS_BIT8_MODE = 1, 0114 }; 0115 0116 /** 0117 * struct iwl_ext_dts_measurement_cmd - request extended DTS temp measurements 0118 * @control_mode: see &enum iwl_dts_control_measurement_mode 0119 * @temperature: used when over write DTS mode is selected 0120 * @sensor: set temperature sensor to use. See &enum iwl_dts_used 0121 * @avg_factor: average factor to DTS in request DTS read mode 0122 * @bit_mode: value defines the DTS bit mode to use. See &enum iwl_dts_bit_mode 0123 * @step_duration: step duration for the DTS 0124 */ 0125 struct iwl_ext_dts_measurement_cmd { 0126 __le32 control_mode; 0127 __le32 temperature; 0128 __le32 sensor; 0129 __le32 avg_factor; 0130 __le32 bit_mode; 0131 __le32 step_duration; 0132 } __packed; /* XVT_FW_DTS_CONTROL_MEASUREMENT_REQUEST_API_S */ 0133 0134 /** 0135 * struct iwl_dts_measurement_notif_v1 - measurements notification 0136 * 0137 * @temp: the measured temperature 0138 * @voltage: the measured voltage 0139 */ 0140 struct iwl_dts_measurement_notif_v1 { 0141 __le32 temp; 0142 __le32 voltage; 0143 } __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_1*/ 0144 0145 /** 0146 * struct iwl_dts_measurement_notif_v2 - measurements notification 0147 * 0148 * @temp: the measured temperature 0149 * @voltage: the measured voltage 0150 * @threshold_idx: the trip index that was crossed 0151 */ 0152 struct iwl_dts_measurement_notif_v2 { 0153 __le32 temp; 0154 __le32 voltage; 0155 __le32 threshold_idx; 0156 } __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_2 */ 0157 0158 /** 0159 * struct iwl_dts_measurement_resp - measurements response 0160 * 0161 * @temp: the measured temperature 0162 */ 0163 struct iwl_dts_measurement_resp { 0164 __le32 temp; 0165 } __packed; /* CMD_DTS_MEASUREMENT_RSP_API_S_VER_1 */ 0166 0167 /** 0168 * struct ct_kill_notif - CT-kill entry notification 0169 * This structure represent both versions of this notification. 0170 * 0171 * @temperature: the current temperature in celsius 0172 * @dts: only in v2: DTS that trigger the CT Kill bitmap: 0173 * bit 0: ToP master 0174 * bit 1: PA chain A master 0175 * bit 2: PA chain B master 0176 * bit 3: ToP slave 0177 * bit 4: PA chain A slave 0178 * bit 5: PA chain B slave) 0179 * bits 6,7: reserved (set to 0) 0180 * @scheme: only for v2: scheme that trigger the CT Kill (0-SW, 1-HW) 0181 */ 0182 struct ct_kill_notif { 0183 __le16 temperature; 0184 u8 dts; 0185 u8 scheme; 0186 } __packed; /* CT_KILL_NOTIFICATION_API_S_VER_1, CT_KILL_NOTIFICATION_API_S_VER_2 */ 0187 0188 /** 0189 * enum ctdp_cmd_operation - CTDP command operations 0190 * @CTDP_CMD_OPERATION_START: update the current budget 0191 * @CTDP_CMD_OPERATION_STOP: stop ctdp 0192 * @CTDP_CMD_OPERATION_REPORT: get the average budget 0193 */ 0194 enum iwl_mvm_ctdp_cmd_operation { 0195 CTDP_CMD_OPERATION_START = 0x1, 0196 CTDP_CMD_OPERATION_STOP = 0x2, 0197 CTDP_CMD_OPERATION_REPORT = 0x4, 0198 };/* CTDP_CMD_OPERATION_TYPE_E */ 0199 0200 /** 0201 * struct iwl_mvm_ctdp_cmd - track and manage the FW power consumption budget 0202 * 0203 * @operation: see &enum iwl_mvm_ctdp_cmd_operation 0204 * @budget: the budget in milliwatt 0205 * @window_size: defined in API but not used 0206 */ 0207 struct iwl_mvm_ctdp_cmd { 0208 __le32 operation; 0209 __le32 budget; 0210 __le32 window_size; 0211 } __packed; 0212 0213 #define IWL_MAX_DTS_TRIPS 8 0214 0215 /** 0216 * struct temp_report_ths_cmd - set temperature thresholds 0217 * 0218 * @num_temps: number of temperature thresholds passed 0219 * @thresholds: array with the thresholds to be configured 0220 */ 0221 struct temp_report_ths_cmd { 0222 __le32 num_temps; 0223 __le16 thresholds[IWL_MAX_DTS_TRIPS]; 0224 } __packed; /* GRP_PHY_TEMP_REPORTING_THRESHOLDS_CMD */ 0225 0226 #endif /* __iwl_fw_api_phy_h__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |