/*
* stv0367_defs.h
*
* Driver for ST STV0367 DVB-T & DVB-C demodulator IC.
*
* Copyright (C) ST Microelectronics.
* Copyright (C) 2010,2011 NetUP Inc.
* Copyright (C) 2010,2011 Igor M. Liplianin <liplianin@netup.ru>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* GNU General Public License for more details.
*/
#ifndef STV0367_DEFS_H
#define STV0367_DEFS_H
#include "stv0367_regs.h"
#define STV0367_DEFTAB_GENERIC 0
#define STV0367_DEFTAB_DDB 1
#define STV0367_DEFTAB_MAX 2
#define STV0367_TAB_TER 0
#define STV0367_TAB_CAB 1
#define STV0367_TAB_BASE 2
#define STV0367_TAB_MAX 3
struct st_register {
u16 addr;
u8 value;
};
/* values for STV4100 XTAL=30M int clk=53.125M*/
static const struct st_register def0367ter[] = {
{R367TER_ID, 0x60},
{R367TER_I2CRPT, 0xa0},
/* {R367TER_I2CRPT, 0x22},*/
{R367TER_TOPCTRL, 0x00},/* for xc5000; was 0x02 */
{R367TER_IOCFG0, 0x40},
{R367TER_DAC0R, 0x00},
{R367TER_IOCFG1, 0x00},
{R367TER_DAC1R, 0x00},
{R367TER_IOCFG2, 0x62},
{R367TER_SDFR, 0x00},
{R367TER_STATUS, 0xf8},
{R367TER_AUX_CLK, 0x0a},
{R367TER_FREESYS1, 0x00},
{R367TER_FREESYS2, 0x00},
{R367TER_FREESYS3, 0x00},
{R367TER_GPIO_CFG, 0x55},
{R367TER_GPIO_CMD, 0x00},
{R367TER_AGC2MAX, 0xff},
{R367TER_AGC2MIN, 0x00},
{R367TER_AGC1MAX, 0xff},
{R367TER_AGC1MIN, 0x00},
{R367TER_AGCR, 0xbc},
{R367TER_AGC2TH, 0x00},
{R367TER_AGC12C, 0x00},
{R367TER_AGCCTRL1, 0x85},
{R367TER_AGCCTRL2, 0x1f},
{R367TER_AGC1VAL1, 0x00},
{R367TER_AGC1VAL2, 0x00},
{R367TER_AGC2VAL1, 0x6f},
{R367TER_AGC2VAL2, 0x05},
{R367TER_AGC2PGA, 0x00},
{R367TER_OVF_RATE1, 0x00},
{R367TER_OVF_RATE2, 0x00},
{R367TER_GAIN_SRC1, 0xaa},/* for xc5000; was 0x2b */
{R367TER_GAIN_SRC2, 0xd6},/* for xc5000; was 0x04 */
{R367TER_INC_DEROT1, 0x55},
{R367TER_INC_DEROT2, 0x55},
{R367TER_PPM_CPAMP_DIR, 0x2c},
{R367TER_PPM_CPAMP_INV, 0x00},
{R367TER_FREESTFE_1, 0x00},
{R367TER_FREESTFE_2, 0x1c},
{R367TER_DCOFFSET, 0x00},
{R367TER_EN_PROCESS, 0x05},
{R367TER_SDI_SMOOTHER, 0x80},
{R367TER_FE_LOOP_OPEN, 0x1c},
{R367TER_FREQOFF1, 0x00},
{R367TER_FREQOFF2, 0x00},