MT6620: add the new driver JB2 V1.0
[firefly-linux-kernel-4.4.55.git] / drivers / mtk_wcn_combo / drv_fm / mt6628 / inc / mt6628_fm.h
1 /* mt6628_fm.h
2  *
3  * (C) Copyright 2009 
4  * MediaTek <www.MediaTek.com>
5  * Hongcheng <hongcheng.xia@MediaTek.com>
6  *
7  * MT6628 FM Radio Driver --  head file
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 #ifndef __MT6628_FM_H__
24 #define __MT6628_FM_H__
25
26 #include "fm_typedef.h"
27
28 //#define FM_PowerOn_with_ShortAntenna
29 #define MT6628_RSSI_TH_LONG    0xFF01      //FM radio long antenna RSSI threshold(11.375dBuV)
30 #define MT6628_RSSI_TH_SHORT   0xFEE0      //FM radio short antenna RSSI threshold(-1dBuV)
31 #define MT6628_CQI_TH          0x00E9      //FM radio Channel quality indicator threshold(0x0000~0x00FF)
32 #define MT6628_SEEK_SPACE      1           //FM radio seek space,1:100KHZ; 2:200KHZ
33 #define MT6628_SCAN_CH_SIZE    40          //FM radio scan max channel size
34 #define MT6628_BAND            1           //FM radio band, 1:87.5MHz~108.0MHz; 2:76.0MHz~90.0MHz; 3:76.0MHz~108.0MHz; 4:special
35 #define MT6628_BAND_FREQ_L     875         //FM radio special band low freq(Default 87.5MHz)
36 #define MT6628_BAND_FREQ_H     1080        //FM radio special band high freq(Default 108.0MHz)
37 #define MT6628_DEEMPHASIS_50us TRUE
38
39 #define MT6628_SLAVE_ADDR    0xE0       //0x70 7-bit address
40 #define MT6628_MAX_COUNT     100
41
42 #ifdef MTK_FM_50KHZ_SUPPORT
43 #define MT6628_SCANTBL_SIZE  26 //16*uinit16_t
44 #else
45 #define MT6628_SCANTBL_SIZE  16         //16*uinit16_t
46 #endif
47
48 #define AFC_ON  0x01
49 #if AFC_ON
50 #define FM_MAIN_CTRL_INIT  0x480
51 #else
52 #define FM_MAIN_CTRL_INIT  0x080
53 #endif
54
55 #define ext_clk                         //if define ext_clk use external reference clock or mask will use internal
56 #define MT6628_DEV                      "MT6628"   
57
58 #endif //end of #ifndef __MT6628_FM_H__
59