14689Sql147931 /* 2*10448SMikore.Li@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 34689Sql147931 * Use is subject to license terms. 44689Sql147931 */ 54689Sql147931 64689Sql147931 /* 74689Sql147931 * Copyright (c) 2005 David Young. All rights reserved. 84689Sql147931 * 94689Sql147931 * This code was written by David Young. 104689Sql147931 * 114689Sql147931 * Redistribution and use in source and binary forms, with or without 124689Sql147931 * modification, are permitted provided that the following conditions 134689Sql147931 * are met: 144689Sql147931 * 1. Redistributions of source code must retain the above copyright 154689Sql147931 * notice, this list of conditions and the following disclaimer. 164689Sql147931 * 2. Redistributions in binary form must reproduce the above copyright 174689Sql147931 * notice, this list of conditions and the following disclaimer in the 184689Sql147931 * documentation and/or other materials provided with the distribution. 194689Sql147931 * 3. Neither the name of the author nor the names of any co-contributors 204689Sql147931 * may be used to endorse or promote products derived from this software 214689Sql147931 * without specific prior written permission. 224689Sql147931 * 234689Sql147931 * THIS SOFTWARE IS PROVIDED BY David Young ``AS IS'' AND ANY 244689Sql147931 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 254689Sql147931 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 264689Sql147931 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL David 274689Sql147931 * Young BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 284689Sql147931 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 294689Sql147931 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 304689Sql147931 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 314689Sql147931 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 324689Sql147931 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 334689Sql147931 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 344689Sql147931 * OF SUCH DAMAGE. 354689Sql147931 */ 364689Sql147931 #ifndef _SI4136REG_H_ 374689Sql147931 #define _SI4136REG_H_ 384689Sql147931 39*10448SMikore.Li@Sun.COM #ifdef __cplusplus 40*10448SMikore.Li@Sun.COM extern "C" { 41*10448SMikore.Li@Sun.COM #endif 42*10448SMikore.Li@Sun.COM 434689Sql147931 /* 444689Sql147931 * Serial bus format for Silicon Laboratories Si4126/Si4136 RF synthesizer. 454689Sql147931 */ 464689Sql147931 #define SI4126_TWI_DATA_MASK BITS(21, 4) 474689Sql147931 #define SI4126_TWI_ADDR_MASK BITS(3, 0) 484689Sql147931 494689Sql147931 /* 504689Sql147931 * Registers for Silicon Laboratories Si4126/Si4136 RF synthesizer. 514689Sql147931 */ 524689Sql147931 #define SI4126_MAIN 0 /* main configuration */ 534689Sql147931 #define SI4126_MAIN_AUXSEL_MASK BITS(13, 12) /* aux. output pin function */ 544689Sql147931 /* 554689Sql147931 * reserved 564689Sql147931 */ 574689Sql147931 #define SI4126_MAIN_AUXSEL_RSVD LSHIFT(0x0, SI4126_MAIN_AUXSEL_MASK) 584689Sql147931 /* 594689Sql147931 * force low 604689Sql147931 */ 614689Sql147931 #define SI4126_MAIN_AUXSEL_FRCLOW LSHIFT(0x1, SI4126_MAIN_AUXSEL_MASK) 624689Sql147931 /* 634689Sql147931 * Lock Detect (LDETB) 644689Sql147931 */ 654689Sql147931 #define SI4126_MAIN_AUXSEL_LDETB LSHIFT(0x3, SI4126_MAIN_AUXSEL_MASK) 664689Sql147931 674689Sql147931 /* 684689Sql147931 * IFOUT = IFVCO frequency / 2**IFDIV. 694689Sql147931 */ 704689Sql147931 #define SI4126_MAIN_IFDIV_MASK BITS(11, 10) 714689Sql147931 724689Sql147931 #define SI4126_MAIN_XINDIV2 BIT(6) /* 1: divide crystal input (XIN) by 2 */ 734689Sql147931 #define SI4126_MAIN_LPWR BIT(5) /* 1: low-power mode */ 744689Sql147931 754689Sql147931 /* 764689Sql147931 * 1: equivalent to reg[SI4126_POWER] <- SI4126_POWER_PDIB | SI4126_POWER_PDRB. 774689Sql147931 * 0: power-down under control of reg[SI4126_POWER]. 784689Sql147931 */ 794689Sql147931 #define SI4126_MAIN_AUTOPDB BIT(3) 804689Sql147931 #define SI4126_GAIN 1 /* phase detector gain */ 814689Sql147931 #define SI4126_GAIN_KPI_MASK BITS(5, 4) /* IF phase detector gain */ 824689Sql147931 #define SI4126_GAIN_KP2_MASK BITS(3, 2) /* RF2 phase detector gain */ 834689Sql147931 #define SI4126_GAIN_KP1_MASK BITS(1, 0) /* RF1 phase detector gain */ 844689Sql147931 854689Sql147931 #define SI4126_POWER 2 /* powerdown */ 864689Sql147931 #define SI4126_POWER_PDIB BIT(1) /* 1: IF synthesizer on */ 874689Sql147931 #define SI4126_POWER_PDRB BIT(0) /* 1: RF synthesizer on */ 884689Sql147931 894689Sql147931 #define SI4126_RF1N 3 /* RF1 N divider */ 904689Sql147931 #define SI4126_RF2N 4 /* RF2 N divider */ 914689Sql147931 #define SI4126_IFN 5 /* IF N divider */ 924689Sql147931 #define SI4126_RF1R 6 /* RF1 R divider */ 934689Sql147931 #define SI4126_RF2R 7 /* RF2 R divider */ 944689Sql147931 #define SI4126_IFR 8 /* IF R divider */ 95*10448SMikore.Li@Sun.COM #ifdef __cplusplus 96*10448SMikore.Li@Sun.COM } 97*10448SMikore.Li@Sun.COM #endif 984689Sql147931 994689Sql147931 #endif /* _SI4136REG_H_ */ 100