MT6620: add the new driver JB2 V1.0
[firefly-linux-kernel-4.4.55.git] / drivers / mtk_wcn_combo / drv_fm / cust / mt6620 / mt6620_fm_cust_cfg.h
1 /* alps/ALPS_SW/TRUNK/MAIN/alps/kernel/arch/arm/mach-mt6516/include/mach/fm.h
2  *
3  * (C) Copyright 2009
4  * MediaTek <www.MediaTek.com>
5  * William Chung <William.Chung@MediaTek.com>
6  *
7  * MT6516 AR10x0 FM Radio Driver
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23
24 #ifndef __FM_CUST_CFG_H__
25 #define __FM_CUST_CFG_H__
26
27 //scan sort algorithm
28 enum {
29     FM_SCAN_SORT_NON = 0,
30     FM_SCAN_SORT_UP,
31     FM_SCAN_SORT_DOWN,
32     FM_SCAN_SORT_MAX
33 };
34 //***********************************FM config for customer ***********************************
35 //RX
36 #define FMR_RSSI_TH_LONG_MT6620    0x0301      //FM radio long antenna RSSI threshold(11.375dBuV)
37 #define FMR_RSSI_TH_SHORT_MT6620   0x02E0      //FM radio short antenna RSSI threshold(-1dBuV)
38 #define FMR_CQI_TH_MT6620          0x00E9      //FM radio Channel quality indicator threshold(0x0000~0x00FF)
39 //***********************************FM config for engineer ***********************************
40 //RX
41 #define FMR_MR_TH_MT6620           0x01BD      //FM radio MR threshold
42 #if 0
43 //*****************************************************************************************
44 //***********************************FM config for customer ***********************************
45 //*****************************************************************************************
46 #define FMR_SEEK_SPACE      1           //FM radio seek space,1:100KHZ; 2:200KHZ
47 #define FMR_SCAN_CH_SIZE    40          //FM radio scan max channel size
48 #define FMR_BAND            1           //FM radio band, 1:87.5MHz~108.0MHz; 2:76.0MHz~90.0MHz; 3:76.0MHz~108.0MHz; 4:special
49 #define FM_SCAN_SORT_SELECT FM_SCAN_SORT_NON
50 #define FM_FAKE_CH_NUM      1
51 #define FM_FAKE_CH_RSSI     40
52 #define FM_FAKE_CH_1        1075
53 #define FM_FAKE_CH_2        0
54 #define FM_FAKE_CH_3        0
55 #define FM_FAKE_CH_4        0
56 #define FM_FAKE_CH_5        0
57
58 //TX
59 #define FMTX_PWR_LEVEL_MAX  120
60
61 //*****************************************************************************************
62 #define ADDR_SCAN_TH        0xE0        //scan thrshold register
63 #define ADDR_CQI_TH         0xE1        //scan CQI register
64
65 //TX
66 #define FMTX_SCAN_HOLE_LOW  923         //92.3MHz~95.4MHz should not show to user
67 #define FMTX_SCAN_HOLE_HIGH 954         //92.3MHz~95.4MHz should not show to user
68 //*****************************************************************************************
69
70 // errno
71 #define FM_SUCCESS      0
72 #define FM_FAILED       1
73 #define FM_EPARM        2
74 #define FM_BADSTATUS    3
75 #define FM_TUNE_FAILED  4
76 #define FM_SEEK_FAILED  5
77 #define FM_BUSY         6
78 #define FM_SCAN_FAILED  7
79
80 //max scan chl num
81 #define FM_MAX_CHL_SIZE FMR_SCAN_CH_SIZE
82 // auto HiLo
83 #define FM_AUTO_HILO_OFF    0
84 #define FM_AUTO_HILO_ON     1
85
86 #define FM_CHIP_AR1000 0x1000
87 #define FM_CHIP_MT5192 0x91
88 #define FM_CHIP_MT5193 0x92
89 #define FM_CHIP_MT6616 0x6616
90 #define FM_CHIP_MT6626 0x6626
91 #define FM_CHIP_MT6628 0x6628
92 #define FM_CHIP_MT6620 0x6620
93 #define FM_CHIP_UNSUPPORTED 0xffff
94
95 // seek threshold
96 #define FM_SEEKTH_LEVEL_DEFAULT 4
97 #endif
98 //RX
99 #define FM_RX_RSSI_TH_LONG_MT6620    -296      //FM radio long antenna RSSI threshold(-4dBuV)
100 #define FM_RX_RSSI_TH_SHORT_MT6620   -296      //FM radio short antenna RSSI threshold(-4dBuV)
101 #define FM_RX_DESENSE_RSSI_MT6620   -245      
102 #define FM_RX_PAMD_TH_MT6620          -12     
103 #define FM_RX_MR_TH_MT6620           -67      
104 #define FM_RX_ATDC_TH_MT6620           219      
105 #define FM_RX_PRX_TH_MT6620           64      
106 #define FM_RX_SMG_TH_MT6620          6      //FM soft-mute gain threshold
107 #define FM_RX_DEEMPHASIS_MT6620       0           //0-50us, China Mainland; 1-75us China Taiwan
108 #define FM_RX_OSC_FREQ_MT6620         0           //0-26MHz; 1-19MHz; 2-24MHz; 3-38.4MHz; 4-40MHz; 5-52MHz  
109 #if 0
110 #define FM_RX_RSSI_TH_LONG_MT6620    0xF2D8      //FM radio long antenna RSSI threshold(-4dBuV)
111 #define FM_RX_RSSI_TH_SHORT_MT6620   0xF2D8      //FM radio short antenna RSSI threshold(-4dBuV)
112 #define FM_RX_CQI_TH_MT6620          0x00E9      //FM radio Channel quality indicator threshold(0x0000~0x00FF)
113 #define FM_RX_MR_TH_MT6620           0x01BD      //FM radio MR threshold
114 #define FM_RX_SMG_TH_MT6620          0x4025      //FM soft-mute gain threshold
115 #define FM_RX_SEEK_SPACE_MT6620      1           //FM radio seek space,1:100KHZ; 2:200KHZ
116 #define FM_RX_SCAN_CH_SIZE_MT6620    40          //FM radio scan max channel size
117 #define FM_RX_BAND_MT6620            1           //FM radio band, 1:87.5MHz~108.0MHz; 2:76.0MHz~90.0MHz; 3:76.0MHz~108.0MHz; 4:special
118
119 #define FM_RX_SCAN_SORT_SELECT_MT6620 FM_SCAN_SORT_NON
120 #define FM_RX_FAKE_CH_NUM_MT6620      1
121 #define FM_RX_FAKE_CH_RSSI_MT6620     40
122 #define FM_RX_FAKE_CH_1_MT6620        1075
123 #define FM_RX_FAKE_CH_2_MT6620        0
124 #define FM_RX_FAKE_CH_3_MT6620        0
125 #define FM_RX_FAKE_CH_4_MT6620        0
126 #define FM_RX_FAKE_CH_5_MT6620        0
127 #endif
128 //TX
129 #define FM_TX_PWR_LEVEL_MAX_MT6620  120  
130 #define FM_TX_SCAN_HOLE_LOW_MT6620  923         //92.3MHz~95.4MHz should not show to user
131 #define FM_TX_SCAN_HOLE_HIGH_MT6620 954         //92.3MHz~95.4MHz should not show to user
132
133 #endif // __FM_CUST_CFG_H__