2 * Driver for the Conexant CX23885 PCIe bridge
4 * Copyright (c) 2006 Steven Toth <stoth@linuxtv.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <linux/init.h>
23 #include <linux/module.h>
24 #include <linux/pci.h>
25 #include <linux/delay.h>
26 #include <media/cx25840.h>
27 #include <linux/firmware.h>
28 #include <staging/altera.h>
31 #include "tuner-xc2028.h"
32 #include "netup-init.h"
33 #include "altera-ci.h"
35 #include "cx23888-ir.h"
37 static unsigned int enable_885_ir
;
38 module_param(enable_885_ir
, int, 0644);
39 MODULE_PARM_DESC(enable_885_ir
,
40 "Enable integrated IR controller for supported\n"
41 "\t\t CX2388[57] boards that are wired for it:\n"
42 "\t\t\tHVR-1250 (reported safe)\n"
43 "\t\t\tTeVii S470 (reported unsafe)\n"
44 "\t\t This can cause an interrupt storm with some cards.\n"
45 "\t\t Default: 0 [Disabled]");
47 /* ------------------------------------------------------------------ */
48 /* board config info */
50 struct cx23885_board cx23885_boards
[] = {
51 [CX23885_BOARD_UNKNOWN
] = {
52 .name
= "UNKNOWN/GENERIC",
53 /* Ensure safe default for unknown boards */
56 .type
= CX23885_VMUX_COMPOSITE1
,
59 .type
= CX23885_VMUX_COMPOSITE2
,
62 .type
= CX23885_VMUX_COMPOSITE3
,
65 .type
= CX23885_VMUX_COMPOSITE4
,
69 [CX23885_BOARD_HAUPPAUGE_HVR1800lp
] = {
70 .name
= "Hauppauge WinTV-HVR1800lp",
71 .portc
= CX23885_MPEG_DVB
,
73 .type
= CX23885_VMUX_TELEVISION
,
77 .type
= CX23885_VMUX_DEBUG
,
81 .type
= CX23885_VMUX_COMPOSITE1
,
85 .type
= CX23885_VMUX_SVIDEO
,
90 [CX23885_BOARD_HAUPPAUGE_HVR1800
] = {
91 .name
= "Hauppauge WinTV-HVR1800",
92 .porta
= CX23885_ANALOG_VIDEO
,
93 .portb
= CX23885_MPEG_ENCODER
,
94 .portc
= CX23885_MPEG_DVB
,
95 .tuner_type
= TUNER_PHILIPS_TDA8290
,
96 .tuner_addr
= 0x42, /* 0x84 >> 1 */
99 .type
= CX23885_VMUX_TELEVISION
,
100 .vmux
= CX25840_VIN7_CH3
|
105 .type
= CX23885_VMUX_COMPOSITE1
,
106 .vmux
= CX25840_VIN7_CH3
|
111 .type
= CX23885_VMUX_SVIDEO
,
112 .vmux
= CX25840_VIN7_CH3
|
119 [CX23885_BOARD_HAUPPAUGE_HVR1250
] = {
120 .name
= "Hauppauge WinTV-HVR1250",
121 .portc
= CX23885_MPEG_DVB
,
123 .type
= CX23885_VMUX_TELEVISION
,
127 .type
= CX23885_VMUX_DEBUG
,
131 .type
= CX23885_VMUX_COMPOSITE1
,
135 .type
= CX23885_VMUX_SVIDEO
,
140 [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
] = {
141 .name
= "DViCO FusionHDTV5 Express",
142 .portb
= CX23885_MPEG_DVB
,
144 [CX23885_BOARD_HAUPPAUGE_HVR1500Q
] = {
145 .name
= "Hauppauge WinTV-HVR1500Q",
146 .portc
= CX23885_MPEG_DVB
,
148 [CX23885_BOARD_HAUPPAUGE_HVR1500
] = {
149 .name
= "Hauppauge WinTV-HVR1500",
150 .portc
= CX23885_MPEG_DVB
,
152 [CX23885_BOARD_HAUPPAUGE_HVR1200
] = {
153 .name
= "Hauppauge WinTV-HVR1200",
154 .portc
= CX23885_MPEG_DVB
,
156 [CX23885_BOARD_HAUPPAUGE_HVR1700
] = {
157 .name
= "Hauppauge WinTV-HVR1700",
158 .portc
= CX23885_MPEG_DVB
,
160 [CX23885_BOARD_HAUPPAUGE_HVR1400
] = {
161 .name
= "Hauppauge WinTV-HVR1400",
162 .portc
= CX23885_MPEG_DVB
,
164 [CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
] = {
165 .name
= "DViCO FusionHDTV7 Dual Express",
166 .portb
= CX23885_MPEG_DVB
,
167 .portc
= CX23885_MPEG_DVB
,
169 [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
] = {
170 .name
= "DViCO FusionHDTV DVB-T Dual Express",
171 .portb
= CX23885_MPEG_DVB
,
172 .portc
= CX23885_MPEG_DVB
,
174 [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
] = {
175 .name
= "Leadtek Winfast PxDVR3200 H",
176 .portc
= CX23885_MPEG_DVB
,
178 [CX23885_BOARD_COMPRO_VIDEOMATE_E650F
] = {
179 .name
= "Compro VideoMate E650F",
180 .portc
= CX23885_MPEG_DVB
,
182 [CX23885_BOARD_TBS_6920
] = {
183 .name
= "TurboSight TBS 6920",
184 .portb
= CX23885_MPEG_DVB
,
186 [CX23885_BOARD_TEVII_S470
] = {
187 .name
= "TeVii S470",
188 .portb
= CX23885_MPEG_DVB
,
190 [CX23885_BOARD_DVBWORLD_2005
] = {
191 .name
= "DVBWorld DVB-S2 2005",
192 .portb
= CX23885_MPEG_DVB
,
194 [CX23885_BOARD_NETUP_DUAL_DVBS2_CI
] = {
196 .name
= "NetUP Dual DVB-S2 CI",
197 .portb
= CX23885_MPEG_DVB
,
198 .portc
= CX23885_MPEG_DVB
,
200 [CX23885_BOARD_HAUPPAUGE_HVR1270
] = {
201 .name
= "Hauppauge WinTV-HVR1270",
202 .portc
= CX23885_MPEG_DVB
,
204 [CX23885_BOARD_HAUPPAUGE_HVR1275
] = {
205 .name
= "Hauppauge WinTV-HVR1275",
206 .portc
= CX23885_MPEG_DVB
,
208 [CX23885_BOARD_HAUPPAUGE_HVR1255
] = {
209 .name
= "Hauppauge WinTV-HVR1255",
210 .portc
= CX23885_MPEG_DVB
,
212 [CX23885_BOARD_HAUPPAUGE_HVR1210
] = {
213 .name
= "Hauppauge WinTV-HVR1210",
214 .portc
= CX23885_MPEG_DVB
,
216 [CX23885_BOARD_MYGICA_X8506
] = {
217 .name
= "Mygica X8506 DMB-TH",
218 .tuner_type
= TUNER_XC5000
,
221 .porta
= CX23885_ANALOG_VIDEO
,
222 .portb
= CX23885_MPEG_DVB
,
225 .type
= CX23885_VMUX_TELEVISION
,
226 .vmux
= CX25840_COMPOSITE2
,
229 .type
= CX23885_VMUX_COMPOSITE1
,
230 .vmux
= CX25840_COMPOSITE8
,
233 .type
= CX23885_VMUX_SVIDEO
,
234 .vmux
= CX25840_SVIDEO_LUMA3
|
235 CX25840_SVIDEO_CHROMA4
,
238 .type
= CX23885_VMUX_COMPONENT
,
239 .vmux
= CX25840_COMPONENT_ON
|
246 [CX23885_BOARD_MAGICPRO_PROHDTVE2
] = {
247 .name
= "Magic-Pro ProHDTV Extreme 2",
248 .tuner_type
= TUNER_XC5000
,
251 .porta
= CX23885_ANALOG_VIDEO
,
252 .portb
= CX23885_MPEG_DVB
,
255 .type
= CX23885_VMUX_TELEVISION
,
256 .vmux
= CX25840_COMPOSITE2
,
259 .type
= CX23885_VMUX_COMPOSITE1
,
260 .vmux
= CX25840_COMPOSITE8
,
263 .type
= CX23885_VMUX_SVIDEO
,
264 .vmux
= CX25840_SVIDEO_LUMA3
|
265 CX25840_SVIDEO_CHROMA4
,
268 .type
= CX23885_VMUX_COMPONENT
,
269 .vmux
= CX25840_COMPONENT_ON
|
276 [CX23885_BOARD_HAUPPAUGE_HVR1850
] = {
277 .name
= "Hauppauge WinTV-HVR1850",
278 .portb
= CX23885_MPEG_ENCODER
,
279 .portc
= CX23885_MPEG_DVB
,
281 [CX23885_BOARD_COMPRO_VIDEOMATE_E800
] = {
282 .name
= "Compro VideoMate E800",
283 .portc
= CX23885_MPEG_DVB
,
285 [CX23885_BOARD_HAUPPAUGE_HVR1290
] = {
286 .name
= "Hauppauge WinTV-HVR1290",
287 .portc
= CX23885_MPEG_DVB
,
289 [CX23885_BOARD_MYGICA_X8558PRO
] = {
290 .name
= "Mygica X8558 PRO DMB-TH",
291 .portb
= CX23885_MPEG_DVB
,
292 .portc
= CX23885_MPEG_DVB
,
294 [CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
] = {
295 .name
= "LEADTEK WinFast PxTV1200",
296 .porta
= CX23885_ANALOG_VIDEO
,
297 .tuner_type
= TUNER_XC2028
,
301 .type
= CX23885_VMUX_TELEVISION
,
302 .vmux
= CX25840_VIN2_CH1
|
306 .type
= CX23885_VMUX_COMPOSITE1
,
307 .vmux
= CX25840_COMPOSITE1
,
309 .type
= CX23885_VMUX_SVIDEO
,
310 .vmux
= CX25840_SVIDEO_LUMA3
|
311 CX25840_SVIDEO_CHROMA4
,
313 .type
= CX23885_VMUX_COMPONENT
,
314 .vmux
= CX25840_VIN7_CH1
|
317 CX25840_COMPONENT_ON
,
320 [CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
] = {
321 .name
= "GoTView X5 3D Hybrid",
322 .tuner_type
= TUNER_XC5000
,
325 .porta
= CX23885_ANALOG_VIDEO
,
326 .portb
= CX23885_MPEG_DVB
,
328 .type
= CX23885_VMUX_TELEVISION
,
329 .vmux
= CX25840_VIN2_CH1
|
333 .type
= CX23885_VMUX_COMPOSITE1
,
334 .vmux
= CX23885_VMUX_COMPOSITE1
,
336 .type
= CX23885_VMUX_SVIDEO
,
337 .vmux
= CX25840_SVIDEO_LUMA3
|
338 CX25840_SVIDEO_CHROMA4
,
341 [CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
] = {
343 .name
= "NetUP Dual DVB-T/C-CI RF",
344 .porta
= CX23885_ANALOG_VIDEO
,
345 .portb
= CX23885_MPEG_DVB
,
346 .portc
= CX23885_MPEG_DVB
,
349 .tuner_type
= TUNER_XC5000
,
352 .type
= CX23885_VMUX_TELEVISION
,
353 .vmux
= CX25840_COMPOSITE1
,
357 const unsigned int cx23885_bcount
= ARRAY_SIZE(cx23885_boards
);
359 /* ------------------------------------------------------------------ */
360 /* PCI subsystem IDs */
362 struct cx23885_subid cx23885_subids
[] = {
366 .card
= CX23885_BOARD_UNKNOWN
,
370 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800lp
,
374 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
378 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
382 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
386 .card
= CX23885_BOARD_HAUPPAUGE_HVR1250
,
390 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
,
394 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500Q
,
398 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500Q
,
402 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500
,
406 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500
,
410 .card
= CX23885_BOARD_HAUPPAUGE_HVR1200
,
414 .card
= CX23885_BOARD_HAUPPAUGE_HVR1200
,
418 .card
= CX23885_BOARD_HAUPPAUGE_HVR1700
,
422 .card
= CX23885_BOARD_HAUPPAUGE_HVR1400
,
426 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
,
430 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
,
434 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
,
438 .card
= CX23885_BOARD_COMPRO_VIDEOMATE_E650F
,
442 .card
= CX23885_BOARD_TBS_6920
,
446 .card
= CX23885_BOARD_TEVII_S470
,
450 .card
= CX23885_BOARD_DVBWORLD_2005
,
454 .card
= CX23885_BOARD_NETUP_DUAL_DVBS2_CI
,
458 .card
= CX23885_BOARD_HAUPPAUGE_HVR1270
,
462 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
466 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
470 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255
,
474 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255
,
478 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
482 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
486 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
490 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
494 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
498 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255
,
502 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
506 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
510 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
514 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
518 .card
= CX23885_BOARD_MYGICA_X8506
,
522 .card
= CX23885_BOARD_MAGICPRO_PROHDTVE2
,
526 .card
= CX23885_BOARD_HAUPPAUGE_HVR1850
,
530 .card
= CX23885_BOARD_COMPRO_VIDEOMATE_E800
,
534 .card
= CX23885_BOARD_HAUPPAUGE_HVR1290
,
538 .card
= CX23885_BOARD_MYGICA_X8558PRO
,
542 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
,
546 .card
= CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
,
550 .card
= CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
,
553 const unsigned int cx23885_idcount
= ARRAY_SIZE(cx23885_subids
);
555 void cx23885_card_list(struct cx23885_dev
*dev
)
559 if (0 == dev
->pci
->subsystem_vendor
&&
560 0 == dev
->pci
->subsystem_device
) {
562 "%s: Board has no valid PCIe Subsystem ID and can't\n"
563 "%s: be autodetected. Pass card=<n> insmod option\n"
564 "%s: to workaround that. Redirect complaints to the\n"
565 "%s: vendor of the TV card. Best regards,\n"
567 dev
->name
, dev
->name
, dev
->name
, dev
->name
, dev
->name
);
570 "%s: Your board isn't known (yet) to the driver.\n"
571 "%s: Try to pick one of the existing card configs via\n"
572 "%s: card=<n> insmod option. Updating to the latest\n"
573 "%s: version might help as well.\n",
574 dev
->name
, dev
->name
, dev
->name
, dev
->name
);
576 printk(KERN_INFO
"%s: Here is a list of valid choices for the card=<n> insmod option:\n",
578 for (i
= 0; i
< cx23885_bcount
; i
++)
579 printk(KERN_INFO
"%s: card=%d -> %s\n",
580 dev
->name
, i
, cx23885_boards
[i
].name
);
583 static void hauppauge_eeprom(struct cx23885_dev
*dev
, u8
*eeprom_data
)
587 tveeprom_hauppauge_analog(&dev
->i2c_bus
[0].i2c_client
, &tv
,
590 /* Make sure we support the board model */
593 /* WinTV-HVR1270 (PCIe, Retail, half height)
594 * ATSC/QAM and basic analog, IR Blast */
596 /* WinTV-HVR1210 (PCIe, Retail, half height)
597 * DVB-T and basic analog, IR Blast */
599 /* WinTV-HVR1270 (PCIe, Retail, half height)
600 * ATSC/QAM and basic analog, IR Recv */
602 /* WinTV-HVR1210 (PCIe, Retail, half height)
603 * DVB-T and basic analog, IR Recv */
605 /* WinTV-HVR1275 (PCIe, Retail, half height)
606 * ATSC/QAM and basic analog, IR Recv */
608 /* WinTV-HVR1210 (PCIe, Retail, half height)
609 * DVB-T and basic analog, IR Recv */
611 /* WinTV-HVR1270 (PCIe, Retail, full height)
612 * ATSC/QAM and basic analog, IR Blast */
614 /* WinTV-HVR1210 (PCIe, Retail, full height)
615 * DVB-T and basic analog, IR Blast */
617 /* WinTV-HVR1270 (PCIe, Retail, full height)
618 * ATSC/QAM and basic analog, IR Recv */
620 /* WinTV-HVR1210 (PCIe, Retail, full height)
621 * DVB-T and basic analog, IR Recv */
623 /* WinTV-HVR1275 (PCIe, Retail, full height)
624 * ATSC/QAM and basic analog, IR Recv */
626 /* WinTV-HVR1210 (PCIe, Retail, full height)
627 * DVB-T and basic analog, IR Recv */
629 /* WinTV-HVR1200 (PCIe, Retail, full height)
630 * DVB-T and basic analog */
632 /* WinTV-HVR1200 (PCIe, OEM, half height)
633 * DVB-T and basic analog */
635 /* WinTV-HVR1200 (PCIe, OEM, half height)
636 * DVB-T and basic analog */
638 /* WinTV-HVR1200 (PCIe, OEM, full height)
639 * DVB-T and basic analog */
641 /* WinTV-HVR1200 (PCIe, OEM, half height)
642 * DVB-T and basic analog */
644 /* WinTV-HVR1200 (PCIe, OEM, full height)
645 * DVB-T and basic analog */
647 /* WinTV-HVR1200 (PCIe, OEM, full height)
648 * DVB-T and basic analog */
650 /* WinTV-HVR1200 (PCIe, OEM, half height)
651 * DVB-T and basic analog */
653 /* WinTV-HVR1200 (PCIe, OEM, full height)
654 * DVB-T and basic analog */
656 /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual
657 channel ATSC and MPEG2 HW Encoder */
659 /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC
662 /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC
665 /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM
668 /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM
671 /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM,
672 Dual channel ATSC and MPEG2 HW Encoder */
674 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM,
675 Dual channel ATSC and MPEG2 HW Encoder */
677 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM,
678 Dual channel ATSC and MPEG2 HW Encoder */
680 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM,
681 Dual channel ATSC and MPEG2 HW Encoder */
683 /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM,
684 Dual channel ATSC and MPEG2 HW Encoder */
686 /* WinTV-HVR1250 (PCIe, Retail, IR, full height,
687 ATSC and Basic analog */
689 /* WinTV-HVR1250 (PCIe, Retail, IR, half height,
690 ATSC and Basic analog */
692 /* WinTV-HVR1250 (PCIe, No IR, half height,
693 ATSC [at least] and Basic analog) */
695 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height,
696 ATSC and Basic analog */
698 /* WinTV-HVR1250 (PCIe, OEM, No IR, full height,
699 ATSC and Basic analog */
701 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height,
702 ATSC and Basic analog */
704 /* WinTV-HVR1400 (Express Card, Retail, IR,
705 * DVB-T and Basic analog */
707 /* WinTV-HVR1700 (PCIe, OEM, No IR, half height)
708 * DVB-T and MPEG2 HW Encoder */
710 /* WinTV-HVR1700 (PCIe, OEM, No IR, full height)
711 * DVB-T and MPEG2 HW Encoder */
714 /* WinTV-HVR1850 (PCIe, Retail, 3.5mm in, IR, FM,
715 Dual channel ATSC and MPEG2 HW Encoder */
718 /* WinTV-HVR1290 (PCIe, OEM, RCA in, IR,
719 Dual channel ATSC and Basic analog */
722 printk(KERN_WARNING
"%s: warning: "
723 "unknown hauppauge model #%d\n",
724 dev
->name
, tv
.model
);
728 printk(KERN_INFO
"%s: hauppauge eeprom: model=%d\n",
729 dev
->name
, tv
.model
);
732 int cx23885_tuner_callback(void *priv
, int component
, int command
, int arg
)
734 struct cx23885_tsport
*port
= priv
;
735 struct cx23885_dev
*dev
= port
->dev
;
738 if (command
== XC2028_RESET_CLK
)
742 printk(KERN_ERR
"%s(): Unknown command 0x%x.\n",
747 switch (dev
->board
) {
748 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
749 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
750 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
751 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
752 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
753 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
754 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
755 /* Tuner Reset Command */
758 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
759 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
760 /* Two identical tuners on two different i2c buses,
761 * we need to reset the correct gpio. */
764 else if (port
->nr
== 2)
767 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
768 /* Tuner Reset Command */
771 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
772 altera_ci_tuner_reset(dev
, port
->nr
);
777 /* Drive the tuner into reset and back out */
778 cx_clear(GP0_IO
, bitmask
);
780 cx_set(GP0_IO
, bitmask
);
786 void cx23885_gpio_setup(struct cx23885_dev
*dev
)
788 switch (dev
->board
) {
789 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
790 /* GPIO-0 cx24227 demodulator reset */
791 cx_set(GP0_IO
, 0x00010001); /* Bring the part out of reset */
793 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
794 /* GPIO-0 cx24227 demodulator */
795 /* GPIO-2 xc3028 tuner */
797 /* Put the parts into reset */
798 cx_set(GP0_IO
, 0x00050000);
799 cx_clear(GP0_IO
, 0x00000005);
802 /* Bring the parts out of reset */
803 cx_set(GP0_IO
, 0x00050005);
805 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
806 /* GPIO-0 cx24227 demodulator reset */
807 /* GPIO-2 xc5000 tuner reset */
808 cx_set(GP0_IO
, 0x00050005); /* Bring the part out of reset */
810 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
813 /* GPIO-2 8295A Reset */
814 /* GPIO-3-10 cx23417 data0-7 */
815 /* GPIO-11-14 cx23417 addr0-3 */
816 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
820 /* EIO15 Zilog Reset */
821 /* EIO14 S5H1409/CX24227 Reset */
822 mc417_gpio_enable(dev
, GPIO_15
| GPIO_14
, 1);
824 /* Put the demod into reset and protect the eeprom */
825 mc417_gpio_clear(dev
, GPIO_15
| GPIO_14
);
828 /* Bring the demod and blaster out of reset */
829 mc417_gpio_set(dev
, GPIO_15
| GPIO_14
);
832 /* Force the TDA8295A into reset and back */
833 cx23885_gpio_enable(dev
, GPIO_2
, 1);
834 cx23885_gpio_set(dev
, GPIO_2
);
836 cx23885_gpio_clear(dev
, GPIO_2
);
838 cx23885_gpio_set(dev
, GPIO_2
);
841 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
842 /* GPIO-0 tda10048 demodulator reset */
843 /* GPIO-2 tda18271 tuner reset */
845 /* Put the parts into reset and back */
846 cx_set(GP0_IO
, 0x00050000);
848 cx_clear(GP0_IO
, 0x00000005);
850 cx_set(GP0_IO
, 0x00050005);
852 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
853 /* GPIO-0 TDA10048 demodulator reset */
854 /* GPIO-2 TDA8295A Reset */
855 /* GPIO-3-10 cx23417 data0-7 */
856 /* GPIO-11-14 cx23417 addr0-3 */
857 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
859 /* The following GPIO's are on the interna AVCore (cx25840) */
861 /* GPIO-20 IR_TX 416/DVBT Select */
862 /* GPIO-21 IIS DAT */
863 /* GPIO-22 IIS WCLK */
864 /* GPIO-23 IIS BCLK */
866 /* Put the parts into reset and back */
867 cx_set(GP0_IO
, 0x00050000);
869 cx_clear(GP0_IO
, 0x00000005);
871 cx_set(GP0_IO
, 0x00050005);
873 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
874 /* GPIO-0 Dibcom7000p demodulator reset */
875 /* GPIO-2 xc3028L tuner reset */
878 /* Put the parts into reset and back */
879 cx_set(GP0_IO
, 0x00050000);
881 cx_clear(GP0_IO
, 0x00000005);
883 cx_set(GP0_IO
, 0x00050005);
885 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
886 /* GPIO-0 xc5000 tuner reset i2c bus 0 */
887 /* GPIO-1 s5h1409 demod reset i2c bus 0 */
888 /* GPIO-2 xc5000 tuner reset i2c bus 1 */
889 /* GPIO-3 s5h1409 demod reset i2c bus 0 */
891 /* Put the parts into reset and back */
892 cx_set(GP0_IO
, 0x000f0000);
894 cx_clear(GP0_IO
, 0x0000000f);
896 cx_set(GP0_IO
, 0x000f000f);
898 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
899 /* GPIO-0 portb xc3028 reset */
900 /* GPIO-1 portb zl10353 reset */
901 /* GPIO-2 portc xc3028 reset */
902 /* GPIO-3 portc zl10353 reset */
904 /* Put the parts into reset and back */
905 cx_set(GP0_IO
, 0x000f0000);
907 cx_clear(GP0_IO
, 0x0000000f);
909 cx_set(GP0_IO
, 0x000f000f);
911 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
912 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
913 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
914 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
915 /* GPIO-2 xc3028 tuner reset */
917 /* The following GPIO's are on the internal AVCore (cx25840) */
918 /* GPIO-? zl10353 demod reset */
920 /* Put the parts into reset and back */
921 cx_set(GP0_IO
, 0x00040000);
923 cx_clear(GP0_IO
, 0x00000004);
925 cx_set(GP0_IO
, 0x00040004);
927 case CX23885_BOARD_TBS_6920
:
928 cx_write(MC417_CTL
, 0x00000036);
929 cx_write(MC417_OEN
, 0x00001000);
930 cx_set(MC417_RWD
, 0x00000002);
932 cx_clear(MC417_RWD
, 0x00000800);
934 cx_set(MC417_RWD
, 0x00000800);
937 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
938 /* GPIO-0 INTA from CiMax1
939 GPIO-1 INTB from CiMax2
941 GPIO-3 to GPIO-10 data/addr for CA
942 GPIO-11 ~CS0 to CiMax1
943 GPIO-12 ~CS1 to CiMax2
944 GPIO-13 ADL0 load LSB addr
945 GPIO-14 ADL1 load MSB addr
946 GPIO-15 ~RDY from CiMax
950 cx_set(GP0_IO
, 0x00040000); /* GPIO as out */
951 /* GPIO1 and GPIO2 as INTA and INTB from CiMaxes, reset low */
952 cx_clear(GP0_IO
, 0x00030004);
953 mdelay(100);/* reset delay */
954 cx_set(GP0_IO
, 0x00040004); /* GPIO as out, reset high */
955 cx_write(MC417_CTL
, 0x00000037);/* enable GPIO3-18 pins */
956 /* GPIO-15 IN as ~ACK, rest as OUT */
957 cx_write(MC417_OEN
, 0x00001000);
958 /* ~RD, ~WR high; ADL0, ADL1 low; ~CS0, ~CS1 high */
959 cx_write(MC417_RWD
, 0x0000c300);
961 cx_write(GPIO_ISM
, 0x00000000);/* INTERRUPTS active low*/
963 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
964 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
965 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
966 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
967 /* GPIO-5 RF Control: 0 = RF1 Terrestrial, 1 = RF2 Cable */
968 /* GPIO-6 I2C Gate which can isolate the demod from the bus */
969 /* GPIO-9 Demod reset */
971 /* Put the parts into reset and back */
972 cx23885_gpio_enable(dev
, GPIO_9
| GPIO_6
| GPIO_5
, 1);
973 cx23885_gpio_set(dev
, GPIO_9
| GPIO_6
| GPIO_5
);
974 cx23885_gpio_clear(dev
, GPIO_9
);
976 cx23885_gpio_set(dev
, GPIO_9
);
978 case CX23885_BOARD_MYGICA_X8506
:
979 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
980 /* GPIO-0 (0)Analog / (1)Digital TV */
981 /* GPIO-1 reset XC5000 */
982 /* GPIO-2 reset LGS8GL5 / LGS8G75 */
983 cx23885_gpio_enable(dev
, GPIO_0
| GPIO_1
| GPIO_2
, 1);
984 cx23885_gpio_clear(dev
, GPIO_1
| GPIO_2
);
986 cx23885_gpio_set(dev
, GPIO_0
| GPIO_1
| GPIO_2
);
989 case CX23885_BOARD_MYGICA_X8558PRO
:
990 /* GPIO-0 reset first ATBM8830 */
991 /* GPIO-1 reset second ATBM8830 */
992 cx23885_gpio_enable(dev
, GPIO_0
| GPIO_1
, 1);
993 cx23885_gpio_clear(dev
, GPIO_0
| GPIO_1
);
995 cx23885_gpio_set(dev
, GPIO_0
| GPIO_1
);
998 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
999 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1000 /* GPIO-0 656_CLK */
1003 /* GPIO-3-10 cx23417 data0-7 */
1004 /* GPIO-11-14 cx23417 addr0-3 */
1005 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
1007 /* GPIO-20 C_IR_TX */
1008 /* GPIO-21 I2S DAT */
1009 /* GPIO-22 I2S WCLK */
1010 /* GPIO-23 I2S BCLK */
1011 /* ALT GPIO: EXP GPIO LATCH */
1013 /* CX23417 GPIO's */
1014 /* GPIO-14 S5H1411/CX24228 Reset */
1015 /* GPIO-13 EEPROM write protect */
1016 mc417_gpio_enable(dev
, GPIO_14
| GPIO_13
, 1);
1018 /* Put the demod into reset and protect the eeprom */
1019 mc417_gpio_clear(dev
, GPIO_14
| GPIO_13
);
1022 /* Bring the demod out of reset */
1023 mc417_gpio_set(dev
, GPIO_14
);
1027 /* Connected to IF / Mux */
1029 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1030 cx_set(GP0_IO
, 0x00010001); /* Bring the part out of reset */
1032 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1035 GPIO-2 ~reset chips out
1036 GPIO-3 to GPIO-10 data/addr for CA in/out
1046 cx_set(GP0_IO
, 0x00060000); /* GPIO-1,2 as out */
1047 /* GPIO-0 as INT, reset & TMS low */
1048 cx_clear(GP0_IO
, 0x00010006);
1049 mdelay(100);/* reset delay */
1050 cx_set(GP0_IO
, 0x00000004); /* reset high */
1051 cx_write(MC417_CTL
, 0x00000037);/* enable GPIO-3..18 pins */
1052 /* GPIO-17 is TDO in, GPIO-15 is ~RDY in, rest is out */
1053 cx_write(MC417_OEN
, 0x00005000);
1054 /* ~RD, ~WR high; ADDR low; ~CS high */
1055 cx_write(MC417_RWD
, 0x00000d00);
1057 cx_write(GPIO_ISM
, 0x00000000);/* INTERRUPTS active low*/
1062 int cx23885_ir_init(struct cx23885_dev
*dev
)
1064 static struct v4l2_subdev_io_pin_config ir_rxtx_pin_cfg
[] = {
1066 .flags
= V4L2_SUBDEV_IO_PIN_INPUT
,
1067 .pin
= CX23885_PIN_IR_RX_GPIO19
,
1068 .function
= CX23885_PAD_IR_RX
,
1070 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1072 .flags
= V4L2_SUBDEV_IO_PIN_OUTPUT
,
1073 .pin
= CX23885_PIN_IR_TX_GPIO20
,
1074 .function
= CX23885_PAD_IR_TX
,
1076 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1079 const size_t ir_rxtx_pin_cfg_count
= ARRAY_SIZE(ir_rxtx_pin_cfg
);
1081 static struct v4l2_subdev_io_pin_config ir_rx_pin_cfg
[] = {
1083 .flags
= V4L2_SUBDEV_IO_PIN_INPUT
,
1084 .pin
= CX23885_PIN_IR_RX_GPIO19
,
1085 .function
= CX23885_PAD_IR_RX
,
1087 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1090 const size_t ir_rx_pin_cfg_count
= ARRAY_SIZE(ir_rx_pin_cfg
);
1092 struct v4l2_subdev_ir_parameters params
;
1094 switch (dev
->board
) {
1095 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1096 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1097 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1098 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1099 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1100 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1101 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1102 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1103 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1104 /* FIXME: Implement me */
1106 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1107 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1108 ret
= cx23888_ir_probe(dev
);
1111 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_888_IR
);
1112 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1113 ir_rxtx_pin_cfg_count
, ir_rxtx_pin_cfg
);
1115 * For these boards we need to invert the Tx output via the
1116 * IR controller to have the LED off while idle
1118 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_g_parameters
, ¶ms
);
1119 params
.enable
= false;
1120 params
.shutdown
= false;
1121 params
.invert_level
= true;
1122 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_s_parameters
, ¶ms
);
1123 params
.shutdown
= true;
1124 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_s_parameters
, ¶ms
);
1126 case CX23885_BOARD_TEVII_S470
:
1129 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_AV_CORE
);
1130 if (dev
->sd_ir
== NULL
) {
1134 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1135 ir_rx_pin_cfg_count
, ir_rx_pin_cfg
);
1137 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1140 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_AV_CORE
);
1141 if (dev
->sd_ir
== NULL
) {
1145 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1146 ir_rxtx_pin_cfg_count
, ir_rxtx_pin_cfg
);
1148 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1149 request_module("ir-kbd-i2c");
1156 void cx23885_ir_fini(struct cx23885_dev
*dev
)
1158 switch (dev
->board
) {
1159 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1160 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1161 cx23885_irq_remove(dev
, PCI_MSK_IR
);
1162 cx23888_ir_remove(dev
);
1165 case CX23885_BOARD_TEVII_S470
:
1166 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1167 cx23885_irq_remove(dev
, PCI_MSK_AV_CORE
);
1168 /* sd_ir is a duplicate pointer to the AV Core, just clear it */
1174 int netup_jtag_io(void *device
, int tms
, int tdi
, int read_tdo
)
1178 struct cx23885_dev
*dev
= (struct cx23885_dev
*)device
;
1180 data
= ((cx_read(GP0_IO
)) & (~0x00000002));
1181 data
|= (tms
? 0x00020002 : 0x00020000);
1182 cx_write(GP0_IO
, data
);
1185 data
= ((cx_read(MC417_RWD
)) & (~0x0000a000));
1186 data
|= (tdi
? 0x00008000 : 0);
1187 cx_write(MC417_RWD
, data
);
1189 tdo
= (data
& 0x00004000) ? 1 : 0; /*TDO*/
1191 cx_write(MC417_RWD
, data
| 0x00002000);
1194 cx_write(MC417_RWD
, data
);
1199 void cx23885_ir_pci_int_enable(struct cx23885_dev
*dev
)
1201 switch (dev
->board
) {
1202 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1203 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1205 cx23885_irq_add_enable(dev
, PCI_MSK_IR
);
1207 case CX23885_BOARD_TEVII_S470
:
1208 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1210 cx23885_irq_add_enable(dev
, PCI_MSK_AV_CORE
);
1215 void cx23885_card_setup(struct cx23885_dev
*dev
)
1217 struct cx23885_tsport
*ts1
= &dev
->ts1
;
1218 struct cx23885_tsport
*ts2
= &dev
->ts2
;
1220 static u8 eeprom
[256];
1222 if (dev
->i2c_bus
[0].i2c_rc
== 0) {
1223 dev
->i2c_bus
[0].i2c_client
.addr
= 0xa0 >> 1;
1224 tveeprom_read(&dev
->i2c_bus
[0].i2c_client
,
1225 eeprom
, sizeof(eeprom
));
1228 switch (dev
->board
) {
1229 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1230 if (dev
->i2c_bus
[0].i2c_rc
== 0) {
1231 if (eeprom
[0x80] != 0x84)
1232 hauppauge_eeprom(dev
, eeprom
+0xc0);
1234 hauppauge_eeprom(dev
, eeprom
+0x80);
1237 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1238 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1239 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1240 if (dev
->i2c_bus
[0].i2c_rc
== 0)
1241 hauppauge_eeprom(dev
, eeprom
+0x80);
1243 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1244 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
1245 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1246 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1247 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1248 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1249 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1250 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1251 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1252 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1253 if (dev
->i2c_bus
[0].i2c_rc
== 0)
1254 hauppauge_eeprom(dev
, eeprom
+0xc0);
1258 switch (dev
->board
) {
1259 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
1260 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1261 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1262 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1263 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1264 /* break omitted intentionally */
1265 case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
:
1266 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1267 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1268 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1270 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1271 /* Defaults for VID B - Analog encoder */
1272 /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */
1273 ts1
->gen_ctrl_val
= 0x10e;
1274 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1275 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1277 /* APB_TSVALERR_POL (active low)*/
1278 ts1
->vld_misc_val
= 0x2000;
1279 ts1
->hw_sop_ctrl_val
= (0x47 << 16 | 188 << 4 | 0xc);
1281 /* Defaults for VID C */
1282 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1283 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1284 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1286 case CX23885_BOARD_TBS_6920
:
1287 ts1
->gen_ctrl_val
= 0x4; /* Parallel */
1288 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1289 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1291 case CX23885_BOARD_TEVII_S470
:
1292 case CX23885_BOARD_DVBWORLD_2005
:
1293 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
1294 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1295 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1297 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1298 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1299 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1300 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1301 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1302 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1303 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1304 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1306 case CX23885_BOARD_MYGICA_X8506
:
1307 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
1308 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
1309 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1310 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1312 case CX23885_BOARD_MYGICA_X8558PRO
:
1313 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
1314 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1315 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1316 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1317 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1318 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1320 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1321 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1322 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1323 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
1324 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1325 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1326 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1327 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1328 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1329 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1330 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1331 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1332 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1333 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1334 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1335 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1336 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1338 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1339 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1340 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1343 /* Certain boards support analog, or require the avcore to be
1344 * loaded, ensure this happens.
1346 switch (dev
->board
) {
1347 case CX23885_BOARD_TEVII_S470
:
1348 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1349 /* Currently only enabled for the integrated IR controller */
1352 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1353 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
1354 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1355 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1356 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1357 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1358 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1359 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1360 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1361 case CX23885_BOARD_MYGICA_X8506
:
1362 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
1363 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1364 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
1365 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1366 dev
->sd_cx25840
= v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
1367 &dev
->i2c_bus
[2].i2c_adap
,
1368 "cx25840", 0x88 >> 1, NULL
);
1369 if (dev
->sd_cx25840
) {
1370 dev
->sd_cx25840
->grp_id
= CX23885_HW_AV_CORE
;
1371 v4l2_subdev_call(dev
->sd_cx25840
, core
, load_fw
);
1376 /* AUX-PLL 27MHz CLK */
1377 switch (dev
->board
) {
1378 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1379 netup_initialize(dev
);
1381 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
: {
1383 const struct firmware
*fw
;
1384 const char *filename
= "dvb-netup-altera-01.fw";
1385 char *action
= "configure";
1386 struct altera_config netup_config
= {
1389 .jtag_io
= netup_jtag_io
,
1392 netup_initialize(dev
);
1394 ret
= request_firmware(&fw
, filename
, &dev
->pci
->dev
);
1396 printk(KERN_ERR
"did not find the firmware file. (%s) "
1397 "Please see linux/Documentation/dvb/ for more details "
1398 "on firmware-problems.", filename
);
1400 altera_init(&netup_config
, fw
);
1407 /* ------------------------------------------------------------------ */