aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885
diff options
context:
space:
mode:
authorDavid Wong <davidtlwong@gmail.com>2009-05-18 04:25:49 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:15 -0400
commit493b7127aa56d0a5c041797639bf543d96f6261b (patch)
tree4256b01df6e52efddafc5d8b3c94adb6c39fd016 /drivers/media/video/cx23885
parent3047a17639d499691c657772667f2c1e65edabfb (diff)
V4L/DVB (11880): cx23885: support for card Mygica X8506 DMB-TH
This patch add cx23885 support for card "Mygica X8506 DMB-TH". It should work on "Magic-Pro ProHDTV Extreme" as well, as they are same hardware with different branding. Sign-off-by: David T.L. Wong <davidtlwong@gmail.com> 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.c22
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c35
-rw-r--r--drivers/media/video/cx23885/cx23885.h1
3 files changed, 57 insertions, 1 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index 057ef36d5a63..ce29b5e34a11 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -197,6 +197,10 @@ struct cx23885_board cx23885_boards[] = {
197 .name = "Hauppauge WinTV-HVR1210", 197 .name = "Hauppauge WinTV-HVR1210",
198 .portc = CX23885_MPEG_DVB, 198 .portc = CX23885_MPEG_DVB,
199 }, 199 },
200 [CX23885_BOARD_MYGICA_X8506] = {
201 .name = "Mygica X8506 DMB-TH",
202 .portb = CX23885_MPEG_DVB,
203 },
200}; 204};
201const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 205const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
202 206
@@ -316,6 +320,10 @@ struct cx23885_subid cx23885_subids[] = {
316 .subvendor = 0x0070, 320 .subvendor = 0x0070,
317 .subdevice = 0x2295, 321 .subdevice = 0x2295,
318 .card = CX23885_BOARD_HAUPPAUGE_HVR1210, 322 .card = CX23885_BOARD_HAUPPAUGE_HVR1210,
323 }, {
324 .subvendor = 0x14f1,
325 .subdevice = 0x8651,
326 .card = CX23885_BOARD_MYGICA_X8506,
319 }, 327 },
320}; 328};
321const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 329const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -706,6 +714,15 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
706 mdelay(20); 714 mdelay(20);
707 cx23885_gpio_set(dev, GPIO_9); 715 cx23885_gpio_set(dev, GPIO_9);
708 break; 716 break;
717 case CX23885_BOARD_MYGICA_X8506:
718 /* GPIO-1 reset XC5000 */
719 /* GPIO-2 reset LGS8GL5 */
720 cx_set(GP0_IO, 0x00060000);
721 cx_clear(GP0_IO, 0x00000006);
722 mdelay(100);
723 cx_set(GP0_IO, 0x00060006);
724 mdelay(100);
725 break;
709 } 726 }
710} 727}
711 728
@@ -809,6 +826,11 @@ void cx23885_card_setup(struct cx23885_dev *dev)
809 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ 826 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
810 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; 827 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
811 break; 828 break;
829 case CX23885_BOARD_MYGICA_X8506:
830 ts1->gen_ctrl_val = 0x5; /* Parallel */
831 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
832 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
833 break;
812 case CX23885_BOARD_HAUPPAUGE_HVR1250: 834 case CX23885_BOARD_HAUPPAUGE_HVR1250:
813 case CX23885_BOARD_HAUPPAUGE_HVR1500: 835 case CX23885_BOARD_HAUPPAUGE_HVR1500:
814 case CX23885_BOARD_HAUPPAUGE_HVR1500Q: 836 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 45784a384300..e236df23370e 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -49,6 +49,7 @@
49#include "lnbh24.h" 49#include "lnbh24.h"
50#include "cx24116.h" 50#include "cx24116.h"
51#include "cimax2.h" 51#include "cimax2.h"
52#include "lgs8gxx.h"
52#include "netup-eeprom.h" 53#include "netup-eeprom.h"
53#include "netup-init.h" 54#include "netup-init.h"
54#include "lgdt3305.h" 55#include "lgdt3305.h"
@@ -420,10 +421,29 @@ static struct cx24116_config dvbworld_cx24116_config = {
420 .demod_address = 0x05, 421 .demod_address = 0x05,
421}; 422};
422 423
424static struct lgs8gxx_config mygica_x8506_lgs8gl5_config = {
425 .prod = LGS8GXX_PROD_LGS8GL5,
426 .demod_address = 0x19,
427 .serial_ts = 0,
428 .ts_clk_pol = 1,
429 .ts_clk_gated = 1,
430 .if_clk_freq = 30400, /* 30.4 MHz */
431 .if_freq = 5380, /* 5.38 MHz */
432 .if_neg_center = 1,
433 .ext_adc = 0,
434 .adc_signed = 0,
435 .if_neg_edge = 0,
436};
437
438static struct xc5000_config mygica_x8506_xc5000_config = {
439 .i2c_address = 0x61,
440 .if_khz = 5380,
441};
442
423static int dvb_register(struct cx23885_tsport *port) 443static int dvb_register(struct cx23885_tsport *port)
424{ 444{
425 struct cx23885_dev *dev = port->dev; 445 struct cx23885_dev *dev = port->dev;
426 struct cx23885_i2c *i2c_bus = NULL; 446 struct cx23885_i2c *i2c_bus = NULL, *i2c_bus2 = NULL;
427 struct videobuf_dvb_frontend *fe0; 447 struct videobuf_dvb_frontend *fe0;
428 int ret; 448 int ret;
429 449
@@ -745,6 +765,19 @@ static int dvb_register(struct cx23885_tsport *port)
745 break; 765 break;
746 } 766 }
747 break; 767 break;
768 case CX23885_BOARD_MYGICA_X8506:
769 i2c_bus = &dev->i2c_bus[0];
770 i2c_bus2 = &dev->i2c_bus[1];
771 fe0->dvb.frontend = dvb_attach(lgs8gxx_attach,
772 &mygica_x8506_lgs8gl5_config,
773 &i2c_bus->i2c_adap);
774 if (fe0->dvb.frontend != NULL) {
775 dvb_attach(xc5000_attach,
776 fe0->dvb.frontend,
777 &i2c_bus2->i2c_adap,
778 &mygica_x8506_xc5000_config);
779 }
780 break;
748 default: 781 default:
749 printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " 782 printk(KERN_INFO "%s: The frontend of your DVB/ATSC card "
750 " isn't supported yet\n", 783 " isn't supported yet\n",
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index 5067c19b6594..1a2ac518a3f1 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -75,6 +75,7 @@
75#define CX23885_BOARD_HAUPPAUGE_HVR1275 19 75#define CX23885_BOARD_HAUPPAUGE_HVR1275 19
76#define CX23885_BOARD_HAUPPAUGE_HVR1255 20 76#define CX23885_BOARD_HAUPPAUGE_HVR1255 20
77#define CX23885_BOARD_HAUPPAUGE_HVR1210 21 77#define CX23885_BOARD_HAUPPAUGE_HVR1210 21
78#define CX23885_BOARD_MYGICA_X8506 22
78 79
79#define GPIO_0 0x00000001 80#define GPIO_0 0x00000001
80#define GPIO_1 0x00000002 81#define GPIO_1 0x00000002