1*c942fddfSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 23e54a169SMatthias Schwarzott /* 37dbbb4bfSMatthias Schwarzott * Driver for Silicon Labs SI2165 DVB-C/-T Demodulator 47dbbb4bfSMatthias Schwarzott * 57dbbb4bfSMatthias Schwarzott * Copyright (C) 2013-2017 Matthias Schwarzott <zzam@gentoo.org> 63e54a169SMatthias Schwarzott */ 73e54a169SMatthias Schwarzott 83e54a169SMatthias Schwarzott #ifndef _DVB_SI2165_PRIV 93e54a169SMatthias Schwarzott #define _DVB_SI2165_PRIV 103e54a169SMatthias Schwarzott 1155bea400SMatthias Schwarzott #define SI2165_FIRMWARE_REV_D "dvb-demod-si2165.fw" 123e54a169SMatthias Schwarzott 1381fd533aSMatthias Schwarzott struct si2165_config { 1481fd533aSMatthias Schwarzott /* i2c addr 157dbbb4bfSMatthias Schwarzott * possible values: 0x64,0x65,0x66,0x67 167dbbb4bfSMatthias Schwarzott */ 1781fd533aSMatthias Schwarzott u8 i2c_addr; 1881fd533aSMatthias Schwarzott 1981fd533aSMatthias Schwarzott /* external clock or XTAL */ 2081fd533aSMatthias Schwarzott u8 chip_mode; 2181fd533aSMatthias Schwarzott 2281fd533aSMatthias Schwarzott /* frequency of external clock or xtal in Hz 2381fd533aSMatthias Schwarzott * possible values: 4000000, 16000000, 20000000, 240000000, 27000000 2481fd533aSMatthias Schwarzott */ 257dbbb4bfSMatthias Schwarzott u32 ref_freq_hz; 2681fd533aSMatthias Schwarzott 2781fd533aSMatthias Schwarzott /* invert the spectrum */ 2881fd533aSMatthias Schwarzott bool inversion; 2981fd533aSMatthias Schwarzott }; 3081fd533aSMatthias Schwarzott 31964b3727SMatthias Schwarzott #define STATISTICS_PERIOD_PKT_COUNT 30000u 32964b3727SMatthias Schwarzott #define STATISTICS_PERIOD_BIT_COUNT (STATISTICS_PERIOD_PKT_COUNT * 204 * 8) 33964b3727SMatthias Schwarzott 34814f86c9SMatthias Schwarzott #define REG_CHIP_MODE 0x0000 35814f86c9SMatthias Schwarzott #define REG_CHIP_REVCODE 0x0023 36814f86c9SMatthias Schwarzott #define REV_CHIP_TYPE 0x0118 37814f86c9SMatthias Schwarzott #define REG_CHIP_INIT 0x0050 38814f86c9SMatthias Schwarzott #define REG_INIT_DONE 0x0054 39814f86c9SMatthias Schwarzott #define REG_START_INIT 0x0096 40814f86c9SMatthias Schwarzott #define REG_PLL_DIVL 0x00a0 41814f86c9SMatthias Schwarzott #define REG_RST_ALL 0x00c0 42814f86c9SMatthias Schwarzott #define REG_LOCK_TIMEOUT 0x00c4 43814f86c9SMatthias Schwarzott #define REG_AUTO_RESET 0x00cb 44814f86c9SMatthias Schwarzott #define REG_OVERSAMP 0x00e4 45814f86c9SMatthias Schwarzott #define REG_IF_FREQ_SHIFT 0x00e8 46814f86c9SMatthias Schwarzott #define REG_DVB_STANDARD 0x00ec 47814f86c9SMatthias Schwarzott #define REG_DSP_CLOCK 0x0104 48814f86c9SMatthias Schwarzott #define REG_ADC_RI8 0x0123 49814f86c9SMatthias Schwarzott #define REG_ADC_RI1 0x012a 50814f86c9SMatthias Schwarzott #define REG_ADC_RI2 0x012b 51814f86c9SMatthias Schwarzott #define REG_ADC_RI3 0x012c 52814f86c9SMatthias Schwarzott #define REG_ADC_RI4 0x012d 53814f86c9SMatthias Schwarzott #define REG_ADC_RI5 0x012e 54814f86c9SMatthias Schwarzott #define REG_ADC_RI6 0x012f 55814f86c9SMatthias Schwarzott #define REG_AGC_CRESTF_DBX8 0x0150 56814f86c9SMatthias Schwarzott #define REG_AGC_UNFREEZE_THR 0x015b 57814f86c9SMatthias Schwarzott #define REG_AGC2_MIN 0x016e 58814f86c9SMatthias Schwarzott #define REG_AGC2_KACQ 0x016c 59814f86c9SMatthias Schwarzott #define REG_AGC2_KLOC 0x016d 60814f86c9SMatthias Schwarzott #define REG_AGC2_OUTPUT 0x0170 61814f86c9SMatthias Schwarzott #define REG_AGC2_CLKDIV 0x0171 62814f86c9SMatthias Schwarzott #define REG_AGC_IF_TRI 0x018b 63814f86c9SMatthias Schwarzott #define REG_AGC_IF_SLR 0x0190 64814f86c9SMatthias Schwarzott #define REG_AAF_CRESTF_DBX8 0x01a0 65814f86c9SMatthias Schwarzott #define REG_ACI_CRESTF_DBX8 0x01c8 66814f86c9SMatthias Schwarzott #define REG_SWEEP_STEP 0x0232 67814f86c9SMatthias Schwarzott #define REG_KP_LOCK 0x023a 68814f86c9SMatthias Schwarzott #define REG_UNKNOWN_24C 0x024c 69814f86c9SMatthias Schwarzott #define REG_CENTRAL_TAP 0x0261 70c0675d0bSMatthias Schwarzott #define REG_C_N 0x026c 71814f86c9SMatthias Schwarzott #define REG_EQ_AUTO_CONTROL 0x0278 72814f86c9SMatthias Schwarzott #define REG_UNKNOWN_27C 0x027c 73814f86c9SMatthias Schwarzott #define REG_START_SYNCHRO 0x02e0 74814f86c9SMatthias Schwarzott #define REG_REQ_CONSTELLATION 0x02f4 75814f86c9SMatthias Schwarzott #define REG_T_BANDWIDTH 0x0308 76814f86c9SMatthias Schwarzott #define REG_FREQ_SYNC_RANGE 0x030c 77814f86c9SMatthias Schwarzott #define REG_IMPULSIVE_NOISE_REM 0x031c 78814f86c9SMatthias Schwarzott #define REG_WDOG_AND_BOOT 0x0341 79814f86c9SMatthias Schwarzott #define REG_PATCH_VERSION 0x0344 80814f86c9SMatthias Schwarzott #define REG_ADDR_JUMP 0x0348 81814f86c9SMatthias Schwarzott #define REG_UNKNOWN_350 0x0350 82814f86c9SMatthias Schwarzott #define REG_EN_RST_ERROR 0x035c 83814f86c9SMatthias Schwarzott #define REG_DCOM_CONTROL_BYTE 0x0364 84814f86c9SMatthias Schwarzott #define REG_DCOM_ADDR 0x0368 85814f86c9SMatthias Schwarzott #define REG_DCOM_DATA 0x036c 86814f86c9SMatthias Schwarzott #define REG_RST_CRC 0x0379 87814f86c9SMatthias Schwarzott #define REG_GP_REG0_LSB 0x0384 88814f86c9SMatthias Schwarzott #define REG_GP_REG0_MSB 0x0387 89814f86c9SMatthias Schwarzott #define REG_CRC 0x037a 901e5fde1bSMatthias Schwarzott #define REG_CHECK_SIGNAL 0x03a8 91964b3727SMatthias Schwarzott #define REG_CBER_RST 0x0424 92964b3727SMatthias Schwarzott #define REG_CBER_BIT 0x0428 93964b3727SMatthias Schwarzott #define REG_CBER_ERR 0x0430 94964b3727SMatthias Schwarzott #define REG_CBER_AVAIL 0x0434 951e5fde1bSMatthias Schwarzott #define REG_PS_LOCK 0x0440 96964b3727SMatthias Schwarzott #define REG_UNCOR_CNT 0x0468 97964b3727SMatthias Schwarzott #define REG_BER_RST 0x046c 98814f86c9SMatthias Schwarzott #define REG_BER_PKT 0x0470 99964b3727SMatthias Schwarzott #define REG_BER_BIT 0x0478 100964b3727SMatthias Schwarzott #define REG_BER_AVAIL 0x047c 101814f86c9SMatthias Schwarzott #define REG_FEC_LOCK 0x04e0 102814f86c9SMatthias Schwarzott #define REG_TS_DATA_MODE 0x04e4 103814f86c9SMatthias Schwarzott #define REG_TS_CLK_MODE 0x04e5 104814f86c9SMatthias Schwarzott #define REG_TS_TRI 0x04ef 105814f86c9SMatthias Schwarzott #define REG_TS_SLR 0x04f4 106814f86c9SMatthias Schwarzott #define REG_RSSI_ENABLE 0x0641 107814f86c9SMatthias Schwarzott #define REG_RSSI_PAD_CTRL 0x0646 108814f86c9SMatthias Schwarzott #define REG_TS_PARALLEL_MODE 0x08f8 109814f86c9SMatthias Schwarzott 1103e54a169SMatthias Schwarzott #endif /* _DVB_SI2165_PRIV */ 111