18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Driver for Zarlink DVB-T MT352 demodulator 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Written by Holger Waechtler <holger@qanu.de> 68c2ecf20Sopenharmony_ci * and Daniel Mack <daniel@qanu.de> 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * AVerMedia AVerTV DVB-T 771 support by 98c2ecf20Sopenharmony_ci * Wolfram Joost <dbox2@frokaschwei.de> 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Support for Samsung TDTC9251DH01C(M) tuner 128c2ecf20Sopenharmony_ci * Copyright (C) 2004 Antonio Mancuso <antonio.mancuso@digitaltelevision.it> 138c2ecf20Sopenharmony_ci * Amauri Celani <acelani@essegi.net> 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * DVICO FusionHDTV DVB-T1 and DVICO FusionHDTV DVB-T Lite support by 168c2ecf20Sopenharmony_ci * Christopher Pascoe <c.pascoe@itee.uq.edu.au> 178c2ecf20Sopenharmony_ci */ 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#ifndef _MT352_PRIV_ 208c2ecf20Sopenharmony_ci#define _MT352_PRIV_ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define ID_MT352 0x13 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define msb(x) (((x) >> 8) & 0xff) 258c2ecf20Sopenharmony_ci#define lsb(x) ((x) & 0xff) 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cienum mt352_reg_addr { 288c2ecf20Sopenharmony_ci STATUS_0 = 0x00, 298c2ecf20Sopenharmony_ci STATUS_1 = 0x01, 308c2ecf20Sopenharmony_ci STATUS_2 = 0x02, 318c2ecf20Sopenharmony_ci STATUS_3 = 0x03, 328c2ecf20Sopenharmony_ci STATUS_4 = 0x04, 338c2ecf20Sopenharmony_ci INTERRUPT_0 = 0x05, 348c2ecf20Sopenharmony_ci INTERRUPT_1 = 0x06, 358c2ecf20Sopenharmony_ci INTERRUPT_2 = 0x07, 368c2ecf20Sopenharmony_ci INTERRUPT_3 = 0x08, 378c2ecf20Sopenharmony_ci SNR = 0x09, 388c2ecf20Sopenharmony_ci VIT_ERR_CNT_2 = 0x0A, 398c2ecf20Sopenharmony_ci VIT_ERR_CNT_1 = 0x0B, 408c2ecf20Sopenharmony_ci VIT_ERR_CNT_0 = 0x0C, 418c2ecf20Sopenharmony_ci RS_ERR_CNT_2 = 0x0D, 428c2ecf20Sopenharmony_ci RS_ERR_CNT_1 = 0x0E, 438c2ecf20Sopenharmony_ci RS_ERR_CNT_0 = 0x0F, 448c2ecf20Sopenharmony_ci RS_UBC_1 = 0x10, 458c2ecf20Sopenharmony_ci RS_UBC_0 = 0x11, 468c2ecf20Sopenharmony_ci AGC_GAIN_3 = 0x12, 478c2ecf20Sopenharmony_ci AGC_GAIN_2 = 0x13, 488c2ecf20Sopenharmony_ci AGC_GAIN_1 = 0x14, 498c2ecf20Sopenharmony_ci AGC_GAIN_0 = 0x15, 508c2ecf20Sopenharmony_ci FREQ_OFFSET_2 = 0x17, 518c2ecf20Sopenharmony_ci FREQ_OFFSET_1 = 0x18, 528c2ecf20Sopenharmony_ci FREQ_OFFSET_0 = 0x19, 538c2ecf20Sopenharmony_ci TIMING_OFFSET_1 = 0x1A, 548c2ecf20Sopenharmony_ci TIMING_OFFSET_0 = 0x1B, 558c2ecf20Sopenharmony_ci CHAN_FREQ_1 = 0x1C, 568c2ecf20Sopenharmony_ci CHAN_FREQ_0 = 0x1D, 578c2ecf20Sopenharmony_ci TPS_RECEIVED_1 = 0x1E, 588c2ecf20Sopenharmony_ci TPS_RECEIVED_0 = 0x1F, 598c2ecf20Sopenharmony_ci TPS_CURRENT_1 = 0x20, 608c2ecf20Sopenharmony_ci TPS_CURRENT_0 = 0x21, 618c2ecf20Sopenharmony_ci TPS_CELL_ID_1 = 0x22, 628c2ecf20Sopenharmony_ci TPS_CELL_ID_0 = 0x23, 638c2ecf20Sopenharmony_ci TPS_MISC_DATA_2 = 0x24, 648c2ecf20Sopenharmony_ci TPS_MISC_DATA_1 = 0x25, 658c2ecf20Sopenharmony_ci TPS_MISC_DATA_0 = 0x26, 668c2ecf20Sopenharmony_ci RESET = 0x50, 678c2ecf20Sopenharmony_ci TPS_GIVEN_1 = 0x51, 688c2ecf20Sopenharmony_ci TPS_GIVEN_0 = 0x52, 698c2ecf20Sopenharmony_ci ACQ_CTL = 0x53, 708c2ecf20Sopenharmony_ci TRL_NOMINAL_RATE_1 = 0x54, 718c2ecf20Sopenharmony_ci TRL_NOMINAL_RATE_0 = 0x55, 728c2ecf20Sopenharmony_ci INPUT_FREQ_1 = 0x56, 738c2ecf20Sopenharmony_ci INPUT_FREQ_0 = 0x57, 748c2ecf20Sopenharmony_ci TUNER_ADDR = 0x58, 758c2ecf20Sopenharmony_ci CHAN_START_1 = 0x59, 768c2ecf20Sopenharmony_ci CHAN_START_0 = 0x5A, 778c2ecf20Sopenharmony_ci CONT_1 = 0x5B, 788c2ecf20Sopenharmony_ci CONT_0 = 0x5C, 798c2ecf20Sopenharmony_ci TUNER_GO = 0x5D, 808c2ecf20Sopenharmony_ci STATUS_EN_0 = 0x5F, 818c2ecf20Sopenharmony_ci STATUS_EN_1 = 0x60, 828c2ecf20Sopenharmony_ci INTERRUPT_EN_0 = 0x61, 838c2ecf20Sopenharmony_ci INTERRUPT_EN_1 = 0x62, 848c2ecf20Sopenharmony_ci INTERRUPT_EN_2 = 0x63, 858c2ecf20Sopenharmony_ci INTERRUPT_EN_3 = 0x64, 868c2ecf20Sopenharmony_ci AGC_TARGET = 0x67, 878c2ecf20Sopenharmony_ci AGC_CTL = 0x68, 888c2ecf20Sopenharmony_ci CAPT_RANGE = 0x75, 898c2ecf20Sopenharmony_ci SNR_SELECT_1 = 0x79, 908c2ecf20Sopenharmony_ci SNR_SELECT_0 = 0x7A, 918c2ecf20Sopenharmony_ci RS_ERR_PER_1 = 0x7C, 928c2ecf20Sopenharmony_ci RS_ERR_PER_0 = 0x7D, 938c2ecf20Sopenharmony_ci CHIP_ID = 0x7F, 948c2ecf20Sopenharmony_ci CHAN_STOP_1 = 0x80, 958c2ecf20Sopenharmony_ci CHAN_STOP_0 = 0x81, 968c2ecf20Sopenharmony_ci CHAN_STEP_1 = 0x82, 978c2ecf20Sopenharmony_ci CHAN_STEP_0 = 0x83, 988c2ecf20Sopenharmony_ci FEC_LOCK_TIME = 0x85, 998c2ecf20Sopenharmony_ci OFDM_LOCK_TIME = 0x86, 1008c2ecf20Sopenharmony_ci ACQ_DELAY = 0x87, 1018c2ecf20Sopenharmony_ci SCAN_CTL = 0x88, 1028c2ecf20Sopenharmony_ci CLOCK_CTL = 0x89, 1038c2ecf20Sopenharmony_ci CONFIG = 0x8A, 1048c2ecf20Sopenharmony_ci MCLK_RATIO = 0x8B, 1058c2ecf20Sopenharmony_ci GPP_CTL = 0x8C, 1068c2ecf20Sopenharmony_ci ADC_CTL_1 = 0x8E, 1078c2ecf20Sopenharmony_ci ADC_CTL_0 = 0x8F 1088c2ecf20Sopenharmony_ci}; 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci/* here we assume 1/6MHz == 166.66kHz stepsize */ 1118c2ecf20Sopenharmony_ci#define IF_FREQUENCYx6 217 /* 6 * 36.16666666667MHz */ 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#endif /* _MT352_PRIV_ */ 114