Commit ca19aaa5 authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab

V4L/DVB (7569): Added support for SkyStar2 rev2.7 and ITD1000 DVB-S tuner

This patches adds support for the SkyStar2 rev2.7 with the PN1010/ITD1000 Frontend.
Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent c9dd82c2
......@@ -10,6 +10,8 @@ config DVB_B2C2_FLEXCOP
select DVB_BCM3510 if !DVB_FE_CUSTOMISE
select DVB_LGDT330X if !DVB_FE_CUSTOMISE
select TUNER_SIMPLE if !DVB_FE_CUSTOMISE
select DVB_S5H1420 if !DVB_FE_CUSTOMISE
select DVB_TUNER_ITD1000 if !DVB_FE_CUSTOMISE
select DVB_ISL6421 if !DVB_FE_CUSTOMISE
select DVB_CX24123 if !DVB_FE_CUSTOMISE
help
......
......@@ -2,6 +2,7 @@ b2c2-flexcop-objs = flexcop.o flexcop-fe-tuner.o flexcop-i2c.o \
flexcop-sram.o flexcop-eeprom.o flexcop-misc.o flexcop-hw-filter.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o
ifneq ($(CONFIG_DVB_B2C2_FLEXCOP_PCI),)
b2c2-flexcop-objs += flexcop-dma.o
endif
......
......@@ -19,6 +19,9 @@
#include "dvb-pll.h"
#include "tuner-simple.h"
#include "s5h1420.h"
#include "itd1000.h"
#include "cx24123.h"
#include "cx24113.h"
......@@ -482,6 +485,18 @@ static struct stv0297_config alps_tdee4_stv0297_config = {
};
/* SkyStar2 rev2.7 (a/u) */
static struct s5h1420_config skystar2_rev2_7_s5h1420_config = {
.demod_address = 0x53,
.invert = 1,
.repeated_start_workaround = 1,
};
static struct itd1000_config skystar2_rev2_7_itd1000_config = {
.i2c_address = 0x61,
};
/* SkyStar2 rev2.8 */
static struct cx24123_config skystar2_rev2_8_cx24123_config = {
.demod_address = 0x55,
.dont_use_pll = 1,
......@@ -500,6 +515,39 @@ int flexcop_frontend_init(struct flexcop_device *fc)
struct i2c_adapter *i2c = &fc->fc_i2c_adap[0].i2c_adap;
struct i2c_adapter *i2c_tuner;
/* enable no_base_addr - no repeated start when reading */
fc->fc_i2c_adap[0].no_base_addr = 1;
fc->fe = dvb_attach(s5h1420_attach, &skystar2_rev2_7_s5h1420_config, i2c);
if (fc->fe != NULL) {
flexcop_ibi_value r108;
i2c_tuner = s5h1420_get_tuner_i2c_adapter(fc->fe);
ops = &fc->fe->ops;
fc->fe_sleep = ops->sleep;
ops->sleep = flexcop_sleep;
fc->dev_type = FC_SKY_REV27;
/* enable no_base_addr - no repeated start when reading */
fc->fc_i2c_adap[2].no_base_addr = 1;
if (dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, 0x08, 1, 1) == NULL)
err("ISL6421 could NOT be attached");
else
info("ISL6421 successfully attached");
/* the ITD1000 requires a lower i2c clock - it slows down the stuff for everyone - but is it a problem ? */
r108.raw = 0x00000506;
fc->write_ibi_reg(fc, tw_sm_c_108, r108);
if (i2c_tuner) {
if (dvb_attach(itd1000_attach, fc->fe, i2c_tuner, &skystar2_rev2_7_itd1000_config) == NULL)
err("ITD1000 could NOT be attached");
else
info("ITD1000 successfully attached");
}
goto fe_found;
}
fc->fc_i2c_adap[0].no_base_addr = 0; /* for the next devices we need it again */
/* try the sky v2.8 (cx24123, isl6421) */
fc->fe = dvb_attach(cx24123_attach,
&skystar2_rev2_8_cx24123_config, i2c);
......
This diff is collapsed.
/*
* Driver for the Integrant ITD1000 "Zero-IF Tuner IC for Direct Broadcast Satellite"
*
* Copyright (c) 2007 Patrick Boettcher <pb@linuxtv.org>
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#ifndef ITD1000_H
#define ITD1000_H
struct dvb_frontend;
struct i2c_adapter;
struct itd1000_config {
u8 i2c_address;
};
#if defined(CONFIG_DVB_TUNER_ITD1000) || (defined(CONFIG_DVB_TUNER_ITD1000_MODULE) && defined(MODULE))
extern struct dvb_frontend *itd1000_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct itd1000_config *cfg);
#else
static inline struct dvb_frontend *itd1000_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct itd1000_config *cfg)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
#endif
#endif
/*
* Driver for the Integrant ITD1000 "Zero-IF Tuner IC for Direct Broadcast Satellite"
*
* Copyright (c) 2007 Patrick Boettcher <pb@linuxtv.org>
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
*/
#ifndef ITD1000_PRIV_H
#define ITD1000_PRIV_H
struct itd1000_state {
struct itd1000_config *cfg;
struct i2c_adapter *i2c;
u32 frequency; /* contains the value resulting from the LO-setting */
/* ugly workaround for flexcop's incapable i2c-controller
* FIXME, if possible
*/
u8 shadow[255];
};
enum itd1000_register {
VCO_CHP1 = 0x65,
VCO_CHP2,
PLLCON1,
PLLNH,
PLLNL,
PLLFH,
PLLFM,
PLLFL,
RESERVED_0X6D,
PLLLOCK,
VCO_CHP2_I2C,
VCO_CHP1_I2C,
BW,
RESERVED_0X73 = 0x73,
RESERVED_0X74,
RESERVED_0X75,
GVBB,
GVRF,
GVBB_I2C,
EXTGVBBRF,
DIVAGCCK,
BBTR,
RFTR,
BBGVMIN,
RESERVED_0X7E,
RESERVED_0X85 = 0x85,
RESERVED_0X86,
CON1,
RESERVED_0X88,
RESERVED_0X89,
RFST0,
RFST1,
RFST2,
RFST3,
RFST4,
RFST5,
RFST6,
RFST7,
RFST8,
RFST9,
RESERVED_0X94,
RESERVED_0X95,
RESERVED_0X96,
RESERVED_0X97,
RESERVED_0X98,
RESERVED_0X99,
RESERVED_0X9A,
RESERVED_0X9B,
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment