Path: blob/master/drivers/media/common/tuners/mt2060_priv.h
15112 views
/*1* Driver for Microtune MT2060 "Single chip dual conversion broadband tuner"2*3* Copyright (c) 2006 Olivier DANET <[email protected]>4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13*14* GNU General Public License for more details.15*16* You should have received a copy of the GNU General Public License17* along with this program; if not, write to the Free Software18* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=19*/2021#ifndef MT2060_PRIV_H22#define MT2060_PRIV_H2324// Uncomment the #define below to enable spurs checking. The results where quite unconvincing.25// #define MT2060_SPURCHECK2627/* This driver is based on the information available in the datasheet of the28"Comtech SDVBT-3K6M" tuner ( K1000737843.pdf ) which features the MT2060 register map :2930I2C Address : 0x603132Reg.No | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | ( defaults )33--------------------------------------------------------------------------------3400 | [ PART ] | [ REV ] | R = 0x633501 | [ LNABAND ] | [ NUM1(5:2) ] | RW = 0x3F3602 | [ DIV1 ] | RW = 0x743703 | FM1CA | FM1SS | [ NUM1(1:0) ] | [ NUM2(3:0) ] | RW = 0x003804 | NUM2(11:4) ] | RW = 0x083905 | [ DIV2 ] |NUM2(12)| RW = 0x934006 | L1LK | [ TAD1 ] | L2LK | [ TAD2 ] | R4107 | [ FMF ] | R4208 | ? | FMCAL | ? | ? | ? | ? | ? | TEMP | R4309 | 0 | 0 | [ FMGC ] | 0 | GP02 | GP01 | 0 | RW = 0x20440A | ??450B | 0 | 0 | 1 | 1 | 0 | 0 | [ VGAG ] | RW = 0x30460C | V1CSE | 1 | 1 | 1 | 1 | 1 | 1 | 1 | RW = 0xFF470D | 1 | 0 | [ V1CS ] | RW = 0xB0480E | ??490F | ??5010 | ??5111 | [ LOTO ] | 0 | 0 | 1 | 0 | RW = 0x425253PART : Part code : 6 for MT206054REV : Revision code : 3 for current revision55LNABAND : Input frequency range : ( See code for details )56NUM1 / DIV1 / NUM2 / DIV2 : Frequencies programming ( See code for details )57FM1CA : Calibration Start Bit58FM1SS : Calibration Single Step bit59L1LK : LO1 Lock Detect60TAD1 : Tune Line ADC ( ? )61L2LK : LO2 Lock Detect62TAD2 : Tune Line ADC ( ? )63FMF : Estimated first IF Center frequency Offset ( ? )64FM1CAL : Calibration done bit65TEMP : On chip temperature sensor66FMCG : Mixer 1 Cap Gain ( ? )67GP01 / GP02 : Programmable digital outputs. Unconnected pins ?68V1CSE : LO1 VCO Automatic Capacitor Select Enable ( ? )69V1CS : LO1 Capacitor Selection Value ( ? )70LOTO : LO Timeout ( ? )71VGAG : Tuner Output gain72*/7374#define I2C_ADDRESS 0x607576#define REG_PART_REV 077#define REG_LO1C1 178#define REG_LO1C2 279#define REG_LO2C1 380#define REG_LO2C2 481#define REG_LO2C3 582#define REG_LO_STATUS 683#define REG_FM_FREQ 784#define REG_MISC_STAT 885#define REG_MISC_CTRL 986#define REG_RESERVED_A 0x0A87#define REG_VGAG 0x0B88#define REG_LO1B1 0x0C89#define REG_LO1B2 0x0D90#define REG_LOTO 0x119192#define PART_REV 0x63 // The current driver works only with PART=6 and REV=3 chips9394struct mt2060_priv {95struct mt2060_config *cfg;96struct i2c_adapter *i2c;9798u32 frequency;99u32 bandwidth;100u16 if1_freq;101u8 fmfreq;102};103104#endif105106107