summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-09-08 15:17:13 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 22:14:29 -0300
commit9bc37caadffe8327683980b2323371691fa182e3 (patch)
tree0253bee2e4fc0b13e740760399b0ca26fe2b4703 /drivers
parent579f1163cd5b2a3fd96ec5b84b18a071e7da3b6b (diff)
V4L/DVB (6196): cx23885: add support for DViCO FusionHDTV 5 Express
This patch adds digital ATSC / QAM support for the DViCO FusionHDTV5 Express. Remote control is supported by ir-kbd-i2c, RTC is supported by rtc-isl1208. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c8
-rw-r--r--drivers/media/video/cx23885/cx23885-core.c26
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c18
-rw-r--r--drivers/media/video/cx23885/cx23885-i2c.c6
-rw-r--r--drivers/media/video/cx23885/cx23885.h1
-rw-r--r--drivers/media/video/ir-kbd-i2c.c3
-rw-r--r--drivers/media/video/tuner-core.c3
7 files changed, 62 insertions, 3 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index 09d4376c2e0..cdda11ddf14 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -109,6 +109,10 @@ struct cx23885_board cx23885_boards[] = {
.gpio0 = 0xff02,
}},
},
+ [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = {
+ .name = "DViCO FusionHDTV5 Express",
+ .portc = CX23885_MPEG_DVB,
+ },
};
const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
@@ -136,6 +140,10 @@ struct cx23885_subid cx23885_subids[] = {
.subvendor = 0x0070,
.subdevice = 0x7911,
.card = CX23885_BOARD_HAUPPAUGE_HVR1250,
+ },{
+ .subvendor = 0x18ac,
+ .subdevice = 0xd500,
+ .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP,
},
};
const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c
index 553a72ae163..bcba1926347 100644
--- a/drivers/media/video/cx23885/cx23885-core.c
+++ b/drivers/media/video/cx23885/cx23885-core.c
@@ -793,6 +793,32 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
cx23885_ir_init(dev);
switch (dev->board) {
+ case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
+ dev->ts2.reg_gpcnt = VID_B_GPCNT;
+ dev->ts2.reg_gpcnt_ctl = VID_B_GPCNT_CTL;
+ dev->ts2.reg_dma_ctl = VID_B_DMA_CTL;
+ dev->ts2.reg_lngth = VID_B_LNGTH;
+ dev->ts2.reg_hw_sop_ctrl = VID_B_HW_SOP_CTL;
+ dev->ts2.reg_gen_ctrl = VID_B_GEN_CTL;
+ dev->ts2.reg_bd_pkt_status = VID_B_BD_PKT_STATUS;
+ dev->ts2.reg_sop_status = VID_B_SOP_STATUS;
+ dev->ts2.reg_fifo_ovfl_stat = VID_B_FIFO_OVFL_STAT;
+ dev->ts2.reg_vld_misc = VID_B_VLD_MISC;
+ dev->ts2.reg_ts_clk_en = VID_B_TS_CLK_EN;
+ dev->ts2.reg_ts_int_msk = VID_B_INT_MSK;
+ dev->ts2.reg_src_sel = VID_B_SRC_SEL;
+
+ // FIXME: Make this board specific
+ dev->ts2.pci_irqmask = 0x02; /* TS Port 2 bit */
+ dev->ts2.dma_ctl_val = 0x11; /* Enable RISC controller and Fifo */
+ dev->ts2.ts_int_msk_val = 0x1111; /* TS port bits for RISC */
+ dev->ts2.gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
+ dev->ts2.ts_clk_en_val = 0x1; /* Enable TS_CLK */
+ dev->ts2.src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
+
+ // Drive this from cards.c (portb/c) and move it outside of this switch
+ dev->ts2.sram_chno = SRAM_CH03;
+ break;
default:
dev->ts2.reg_gpcnt = VID_C_GPCNT;
dev->ts2.reg_gpcnt_ctl = VID_C_GPCNT_CTL;
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index ffa4c49d691..0ace919195d 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -32,6 +32,8 @@
#include "s5h1409.h"
#include "mt2131.h"
+#include "lgdt330x.h"
+#include "dvb-pll.h"
static unsigned int debug = 0;
@@ -101,6 +103,12 @@ static struct mt2131_config hauppauge_generic_tunerconfig = {
0x61
};
+static struct lgdt330x_config fusionhdtv_5_express = {
+ .demod_address = 0x0e,
+ .demod_chip = LGDT3303,
+ .serial_mpeg = 0x40,
+};
+
static int dvb_register(struct cx23885_tsport *port)
{
struct cx23885_dev *dev = port->dev;
@@ -131,6 +139,16 @@ static int dvb_register(struct cx23885_tsport *port)
&hauppauge_generic_tunerconfig, 0);
}
break;
+ case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
+ port->dvb.frontend = dvb_attach(lgdt330x_attach,
+ &fusionhdtv_5_express,
+ &dev->i2c_bus[0].i2c_adap);
+ if (port->dvb.frontend != NULL) {
+ dvb_attach(dvb_pll_attach, port->dvb.frontend,
+ 0x61, &dev->i2c_bus[0].i2c_adap,
+ DVB_PLL_LG_TDVS_H06XF);
+ }
+ break;
default:
printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
dev->name);
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c
index 5572fbbbb5a..b517c8b5a56 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -305,12 +305,14 @@ static struct i2c_client cx23885_i2c_client_template = {
};
static char *i2c_devs[128] = {
+ [ 0x1c >> 1 ] = "lgdt3303",
+ [ 0x86 >> 1 ] = "tda9887",
[ 0x32 >> 1 ] = "cx24227",
[ 0x88 >> 1 ] = "cx25837",
[ 0x84 >> 1 ] = "tda8295",
[ 0xa0 >> 1 ] = "eeprom",
- [ 0xc0 >> 1 ] = "mt2131/tda8275",
- [ 0xc2 >> 1 ] = "mt2131/tda8275",
+ [ 0xc0 >> 1 ] = "tuner/mt2131/tda8275",
+ [ 0xc2 >> 1 ] = "tuner/mt2131/tda8275",
};
static void do_i2c_scan(char *name, struct i2c_client *c)
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index 62b44f6d749..4933274b1e3 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -54,6 +54,7 @@
#define CX23885_BOARD_HAUPPAUGE_HVR1800lp 1
#define CX23885_BOARD_HAUPPAUGE_HVR1800 2
#define CX23885_BOARD_HAUPPAUGE_HVR1250 3
+#define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP 4
enum cx23885_itype {
CX23885_VMUX_COMPOSITE1 = 1,
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 04f6eb5ea29..d98dd0d1e37 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -507,6 +507,7 @@ static int ir_probe(struct i2c_adapter *adap)
static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 };
static const int probe_em28XX[] = { 0x30, 0x47, -1 };
static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
+ static const int probe_cx23885[] = { 0x6b, -1 };
const int *probe = NULL;
struct i2c_client c;
unsigned char buf;
@@ -527,6 +528,8 @@ static int ir_probe(struct i2c_adapter *adap)
break;
case I2C_HW_B_CX2388x:
probe = probe_cx88;
+ case I2C_HW_B_CX23885:
+ probe = probe_cx23885;
break;
}
if (NULL == probe)
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 2d4a3e38f27..94843086cda 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -665,7 +665,8 @@ static int tuner_probe(struct i2c_adapter *adap)
* FusionHDTV5 RT Gold has an ir receiver at 0x6b
* and an RTC at 0x6f which can get corrupted if probed.
*/
- if (adap->id == I2C_HW_B_CX2388x) {
+ if ((adap->id == I2C_HW_B_CX2388x) ||
+ (adap->id == I2C_HW_B_CX23885)) {
unsigned int i = 0;
while (i < I2C_CLIENT_MAX_OPTS && ignore[i] != I2C_CLIENT_END)