1*2b27bdccSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 246a1d512SLuciano Coelho /* 346a1d512SLuciano Coelho * This file is part of wl18xx 446a1d512SLuciano Coelho * 546a1d512SLuciano Coelho * Copyright (C) 2011 Texas Instruments Inc. 646a1d512SLuciano Coelho */ 746a1d512SLuciano Coelho 846a1d512SLuciano Coelho #ifndef __WL18XX_CONF_H__ 946a1d512SLuciano Coelho #define __WL18XX_CONF_H__ 1046a1d512SLuciano Coelho 1118b70ac9SLuciano Coelho #define WL18XX_CONF_MAGIC 0x10e100ca 12e2f1e50fSKobi L #define WL18XX_CONF_VERSION (WLCORE_CONF_VERSION | 0x0007) 1318b70ac9SLuciano Coelho #define WL18XX_CONF_MASK 0x0000ffff 1418b70ac9SLuciano Coelho #define WL18XX_CONF_SIZE (WLCORE_CONF_SIZE + \ 1518b70ac9SLuciano Coelho sizeof(struct wl18xx_priv_conf)) 1618b70ac9SLuciano Coelho 17d61c6b55SArik Nemtsov #define NUM_OF_CHANNELS_11_ABG 150 18d61c6b55SArik Nemtsov #define NUM_OF_CHANNELS_11_P 7 19d61c6b55SArik Nemtsov #define SRF_TABLE_LEN 16 20d61c6b55SArik Nemtsov #define PIN_MUXING_SIZE 2 21ec4f4b76SIdo Reis #define WL18XX_TRACE_LOSS_GAPS_TX 10 22ec4f4b76SIdo Reis #define WL18XX_TRACE_LOSS_GAPS_RX 18 23d61c6b55SArik Nemtsov 24d61c6b55SArik Nemtsov struct wl18xx_mac_and_phy_params { 2546a1d512SLuciano Coelho u8 phy_standalone; 26ec4f4b76SIdo Reis u8 spare0; 2746a1d512SLuciano Coelho u8 enable_clpc; 2846a1d512SLuciano Coelho u8 enable_tx_low_pwr_on_siso_rdl; 2946a1d512SLuciano Coelho u8 auto_detect; 3046a1d512SLuciano Coelho u8 dedicated_fem; 31d61c6b55SArik Nemtsov 3246a1d512SLuciano Coelho u8 low_band_component; 33d61c6b55SArik Nemtsov 34d61c6b55SArik Nemtsov /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */ 3546a1d512SLuciano Coelho u8 low_band_component_type; 36d61c6b55SArik Nemtsov 3746a1d512SLuciano Coelho u8 high_band_component; 38d61c6b55SArik Nemtsov 39d61c6b55SArik Nemtsov /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */ 4046a1d512SLuciano Coelho u8 high_band_component_type; 41d61c6b55SArik Nemtsov u8 number_of_assembled_ant2_4; 42d61c6b55SArik Nemtsov u8 number_of_assembled_ant5; 43d61c6b55SArik Nemtsov u8 pin_muxing_platform_options[PIN_MUXING_SIZE]; 44d61c6b55SArik Nemtsov u8 external_pa_dc2dc; 4546a1d512SLuciano Coelho u8 tcxo_ldo_voltage; 4646a1d512SLuciano Coelho u8 xtal_itrim_val; 4746a1d512SLuciano Coelho u8 srf_state; 48d61c6b55SArik Nemtsov u8 srf1[SRF_TABLE_LEN]; 49d61c6b55SArik Nemtsov u8 srf2[SRF_TABLE_LEN]; 50d61c6b55SArik Nemtsov u8 srf3[SRF_TABLE_LEN]; 5146a1d512SLuciano Coelho u8 io_configuration; 5246a1d512SLuciano Coelho u8 sdio_configuration; 5346a1d512SLuciano Coelho u8 settings; 5446a1d512SLuciano Coelho u8 rx_profile; 55d61c6b55SArik Nemtsov u8 per_chan_pwr_limit_arr_11abg[NUM_OF_CHANNELS_11_ABG]; 56d61c6b55SArik Nemtsov u8 pwr_limit_reference_11_abg; 57d61c6b55SArik Nemtsov u8 per_chan_pwr_limit_arr_11p[NUM_OF_CHANNELS_11_P]; 58d61c6b55SArik Nemtsov u8 pwr_limit_reference_11p; 591d614665SVictor Goldenshtein u8 spare1; 601d614665SVictor Goldenshtein u8 per_chan_bo_mode_11_abg[13]; 611d614665SVictor Goldenshtein u8 per_chan_bo_mode_11_p[4]; 6246a1d512SLuciano Coelho u8 primary_clock_setting_time; 6346a1d512SLuciano Coelho u8 clock_valid_on_wake_up; 6446a1d512SLuciano Coelho u8 secondary_clock_setting_time; 65d61c6b55SArik Nemtsov u8 board_type; 66d61c6b55SArik Nemtsov /* enable point saturation */ 6716ea4733SIdo Reis u8 psat; 68d88949b7SYair Shapira /* low/medium/high Tx power in dBm for STA-HP BG */ 6916ea4733SIdo Reis s8 low_power_val; 7016ea4733SIdo Reis s8 med_power_val; 7116ea4733SIdo Reis s8 high_power_val; 72ec4f4b76SIdo Reis s8 per_sub_band_tx_trace_loss[WL18XX_TRACE_LOSS_GAPS_TX]; 73ec4f4b76SIdo Reis s8 per_sub_band_rx_trace_loss[WL18XX_TRACE_LOSS_GAPS_RX]; 74ec4f4b76SIdo Reis u8 tx_rf_margin; 75d88949b7SYair Shapira /* low/medium/high Tx power in dBm for other role */ 76d88949b7SYair Shapira s8 low_power_val_2nd; 77d88949b7SYair Shapira s8 med_power_val_2nd; 78d88949b7SYair Shapira s8 high_power_val_2nd; 79ec4f4b76SIdo Reis 80d88949b7SYair Shapira u8 padding[1]; 8134bacf73SLuciano Coelho } __packed; 8246a1d512SLuciano Coelho 83c68cc0f6SYair Shapira enum wl18xx_ht_mode { 84c68cc0f6SYair Shapira /* Default - use MIMO, fallback to SISO20 */ 85c68cc0f6SYair Shapira HT_MODE_DEFAULT = 0, 86c68cc0f6SYair Shapira 87c68cc0f6SYair Shapira /* Wide - use SISO40 */ 88c68cc0f6SYair Shapira HT_MODE_WIDE = 1, 89c68cc0f6SYair Shapira 90c68cc0f6SYair Shapira /* Use SISO20 */ 91c68cc0f6SYair Shapira HT_MODE_SISO20 = 2, 92c68cc0f6SYair Shapira }; 93c68cc0f6SYair Shapira 94c68cc0f6SYair Shapira struct wl18xx_ht_settings { 95c68cc0f6SYair Shapira /* DEFAULT / WIDE / SISO20 */ 96c68cc0f6SYair Shapira u8 mode; 97c68cc0f6SYair Shapira } __packed; 98c68cc0f6SYair Shapira 99e2f1e50fSKobi L struct conf_ap_sleep_settings { 100e2f1e50fSKobi L /* Duty Cycle (20-80% of staying Awake) for IDLE AP 101e2f1e50fSKobi L * (0: disable) 102e2f1e50fSKobi L */ 103e2f1e50fSKobi L u8 idle_duty_cycle; 104e2f1e50fSKobi L /* Duty Cycle (20-80% of staying Awake) for Connected AP 105e2f1e50fSKobi L * (0: disable) 106e2f1e50fSKobi L */ 107e2f1e50fSKobi L u8 connected_duty_cycle; 108e2f1e50fSKobi L /* Maximum stations that are allowed to be connected to AP 109e2f1e50fSKobi L * (255: no limit) 110e2f1e50fSKobi L */ 111e2f1e50fSKobi L u8 max_stations_thresh; 112e2f1e50fSKobi L /* Timeout till enabling the Sleep Mechanism after data stops 113e2f1e50fSKobi L * [unit: 100 msec] 114e2f1e50fSKobi L */ 115e2f1e50fSKobi L u8 idle_conn_thresh; 116e2f1e50fSKobi L } __packed; 117e2f1e50fSKobi L 11823ee9bf8SLuciano Coelho struct wl18xx_priv_conf { 119c68cc0f6SYair Shapira /* Module params structures */ 120c68cc0f6SYair Shapira struct wl18xx_ht_settings ht; 121c68cc0f6SYair Shapira 122d61c6b55SArik Nemtsov /* this structure is copied wholesale to FW */ 123d61c6b55SArik Nemtsov struct wl18xx_mac_and_phy_params phy; 124e2f1e50fSKobi L 125e2f1e50fSKobi L struct conf_ap_sleep_settings ap_sleep; 12634bacf73SLuciano Coelho } __packed; 12746a1d512SLuciano Coelho 128133b7326SGuy Mishol enum wl18xx_sg_params { 129133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_0 = 0, 130133b7326SGuy Mishol 131133b7326SGuy Mishol /* Configuration Parameters */ 132133b7326SGuy Mishol WL18XX_CONF_SG_ANTENNA_CONFIGURATION, 133133b7326SGuy Mishol WL18XX_CONF_SG_ZIGBEE_COEX, 134133b7326SGuy Mishol WL18XX_CONF_SG_TIME_SYNC, 135133b7326SGuy Mishol 136133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_4, 137133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_5, 138133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_6, 139133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_7, 140133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_8, 141133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_9, 142133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_10, 143133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_11, 144133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_12, 145133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_13, 146133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_14, 147133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_15, 148133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_16, 149133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_17, 150133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_18, 151133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_19, 152133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_20, 153133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_21, 154133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_22, 155133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_23, 156133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_24, 157133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_25, 158133b7326SGuy Mishol 159133b7326SGuy Mishol /* Active Scan Parameters */ 160133b7326SGuy Mishol WL18XX_CONF_SG_AUTO_SCAN_PROBE_REQ, 161133b7326SGuy Mishol WL18XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3, 162133b7326SGuy Mishol 163133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_28, 164133b7326SGuy Mishol 165133b7326SGuy Mishol /* Passive Scan Parameters */ 166133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_29, 167133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_30, 168133b7326SGuy Mishol WL18XX_CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3, 169133b7326SGuy Mishol 170133b7326SGuy Mishol /* Passive Scan in Dual Antenna Parameters */ 171133b7326SGuy Mishol WL18XX_CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN, 172133b7326SGuy Mishol WL18XX_CONF_SG_BEACON_HV3_COLL_TH_IN_PASSIVE_SCAN, 173133b7326SGuy Mishol WL18XX_CONF_SG_TX_RX_PROTECT_BW_IN_PASSIVE_SCAN, 174133b7326SGuy Mishol 175133b7326SGuy Mishol /* General Parameters */ 176133b7326SGuy Mishol WL18XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO, 177133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_36, 178133b7326SGuy Mishol WL18XX_CONF_SG_BEACON_MISS_PERCENT, 179133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_38, 180133b7326SGuy Mishol WL18XX_CONF_SG_RXT, 181133b7326SGuy Mishol WL18XX_CONF_SG_UNUSED, 182133b7326SGuy Mishol WL18XX_CONF_SG_ADAPTIVE_RXT_TXT, 183133b7326SGuy Mishol WL18XX_CONF_SG_GENERAL_USAGE_BIT_MAP, 184133b7326SGuy Mishol WL18XX_CONF_SG_HV3_MAX_SERVED, 185133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_44, 186133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_45, 187133b7326SGuy Mishol WL18XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD, 188133b7326SGuy Mishol WL18XX_CONF_SG_GEMINI_PARAM_47, 189133b7326SGuy Mishol WL18XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME, 190133b7326SGuy Mishol 191133b7326SGuy Mishol /* AP Parameters */ 192133b7326SGuy Mishol WL18XX_CONF_SG_AP_BEACON_MISS_TX, 193133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_50, 194133b7326SGuy Mishol WL18XX_CONF_SG_AP_BEACON_WINDOW_INTERVAL, 195133b7326SGuy Mishol WL18XX_CONF_SG_AP_CONNECTION_PROTECTION_TIME, 196133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_53, 197133b7326SGuy Mishol WL18XX_CONF_SG_PARAM_54, 198133b7326SGuy Mishol 199133b7326SGuy Mishol /* CTS Diluting Parameters */ 200133b7326SGuy Mishol WL18XX_CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH, 201133b7326SGuy Mishol WL18XX_CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER, 202133b7326SGuy Mishol 203133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_1, 204133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_2, 205133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_3, 206133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_4, 207133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_5, 208133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_6, 209133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_7, 210133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_8, 211133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_9, 212133b7326SGuy Mishol WL18XX_CONF_SG_TEMP_PARAM_10, 213133b7326SGuy Mishol 214133b7326SGuy Mishol WL18XX_CONF_SG_PARAMS_MAX, 215133b7326SGuy Mishol WL18XX_CONF_SG_PARAMS_ALL = 0xff 216133b7326SGuy Mishol }; 217133b7326SGuy Mishol 21846a1d512SLuciano Coelho #endif /* __WL18XX_CONF_H__ */ 219