aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885
diff options
context:
space:
mode:
authorStefan Ringel <linuxtv@stefanringel.de>2012-01-07 07:20:48 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-07 08:47:33 -0500
commit722c90eb761195c09b776314f331341095273204 (patch)
tree92a8c614c3ee4a47a69e8b125ba09947143adafc /drivers/media/video/cx23885
parentb247377ace5d965809d0ba8de158dc2e8d28af77 (diff)
[media] cx23885: add Terratec Cinergy T PCIe dual
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c11
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c53
-rw-r--r--drivers/media/video/cx23885/cx23885.h1
3 files changed, 65 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index dc7864eb6b37..3c01be999e35 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -492,6 +492,11 @@ struct cx23885_board cx23885_boards[] = {
492 CX25840_VIN7_CH3, 492 CX25840_VIN7_CH3,
493 }, 493 },
494 }, 494 },
495 },
496 [CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL] = {
497 .name = "TerraTec Cinergy T PCIe Dual",
498 .portb = CX23885_MPEG_DVB,
499 .portc = CX23885_MPEG_DVB,
495 } 500 }
496}; 501};
497const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 502const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
@@ -696,6 +701,10 @@ struct cx23885_subid cx23885_subids[] = {
696 .subvendor = 0x14f1, 701 .subvendor = 0x14f1,
697 .subdevice = 0x8502, 702 .subdevice = 0x8502,
698 .card = CX23885_BOARD_MYGICA_X8507, 703 .card = CX23885_BOARD_MYGICA_X8507,
704 }, {
705 .subvendor = 0x153b,
706 .subdevice = 0x117e,
707 .card = CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL,
699 }, 708 },
700}; 709};
701const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 710const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -1458,6 +1467,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1458 break; 1467 break;
1459 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: 1468 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI:
1460 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF: 1469 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF:
1470 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
1461 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ 1471 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
1462 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ 1472 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
1463 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; 1473 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
@@ -1530,6 +1540,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1530 case CX23885_BOARD_HAUPPAUGE_HVR1500: 1540 case CX23885_BOARD_HAUPPAUGE_HVR1500:
1531 case CX23885_BOARD_MPX885: 1541 case CX23885_BOARD_MPX885:
1532 case CX23885_BOARD_MYGICA_X8507: 1542 case CX23885_BOARD_MYGICA_X8507:
1543 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
1533 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, 1544 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
1534 &dev->i2c_bus[2].i2c_adap, 1545 &dev->i2c_bus[2].i2c_adap,
1535 "cx25840", 0x88 >> 1, NULL); 1546 "cx25840", 0x88 >> 1, NULL);
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index a3906225c493..af8a225763d3 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -61,6 +61,8 @@
61#include "cx23885-f300.h" 61#include "cx23885-f300.h"
62#include "altera-ci.h" 62#include "altera-ci.h"
63#include "stv0367.h" 63#include "stv0367.h"
64#include "drxk.h"
65#include "mt2063.h"
64 66
65static unsigned int debug; 67static unsigned int debug;
66 68
@@ -600,6 +602,24 @@ static struct xc5000_config netup_xc5000_config[] = {
600 }, 602 },
601}; 603};
602 604
605static struct drxk_config terratec_drxk_config[] = {
606 {
607 .adr = 0x29,
608 .no_i2c_bridge = 1,
609 }, {
610 .adr = 0x2a,
611 .no_i2c_bridge = 1,
612 },
613};
614
615static struct mt2063_config terratec_mt2063_config[] = {
616 {
617 .tuner_address = 0x60,
618 }, {
619 .tuner_address = 0x67,
620 },
621};
622
603int netup_altera_fpga_rw(void *device, int flag, int data, int read) 623int netup_altera_fpga_rw(void *device, int flag, int data, int read)
604{ 624{
605 struct cx23885_dev *dev = (struct cx23885_dev *)device; 625 struct cx23885_dev *dev = (struct cx23885_dev *)device;
@@ -1115,6 +1135,39 @@ static int dvb_register(struct cx23885_tsport *port)
1115 goto frontend_detach; 1135 goto frontend_detach;
1116 } 1136 }
1117 break; 1137 break;
1138 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
1139 i2c_bus = &dev->i2c_bus[0];
1140 i2c_bus2 = &dev->i2c_bus[1];
1141
1142 switch (port->nr) {
1143 /* port b */
1144 case 1:
1145 fe0->dvb.frontend = dvb_attach(drxk_attach,
1146 &terratec_drxk_config[0],
1147 &i2c_bus->i2c_adap);
1148 if (fe0->dvb.frontend != NULL) {
1149 if (!dvb_attach(mt2063_attach,
1150 fe0->dvb.frontend,
1151 &terratec_mt2063_config[0],
1152 &i2c_bus2->i2c_adap))
1153 goto frontend_detach;
1154 }
1155 break;
1156 /* port c */
1157 case 2:
1158 fe0->dvb.frontend = dvb_attach(drxk_attach,
1159 &terratec_drxk_config[1],
1160 &i2c_bus->i2c_adap);
1161 if (fe0->dvb.frontend != NULL) {
1162 if (!dvb_attach(mt2063_attach,
1163 fe0->dvb.frontend,
1164 &terratec_mt2063_config[1],
1165 &i2c_bus2->i2c_adap))
1166 goto frontend_detach;
1167 }
1168 break;
1169 }
1170 break;
1118 default: 1171 default:
1119 printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " 1172 printk(KERN_INFO "%s: The frontend of your DVB/ATSC card "
1120 " isn't supported yet\n", 1173 " isn't supported yet\n",
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index 78fdb841cc17..f020f0568df4 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -88,6 +88,7 @@
88#define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000 31 88#define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000 31
89#define CX23885_BOARD_MPX885 32 89#define CX23885_BOARD_MPX885 32
90#define CX23885_BOARD_MYGICA_X8507 33 90#define CX23885_BOARD_MYGICA_X8507 33
91#define CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL 34
91 92
92#define GPIO_0 0x00000001 93#define GPIO_0 0x00000001
93#define GPIO_1 0x00000002 94#define GPIO_1 0x00000002