Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of wl1271 |
| 3 | * |
| 4 | * Copyright (C) 2009 Nokia Corporation |
| 5 | * |
| 6 | * Contact: Luciano Coelho <luciano.coelho@nokia.com> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License |
| 10 | * version 2 as published by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 20 | * 02110-1301 USA |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef __WL1271_INIT_H__ |
| 25 | #define __WL1271_INIT_H__ |
| 26 | |
| 27 | #include "wl1271.h" |
| 28 | |
| 29 | int wl1271_hw_init_power_auth(struct wl1271 *wl); |
| 30 | int wl1271_hw_init(struct wl1271 *wl); |
| 31 | |
| 32 | /* These are not really a TEST_CMD, but the ref driver uses them as such */ |
| 33 | #define TEST_CMD_INI_FILE_RADIO_PARAM 0x19 |
| 34 | #define TEST_CMD_INI_FILE_GENERAL_PARAM 0x1E |
| 35 | |
| 36 | struct wl1271_general_parms { |
| 37 | u8 id; |
| 38 | u8 padding[3]; |
| 39 | |
| 40 | u8 ref_clk; |
| 41 | u8 settling_time; |
| 42 | u8 clk_valid_on_wakeup; |
| 43 | u8 dc2dcmode; |
| 44 | u8 single_dual_band; |
| 45 | |
| 46 | u8 tx_bip_fem_autodetect; |
| 47 | u8 tx_bip_fem_manufacturer; |
| 48 | u8 settings; |
| 49 | } __attribute__ ((packed)); |
| 50 | |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 51 | struct wl1271_radio_parms { |
| 52 | u8 id; |
| 53 | u8 padding[3]; |
| 54 | |
| 55 | /* Static radio parameters */ |
| 56 | /* 2.4GHz */ |
| 57 | u8 rx_trace_loss; |
| 58 | u8 tx_trace_loss; |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 59 | s8 rx_rssi_and_proc_compens[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 60 | |
| 61 | /* 5GHz */ |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 62 | u8 rx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5]; |
| 63 | u8 tx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5]; |
| 64 | s8 rx_rssi_and_proc_compens_5[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 65 | |
| 66 | /* Dynamic radio parameters */ |
| 67 | /* 2.4GHz */ |
Luciano Coelho | d0f63b2 | 2009-10-15 10:33:29 +0300 | [diff] [blame] | 68 | __le16 tx_ref_pd_voltage; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 69 | s8 tx_ref_power; |
| 70 | s8 tx_offset_db; |
| 71 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 72 | s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS]; |
| 73 | s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 74 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 75 | s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4]; |
| 76 | s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4]; |
| 77 | s8 tx_pdv_rate_offsets[CONF_NUMBER_OF_RATE_GROUPS]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 78 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 79 | u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 80 | u8 rx_fem_insertion_loss; |
| 81 | |
| 82 | u8 padding2; |
| 83 | |
| 84 | /* 5GHz */ |
Luciano Coelho | d0f63b2 | 2009-10-15 10:33:29 +0300 | [diff] [blame] | 85 | __le16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5]; |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 86 | s8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5]; |
| 87 | s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 88 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 89 | s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS]; |
| 90 | s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 91 | |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 92 | s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5]; |
| 93 | s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 94 | |
| 95 | /* FIXME: this is inconsistent with the types for 2.4GHz */ |
Juuso Oikarinen | 47fab7d | 2009-10-13 12:47:43 +0300 | [diff] [blame] | 96 | s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS]; |
| 97 | s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5]; |
Luciano Coelho | f5fc0f8 | 2009-08-06 16:25:28 +0300 | [diff] [blame] | 98 | |
| 99 | u8 padding3[2]; |
| 100 | } __attribute__ ((packed)); |
| 101 | |
| 102 | #endif |