1 /* 2 * This file is part of wl18xx 3 * 4 * Copyright (C) 2011 Texas Instruments Inc. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 * 02110-1301 USA 19 * 20 */ 21 22 #ifndef __WL18XX_CONF_H__ 23 #define __WL18XX_CONF_H__ 24 25 #define WL18XX_CONF_MAGIC 0x10e100ca 26 #define WL18XX_CONF_VERSION (WLCORE_CONF_VERSION | 0x0003) 27 #define WL18XX_CONF_MASK 0x0000ffff 28 #define WL18XX_CONF_SIZE (WLCORE_CONF_SIZE + \ 29 sizeof(struct wl18xx_priv_conf)) 30 31 #define NUM_OF_CHANNELS_11_ABG 150 32 #define NUM_OF_CHANNELS_11_P 7 33 #define WL18XX_NUM_OF_SUB_BANDS 9 34 #define SRF_TABLE_LEN 16 35 #define PIN_MUXING_SIZE 2 36 37 struct wl18xx_mac_and_phy_params { 38 u8 phy_standalone; 39 u8 rdl; 40 u8 enable_clpc; 41 u8 enable_tx_low_pwr_on_siso_rdl; 42 u8 auto_detect; 43 u8 dedicated_fem; 44 45 u8 low_band_component; 46 47 /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */ 48 u8 low_band_component_type; 49 50 u8 high_band_component; 51 52 /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */ 53 u8 high_band_component_type; 54 u8 number_of_assembled_ant2_4; 55 u8 number_of_assembled_ant5; 56 u8 pin_muxing_platform_options[PIN_MUXING_SIZE]; 57 u8 external_pa_dc2dc; 58 u8 tcxo_ldo_voltage; 59 u8 xtal_itrim_val; 60 u8 srf_state; 61 u8 srf1[SRF_TABLE_LEN]; 62 u8 srf2[SRF_TABLE_LEN]; 63 u8 srf3[SRF_TABLE_LEN]; 64 u8 io_configuration; 65 u8 sdio_configuration; 66 u8 settings; 67 u8 rx_profile; 68 u8 per_chan_pwr_limit_arr_11abg[NUM_OF_CHANNELS_11_ABG]; 69 u8 pwr_limit_reference_11_abg; 70 u8 per_chan_pwr_limit_arr_11p[NUM_OF_CHANNELS_11_P]; 71 u8 pwr_limit_reference_11p; 72 u8 per_sub_band_tx_trace_loss[WL18XX_NUM_OF_SUB_BANDS]; 73 u8 per_sub_band_rx_trace_loss[WL18XX_NUM_OF_SUB_BANDS]; 74 u8 primary_clock_setting_time; 75 u8 clock_valid_on_wake_up; 76 u8 secondary_clock_setting_time; 77 u8 board_type; 78 /* enable point saturation */ 79 u8 psat; 80 /* low/medium/high Tx power in dBm */ 81 s8 low_power_val; 82 s8 med_power_val; 83 s8 high_power_val; 84 u8 padding[1]; 85 } __packed; 86 87 enum wl18xx_ht_mode { 88 /* Default - use MIMO, fallback to SISO20 */ 89 HT_MODE_DEFAULT = 0, 90 91 /* Wide - use SISO40 */ 92 HT_MODE_WIDE = 1, 93 94 /* Use SISO20 */ 95 HT_MODE_SISO20 = 2, 96 }; 97 98 struct wl18xx_ht_settings { 99 /* DEFAULT / WIDE / SISO20 */ 100 u8 mode; 101 } __packed; 102 103 struct wl18xx_priv_conf { 104 /* Module params structures */ 105 struct wl18xx_ht_settings ht; 106 107 /* this structure is copied wholesale to FW */ 108 struct wl18xx_mac_and_phy_params phy; 109 } __packed; 110 111 #endif /* __WL18XX_CONF_H__ */ 112