aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-09-08 14:17:13 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:14:29 -0400
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 09d4376c2e05..cdda11ddf145 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[] = {
109 .gpio0 = 0xff02, 109 .gpio0 = 0xff02,
110 }}, 110 }},
111 }, 111 },
112 [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = {
113 .name = "DViCO FusionHDTV5 Express",
114 .portc = CX23885_MPEG_DVB,
115 },
112}; 116};
113const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 117const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
114 118
@@ -136,6 +140,10 @@ struct cx23885_subid cx23885_subids[] = {
136 .subvendor = 0x0070, 140 .subvendor = 0x0070,
137 .subdevice = 0x7911, 141 .subdevice = 0x7911,
138 .card = CX23885_BOARD_HAUPPAUGE_HVR1250, 142 .card = CX23885_BOARD_HAUPPAUGE_HVR1250,
143 },{
144 .subvendor = 0x18ac,
145 .subdevice = 0xd500,
146 .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP,
139 }, 147 },
140}; 148};
141const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 149const 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 553a72ae163a..bcba19263476 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)
793 cx23885_ir_init(dev); 793 cx23885_ir_init(dev);
794 794
795 switch (dev->board) { 795 switch (dev->board) {
796 case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
797 dev->ts2.reg_gpcnt = VID_B_GPCNT;
798 dev->ts2.reg_gpcnt_ctl = VID_B_GPCNT_CTL;
799 dev->ts2.reg_dma_ctl = VID_B_DMA_CTL;
800 dev->ts2.reg_lngth = VID_B_LNGTH;
801 dev->ts2.reg_hw_sop_ctrl = VID_B_HW_SOP_CTL;
802 dev->ts2.reg_gen_ctrl = VID_B_GEN_CTL;
803 dev->ts2.reg_bd_pkt_status = VID_B_BD_PKT_STATUS;
804 dev->ts2.reg_sop_status = VID_B_SOP_STATUS;
805 dev->ts2.reg_fifo_ovfl_stat = VID_B_FIFO_OVFL_STAT;
806 dev->ts2.reg_vld_misc = VID_B_VLD_MISC;
807 dev->ts2.reg_ts_clk_en = VID_B_TS_CLK_EN;
808 dev->ts2.reg_ts_int_msk = VID_B_INT_MSK;
809 dev->ts2.reg_src_sel = VID_B_SRC_SEL;
810
811 // FIXME: Make this board specific
812 dev->ts2.pci_irqmask = 0x02; /* TS Port 2 bit */
813 dev->ts2.dma_ctl_val = 0x11; /* Enable RISC controller and Fifo */
814 dev->ts2.ts_int_msk_val = 0x1111; /* TS port bits for RISC */
815 dev->ts2.gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
816 dev->ts2.ts_clk_en_val = 0x1; /* Enable TS_CLK */
817 dev->ts2.src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
818
819 // Drive this from cards.c (portb/c) and move it outside of this switch
820 dev->ts2.sram_chno = SRAM_CH03;
821 break;
796 default: 822 default:
797 dev->ts2.reg_gpcnt = VID_C_GPCNT; 823 dev->ts2.reg_gpcnt = VID_C_GPCNT;
798 dev->ts2.reg_gpcnt_ctl = VID_C_GPCNT_CTL; 824 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 ffa4c49d6916..0ace919195df 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -32,6 +32,8 @@
32 32
33#include "s5h1409.h" 33#include "s5h1409.h"
34#include "mt2131.h" 34#include "mt2131.h"
35#include "lgdt330x.h"
36#include "dvb-pll.h"
35 37
36static unsigned int debug = 0; 38static unsigned int debug = 0;
37 39
@@ -101,6 +103,12 @@ static struct mt2131_config hauppauge_generic_tunerconfig = {
101 0x61 103 0x61
102}; 104};
103 105
106static struct lgdt330x_config fusionhdtv_5_express = {
107 .demod_address = 0x0e,
108 .demod_chip = LGDT3303,
109 .serial_mpeg = 0x40,
110};
111
104static int dvb_register(struct cx23885_tsport *port) 112static int dvb_register(struct cx23885_tsport *port)
105{ 113{
106 struct cx23885_dev *dev = port->dev; 114 struct cx23885_dev *dev = port->dev;
@@ -131,6 +139,16 @@ static int dvb_register(struct cx23885_tsport *port)
131 &hauppauge_generic_tunerconfig, 0); 139 &hauppauge_generic_tunerconfig, 0);
132 } 140 }
133 break; 141 break;
142 case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
143 port->dvb.frontend = dvb_attach(lgdt330x_attach,
144 &fusionhdtv_5_express,
145 &dev->i2c_bus[0].i2c_adap);
146 if (port->dvb.frontend != NULL) {
147 dvb_attach(dvb_pll_attach, port->dvb.frontend,
148 0x61, &dev->i2c_bus[0].i2c_adap,
149 DVB_PLL_LG_TDVS_H06XF);
150 }
151 break;
134 default: 152 default:
135 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", 153 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
136 dev->name); 154 dev->name);
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c
index 5572fbbbb5ae..b517c8b5a566 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 = {
305}; 305};
306 306
307static char *i2c_devs[128] = { 307static char *i2c_devs[128] = {
308 [ 0x1c >> 1 ] = "lgdt3303",
309 [ 0x86 >> 1 ] = "tda9887",
308 [ 0x32 >> 1 ] = "cx24227", 310 [ 0x32 >> 1 ] = "cx24227",
309 [ 0x88 >> 1 ] = "cx25837", 311 [ 0x88 >> 1 ] = "cx25837",
310 [ 0x84 >> 1 ] = "tda8295", 312 [ 0x84 >> 1 ] = "tda8295",
311 [ 0xa0 >> 1 ] = "eeprom", 313 [ 0xa0 >> 1 ] = "eeprom",
312 [ 0xc0 >> 1 ] = "mt2131/tda8275", 314 [ 0xc0 >> 1 ] = "tuner/mt2131/tda8275",
313 [ 0xc2 >> 1 ] = "mt2131/tda8275", 315 [ 0xc2 >> 1 ] = "tuner/mt2131/tda8275",
314}; 316};
315 317
316static void do_i2c_scan(char *name, struct i2c_client *c) 318static 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 62b44f6d749f..4933274b1e39 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -54,6 +54,7 @@
54#define CX23885_BOARD_HAUPPAUGE_HVR1800lp 1 54#define CX23885_BOARD_HAUPPAUGE_HVR1800lp 1
55#define CX23885_BOARD_HAUPPAUGE_HVR1800 2 55#define CX23885_BOARD_HAUPPAUGE_HVR1800 2
56#define CX23885_BOARD_HAUPPAUGE_HVR1250 3 56#define CX23885_BOARD_HAUPPAUGE_HVR1250 3
57#define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP 4
57 58
58enum cx23885_itype { 59enum cx23885_itype {
59 CX23885_VMUX_COMPOSITE1 = 1, 60 CX23885_VMUX_COMPOSITE1 = 1,
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 04f6eb5ea292..d98dd0d1e373 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)
507 static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 }; 507 static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 };
508 static const int probe_em28XX[] = { 0x30, 0x47, -1 }; 508 static const int probe_em28XX[] = { 0x30, 0x47, -1 };
509 static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 }; 509 static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
510 static const int probe_cx23885[] = { 0x6b, -1 };
510 const int *probe = NULL; 511 const int *probe = NULL;
511 struct i2c_client c; 512 struct i2c_client c;
512 unsigned char buf; 513 unsigned char buf;
@@ -527,6 +528,8 @@ static int ir_probe(struct i2c_adapter *adap)
527 break; 528 break;
528 case I2C_HW_B_CX2388x: 529 case I2C_HW_B_CX2388x:
529 probe = probe_cx88; 530 probe = probe_cx88;
531 case I2C_HW_B_CX23885:
532 probe = probe_cx23885;
530 break; 533 break;
531 } 534 }
532 if (NULL == probe) 535 if (NULL == probe)
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 2d4a3e38f278..94843086cda9 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)
665 * FusionHDTV5 RT Gold has an ir receiver at 0x6b 665 * FusionHDTV5 RT Gold has an ir receiver at 0x6b
666 * and an RTC at 0x6f which can get corrupted if probed. 666 * and an RTC at 0x6f which can get corrupted if probed.
667 */ 667 */
668 if (adap->id == I2C_HW_B_CX2388x) { 668 if ((adap->id == I2C_HW_B_CX2388x) ||
669 (adap->id == I2C_HW_B_CX23885)) {
669 unsigned int i = 0; 670 unsigned int i = 0;
670 671
671 while (i < I2C_CLIENT_MAX_OPTS && ignore[i] != I2C_CLIENT_END) 672 while (i < I2C_CLIENT_MAX_OPTS && ignore[i] != I2C_CLIENT_END)