aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c77
1 files changed, 72 insertions, 5 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index ce29b5e34a11..3143d85ef31d 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -201,6 +201,15 @@ struct cx23885_board cx23885_boards[] = {
201 .name = "Mygica X8506 DMB-TH", 201 .name = "Mygica X8506 DMB-TH",
202 .portb = CX23885_MPEG_DVB, 202 .portb = CX23885_MPEG_DVB,
203 }, 203 },
204 [CX23885_BOARD_MAGICPRO_PROHDTVE2] = {
205 .name = "Magic-Pro ProHDTV Extreme 2",
206 .portb = CX23885_MPEG_DVB,
207 },
208 [CX23885_BOARD_HAUPPAUGE_HVR1850] = {
209 .name = "Hauppauge WinTV-HVR1850",
210 .portb = CX23885_MPEG_ENCODER,
211 .portc = CX23885_MPEG_DVB,
212 },
204}; 213};
205const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 214const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
206 215
@@ -324,6 +333,14 @@ struct cx23885_subid cx23885_subids[] = {
324 .subvendor = 0x14f1, 333 .subvendor = 0x14f1,
325 .subdevice = 0x8651, 334 .subdevice = 0x8651,
326 .card = CX23885_BOARD_MYGICA_X8506, 335 .card = CX23885_BOARD_MYGICA_X8506,
336 }, {
337 .subvendor = 0x14f1,
338 .subdevice = 0x8657,
339 .card = CX23885_BOARD_MAGICPRO_PROHDTVE2,
340 }, {
341 .subvendor = 0x0070,
342 .subdevice = 0x8541,
343 .card = CX23885_BOARD_HAUPPAUGE_HVR1850,
327 }, 344 },
328}; 345};
329const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 346const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -483,8 +500,13 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
483 /* WinTV-HVR1700 (PCIe, OEM, No IR, full height) 500 /* WinTV-HVR1700 (PCIe, OEM, No IR, full height)
484 * DVB-T and MPEG2 HW Encoder */ 501 * DVB-T and MPEG2 HW Encoder */
485 break; 502 break;
503 case 85021:
504 /* WinTV-HVR1850 (PCIe, OEM, RCA in, IR, FM,
505 Dual channel ATSC and MPEG2 HW Encoder */
506 break;
486 default: 507 default:
487 printk(KERN_WARNING "%s: warning: unknown hauppauge model #%d\n", 508 printk(KERN_WARNING "%s: warning: "
509 "unknown hauppauge model #%d\n",
488 dev->name, tv.model); 510 dev->name, tv.model);
489 break; 511 break;
490 } 512 }
@@ -574,13 +596,23 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
574 /* CX23417 GPIO's */ 596 /* CX23417 GPIO's */
575 /* EIO15 Zilog Reset */ 597 /* EIO15 Zilog Reset */
576 /* EIO14 S5H1409/CX24227 Reset */ 598 /* EIO14 S5H1409/CX24227 Reset */
599 mc417_gpio_enable(dev, GPIO_15 | GPIO_14, 1);
600
601 /* Put the demod into reset and protect the eeprom */
602 mc417_gpio_clear(dev, GPIO_15 | GPIO_14);
603 mdelay(100);
604
605 /* Bring the demod and blaster out of reset */
606 mc417_gpio_set(dev, GPIO_15 | GPIO_14);
607 mdelay(100);
577 608
578 /* Force the TDA8295A into reset and back */ 609 /* Force the TDA8295A into reset and back */
579 cx_set(GP0_IO, 0x00040004); 610 cx23885_gpio_enable(dev, GPIO_2, 1);
611 cx23885_gpio_set(dev, GPIO_2);
580 mdelay(20); 612 mdelay(20);
581 cx_clear(GP0_IO, 0x00000004); 613 cx23885_gpio_clear(dev, GPIO_2);
582 mdelay(20); 614 mdelay(20);
583 cx_set(GP0_IO, 0x00040004); 615 cx23885_gpio_set(dev, GPIO_2);
584 mdelay(20); 616 mdelay(20);
585 break; 617 break;
586 case CX23885_BOARD_HAUPPAUGE_HVR1200: 618 case CX23885_BOARD_HAUPPAUGE_HVR1200:
@@ -715,14 +747,45 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
715 cx23885_gpio_set(dev, GPIO_9); 747 cx23885_gpio_set(dev, GPIO_9);
716 break; 748 break;
717 case CX23885_BOARD_MYGICA_X8506: 749 case CX23885_BOARD_MYGICA_X8506:
750 case CX23885_BOARD_MAGICPRO_PROHDTVE2:
718 /* GPIO-1 reset XC5000 */ 751 /* GPIO-1 reset XC5000 */
719 /* GPIO-2 reset LGS8GL5 */ 752 /* GPIO-2 reset LGS8GL5 / LGS8G75 */
720 cx_set(GP0_IO, 0x00060000); 753 cx_set(GP0_IO, 0x00060000);
721 cx_clear(GP0_IO, 0x00000006); 754 cx_clear(GP0_IO, 0x00000006);
722 mdelay(100); 755 mdelay(100);
723 cx_set(GP0_IO, 0x00060006); 756 cx_set(GP0_IO, 0x00060006);
724 mdelay(100); 757 mdelay(100);
725 break; 758 break;
759 case CX23885_BOARD_HAUPPAUGE_HVR1850:
760 /* GPIO-0 656_CLK */
761 /* GPIO-1 656_D0 */
762 /* GPIO-2 Wake# */
763 /* GPIO-3-10 cx23417 data0-7 */
764 /* GPIO-11-14 cx23417 addr0-3 */
765 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
766 /* GPIO-19 IR_RX */
767 /* GPIO-20 C_IR_TX */
768 /* GPIO-21 I2S DAT */
769 /* GPIO-22 I2S WCLK */
770 /* GPIO-23 I2S BCLK */
771 /* ALT GPIO: EXP GPIO LATCH */
772
773 /* CX23417 GPIO's */
774 /* GPIO-14 S5H1411/CX24228 Reset */
775 /* GPIO-13 EEPROM write protect */
776 mc417_gpio_enable(dev, GPIO_14 | GPIO_13, 1);
777
778 /* Put the demod into reset and protect the eeprom */
779 mc417_gpio_clear(dev, GPIO_14 | GPIO_13);
780 mdelay(100);
781
782 /* Bring the demod out of reset */
783 mc417_gpio_set(dev, GPIO_14);
784 mdelay(100);
785
786 /* CX24228 GPIO */
787 /* Connected to IF / Mux */
788 break;
726 } 789 }
727} 790}
728 791
@@ -739,6 +802,7 @@ int cx23885_ir_init(struct cx23885_dev *dev)
739 case CX23885_BOARD_HAUPPAUGE_HVR1275: 802 case CX23885_BOARD_HAUPPAUGE_HVR1275:
740 case CX23885_BOARD_HAUPPAUGE_HVR1255: 803 case CX23885_BOARD_HAUPPAUGE_HVR1255:
741 case CX23885_BOARD_HAUPPAUGE_HVR1210: 804 case CX23885_BOARD_HAUPPAUGE_HVR1210:
805 case CX23885_BOARD_HAUPPAUGE_HVR1850:
742 /* FIXME: Implement me */ 806 /* FIXME: Implement me */
743 break; 807 break;
744 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: 808 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
@@ -778,6 +842,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
778 case CX23885_BOARD_HAUPPAUGE_HVR1275: 842 case CX23885_BOARD_HAUPPAUGE_HVR1275:
779 case CX23885_BOARD_HAUPPAUGE_HVR1255: 843 case CX23885_BOARD_HAUPPAUGE_HVR1255:
780 case CX23885_BOARD_HAUPPAUGE_HVR1210: 844 case CX23885_BOARD_HAUPPAUGE_HVR1210:
845 case CX23885_BOARD_HAUPPAUGE_HVR1850:
781 if (dev->i2c_bus[0].i2c_rc == 0) 846 if (dev->i2c_bus[0].i2c_rc == 0)
782 hauppauge_eeprom(dev, eeprom+0xc0); 847 hauppauge_eeprom(dev, eeprom+0xc0);
783 break; 848 break;
@@ -827,6 +892,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
827 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; 892 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
828 break; 893 break;
829 case CX23885_BOARD_MYGICA_X8506: 894 case CX23885_BOARD_MYGICA_X8506:
895 case CX23885_BOARD_MAGICPRO_PROHDTVE2:
830 ts1->gen_ctrl_val = 0x5; /* Parallel */ 896 ts1->gen_ctrl_val = 0x5; /* Parallel */
831 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ 897 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
832 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; 898 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
@@ -844,6 +910,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
844 case CX23885_BOARD_HAUPPAUGE_HVR1275: 910 case CX23885_BOARD_HAUPPAUGE_HVR1275:
845 case CX23885_BOARD_HAUPPAUGE_HVR1255: 911 case CX23885_BOARD_HAUPPAUGE_HVR1255:
846 case CX23885_BOARD_HAUPPAUGE_HVR1210: 912 case CX23885_BOARD_HAUPPAUGE_HVR1210:
913 case CX23885_BOARD_HAUPPAUGE_HVR1850:
847 default: 914 default:
848 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ 915 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
849 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ 916 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */