source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/tnr/7552/btnr_struct.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 15.7 KB
Line 
1/******************************************************************************
2 *    (c)2011-2012 Broadcom Corporation
3 *
4 * This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 * and may only be used, duplicated, modified or distributed pursuant to the terms and
6 * conditions of a separate, written license agreement executed between you and Broadcom
7 * (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 * no license (express or implied), right to use, or waiver of any kind with respect to the
9 * Software, and Broadcom expressly reserves all rights in and to the Software and all
10 * intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. 
13 * 
14 * Except as expressly set forth in the Authorized License,
15 * 
16 * 1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 * and to use this information only in connection with your use of Broadcom integrated circuit products.
19 * 
20 * 2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 * THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 * USE OR PERFORMANCE OF THE SOFTWARE.
28 *
29 * 3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 * ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile: btnr_struct.h $
39 * $brcm_Revision: 26 $
40 * $brcm_Date: 1/20/12 7:00p $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /AP/ctfe/core/tnr/btnr_struct.h $
47 *
48 * 26   1/20/12 7:00p farshidf
49 * SW3461-1: merge to main
50 *
51 * Fw_Integration_Devel/9   1/20/12 6:31p farshidf
52 * SW3461-1: merge to integ
53 *
54 * Fw_Integration_Devel/AP_V3_0_TNR_DEV/2   1/11/12 12:01p farshidf
55 * SW3461-129: add the Internal Lna Daisy mode
56 *
57 * Fw_Integration_Devel/AP_V3_0_TNR_DEV/1   1/11/12 11:05a farshidf
58 * SW3461-129 : add new power mode Internal LNA daisy out
59 *
60 * Fw_Integration_Devel/8   12/15/11 6:01p farshidf
61 * SW3461-118: merge to Integ
62 *
63 * 25   12/15/11 5:59p farshidf
64 * SW3461-118: update the tuner to work on B0 and B1
65 *
66 * 24   11/8/11 6:12p farshidf
67 * SW7552-144: add loopthr,daisy,dpm
68 *
69 * 23   10/24/11 3:25p farshidf
70 * SW7552-134: add the new flag to store BBS address
71 *
72 * 22   10/12/11 5:23p farshidf
73 * SW7552-134: fixi 7552 issue
74 *
75 * 21   8/24/11 12:33p farshidf
76 * SW3461-38: merge to main
77 *
78 * Fw_Integration_Devel/7   8/24/11 12:08p farshidf
79 * SW3461-38: merge to integ
80 *
81 * Fw_Integration_Devel/AP_V2_0_TNR_DEV/3   8/23/11 4:50p mpovich
82 * SW3128-24: Merge latest of SW3128-24 to devel. branch.
83 *
84 * Fw_Integration_Devel/AP_V2_0_TNR_DEV/2   8/22/11 12:44p jputnam
85 * SW3461-1: Added SmartTune
86 *
87 * Fw_Integration_Devel/AP_V0_6_TNR_DEV/SW3128-24/3   8/19/11 5:12p mpovich
88 * SW3128-24: Rebase with Ver 2.0 devel. branch.
89 *
90 * Fw_Integration_Devel/AP_V2_0_TNR_DEV/1   8/18/11 2:40p mpovich
91 * SW3128-24: Merge Scan feature support into the devel. branch.
92 *
93 * Fw_Integration_Devel/AP_V0_6_TNR_DEV/SW3128-24/2   8/5/11 1:08a mpovich
94 * SW3128-24: Rebase with latest dev branch.
95 *
96 * Fw_Integration_Devel/5   8/2/11 6:21p farshidf
97 * SW3461-1: merge to integ
98 *
99 * Fw_Integration_Devel/AP_V0_6_TNR_DEV/3   8/2/11 6:11p farshidf
100 * SW3461-1: update the tuner structure
101 *
102 * Fw_Integration_Devel/AP_V0_6_TNR_DEV/SW3128-24/1   8/1/11 7:37p mpovich
103 * SW3128-24: Add "Initiate Tune after Setting Tune Params" flag to TNR
104 *  Tune Params.
105 *
106 * Fw_Integration_Devel/AP_V0_6_TNR_DEV/2   7/7/11 4:48p cbrooks
107 * sw3461-1:added callback support
108 *
109 * Fw_Integration_Devel/AP_V0_6_TNR_DEV/1   7/1/11 3:20p cbrooks
110 * sw3461-1:added ADS callback support
111 *
112 * Fw_Integration_Devel/3   7/20/11 11:30a farshidf
113 * SW3461-1: add leap flag
114 *
115 * Fw_Integration_Devel/2   7/19/11 8:27p farshidf
116 * SW3461-1: fix BBS for 7552
117 *
118 * Fw_Integration_Devel/1   6/29/11 12:39p farshidf
119 * SW3461-13: merge to integration branch
120 *
121 * Fw_Integration_Devel/Tnr_Fw_Devel_Rc05/1   6/22/11 6:48p cbrooks
122 * sw3461-1:added callback support
123 *
124 * 17   6/12/11 10:59a farshidf
125 * SW3461-1: remove warning for 7552
126 *
127 * 16   6/9/11 6:56p farshidf
128 * SW3128-1: fix the mode
129 *
130 * 15   6/9/11 4:56p farshidf
131 * SW3461-1: 7552 compatiable
132 *
133 * 14   6/9/11 4:48p farshidf
134 * SW3461-1: sync up with 7552 code
135 *
136 * 13   6/2/11 6:57p mpovich
137 * SW3461-1: TNR RF Input Mode and TNR Power HAB commands.  Change T2
138 *  Acquire Params.  Fix THD Status extraneous bytes sent by LEAP.
139 *
140 * SW_System_HAB_Devel_4/1   6/2/11 5:18p mpovich
141 * SW3461-1: Add "RF Input Mode" HAB command and remove "Tuner ower mode"
142 *  from Tuner Power HAB command.
143 *
144 * 12   5/20/11 6:43a mpovich
145 * SW3461-1: rename UFE (BUFE) module to TNR (BTNR).
146 *
147 * TNR_3461_1/1   5/19/11 5:15p mpovich
148 * SW3461-1: Change BUFE module prefix to BTNR
149 *
150 * 11   3/9/11 9:02p cbrooks
151 * sw3461-1:Added LNA level and RFVGA level to status
152 *
153 * 9   3/8/11 8:40p cbrooks
154 * sw3461-1:new code
155 *
156 * 8   3/8/11 8:04p mpovich
157 * SW3461-1: Add "Get Power Status" function.
158 *
159 * 7   3/8/11 3:42p farshidf
160 * SW3461-1: add the tuner power up
161 *
162 * 6   3/8/11 2:43p cbrooks
163 * sw3461-1:new code
164 *
165 * 4   3/6/11 5:58p cbrooks
166 * SW3461-1:New TNR Code
167 *
168 * 3   3/2/11 4:59p mpovich
169 * SW3461-1: Fix TNR struct compiler bugs.  Add HAB related updates for T2
170 *  and for TNR.
171 *
172 * Rom_Devel_3461/1   3/2/11 4:25p mpovich
173 * SW3461-1: Fix TNR struct compiler bugs.  Add HAB related updates for T2
174 *  and for TNR.
175 *
176 * 2   3/1/11 12:59p cbrooks
177 * sw3461-1:new code
178 *
179 * 1   2/28/11 3:55p cbrooks
180 * sw3461-1:new code
181 *
182 *****************************************************************************/
183
184#ifndef _BTNR_STRUCT_H__
185#define _BTNR_STRUCT_H__
186
187#if __cplusplus
188extern "C" {
189#endif
190
191/******************************************
192 *BTNR_3x7x_Tuner_Power_Mode_t definition
193 *****************************************/
194typedef enum BTNR_Tuner_Power_Mode_s
195{
196BTNR_Tuner_Power_Mode_eOff        = 0,
197BTNR_Tuner_Power_Mode_eMini_Power = 1,
198BTNR_Tuner_Power_Mode_eUHF_Power = 2,
199BTNR_Tuner_Power_Mode_eVHF_Power = 3,
200BTNR_Tuner_Power_Mode_eUHF_VHF_Power = 4,
201BTNR_Tuner_Power_Mode_eLna_Daisy_Power = 5,
202BTNR_Tuner_Power_Mode_eOn        = 0xFFU
203}BTNR_Tuner_Power_Mode_t;
204
205typedef struct BTNR_3x7x_Tuner_Power_Mode_s
206{
207        BTNR_Tuner_Power_Mode_t Tuner_Power_Mode;
208}BTNR_3x7x_Tuner_Power_Mode_t;
209
210/******************************************
211 *BTNR_3x7x_TuneType_t definition
212 *****************************************/
213typedef enum BTNR_TuneType_s
214{
215  BTNR_TuneType_eInitTune = 1,
216  BTNR_TuneType_eTune = 2,
217  BTNR_TuneType_eMiniTune = 3
218} BTNR_TuneType_t;
219
220typedef struct BTNR_3x7x_TuneType_s
221{
222        BTNR_TuneType_t   TuneType;
223} BTNR_3x7x_TuneType_t;
224
225/******************************************
226 *BTNR_3x7x_Acquire_Params_t definition
227 *****************************************/
228typedef enum BTNR_TunerApplicationMode_s
229{
230  BTNR_TunerApplicationMode_eCable = 1,
231  BTNR_TunerApplicationMode_eTerrestrial = 2
232} BTNR_TunerApplicationMode_t;
233
234typedef enum BTNR_LPF_Bandwidth_s
235{
236  BTNR_LPF_Bandwidth_e8MHz = 1,
237  BTNR_LPF_Bandwidth_e7MHz = 2,
238  BTNR_LPF_Bandwidth_e6MHz = 3,
239  BTNR_LPF_Bandwidth_e5MHz = 4,
240  BTNR_LPF_Bandwidth_e1_7MHz = 5,
241        BTNR_LPF_Bandwidth_eVariable = 6                       
242} BTNR_LPF_Bandwidth_t;
243
244typedef enum BTNR_Standard_s
245{
246  BTNR_Standard_eDVBT = 1,
247  BTNR_Standard_eISDBT = 2,
248  BTNR_Standard_eQAM = 3,
249  BTNR_Standard_eT2 =4
250} BTNR_Standard_t;
251
252typedef struct BTNR_Acquire_Params_s
253{
254        BTNR_TunerApplicationMode_t   Application;
255        BTNR_Standard_t           Standard;
256        BTNR_LPF_Bandwidth_t      LPF_Bandwidth;
257        uint32_t                                  LPF_Variable_Bandwidth;       
258        uint32_t                                  RF_Freq;
259
260    uint32_t                  Tune_After_Set_Params; 
261} BTNR_3x7x_Acquire_Params_t;
262 
263
264/******************************************
265 *BTNR_DPM_Params_t definition
266 *****************************************/
267typedef enum BTNR_DPM_Target_s
268{
269  BTNR_DPM_Target_eDaisyUHF=0,
270  BTNR_DPM_Target_eRFVGA=1,
271  BTNR_DPM_Target_eDaisyUHF_RFVGA=2
272}BTNR_DPM_Target_t;
273
274typedef enum BTNR_DPM_Params_OffOn_s
275{
276  BTNR_DPM_Params_eDisable=0,
277  BTNR_DPM_Params_eEnable=1
278}BTNR_DPM_Params_OffOn_t;
279
280typedef struct BTNR_3x7x_DPM_Params_s
281{
282        BTNR_DPM_Params_OffOn_t   DPM_Enable;
283        BTNR_DPM_Target_t         DPM_Target;
284        uint32_t                                  DPM_Freq;
285} BTNR_3x7x_DPM_Params_t;
286
287/******************************************
288 *BTNR_3x7x_LoopThru_Params_t definition
289 *****************************************/
290typedef enum BTNR_LoopThru_Source_s
291{
292  BTNR_LoopThru_Source_eVHF=0,
293  BTNR_LoopThru_Source_eDAC=1,
294  BTNR_LoopThru_Source_eVHF_DAC=2
295}BTNR_LoopThru_Source_t;
296
297typedef enum BTNR_LoopThru_Params_OffOn_s
298{
299  BTNR_LoopThru_Params_eDisable=0,
300  BTNR_LoopThru_Params_eEnable=1
301}BTNR_LoopThru_Params_OffOn_t;
302
303typedef struct BTNR_3x7x_LoopThru_Params_s
304{
305        BTNR_LoopThru_Params_OffOn_t LoopThru_Enable;
306        BTNR_LoopThru_Source_t       LoopThru_Source;
307} BTNR_3x7x_LoopThru_Params_t;
308
309/******************************************
310 *BTNR_3x7x_Daisy_Params_t definition
311 *****************************************/
312typedef enum BTNR_Daisy_Source_s
313{
314  BTNR_Daisy_Source_eUHF=0,
315  BTNR_Daisy_Source_eVHF=1,
316  BTNR_Daisy_Source_eUHF_VHF=2
317}BTNR_Daisy_Source_t;
318
319typedef enum BTNR_Daisy_Params_OffOn_s
320{
321  BTNR_Daisy_Params_eDisable=0,
322  BTNR_Daisy_Params_eEnable=1
323}BTNR_Daisy_Params_OffOn_t;
324
325typedef struct BTNR_3x7x_Daisy_Params_s
326{
327        BTNR_Daisy_Params_OffOn_t Daisy_Enable;
328        BTNR_Daisy_Source_t       Daisy_Source;
329} BTNR_3x7x_Daisy_Params_t;
330
331/****************************************************
332 * BTNR_TunerRfInputMode
333 ***************************************************/
334typedef enum BTNR_3x7x_TunerRfInputMode
335{
336  BTNR_3x7x_TunerRfInputMode_eOff = 0, /* Tuner Rf is off. */
337  BTNR_3x7x_TunerRfInputMode_eExternalLna=1,  /* Tuner Rf input through UHF path. This Rf path does not use internal LNA. */
338  BTNR_3x7x_TunerRfInputMode_eInternalLna=2, /* Tuner Rf input through UHF path. This Rf path does uses internal LNA. */
339  BTNR_3x7x_TunerRfInputMode_eStandardIf=3,  /* 44 MHz or 36 MHz */
340  BTNR_3x7x_TunerRfInputMode_eLowIf=4,  /*4 MHz to 5 MHz. */
341  BTNR_3x7x_TunerRfInputMode_eBaseband=5,
342  BTNR_3x7x_TunerRfInputMode_InternalLna_Daisy=6
343}BTNR_3x7x_TunerRfInputMode_t;
344
345/****************************************************
346 *BTNR_3x7x_Local_Params_t definition: must be initialized 
347 ***************************************************/
348 typedef enum BTNR_Local_Params_SmartTune_s
349{
350  BTNR_Local_Params_SmartTune_FreqPlanDefault=0,
351  BTNR_Local_Params_SmartTune_FreqPlanA=1
352}BTNR_Local_Params_SmartTune_t;
353
354typedef struct BTNR_3x7x_Local_Params_s
355{       
356        uint32_t                                                                TunerCapCntl;
357        int32_t                                                                 RF_Offset;        /*This is set by scan*/
358        uint32_t                                                                Symbol_Rate;    /*This is set by scan*/
359        int32_t                                                                 Total_Mix_After_ADC;
360        int16_t                                                                 PostADC_Gain_x256db;
361#ifndef LEAP_BASED_CODE
362        BTNR_TunerApplicationMode_t                                     TunerApplication;
363        BTNR_RfInputMode                                                RfInputMode;
364        BTNR_Tuner_Power_Mode_t                                 Tuner_Power_Mode;
365        uint32_t                                                                TunerBBSaddress;
366#endif
367        BTNR_Local_Params_SmartTune_t   SmartTune;     
368        uint32_t                                                                RevId;
369}BTNR_3x7x_Local_Params_t;
370
371/****************************************************
372 *BTNR_3x7x_Internal_Params_t definition: must be initialized
373 ***************************************************/
374typedef enum BTNR_Internal_Params_SDADC_Input_s
375{
376        BTNR_Internal_Params_SDADC_Input_eTuner=0,
377        BTNR_Internal_Params_SDADC_Input_eTuner_wTestOut=1,
378        BTNR_Internal_Params_SDADC_Input_eExtReal=2,
379        BTNR_Internal_Params_SDADC_Input_eExtIQ=3
380} BTNR_Internal_Params_SDADC_Input_t;
381
382
383
384typedef enum BTNR_Internal_Params_TunerRFFIL_s
385{
386  BTNR_Internal_Params_TunerRFFIL_eTRKFIL=0,
387  BTNR_Internal_Params_TunerRFFIL_eMOCATRAP=1
388}BTNR_Internal_Params_TunerRFFIL_t;
389
390typedef enum BTNR_Internal_Params_OffOn_s
391{
392  BTNR_Internal_Params_eDisable=0,
393  BTNR_Internal_Params_eEnable=1
394}BTNR_Internal_Params_OffOn_t;
395
396typedef struct BTNR_3x7x_Internal_Params_s
397{       
398        BTNR_Internal_Params_OffOn_t       LNA_Enable;
399        BTNR_Internal_Params_SDADC_Input_t SDADC_Input;
400        BTNR_Internal_Params_TunerRFFIL_t  RFFIL_Select;
401        BTNR_Internal_Params_OffOn_t       HRC_Enable;
402        uint32_t                                                   IF_Freq;
403}BTNR_3x7x_Internal_Params_t;
404
405typedef enum BTNR_BBSConnectMode_s
406{
407  BTNR_BBSConnectMode_Tune = 1, 
408  BTNR_BBSConnectMode_ResetStatus = 2,
409  BTNR_BBSConnectMode_EnableStatus = 4,
410  BTNR_BBSConnectMode_RfMode = 8,
411  BTNR_BBSConnectMode_EnableLoop = 16,
412  BTNR_BBSConnectMode_EnableDaisy = 32,
413  BTNR_BBSConnectMode_EnableDPM = 64
414} BTNR_BBSConnectMode_t;
415
416
417typedef struct BTNR_3x7x_BBS_Params_t
418{       
419        uint32_t                                                        StartSturctureAddress;
420        volatile BTNR_BBSConnectMode_t          BBSConnectMode;
421        BTNR_TunerApplicationMode_t                     Application;
422        BTNR_Standard_t                                         Standard;
423        BTNR_LPF_Bandwidth_t                            LPF_Bandwidth;
424    BTNR_3x7x_TunerRfInputMode_t                BTNR_RF_Input_Mode; 
425        BTNR_3x7x_LoopThru_Params_t                     BTNR_LoopThru_Params;
426        BTNR_3x7x_Daisy_Params_t                        BTNR_Daisy_Params;
427        BTNR_3x7x_DPM_Params_t                           BTNR_DPM_Params;
428}BTNR_3x7x_BBS_Params_t;
429
430/*This is the main structure by the tuning functions*/
431typedef struct BTNR_3x7x_TuneParams_s
432{
433#ifndef LEAP_BASED_CODE
434        BTNR_3x7x_BBS_Params_t           BTNR_BBS_Params;
435#endif
436        BTNR_3x7x_Tuner_Power_Mode_t BTNR_TunePowerMode;
437        BTNR_3x7x_TuneType_t         BTNR_TuneType;
438        BTNR_3x7x_Acquire_Params_t   BTNR_Acquire_Params;
439        BTNR_3x7x_DPM_Params_t       BTNR_DPM_Params;
440        BTNR_3x7x_LoopThru_Params_t  BTNR_LoopThru_Params;
441        BTNR_3x7x_Daisy_Params_t     BTNR_Daisy_Params;
442    BTNR_3x7x_TunerRfInputMode_t BTNR_RF_Input_Mode; 
443        BTNR_3x7x_Internal_Params_t  BTNR_Internal_Params;
444        BTNR_3x7x_Local_Params_t     BTNR_Local_Params;
445}BTNR_3x7x_TuneParams_t;
446
447
448
449typedef enum BTNR_PowerStatus_s
450{
451    BTNR_ePower_Off = 0,
452    BTNR_ePower_On  = 1,
453    BTNR_ePower_Unknown = 0xFF
454}  BTNR_PowerStatus_t;
455
456typedef enum BADS_3x7x_Status_UnlockLock_s
457{
458  BTNR_Status_eUnlock=0, 
459  BTNR_Status_eLock=1
460}BTNR_3x7x_Status_UnlockLock_t;
461
462/*This is the main structure by the tuning status*/
463typedef struct BTNR_3x7x_TuneStatus_s
464{
465  uint32_t      Lock;
466  BTNR_3x7x_Status_UnlockLock_t                         Tuner_Ref_Lock_Status;
467  BTNR_3x7x_Status_UnlockLock_t                         Tuner_Phy_Lock_Status;
468        BTNR_3x7x_Status_UnlockLock_t                           Tuner_Mixer_Lock_Status;
469        BTNR_PowerStatus_t                  PowerStatus;
470        uint32_t                            Tuner_Ref_Freq;
471        uint32_t                            Tuner_RefPll_Freq;
472        uint32_t                            Tuner_PhyPll1_Freq;
473        uint32_t                            Tuner_PhyPll2_Freq;
474        uint32_t                            Tuner_PhyPll3_Freq;
475        uint32_t                            Tuner_PhyPll4_Freq;
476        uint32_t                            Tuner_PhyPll5_Freq;
477        uint32_t                            Tuner_PhyPll6_Freq;
478        uint32_t                                                                                                                Tuner_LNA_Gain_Code;
479        uint32_t                                                                                                                Tuner_RFVGA_Gain_Code;
480        uint32_t                                                                                                                Tuner_RF_Freq;
481        int16_t                                                                                                                 Tuner_PreADC_Gain_x256db;
482        int16_t                                                                                                                 External_Gain_x256db;
483} BTNR_3x7x_TuneStatus_t;
484
485#ifdef __cplusplus
486}
487#endif
488
489#endif /* _BTNR_STRUCT_H__ */
490
491
492
493
494
Note: See TracBrowser for help on using the repository browser.