18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Support for AltoBeam GB20600 (a.k.a DMB-TH) demodulator 48c2ecf20Sopenharmony_ci * ATBM8830, ATBM8831 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 2009 David T.L. Wong <davidtlwong@gmail.com> 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __ATBM8830_PRIV_H 108c2ecf20Sopenharmony_ci#define __ATBM8830_PRIV_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cistruct atbm_state { 138c2ecf20Sopenharmony_ci struct i2c_adapter *i2c; 148c2ecf20Sopenharmony_ci /* configuration settings */ 158c2ecf20Sopenharmony_ci const struct atbm8830_config *config; 168c2ecf20Sopenharmony_ci struct dvb_frontend frontend; 178c2ecf20Sopenharmony_ci}; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define REG_CHIP_ID 0x0000 208c2ecf20Sopenharmony_ci#define REG_TUNER_BASEBAND 0x0001 218c2ecf20Sopenharmony_ci#define REG_DEMOD_RUN 0x0004 228c2ecf20Sopenharmony_ci#define REG_DSP_RESET 0x0005 238c2ecf20Sopenharmony_ci#define REG_RAM_RESET 0x0006 248c2ecf20Sopenharmony_ci#define REG_ADC_RESET 0x0007 258c2ecf20Sopenharmony_ci#define REG_TSPORT_RESET 0x0008 268c2ecf20Sopenharmony_ci#define REG_BLKERR_POL 0x000C 278c2ecf20Sopenharmony_ci#define REG_I2C_GATE 0x0103 288c2ecf20Sopenharmony_ci#define REG_TS_SAMPLE_EDGE 0x0301 298c2ecf20Sopenharmony_ci#define REG_TS_PKT_LEN_204 0x0302 308c2ecf20Sopenharmony_ci#define REG_TS_PKT_LEN_AUTO 0x0303 318c2ecf20Sopenharmony_ci#define REG_TS_SERIAL 0x0305 328c2ecf20Sopenharmony_ci#define REG_TS_CLK_FREERUN 0x0306 338c2ecf20Sopenharmony_ci#define REG_TS_VALID_MODE 0x0307 348c2ecf20Sopenharmony_ci#define REG_TS_CLK_MODE 0x030B /* 1 for serial, 0 for parallel */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define REG_TS_ERRBIT_USE 0x030C 378c2ecf20Sopenharmony_ci#define REG_LOCK_STATUS 0x030D 388c2ecf20Sopenharmony_ci#define REG_ADC_CONFIG 0x0602 398c2ecf20Sopenharmony_ci#define REG_CARRIER_OFFSET 0x0827 /* 0x0827-0x0829 little endian */ 408c2ecf20Sopenharmony_ci#define REG_DETECTED_PN_MODE 0x082D 418c2ecf20Sopenharmony_ci#define REG_READ_LATCH 0x084D 428c2ecf20Sopenharmony_ci#define REG_IF_FREQ 0x0A00 /* 0x0A00-0x0A02 little endian */ 438c2ecf20Sopenharmony_ci#define REG_OSC_CLK 0x0A03 /* 0x0A03-0x0A05 little endian */ 448c2ecf20Sopenharmony_ci#define REG_BYPASS_CCI 0x0A06 458c2ecf20Sopenharmony_ci#define REG_ANALOG_LUMA_DETECTED 0x0A25 468c2ecf20Sopenharmony_ci#define REG_ANALOG_AUDIO_DETECTED 0x0A26 478c2ecf20Sopenharmony_ci#define REG_ANALOG_CHROMA_DETECTED 0x0A39 488c2ecf20Sopenharmony_ci#define REG_FRAME_ERR_CNT 0x0B04 498c2ecf20Sopenharmony_ci#define REG_USE_EXT_ADC 0x0C00 508c2ecf20Sopenharmony_ci#define REG_SWAP_I_Q 0x0C01 518c2ecf20Sopenharmony_ci#define REG_TPS_MANUAL 0x0D01 528c2ecf20Sopenharmony_ci#define REG_TPS_CONFIG 0x0D02 538c2ecf20Sopenharmony_ci#define REG_BYPASS_DEINTERLEAVER 0x0E00 548c2ecf20Sopenharmony_ci#define REG_AGC_TARGET 0x1003 /* 0x1003-0x1005 little endian */ 558c2ecf20Sopenharmony_ci#define REG_AGC_MIN 0x1020 568c2ecf20Sopenharmony_ci#define REG_AGC_MAX 0x1023 578c2ecf20Sopenharmony_ci#define REG_AGC_LOCK 0x1027 588c2ecf20Sopenharmony_ci#define REG_AGC_PWM_VAL 0x1028 /* 0x1028-0x1029 little endian */ 598c2ecf20Sopenharmony_ci#define REG_AGC_HOLD_LOOP 0x1031 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#endif 628c2ecf20Sopenharmony_ci 63