2 * Copyright 2010 Free Software Foundation, Inc.
4 * Copyright 2010 Ettus Research LLC
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 // Tx and Rx have shared defs, but different i/o regs
28 #define ENABLE_5 (1 << 7) // enables 5.0V power supply
29 #define ENABLE_33 (1 << 6) // enables 3.3V supply
30 //#define RX_TXN (1 << 15) // Tx only: T/R antenna switch for TX/RX port
31 //#define RX2_RX1N (1 << 15) // Rx only: antenna switch between RX2 and TX/RX port
32 #define RX_TXN ((1 << 5)|(1 << 15)) // Tx only: T/R antenna switch for TX/RX port
33 #define RX2_RX1N ((1 << 5)|(1 << 15)) // Rx only: antenna switch between RX2 and TX/RX port
34 #define RXBB_EN (1 << 4)
35 #define TXMOD_EN (1 << 4)
36 #define PLL_CE (1 << 3)
37 #define PLL_PDBRF (1 << 2)
38 #define PLL_MUXOUT (1 << 1)
39 #define PLL_LOCK_DETECT (1 << 0)
41 // RX Attenuator constants
43 #define ATTN_MASK (63 << ATTN_SHIFT)
45 struct db_wbxng_common {
47 uint16_t adf4350_regs_int;
48 uint16_t adf4350_regs_frac;
49 uint8_t adf4350_regs_prescaler;
50 uint16_t adf4350_regs_mod;
51 uint16_t adf4350_regs_10_bit_r_counter;
52 uint8_t adf4350_regs_divider_select;
53 uint8_t adf4350_regs_8_bit_band_select_clock_divider_value;
59 struct db_wbxng_dummy {
61 struct db_wbxng_common common;
67 struct db_wbxng_common common;
72 struct db_wbxng_common common;
76 #endif /* DB_WBXNG_H */