aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid T. L. Wong <davidtlwong@gmail.com>2009-10-26 07:54:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:34 -0500
commitea5697fe9ed6a1d534de436eff3138041e3c8aa9 (patch)
tree7df0cce326d385d3e2e91a8f8ffdb5ce7fa0d99a /drivers
parentec27b6aafb1796a09aad401143f70ad079421ca4 (diff)
V4L/DVB (13375): cx23885: Add support for Mygica X8558Pro DMB-TH
Adds support for cx23885 card Mygica X8558 Pro DMB-TH Signed-off-by: David T. L. Wong <davidtlwong@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c26
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c64
-rw-r--r--drivers/media/video/cx23885/cx23885.h1
3 files changed, 91 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index d9d71c8c7941..23302ddf4187 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -269,6 +269,11 @@ struct cx23885_board cx23885_boards[] = {
269 .name = "Hauppauge WinTV-HVR1290", 269 .name = "Hauppauge WinTV-HVR1290",
270 .portc = CX23885_MPEG_DVB, 270 .portc = CX23885_MPEG_DVB,
271 }, 271 },
272 [CX23885_BOARD_MYGICA_X8558PRO] = {
273 .name = "Mygica X8558 PRO DMB-TH",
274 .portb = CX23885_MPEG_DVB,
275 .portc = CX23885_MPEG_DVB,
276 },
272}; 277};
273const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 278const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
274 279
@@ -408,6 +413,10 @@ struct cx23885_subid cx23885_subids[] = {
408 .subvendor = 0x0070, 413 .subvendor = 0x0070,
409 .subdevice = 0x8551, 414 .subdevice = 0x8551,
410 .card = CX23885_BOARD_HAUPPAUGE_HVR1290, 415 .card = CX23885_BOARD_HAUPPAUGE_HVR1290,
416 }, {
417 .subvendor = 0x14f1,
418 .subdevice = 0x8578,
419 .card = CX23885_BOARD_MYGICA_X8558PRO,
411 }, 420 },
412}; 421};
413const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 422const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -830,6 +839,15 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
830 cx23885_gpio_set(dev, GPIO_0 | GPIO_1 | GPIO_2); 839 cx23885_gpio_set(dev, GPIO_0 | GPIO_1 | GPIO_2);
831 mdelay(100); 840 mdelay(100);
832 break; 841 break;
842 case CX23885_BOARD_MYGICA_X8558PRO:
843 /* GPIO-0 reset first ATBM8830 */
844 /* GPIO-1 reset second ATBM8830 */
845 cx23885_gpio_enable(dev, GPIO_0 | GPIO_1, 1);
846 cx23885_gpio_clear(dev, GPIO_0 | GPIO_1);
847 mdelay(100);
848 cx23885_gpio_set(dev, GPIO_0 | GPIO_1);
849 mdelay(100);
850 break;
833 case CX23885_BOARD_HAUPPAUGE_HVR1850: 851 case CX23885_BOARD_HAUPPAUGE_HVR1850:
834 case CX23885_BOARD_HAUPPAUGE_HVR1290: 852 case CX23885_BOARD_HAUPPAUGE_HVR1290:
835 /* GPIO-0 656_CLK */ 853 /* GPIO-0 656_CLK */
@@ -1005,6 +1023,14 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1005 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ 1023 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
1006 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; 1024 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
1007 break; 1025 break;
1026 case CX23885_BOARD_MYGICA_X8558PRO:
1027 ts1->gen_ctrl_val = 0x5; /* Parallel */
1028 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
1029 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
1030 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
1031 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
1032 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
1033 break;
1008 case CX23885_BOARD_HAUPPAUGE_HVR1250: 1034 case CX23885_BOARD_HAUPPAUGE_HVR1250:
1009 case CX23885_BOARD_HAUPPAUGE_HVR1500: 1035 case CX23885_BOARD_HAUPPAUGE_HVR1500:
1010 case CX23885_BOARD_HAUPPAUGE_HVR1500Q: 1036 case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 133e80290711..bf24e86293c6 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -38,6 +38,7 @@
38#include "tda18271.h" 38#include "tda18271.h"
39#include "lgdt330x.h" 39#include "lgdt330x.h"
40#include "xc5000.h" 40#include "xc5000.h"
41#include "max2165.h"
41#include "tda10048.h" 42#include "tda10048.h"
42#include "tuner-xc2028.h" 43#include "tuner-xc2028.h"
43#include "tuner-simple.h" 44#include "tuner-simple.h"
@@ -54,6 +55,7 @@
54#include "netup-eeprom.h" 55#include "netup-eeprom.h"
55#include "netup-init.h" 56#include "netup-init.h"
56#include "lgdt3305.h" 57#include "lgdt3305.h"
58#include "atbm8830.h"
57 59
58static unsigned int debug; 60static unsigned int debug;
59 61
@@ -543,6 +545,38 @@ static struct xc5000_config magicpro_prohdtve2_xc5000_config = {
543 .if_khz = 6500, 545 .if_khz = 6500,
544}; 546};
545 547
548static struct atbm8830_config mygica_x8558pro_atbm8830_cfg1 = {
549 .prod = ATBM8830_PROD_8830,
550 .demod_address = 0x44,
551 .serial_ts = 0,
552 .ts_sampling_edge = 1,
553 .ts_clk_gated = 0,
554 .osc_clk_freq = 30400, /* in kHz */
555 .if_freq = 0, /* zero IF */
556 .zif_swap_iq = 1,
557};
558
559static struct max2165_config mygic_x8558pro_max2165_cfg1 = {
560 .i2c_address = 0x60,
561 .osc_clk = 20
562};
563
564static struct atbm8830_config mygica_x8558pro_atbm8830_cfg2 = {
565 .prod = ATBM8830_PROD_8830,
566 .demod_address = 0x44,
567 .serial_ts = 1,
568 .ts_sampling_edge = 1,
569 .ts_clk_gated = 0,
570 .osc_clk_freq = 30400, /* in kHz */
571 .if_freq = 0, /* zero IF */
572 .zif_swap_iq = 1,
573};
574
575static struct max2165_config mygic_x8558pro_max2165_cfg2 = {
576 .i2c_address = 0x60,
577 .osc_clk = 20
578};
579
546static int dvb_register(struct cx23885_tsport *port) 580static int dvb_register(struct cx23885_tsport *port)
547{ 581{
548 struct cx23885_dev *dev = port->dev; 582 struct cx23885_dev *dev = port->dev;
@@ -908,6 +942,36 @@ static int dvb_register(struct cx23885_tsport *port)
908 0x60, &dev->i2c_bus[0].i2c_adap, 942 0x60, &dev->i2c_bus[0].i2c_adap,
909 &hauppauge_tda18271_config); 943 &hauppauge_tda18271_config);
910 break; 944 break;
945 case CX23885_BOARD_MYGICA_X8558PRO:
946 switch (port->nr) {
947 /* port B */
948 case 1:
949 i2c_bus = &dev->i2c_bus[0];
950 fe0->dvb.frontend = dvb_attach(atbm8830_attach,
951 &mygica_x8558pro_atbm8830_cfg1,
952 &i2c_bus->i2c_adap);
953 if (fe0->dvb.frontend != NULL) {
954 dvb_attach(max2165_attach,
955 fe0->dvb.frontend,
956 &i2c_bus->i2c_adap,
957 &mygic_x8558pro_max2165_cfg1);
958 }
959 break;
960 /* port C */
961 case 2:
962 i2c_bus = &dev->i2c_bus[1];
963 fe0->dvb.frontend = dvb_attach(atbm8830_attach,
964 &mygica_x8558pro_atbm8830_cfg2,
965 &i2c_bus->i2c_adap);
966 if (fe0->dvb.frontend != NULL) {
967 dvb_attach(max2165_attach,
968 fe0->dvb.frontend,
969 &i2c_bus->i2c_adap,
970 &mygic_x8558pro_max2165_cfg2);
971 }
972 break;
973 }
974 break;
911 975
912 default: 976 default:
913 printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " 977 printk(KERN_INFO "%s: The frontend of your DVB/ATSC card "
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index 12d1a344a8ab..338320025529 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -80,6 +80,7 @@
80#define CX23885_BOARD_HAUPPAUGE_HVR1850 24 80#define CX23885_BOARD_HAUPPAUGE_HVR1850 24
81#define CX23885_BOARD_COMPRO_VIDEOMATE_E800 25 81#define CX23885_BOARD_COMPRO_VIDEOMATE_E800 25
82#define CX23885_BOARD_HAUPPAUGE_HVR1290 26 82#define CX23885_BOARD_HAUPPAUGE_HVR1290 26
83#define CX23885_BOARD_MYGICA_X8558PRO 27
83 84
84#define GPIO_0 0x00000001 85#define GPIO_0 0x00000001
85#define GPIO_1 0x00000002 86#define GPIO_1 0x00000002