Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Driver for the Conexant CX23885 PCIe bridge |
| 3 | * |
Steven Toth | 6d89761 | 2008-09-03 17:12:12 -0300 | [diff] [blame] | 4 | * Copyright (c) 2006 Steven Toth <stoth@linuxtv.org> |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 5 | * |
| 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. |
| 10 | * |
| 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 |
| 14 | * |
| 15 | * GNU General Public License for more details. |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #include <linux/init.h> |
| 19 | #include <linux/module.h> |
| 20 | #include <linux/pci.h> |
| 21 | #include <linux/delay.h> |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 22 | #include <media/cx25840.h> |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 23 | #include <linux/firmware.h> |
Igor M. Liplianin | cff4fa8 | 2011-09-23 11:17:41 -0300 | [diff] [blame] | 24 | #include <misc/altera.h> |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 25 | |
| 26 | #include "cx23885.h" |
Steven Toth | 90a71b1 | 2008-08-04 21:38:46 -0300 | [diff] [blame] | 27 | #include "tuner-xc2028.h" |
Abylay Ospan | b8f0d30 | 2011-07-14 05:20:29 -0300 | [diff] [blame] | 28 | #include "netup-eeprom.h" |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 29 | #include "netup-init.h" |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 30 | #include "altera-ci.h" |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 31 | #include "xc4000.h" |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 32 | #include "xc5000.h" |
Andy Walls | 29f8a0a | 2009-09-26 23:17:30 -0300 | [diff] [blame] | 33 | #include "cx23888-ir.h" |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 34 | |
Anton Nurkin | 8934305 | 2012-08-14 01:35:44 -0300 | [diff] [blame] | 35 | static unsigned int netup_card_rev = 4; |
Abylay Ospan | 2d12421 | 2011-07-18 04:14:28 -0300 | [diff] [blame] | 36 | module_param(netup_card_rev, int, 0644); |
| 37 | MODULE_PARM_DESC(netup_card_rev, |
| 38 | "NetUP Dual DVB-T/C CI card revision"); |
Andy Walls | fa647f2 | 2010-07-19 21:22:05 -0300 | [diff] [blame] | 39 | static unsigned int enable_885_ir; |
| 40 | module_param(enable_885_ir, int, 0644); |
| 41 | MODULE_PARM_DESC(enable_885_ir, |
| 42 | "Enable integrated IR controller for supported\n" |
| 43 | "\t\t CX2388[57] boards that are wired for it:\n" |
| 44 | "\t\t\tHVR-1250 (reported safe)\n" |
Djuri Baars | 076f0e3 | 2012-07-28 09:01:38 -0300 | [diff] [blame] | 45 | "\t\t\tTerraTec Cinergy T PCIe Dual (not well tested, appears to be safe)\n" |
Andy Walls | fa647f2 | 2010-07-19 21:22:05 -0300 | [diff] [blame] | 46 | "\t\t\tTeVii S470 (reported unsafe)\n" |
| 47 | "\t\t This can cause an interrupt storm with some cards.\n" |
| 48 | "\t\t Default: 0 [Disabled]"); |
| 49 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 50 | /* ------------------------------------------------------------------ */ |
| 51 | /* board config info */ |
| 52 | |
| 53 | struct cx23885_board cx23885_boards[] = { |
| 54 | [CX23885_BOARD_UNKNOWN] = { |
| 55 | .name = "UNKNOWN/GENERIC", |
Steven Toth | c771261 | 2008-01-10 02:24:27 -0300 | [diff] [blame] | 56 | /* Ensure safe default for unknown boards */ |
| 57 | .clk_freq = 0, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 58 | .input = {{ |
| 59 | .type = CX23885_VMUX_COMPOSITE1, |
| 60 | .vmux = 0, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 61 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 62 | .type = CX23885_VMUX_COMPOSITE2, |
| 63 | .vmux = 1, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 64 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 65 | .type = CX23885_VMUX_COMPOSITE3, |
| 66 | .vmux = 2, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 67 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 68 | .type = CX23885_VMUX_COMPOSITE4, |
| 69 | .vmux = 3, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 70 | } }, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 71 | }, |
| 72 | [CX23885_BOARD_HAUPPAUGE_HVR1800lp] = { |
| 73 | .name = "Hauppauge WinTV-HVR1800lp", |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 74 | .portc = CX23885_MPEG_DVB, |
| 75 | .input = {{ |
| 76 | .type = CX23885_VMUX_TELEVISION, |
| 77 | .vmux = 0, |
| 78 | .gpio0 = 0xff00, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 79 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 80 | .type = CX23885_VMUX_DEBUG, |
| 81 | .vmux = 0, |
| 82 | .gpio0 = 0xff01, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 83 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 84 | .type = CX23885_VMUX_COMPOSITE1, |
| 85 | .vmux = 1, |
| 86 | .gpio0 = 0xff02, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 87 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 88 | .type = CX23885_VMUX_SVIDEO, |
| 89 | .vmux = 2, |
| 90 | .gpio0 = 0xff02, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 91 | } }, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 92 | }, |
| 93 | [CX23885_BOARD_HAUPPAUGE_HVR1800] = { |
| 94 | .name = "Hauppauge WinTV-HVR1800", |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 95 | .porta = CX23885_ANALOG_VIDEO, |
Steven Toth | a589b66 | 2008-01-13 23:44:47 -0300 | [diff] [blame] | 96 | .portb = CX23885_MPEG_ENCODER, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 97 | .portc = CX23885_MPEG_DVB, |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 98 | .tuner_type = TUNER_PHILIPS_TDA8290, |
| 99 | .tuner_addr = 0x42, /* 0x84 >> 1 */ |
Igor M. Liplianin | 557f48d | 2011-01-25 17:05:00 -0300 | [diff] [blame] | 100 | .tuner_bus = 1, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 101 | .input = {{ |
| 102 | .type = CX23885_VMUX_TELEVISION, |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 103 | .vmux = CX25840_VIN7_CH3 | |
| 104 | CX25840_VIN5_CH2 | |
| 105 | CX25840_VIN2_CH1, |
Steven Toth | 33cdeb3 | 2011-10-10 11:09:55 -0300 | [diff] [blame] | 106 | .amux = CX25840_AUDIO8, |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 107 | .gpio0 = 0, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 108 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 109 | .type = CX23885_VMUX_COMPOSITE1, |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 110 | .vmux = CX25840_VIN7_CH3 | |
| 111 | CX25840_VIN4_CH2 | |
| 112 | CX25840_VIN6_CH1, |
Steven Toth | 33cdeb3 | 2011-10-10 11:09:55 -0300 | [diff] [blame] | 113 | .amux = CX25840_AUDIO7, |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 114 | .gpio0 = 0, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 115 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 116 | .type = CX23885_VMUX_SVIDEO, |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 117 | .vmux = CX25840_VIN7_CH3 | |
| 118 | CX25840_VIN4_CH2 | |
| 119 | CX25840_VIN8_CH1 | |
| 120 | CX25840_SVIDEO_ON, |
Steven Toth | 33cdeb3 | 2011-10-10 11:09:55 -0300 | [diff] [blame] | 121 | .amux = CX25840_AUDIO7, |
Steven Toth | 7b88801 | 2008-01-10 03:40:49 -0300 | [diff] [blame] | 122 | .gpio0 = 0, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 123 | } }, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 124 | }, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 125 | [CX23885_BOARD_HAUPPAUGE_HVR1250] = { |
| 126 | .name = "Hauppauge WinTV-HVR1250", |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 127 | .porta = CX23885_ANALOG_VIDEO, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 128 | .portc = CX23885_MPEG_DVB, |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 129 | #ifdef MT2131_NO_ANALOG_SUPPORT_YET |
| 130 | .tuner_type = TUNER_PHILIPS_TDA8290, |
| 131 | .tuner_addr = 0x42, /* 0x84 >> 1 */ |
| 132 | .tuner_bus = 1, |
| 133 | #endif |
| 134 | .force_bff = 1, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 135 | .input = {{ |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 136 | #ifdef MT2131_NO_ANALOG_SUPPORT_YET |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 137 | .type = CX23885_VMUX_TELEVISION, |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 138 | .vmux = CX25840_VIN7_CH3 | |
| 139 | CX25840_VIN5_CH2 | |
| 140 | CX25840_VIN2_CH1, |
| 141 | .amux = CX25840_AUDIO8, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 142 | .gpio0 = 0xff00, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 143 | }, { |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 144 | #endif |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 145 | .type = CX23885_VMUX_COMPOSITE1, |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 146 | .vmux = CX25840_VIN7_CH3 | |
| 147 | CX25840_VIN4_CH2 | |
| 148 | CX25840_VIN6_CH1, |
| 149 | .amux = CX25840_AUDIO7, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 150 | .gpio0 = 0xff02, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 151 | }, { |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 152 | .type = CX23885_VMUX_SVIDEO, |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 153 | .vmux = CX25840_VIN7_CH3 | |
| 154 | CX25840_VIN4_CH2 | |
| 155 | CX25840_VIN8_CH1 | |
| 156 | CX25840_SVIDEO_ON, |
| 157 | .amux = CX25840_AUDIO7, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 158 | .gpio0 = 0xff02, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 159 | } }, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 160 | }, |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 161 | [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = { |
| 162 | .name = "DViCO FusionHDTV5 Express", |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 163 | .portb = CX23885_MPEG_DVB, |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 164 | }, |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 165 | [CX23885_BOARD_HAUPPAUGE_HVR1500Q] = { |
| 166 | .name = "Hauppauge WinTV-HVR1500Q", |
| 167 | .portc = CX23885_MPEG_DVB, |
| 168 | }, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 169 | [CX23885_BOARD_HAUPPAUGE_HVR1500] = { |
| 170 | .name = "Hauppauge WinTV-HVR1500", |
Mijhail Moreyra | 18d6447 | 2011-10-10 11:09:53 -0300 | [diff] [blame] | 171 | .porta = CX23885_ANALOG_VIDEO, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 172 | .portc = CX23885_MPEG_DVB, |
Mijhail Moreyra | 18d6447 | 2011-10-10 11:09:53 -0300 | [diff] [blame] | 173 | .tuner_type = TUNER_XC2028, |
| 174 | .tuner_addr = 0x61, /* 0xc2 >> 1 */ |
| 175 | .input = {{ |
| 176 | .type = CX23885_VMUX_TELEVISION, |
| 177 | .vmux = CX25840_VIN7_CH3 | |
| 178 | CX25840_VIN5_CH2 | |
| 179 | CX25840_VIN2_CH1, |
| 180 | .gpio0 = 0, |
| 181 | }, { |
| 182 | .type = CX23885_VMUX_COMPOSITE1, |
| 183 | .vmux = CX25840_VIN7_CH3 | |
| 184 | CX25840_VIN4_CH2 | |
| 185 | CX25840_VIN6_CH1, |
| 186 | .gpio0 = 0, |
| 187 | }, { |
| 188 | .type = CX23885_VMUX_SVIDEO, |
| 189 | .vmux = CX25840_VIN7_CH3 | |
| 190 | CX25840_VIN4_CH2 | |
| 191 | CX25840_VIN8_CH1 | |
| 192 | CX25840_SVIDEO_ON, |
| 193 | .gpio0 = 0, |
| 194 | } }, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 195 | }, |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 196 | [CX23885_BOARD_HAUPPAUGE_HVR1200] = { |
| 197 | .name = "Hauppauge WinTV-HVR1200", |
| 198 | .portc = CX23885_MPEG_DVB, |
| 199 | }, |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 200 | [CX23885_BOARD_HAUPPAUGE_HVR1700] = { |
| 201 | .name = "Hauppauge WinTV-HVR1700", |
| 202 | .portc = CX23885_MPEG_DVB, |
| 203 | }, |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 204 | [CX23885_BOARD_HAUPPAUGE_HVR1400] = { |
| 205 | .name = "Hauppauge WinTV-HVR1400", |
| 206 | .portc = CX23885_MPEG_DVB, |
| 207 | }, |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 208 | [CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP] = { |
| 209 | .name = "DViCO FusionHDTV7 Dual Express", |
Steven Toth | aaadeac | 2008-06-30 20:58:38 -0300 | [diff] [blame] | 210 | .portb = CX23885_MPEG_DVB, |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 211 | .portc = CX23885_MPEG_DVB, |
| 212 | }, |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 213 | [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP] = { |
| 214 | .name = "DViCO FusionHDTV DVB-T Dual Express", |
| 215 | .portb = CX23885_MPEG_DVB, |
| 216 | .portc = CX23885_MPEG_DVB, |
| 217 | }, |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 218 | [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H] = { |
| 219 | .name = "Leadtek Winfast PxDVR3200 H", |
| 220 | .portc = CX23885_MPEG_DVB, |
| 221 | }, |
Anca Emanuel | 642ca1a | 2013-09-13 11:28:12 -0300 | [diff] [blame] | 222 | [CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200] = { |
| 223 | .name = "Leadtek Winfast PxPVR2200", |
| 224 | .porta = CX23885_ANALOG_VIDEO, |
| 225 | .tuner_type = TUNER_XC2028, |
| 226 | .tuner_addr = 0x61, |
| 227 | .tuner_bus = 1, |
| 228 | .input = {{ |
| 229 | .type = CX23885_VMUX_TELEVISION, |
| 230 | .vmux = CX25840_VIN2_CH1 | |
| 231 | CX25840_VIN5_CH2, |
| 232 | .amux = CX25840_AUDIO8, |
| 233 | .gpio0 = 0x704040, |
| 234 | }, { |
| 235 | .type = CX23885_VMUX_COMPOSITE1, |
| 236 | .vmux = CX25840_COMPOSITE1, |
| 237 | .amux = CX25840_AUDIO7, |
| 238 | .gpio0 = 0x704040, |
| 239 | }, { |
| 240 | .type = CX23885_VMUX_SVIDEO, |
| 241 | .vmux = CX25840_SVIDEO_LUMA3 | |
| 242 | CX25840_SVIDEO_CHROMA4, |
| 243 | .amux = CX25840_AUDIO7, |
| 244 | .gpio0 = 0x704040, |
| 245 | }, { |
| 246 | .type = CX23885_VMUX_COMPONENT, |
| 247 | .vmux = CX25840_VIN7_CH1 | |
| 248 | CX25840_VIN6_CH2 | |
| 249 | CX25840_VIN8_CH3 | |
| 250 | CX25840_COMPONENT_ON, |
| 251 | .amux = CX25840_AUDIO7, |
| 252 | .gpio0 = 0x704040, |
| 253 | } }, |
| 254 | }, |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 255 | [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000] = { |
| 256 | .name = "Leadtek Winfast PxDVR3200 H XC4000", |
| 257 | .porta = CX23885_ANALOG_VIDEO, |
| 258 | .portc = CX23885_MPEG_DVB, |
| 259 | .tuner_type = TUNER_XC4000, |
| 260 | .tuner_addr = 0x61, |
Miroslav Slugen | 9ee8537 | 2011-12-11 20:19:34 -0300 | [diff] [blame] | 261 | .radio_type = UNSET, |
| 262 | .radio_addr = ADDR_UNSET, |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 263 | .input = {{ |
| 264 | .type = CX23885_VMUX_TELEVISION, |
| 265 | .vmux = CX25840_VIN2_CH1 | |
| 266 | CX25840_VIN5_CH2 | |
| 267 | CX25840_NONE0_CH3, |
| 268 | }, { |
| 269 | .type = CX23885_VMUX_COMPOSITE1, |
| 270 | .vmux = CX25840_COMPOSITE1, |
| 271 | }, { |
| 272 | .type = CX23885_VMUX_SVIDEO, |
| 273 | .vmux = CX25840_SVIDEO_LUMA3 | |
| 274 | CX25840_SVIDEO_CHROMA4, |
| 275 | }, { |
| 276 | .type = CX23885_VMUX_COMPONENT, |
| 277 | .vmux = CX25840_VIN7_CH1 | |
| 278 | CX25840_VIN6_CH2 | |
| 279 | CX25840_VIN8_CH3 | |
| 280 | CX25840_COMPONENT_ON, |
| 281 | } }, |
| 282 | }, |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 283 | [CX23885_BOARD_COMPRO_VIDEOMATE_E650F] = { |
| 284 | .name = "Compro VideoMate E650F", |
| 285 | .portc = CX23885_MPEG_DVB, |
| 286 | }, |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 287 | [CX23885_BOARD_TBS_6920] = { |
| 288 | .name = "TurboSight TBS 6920", |
| 289 | .portb = CX23885_MPEG_DVB, |
| 290 | }, |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 291 | [CX23885_BOARD_TBS_6980] = { |
| 292 | .name = "TurboSight TBS 6980", |
| 293 | .portb = CX23885_MPEG_DVB, |
| 294 | .portc = CX23885_MPEG_DVB, |
| 295 | }, |
| 296 | [CX23885_BOARD_TBS_6981] = { |
| 297 | .name = "TurboSight TBS 6981", |
| 298 | .portb = CX23885_MPEG_DVB, |
| 299 | .portc = CX23885_MPEG_DVB, |
| 300 | }, |
Igor M. Liplianin | 579943f | 2009-01-17 12:18:26 -0300 | [diff] [blame] | 301 | [CX23885_BOARD_TEVII_S470] = { |
| 302 | .name = "TeVii S470", |
| 303 | .portb = CX23885_MPEG_DVB, |
| 304 | }, |
Igor M. Liplianin | c9b8b04 | 2009-01-17 12:23:31 -0300 | [diff] [blame] | 305 | [CX23885_BOARD_DVBWORLD_2005] = { |
| 306 | .name = "DVBWorld DVB-S2 2005", |
| 307 | .portb = CX23885_MPEG_DVB, |
| 308 | }, |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 309 | [CX23885_BOARD_NETUP_DUAL_DVBS2_CI] = { |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 310 | .ci_type = 1, |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 311 | .name = "NetUP Dual DVB-S2 CI", |
| 312 | .portb = CX23885_MPEG_DVB, |
| 313 | .portc = CX23885_MPEG_DVB, |
| 314 | }, |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 315 | [CX23885_BOARD_HAUPPAUGE_HVR1270] = { |
| 316 | .name = "Hauppauge WinTV-HVR1270", |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 317 | .portc = CX23885_MPEG_DVB, |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 318 | }, |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 319 | [CX23885_BOARD_HAUPPAUGE_HVR1275] = { |
| 320 | .name = "Hauppauge WinTV-HVR1275", |
| 321 | .portc = CX23885_MPEG_DVB, |
| 322 | }, |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 323 | [CX23885_BOARD_HAUPPAUGE_HVR1255] = { |
| 324 | .name = "Hauppauge WinTV-HVR1255", |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 325 | .porta = CX23885_ANALOG_VIDEO, |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 326 | .portc = CX23885_MPEG_DVB, |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 327 | .tuner_type = TUNER_ABSENT, |
| 328 | .tuner_addr = 0x42, /* 0x84 >> 1 */ |
| 329 | .force_bff = 1, |
| 330 | .input = {{ |
| 331 | .type = CX23885_VMUX_TELEVISION, |
| 332 | .vmux = CX25840_VIN7_CH3 | |
| 333 | CX25840_VIN5_CH2 | |
| 334 | CX25840_VIN2_CH1 | |
| 335 | CX25840_DIF_ON, |
| 336 | .amux = CX25840_AUDIO8, |
| 337 | }, { |
| 338 | .type = CX23885_VMUX_COMPOSITE1, |
| 339 | .vmux = CX25840_VIN7_CH3 | |
| 340 | CX25840_VIN4_CH2 | |
| 341 | CX25840_VIN6_CH1, |
| 342 | .amux = CX25840_AUDIO7, |
| 343 | }, { |
| 344 | .type = CX23885_VMUX_SVIDEO, |
| 345 | .vmux = CX25840_VIN7_CH3 | |
| 346 | CX25840_VIN4_CH2 | |
| 347 | CX25840_VIN8_CH1 | |
| 348 | CX25840_SVIDEO_ON, |
| 349 | .amux = CX25840_AUDIO7, |
| 350 | } }, |
| 351 | }, |
| 352 | [CX23885_BOARD_HAUPPAUGE_HVR1255_22111] = { |
| 353 | .name = "Hauppauge WinTV-HVR1255", |
| 354 | .porta = CX23885_ANALOG_VIDEO, |
| 355 | .portc = CX23885_MPEG_DVB, |
| 356 | .tuner_type = TUNER_ABSENT, |
| 357 | .tuner_addr = 0x42, /* 0x84 >> 1 */ |
| 358 | .force_bff = 1, |
| 359 | .input = {{ |
| 360 | .type = CX23885_VMUX_TELEVISION, |
| 361 | .vmux = CX25840_VIN7_CH3 | |
| 362 | CX25840_VIN5_CH2 | |
| 363 | CX25840_VIN2_CH1 | |
| 364 | CX25840_DIF_ON, |
| 365 | .amux = CX25840_AUDIO8, |
| 366 | }, { |
| 367 | .type = CX23885_VMUX_SVIDEO, |
| 368 | .vmux = CX25840_VIN7_CH3 | |
| 369 | CX25840_VIN4_CH2 | |
| 370 | CX25840_VIN8_CH1 | |
| 371 | CX25840_SVIDEO_ON, |
| 372 | .amux = CX25840_AUDIO7, |
| 373 | } }, |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 374 | }, |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 375 | [CX23885_BOARD_HAUPPAUGE_HVR1210] = { |
| 376 | .name = "Hauppauge WinTV-HVR1210", |
| 377 | .portc = CX23885_MPEG_DVB, |
| 378 | }, |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 379 | [CX23885_BOARD_MYGICA_X8506] = { |
| 380 | .name = "Mygica X8506 DMB-TH", |
David T.L. Wong | 6f0d8c0 | 2009-10-21 13:15:30 -0300 | [diff] [blame] | 381 | .tuner_type = TUNER_XC5000, |
| 382 | .tuner_addr = 0x61, |
Igor M. Liplianin | 557f48d | 2011-01-25 17:05:00 -0300 | [diff] [blame] | 383 | .tuner_bus = 1, |
David T.L. Wong | bc1548a | 2009-10-21 11:09:28 -0300 | [diff] [blame] | 384 | .porta = CX23885_ANALOG_VIDEO, |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 385 | .portb = CX23885_MPEG_DVB, |
David T.L. Wong | bc1548a | 2009-10-21 11:09:28 -0300 | [diff] [blame] | 386 | .input = { |
| 387 | { |
David T.L. Wong | 6f0d8c0 | 2009-10-21 13:15:30 -0300 | [diff] [blame] | 388 | .type = CX23885_VMUX_TELEVISION, |
| 389 | .vmux = CX25840_COMPOSITE2, |
| 390 | }, |
| 391 | { |
David T.L. Wong | bc1548a | 2009-10-21 11:09:28 -0300 | [diff] [blame] | 392 | .type = CX23885_VMUX_COMPOSITE1, |
| 393 | .vmux = CX25840_COMPOSITE8, |
| 394 | }, |
| 395 | { |
| 396 | .type = CX23885_VMUX_SVIDEO, |
| 397 | .vmux = CX25840_SVIDEO_LUMA3 | |
| 398 | CX25840_SVIDEO_CHROMA4, |
| 399 | }, |
| 400 | { |
| 401 | .type = CX23885_VMUX_COMPONENT, |
| 402 | .vmux = CX25840_COMPONENT_ON | |
| 403 | CX25840_VIN1_CH1 | |
| 404 | CX25840_VIN6_CH2 | |
| 405 | CX25840_VIN7_CH3, |
| 406 | }, |
| 407 | }, |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 408 | }, |
David Wong | 2365b2d | 2009-06-17 01:38:12 -0300 | [diff] [blame] | 409 | [CX23885_BOARD_MAGICPRO_PROHDTVE2] = { |
| 410 | .name = "Magic-Pro ProHDTV Extreme 2", |
David T.L. Wong | 6f0d8c0 | 2009-10-21 13:15:30 -0300 | [diff] [blame] | 411 | .tuner_type = TUNER_XC5000, |
| 412 | .tuner_addr = 0x61, |
Igor M. Liplianin | 557f48d | 2011-01-25 17:05:00 -0300 | [diff] [blame] | 413 | .tuner_bus = 1, |
David T.L. Wong | bc1548a | 2009-10-21 11:09:28 -0300 | [diff] [blame] | 414 | .porta = CX23885_ANALOG_VIDEO, |
David Wong | 2365b2d | 2009-06-17 01:38:12 -0300 | [diff] [blame] | 415 | .portb = CX23885_MPEG_DVB, |
David T.L. Wong | bc1548a | 2009-10-21 11:09:28 -0300 | [diff] [blame] | 416 | .input = { |
| 417 | { |
David T.L. Wong | 6f0d8c0 | 2009-10-21 13:15:30 -0300 | [diff] [blame] | 418 | .type = CX23885_VMUX_TELEVISION, |
| 419 | .vmux = CX25840_COMPOSITE2, |
| 420 | }, |
| 421 | { |
David T.L. Wong | bc1548a | 2009-10-21 11:09:28 -0300 | [diff] [blame] | 422 | .type = CX23885_VMUX_COMPOSITE1, |
| 423 | .vmux = CX25840_COMPOSITE8, |
| 424 | }, |
| 425 | { |
| 426 | .type = CX23885_VMUX_SVIDEO, |
| 427 | .vmux = CX25840_SVIDEO_LUMA3 | |
| 428 | CX25840_SVIDEO_CHROMA4, |
| 429 | }, |
| 430 | { |
| 431 | .type = CX23885_VMUX_COMPONENT, |
| 432 | .vmux = CX25840_COMPONENT_ON | |
| 433 | CX25840_VIN1_CH1 | |
| 434 | CX25840_VIN6_CH2 | |
| 435 | CX25840_VIN7_CH3, |
| 436 | }, |
| 437 | }, |
David Wong | 2365b2d | 2009-06-17 01:38:12 -0300 | [diff] [blame] | 438 | }, |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 439 | [CX23885_BOARD_HAUPPAUGE_HVR1850] = { |
| 440 | .name = "Hauppauge WinTV-HVR1850", |
Steven Toth | 3504513 | 2012-01-04 21:08:35 -0300 | [diff] [blame] | 441 | .porta = CX23885_ANALOG_VIDEO, |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 442 | .portb = CX23885_MPEG_ENCODER, |
| 443 | .portc = CX23885_MPEG_DVB, |
Steven Toth | 3504513 | 2012-01-04 21:08:35 -0300 | [diff] [blame] | 444 | .tuner_type = TUNER_ABSENT, |
| 445 | .tuner_addr = 0x42, /* 0x84 >> 1 */ |
| 446 | .force_bff = 1, |
| 447 | .input = {{ |
| 448 | .type = CX23885_VMUX_TELEVISION, |
| 449 | .vmux = CX25840_VIN7_CH3 | |
| 450 | CX25840_VIN5_CH2 | |
| 451 | CX25840_VIN2_CH1 | |
| 452 | CX25840_DIF_ON, |
| 453 | .amux = CX25840_AUDIO8, |
| 454 | }, { |
| 455 | .type = CX23885_VMUX_COMPOSITE1, |
| 456 | .vmux = CX25840_VIN7_CH3 | |
| 457 | CX25840_VIN4_CH2 | |
| 458 | CX25840_VIN6_CH1, |
| 459 | .amux = CX25840_AUDIO7, |
| 460 | }, { |
| 461 | .type = CX23885_VMUX_SVIDEO, |
| 462 | .vmux = CX25840_VIN7_CH3 | |
| 463 | CX25840_VIN4_CH2 | |
| 464 | CX25840_VIN8_CH1 | |
| 465 | CX25840_SVIDEO_ON, |
| 466 | .amux = CX25840_AUDIO7, |
| 467 | } }, |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 468 | }, |
Vladimir Geroy | 34e383d | 2009-09-18 18:55:47 -0300 | [diff] [blame] | 469 | [CX23885_BOARD_COMPRO_VIDEOMATE_E800] = { |
| 470 | .name = "Compro VideoMate E800", |
| 471 | .portc = CX23885_MPEG_DVB, |
| 472 | }, |
Michael Krufky | aee0b24 | 2009-11-11 01:52:45 -0300 | [diff] [blame] | 473 | [CX23885_BOARD_HAUPPAUGE_HVR1290] = { |
| 474 | .name = "Hauppauge WinTV-HVR1290", |
| 475 | .portc = CX23885_MPEG_DVB, |
| 476 | }, |
David T. L. Wong | ea5697f | 2009-10-26 08:54:04 -0300 | [diff] [blame] | 477 | [CX23885_BOARD_MYGICA_X8558PRO] = { |
| 478 | .name = "Mygica X8558 PRO DMB-TH", |
| 479 | .portb = CX23885_MPEG_DVB, |
| 480 | .portc = CX23885_MPEG_DVB, |
| 481 | }, |
Kusanagi Kouichi | 0b32d65 | 2010-01-22 04:55:28 -0300 | [diff] [blame] | 482 | [CX23885_BOARD_LEADTEK_WINFAST_PXTV1200] = { |
| 483 | .name = "LEADTEK WinFast PxTV1200", |
| 484 | .porta = CX23885_ANALOG_VIDEO, |
| 485 | .tuner_type = TUNER_XC2028, |
| 486 | .tuner_addr = 0x61, |
Igor M. Liplianin | 557f48d | 2011-01-25 17:05:00 -0300 | [diff] [blame] | 487 | .tuner_bus = 1, |
Kusanagi Kouichi | 0b32d65 | 2010-01-22 04:55:28 -0300 | [diff] [blame] | 488 | .input = {{ |
| 489 | .type = CX23885_VMUX_TELEVISION, |
| 490 | .vmux = CX25840_VIN2_CH1 | |
| 491 | CX25840_VIN5_CH2 | |
| 492 | CX25840_NONE0_CH3, |
| 493 | }, { |
| 494 | .type = CX23885_VMUX_COMPOSITE1, |
| 495 | .vmux = CX25840_COMPOSITE1, |
| 496 | }, { |
| 497 | .type = CX23885_VMUX_SVIDEO, |
| 498 | .vmux = CX25840_SVIDEO_LUMA3 | |
| 499 | CX25840_SVIDEO_CHROMA4, |
| 500 | }, { |
| 501 | .type = CX23885_VMUX_COMPONENT, |
| 502 | .vmux = CX25840_VIN7_CH1 | |
| 503 | CX25840_VIN6_CH2 | |
| 504 | CX25840_VIN8_CH3 | |
| 505 | CX25840_COMPONENT_ON, |
| 506 | } }, |
| 507 | }, |
Alexey Chernov | 9028f58 | 2010-12-06 17:09:53 -0300 | [diff] [blame] | 508 | [CX23885_BOARD_GOTVIEW_X5_3D_HYBRID] = { |
| 509 | .name = "GoTView X5 3D Hybrid", |
| 510 | .tuner_type = TUNER_XC5000, |
| 511 | .tuner_addr = 0x64, |
Igor M. Liplianin | 557f48d | 2011-01-25 17:05:00 -0300 | [diff] [blame] | 512 | .tuner_bus = 1, |
Alexey Chernov | 9028f58 | 2010-12-06 17:09:53 -0300 | [diff] [blame] | 513 | .porta = CX23885_ANALOG_VIDEO, |
| 514 | .portb = CX23885_MPEG_DVB, |
| 515 | .input = {{ |
| 516 | .type = CX23885_VMUX_TELEVISION, |
| 517 | .vmux = CX25840_VIN2_CH1 | |
| 518 | CX25840_VIN5_CH2, |
| 519 | .gpio0 = 0x02, |
| 520 | }, { |
| 521 | .type = CX23885_VMUX_COMPOSITE1, |
| 522 | .vmux = CX23885_VMUX_COMPOSITE1, |
| 523 | }, { |
| 524 | .type = CX23885_VMUX_SVIDEO, |
| 525 | .vmux = CX25840_SVIDEO_LUMA3 | |
| 526 | CX25840_SVIDEO_CHROMA4, |
| 527 | } }, |
| 528 | }, |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 529 | [CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF] = { |
| 530 | .ci_type = 2, |
| 531 | .name = "NetUP Dual DVB-T/C-CI RF", |
| 532 | .porta = CX23885_ANALOG_VIDEO, |
| 533 | .portb = CX23885_MPEG_DVB, |
| 534 | .portc = CX23885_MPEG_DVB, |
Igor M. Liplianin | 10d0dcd | 2011-01-25 17:06:00 -0300 | [diff] [blame] | 535 | .num_fds_portb = 2, |
| 536 | .num_fds_portc = 2, |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 537 | .tuner_type = TUNER_XC5000, |
| 538 | .tuner_addr = 0x64, |
| 539 | .input = { { |
| 540 | .type = CX23885_VMUX_TELEVISION, |
| 541 | .vmux = CX25840_COMPOSITE1, |
| 542 | } }, |
| 543 | }, |
Steven Toth | 2cb9ccd | 2011-10-10 11:09:55 -0300 | [diff] [blame] | 544 | [CX23885_BOARD_MPX885] = { |
| 545 | .name = "MPX-885", |
| 546 | .porta = CX23885_ANALOG_VIDEO, |
| 547 | .input = {{ |
| 548 | .type = CX23885_VMUX_COMPOSITE1, |
| 549 | .vmux = CX25840_COMPOSITE1, |
| 550 | .amux = CX25840_AUDIO6, |
| 551 | .gpio0 = 0, |
| 552 | }, { |
| 553 | .type = CX23885_VMUX_COMPOSITE2, |
| 554 | .vmux = CX25840_COMPOSITE2, |
| 555 | .amux = CX25840_AUDIO6, |
| 556 | .gpio0 = 0, |
| 557 | }, { |
| 558 | .type = CX23885_VMUX_COMPOSITE3, |
| 559 | .vmux = CX25840_COMPOSITE3, |
| 560 | .amux = CX25840_AUDIO7, |
| 561 | .gpio0 = 0, |
| 562 | }, { |
| 563 | .type = CX23885_VMUX_COMPOSITE4, |
| 564 | .vmux = CX25840_COMPOSITE4, |
| 565 | .amux = CX25840_AUDIO7, |
| 566 | .gpio0 = 0, |
| 567 | } }, |
| 568 | }, |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 569 | [CX23885_BOARD_MYGICA_X8507] = { |
Mauro Carvalho Chehab | 0d1b526 | 2013-08-09 08:53:27 -0300 | [diff] [blame] | 570 | .name = "Mygica X8502/X8507 ISDB-T", |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 571 | .tuner_type = TUNER_XC5000, |
| 572 | .tuner_addr = 0x61, |
| 573 | .tuner_bus = 1, |
| 574 | .porta = CX23885_ANALOG_VIDEO, |
Mauro Carvalho Chehab | 0d1b526 | 2013-08-09 08:53:27 -0300 | [diff] [blame] | 575 | .portb = CX23885_MPEG_DVB, |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 576 | .input = { |
| 577 | { |
| 578 | .type = CX23885_VMUX_TELEVISION, |
| 579 | .vmux = CX25840_COMPOSITE2, |
| 580 | .amux = CX25840_AUDIO8, |
| 581 | }, |
| 582 | { |
| 583 | .type = CX23885_VMUX_COMPOSITE1, |
| 584 | .vmux = CX25840_COMPOSITE8, |
Alfredo Jesús Delaiti | 082c057 | 2012-09-21 10:33:51 -0300 | [diff] [blame] | 585 | .amux = CX25840_AUDIO7, |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 586 | }, |
| 587 | { |
| 588 | .type = CX23885_VMUX_SVIDEO, |
| 589 | .vmux = CX25840_SVIDEO_LUMA3 | |
| 590 | CX25840_SVIDEO_CHROMA4, |
Alfredo Jesús Delaiti | 082c057 | 2012-09-21 10:33:51 -0300 | [diff] [blame] | 591 | .amux = CX25840_AUDIO7, |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 592 | }, |
| 593 | { |
| 594 | .type = CX23885_VMUX_COMPONENT, |
| 595 | .vmux = CX25840_COMPONENT_ON | |
| 596 | CX25840_VIN1_CH1 | |
| 597 | CX25840_VIN6_CH2 | |
| 598 | CX25840_VIN7_CH3, |
Alfredo Jesús Delaiti | 082c057 | 2012-09-21 10:33:51 -0300 | [diff] [blame] | 599 | .amux = CX25840_AUDIO7, |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 600 | }, |
| 601 | }, |
Stefan Ringel | 722c90e | 2012-01-07 09:20:48 -0300 | [diff] [blame] | 602 | }, |
| 603 | [CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL] = { |
| 604 | .name = "TerraTec Cinergy T PCIe Dual", |
| 605 | .portb = CX23885_MPEG_DVB, |
| 606 | .portc = CX23885_MPEG_DVB, |
Igor M. Liplianin | 7b134e8 | 2012-05-11 11:45:42 -0300 | [diff] [blame] | 607 | }, |
| 608 | [CX23885_BOARD_TEVII_S471] = { |
| 609 | .name = "TeVii S471", |
| 610 | .portb = CX23885_MPEG_DVB, |
Mariusz Bia?o?czyk | f667190 | 2012-09-12 07:59:18 -0300 | [diff] [blame] | 611 | }, |
| 612 | [CX23885_BOARD_PROF_8000] = { |
| 613 | .name = "Prof Revolution DVB-S2 8000", |
| 614 | .portb = CX23885_MPEG_DVB, |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 615 | }, |
| 616 | [CX23885_BOARD_HAUPPAUGE_HVR4400] = { |
| 617 | .name = "Hauppauge WinTV-HVR4400", |
Matthias Schwarzott | 36efec4 | 2014-07-22 17:12:13 -0300 | [diff] [blame] | 618 | .porta = CX23885_ANALOG_VIDEO, |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 619 | .portb = CX23885_MPEG_DVB, |
Matthias Schwarzott | 36efec4 | 2014-07-22 17:12:13 -0300 | [diff] [blame] | 620 | .portc = CX23885_MPEG_DVB, |
| 621 | .tuner_type = TUNER_NXP_TDA18271, |
| 622 | .tuner_addr = 0x60, /* 0xc0 >> 1 */ |
| 623 | .tuner_bus = 1, |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 624 | }, |
Oleh Kravchenko | e8d4237 | 2012-12-08 18:20:59 -0300 | [diff] [blame] | 625 | [CX23885_BOARD_AVERMEDIA_HC81R] = { |
| 626 | .name = "AVerTV Hybrid Express Slim HC81R", |
| 627 | .tuner_type = TUNER_XC2028, |
| 628 | .tuner_addr = 0x61, /* 0xc2 >> 1 */ |
| 629 | .tuner_bus = 1, |
| 630 | .porta = CX23885_ANALOG_VIDEO, |
| 631 | .input = {{ |
| 632 | .type = CX23885_VMUX_TELEVISION, |
| 633 | .vmux = CX25840_VIN2_CH1 | |
| 634 | CX25840_VIN5_CH2 | |
| 635 | CX25840_NONE0_CH3 | |
| 636 | CX25840_NONE1_CH3, |
| 637 | .amux = CX25840_AUDIO8, |
| 638 | }, { |
| 639 | .type = CX23885_VMUX_SVIDEO, |
| 640 | .vmux = CX25840_VIN8_CH1 | |
| 641 | CX25840_NONE_CH2 | |
| 642 | CX25840_VIN7_CH3 | |
| 643 | CX25840_SVIDEO_ON, |
| 644 | .amux = CX25840_AUDIO6, |
| 645 | }, { |
| 646 | .type = CX23885_VMUX_COMPONENT, |
| 647 | .vmux = CX25840_VIN1_CH1 | |
| 648 | CX25840_NONE_CH2 | |
| 649 | CX25840_NONE0_CH3 | |
| 650 | CX25840_NONE1_CH3, |
| 651 | .amux = CX25840_AUDIO6, |
| 652 | } }, |
Hans Verkuil | cce11b0 | 2014-06-27 11:15:42 -0300 | [diff] [blame] | 653 | }, |
James Harper | 46b21bb | 2014-06-12 07:12:24 -0300 | [diff] [blame] | 654 | [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2] = { |
| 655 | .name = "DViCO FusionHDTV DVB-T Dual Express2", |
| 656 | .portb = CX23885_MPEG_DVB, |
| 657 | .portc = CX23885_MPEG_DVB, |
| 658 | }, |
Hans Verkuil | cce11b0 | 2014-06-27 11:15:42 -0300 | [diff] [blame] | 659 | [CX23885_BOARD_HAUPPAUGE_IMPACTVCBE] = { |
| 660 | .name = "Hauppauge ImpactVCB-e", |
| 661 | .tuner_type = TUNER_ABSENT, |
| 662 | .porta = CX23885_ANALOG_VIDEO, |
| 663 | .input = {{ |
| 664 | .type = CX23885_VMUX_COMPOSITE1, |
| 665 | .vmux = CX25840_VIN7_CH3 | |
| 666 | CX25840_VIN4_CH2 | |
| 667 | CX25840_VIN6_CH1, |
| 668 | .amux = CX25840_AUDIO7, |
| 669 | }, { |
| 670 | .type = CX23885_VMUX_SVIDEO, |
| 671 | .vmux = CX25840_VIN7_CH3 | |
| 672 | CX25840_VIN4_CH2 | |
| 673 | CX25840_VIN8_CH1 | |
| 674 | CX25840_SVIDEO_ON, |
| 675 | .amux = CX25840_AUDIO7, |
| 676 | } }, |
| 677 | }, |
Olli Salonen | 2944226 | 2014-08-11 16:58:15 -0300 | [diff] [blame] | 678 | [CX23885_BOARD_DVBSKY_T9580] = { |
| 679 | .name = "DVBSky T9580", |
| 680 | .portb = CX23885_MPEG_DVB, |
| 681 | .portc = CX23885_MPEG_DVB, |
| 682 | }, |
Olli Salonen | 82c1027 | 2014-09-29 04:44:16 -0300 | [diff] [blame] | 683 | [CX23885_BOARD_DVBSKY_T980C] = { |
| 684 | .name = "DVBSky T980C", |
| 685 | .portb = CX23885_MPEG_DVB, |
| 686 | }, |
nibble.max | 0e6c7b0 | 2014-10-23 07:01:44 -0300 | [diff] [blame^] | 687 | [CX23885_BOARD_DVBSKY_S950C] = { |
| 688 | .name = "DVBSky S950C", |
| 689 | .portb = CX23885_MPEG_DVB, |
| 690 | }, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 691 | }; |
| 692 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); |
| 693 | |
| 694 | /* ------------------------------------------------------------------ */ |
| 695 | /* PCI subsystem IDs */ |
| 696 | |
| 697 | struct cx23885_subid cx23885_subids[] = { |
| 698 | { |
| 699 | .subvendor = 0x0070, |
| 700 | .subdevice = 0x3400, |
| 701 | .card = CX23885_BOARD_UNKNOWN, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 702 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 703 | .subvendor = 0x0070, |
| 704 | .subdevice = 0x7600, |
| 705 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800lp, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 706 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 707 | .subvendor = 0x0070, |
| 708 | .subdevice = 0x7800, |
| 709 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 710 | }, { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 711 | .subvendor = 0x0070, |
| 712 | .subdevice = 0x7801, |
| 713 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 714 | }, { |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 715 | .subvendor = 0x0070, |
Michael Krufky | 6ccb8cf | 2007-12-27 21:46:34 -0300 | [diff] [blame] | 716 | .subdevice = 0x7809, |
| 717 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 718 | }, { |
Michael Krufky | 6ccb8cf | 2007-12-27 21:46:34 -0300 | [diff] [blame] | 719 | .subvendor = 0x0070, |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 720 | .subdevice = 0x7911, |
| 721 | .card = CX23885_BOARD_HAUPPAUGE_HVR1250, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 722 | }, { |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 723 | .subvendor = 0x18ac, |
| 724 | .subdevice = 0xd500, |
| 725 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 726 | }, { |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 727 | .subvendor = 0x0070, |
Michael Krufky | b00fff0 | 2007-12-27 22:19:31 -0300 | [diff] [blame] | 728 | .subdevice = 0x7790, |
| 729 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 730 | }, { |
Michael Krufky | b00fff0 | 2007-12-27 22:19:31 -0300 | [diff] [blame] | 731 | .subvendor = 0x0070, |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 732 | .subdevice = 0x7797, |
| 733 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 734 | }, { |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 735 | .subvendor = 0x0070, |
Michael Krufky | b00fff0 | 2007-12-27 22:19:31 -0300 | [diff] [blame] | 736 | .subdevice = 0x7710, |
| 737 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 738 | }, { |
Michael Krufky | b00fff0 | 2007-12-27 22:19:31 -0300 | [diff] [blame] | 739 | .subvendor = 0x0070, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 740 | .subdevice = 0x7717, |
| 741 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500, |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 742 | }, { |
| 743 | .subvendor = 0x0070, |
| 744 | .subdevice = 0x71d1, |
| 745 | .card = CX23885_BOARD_HAUPPAUGE_HVR1200, |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 746 | }, { |
| 747 | .subvendor = 0x0070, |
Michael Krufky | 3c3852c | 2008-05-02 16:12:44 -0300 | [diff] [blame] | 748 | .subdevice = 0x71d3, |
| 749 | .card = CX23885_BOARD_HAUPPAUGE_HVR1200, |
| 750 | }, { |
| 751 | .subvendor = 0x0070, |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 752 | .subdevice = 0x8101, |
| 753 | .card = CX23885_BOARD_HAUPPAUGE_HVR1700, |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 754 | }, { |
| 755 | .subvendor = 0x0070, |
| 756 | .subdevice = 0x8010, |
| 757 | .card = CX23885_BOARD_HAUPPAUGE_HVR1400, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 758 | }, { |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 759 | .subvendor = 0x18ac, |
| 760 | .subdevice = 0xd618, |
| 761 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 762 | }, { |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 763 | .subvendor = 0x18ac, |
| 764 | .subdevice = 0xdb78, |
| 765 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP, |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 766 | }, { |
| 767 | .subvendor = 0x107d, |
| 768 | .subdevice = 0x6681, |
| 769 | .card = CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H, |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 770 | }, { |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 771 | .subvendor = 0x107d, |
Anca Emanuel | 642ca1a | 2013-09-13 11:28:12 -0300 | [diff] [blame] | 772 | .subdevice = 0x6f21, |
| 773 | .card = CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200, |
| 774 | }, { |
| 775 | .subvendor = 0x107d, |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 776 | .subdevice = 0x6f39, |
| 777 | .card = CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000, |
| 778 | }, { |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 779 | .subvendor = 0x185b, |
| 780 | .subdevice = 0xe800, |
| 781 | .card = CX23885_BOARD_COMPRO_VIDEOMATE_E650F, |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 782 | }, { |
| 783 | .subvendor = 0x6920, |
| 784 | .subdevice = 0x8888, |
| 785 | .card = CX23885_BOARD_TBS_6920, |
Igor M. Liplianin | 579943f | 2009-01-17 12:18:26 -0300 | [diff] [blame] | 786 | }, { |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 787 | .subvendor = 0x6980, |
| 788 | .subdevice = 0x8888, |
| 789 | .card = CX23885_BOARD_TBS_6980, |
| 790 | }, { |
| 791 | .subvendor = 0x6981, |
| 792 | .subdevice = 0x8888, |
| 793 | .card = CX23885_BOARD_TBS_6981, |
| 794 | }, { |
Igor M. Liplianin | 579943f | 2009-01-17 12:18:26 -0300 | [diff] [blame] | 795 | .subvendor = 0xd470, |
| 796 | .subdevice = 0x9022, |
| 797 | .card = CX23885_BOARD_TEVII_S470, |
Igor M. Liplianin | c9b8b04 | 2009-01-17 12:23:31 -0300 | [diff] [blame] | 798 | }, { |
| 799 | .subvendor = 0x0001, |
| 800 | .subdevice = 0x2005, |
| 801 | .card = CX23885_BOARD_DVBWORLD_2005, |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 802 | }, { |
| 803 | .subvendor = 0x1b55, |
| 804 | .subdevice = 0x2a2c, |
| 805 | .card = CX23885_BOARD_NETUP_DUAL_DVBS2_CI, |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 806 | }, { |
| 807 | .subvendor = 0x0070, |
| 808 | .subdevice = 0x2211, |
| 809 | .card = CX23885_BOARD_HAUPPAUGE_HVR1270, |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 810 | }, { |
| 811 | .subvendor = 0x0070, |
| 812 | .subdevice = 0x2215, |
| 813 | .card = CX23885_BOARD_HAUPPAUGE_HVR1275, |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 814 | }, { |
| 815 | .subvendor = 0x0070, |
Michael Krufky | 7d7b528 | 2010-06-30 18:17:35 -0300 | [diff] [blame] | 816 | .subdevice = 0x221d, |
| 817 | .card = CX23885_BOARD_HAUPPAUGE_HVR1275, |
| 818 | }, { |
| 819 | .subvendor = 0x0070, |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 820 | .subdevice = 0x2251, |
| 821 | .card = CX23885_BOARD_HAUPPAUGE_HVR1255, |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 822 | }, { |
| 823 | .subvendor = 0x0070, |
Michael Krufky | 7d7b528 | 2010-06-30 18:17:35 -0300 | [diff] [blame] | 824 | .subdevice = 0x2259, |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 825 | .card = CX23885_BOARD_HAUPPAUGE_HVR1255_22111, |
Michael Krufky | 7d7b528 | 2010-06-30 18:17:35 -0300 | [diff] [blame] | 826 | }, { |
| 827 | .subvendor = 0x0070, |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 828 | .subdevice = 0x2291, |
| 829 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, |
| 830 | }, { |
| 831 | .subvendor = 0x0070, |
| 832 | .subdevice = 0x2295, |
| 833 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 834 | }, { |
Michael Krufky | 7d7b528 | 2010-06-30 18:17:35 -0300 | [diff] [blame] | 835 | .subvendor = 0x0070, |
| 836 | .subdevice = 0x2299, |
| 837 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, |
| 838 | }, { |
| 839 | .subvendor = 0x0070, |
| 840 | .subdevice = 0x229d, |
| 841 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, /* HVR1215 */ |
| 842 | }, { |
| 843 | .subvendor = 0x0070, |
| 844 | .subdevice = 0x22f0, |
| 845 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, |
| 846 | }, { |
| 847 | .subvendor = 0x0070, |
| 848 | .subdevice = 0x22f1, |
| 849 | .card = CX23885_BOARD_HAUPPAUGE_HVR1255, |
| 850 | }, { |
| 851 | .subvendor = 0x0070, |
| 852 | .subdevice = 0x22f2, |
| 853 | .card = CX23885_BOARD_HAUPPAUGE_HVR1275, |
| 854 | }, { |
| 855 | .subvendor = 0x0070, |
| 856 | .subdevice = 0x22f3, |
| 857 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, /* HVR1215 */ |
| 858 | }, { |
| 859 | .subvendor = 0x0070, |
| 860 | .subdevice = 0x22f4, |
| 861 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, |
| 862 | }, { |
| 863 | .subvendor = 0x0070, |
| 864 | .subdevice = 0x22f5, |
| 865 | .card = CX23885_BOARD_HAUPPAUGE_HVR1210, /* HVR1215 */ |
| 866 | }, { |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 867 | .subvendor = 0x14f1, |
| 868 | .subdevice = 0x8651, |
| 869 | .card = CX23885_BOARD_MYGICA_X8506, |
David Wong | 2365b2d | 2009-06-17 01:38:12 -0300 | [diff] [blame] | 870 | }, { |
| 871 | .subvendor = 0x14f1, |
| 872 | .subdevice = 0x8657, |
| 873 | .card = CX23885_BOARD_MAGICPRO_PROHDTVE2, |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 874 | }, { |
| 875 | .subvendor = 0x0070, |
| 876 | .subdevice = 0x8541, |
| 877 | .card = CX23885_BOARD_HAUPPAUGE_HVR1850, |
Vladimir Geroy | 34e383d | 2009-09-18 18:55:47 -0300 | [diff] [blame] | 878 | }, { |
| 879 | .subvendor = 0x1858, |
| 880 | .subdevice = 0xe800, |
| 881 | .card = CX23885_BOARD_COMPRO_VIDEOMATE_E800, |
Michael Krufky | aee0b24 | 2009-11-11 01:52:45 -0300 | [diff] [blame] | 882 | }, { |
| 883 | .subvendor = 0x0070, |
| 884 | .subdevice = 0x8551, |
| 885 | .card = CX23885_BOARD_HAUPPAUGE_HVR1290, |
David T. L. Wong | ea5697f | 2009-10-26 08:54:04 -0300 | [diff] [blame] | 886 | }, { |
| 887 | .subvendor = 0x14f1, |
| 888 | .subdevice = 0x8578, |
| 889 | .card = CX23885_BOARD_MYGICA_X8558PRO, |
Kusanagi Kouichi | 0b32d65 | 2010-01-22 04:55:28 -0300 | [diff] [blame] | 890 | }, { |
| 891 | .subvendor = 0x107d, |
| 892 | .subdevice = 0x6f22, |
| 893 | .card = CX23885_BOARD_LEADTEK_WINFAST_PXTV1200, |
Alexey Chernov | 9028f58 | 2010-12-06 17:09:53 -0300 | [diff] [blame] | 894 | }, { |
| 895 | .subvendor = 0x5654, |
| 896 | .subdevice = 0x2390, |
| 897 | .card = CX23885_BOARD_GOTVIEW_X5_3D_HYBRID, |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 898 | }, { |
| 899 | .subvendor = 0x1b55, |
| 900 | .subdevice = 0xe2e4, |
| 901 | .card = CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF, |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 902 | }, { |
| 903 | .subvendor = 0x14f1, |
| 904 | .subdevice = 0x8502, |
| 905 | .card = CX23885_BOARD_MYGICA_X8507, |
Stefan Ringel | 722c90e | 2012-01-07 09:20:48 -0300 | [diff] [blame] | 906 | }, { |
| 907 | .subvendor = 0x153b, |
| 908 | .subdevice = 0x117e, |
| 909 | .card = CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL, |
Igor M. Liplianin | 7b134e8 | 2012-05-11 11:45:42 -0300 | [diff] [blame] | 910 | }, { |
| 911 | .subvendor = 0xd471, |
| 912 | .subdevice = 0x9022, |
| 913 | .card = CX23885_BOARD_TEVII_S471, |
Mariusz Bia?o?czyk | f667190 | 2012-09-12 07:59:18 -0300 | [diff] [blame] | 914 | }, { |
| 915 | .subvendor = 0x8000, |
| 916 | .subdevice = 0x3034, |
| 917 | .card = CX23885_BOARD_PROF_8000, |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 918 | }, { |
| 919 | .subvendor = 0x0070, |
| 920 | .subdevice = 0xc108, |
| 921 | .card = CX23885_BOARD_HAUPPAUGE_HVR4400, |
| 922 | }, { |
| 923 | .subvendor = 0x0070, |
| 924 | .subdevice = 0xc138, |
| 925 | .card = CX23885_BOARD_HAUPPAUGE_HVR4400, |
| 926 | }, { |
| 927 | .subvendor = 0x0070, |
| 928 | .subdevice = 0xc12a, |
| 929 | .card = CX23885_BOARD_HAUPPAUGE_HVR4400, |
| 930 | }, { |
| 931 | .subvendor = 0x0070, |
| 932 | .subdevice = 0xc1f8, |
| 933 | .card = CX23885_BOARD_HAUPPAUGE_HVR4400, |
Oleh Kravchenko | e8d4237 | 2012-12-08 18:20:59 -0300 | [diff] [blame] | 934 | }, { |
| 935 | .subvendor = 0x1461, |
| 936 | .subdevice = 0xd939, |
| 937 | .card = CX23885_BOARD_AVERMEDIA_HC81R, |
Hans Verkuil | cce11b0 | 2014-06-27 11:15:42 -0300 | [diff] [blame] | 938 | }, { |
| 939 | .subvendor = 0x0070, |
| 940 | .subdevice = 0x7133, |
| 941 | .card = CX23885_BOARD_HAUPPAUGE_IMPACTVCBE, |
James Harper | 46b21bb | 2014-06-12 07:12:24 -0300 | [diff] [blame] | 942 | }, { |
| 943 | .subvendor = 0x18ac, |
| 944 | .subdevice = 0xdb98, |
| 945 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2, |
Olli Salonen | 2944226 | 2014-08-11 16:58:15 -0300 | [diff] [blame] | 946 | }, { |
| 947 | .subvendor = 0x4254, |
| 948 | .subdevice = 0x9580, |
| 949 | .card = CX23885_BOARD_DVBSKY_T9580, |
Olli Salonen | 82c1027 | 2014-09-29 04:44:16 -0300 | [diff] [blame] | 950 | }, { |
| 951 | .subvendor = 0x4254, |
| 952 | .subdevice = 0x980c, |
| 953 | .card = CX23885_BOARD_DVBSKY_T980C, |
nibble.max | 0e6c7b0 | 2014-10-23 07:01:44 -0300 | [diff] [blame^] | 954 | }, { |
| 955 | .subvendor = 0x4254, |
| 956 | .subdevice = 0x950c, |
| 957 | .card = CX23885_BOARD_DVBSKY_S950C, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 958 | }, |
| 959 | }; |
| 960 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); |
| 961 | |
| 962 | void cx23885_card_list(struct cx23885_dev *dev) |
| 963 | { |
| 964 | int i; |
| 965 | |
| 966 | if (0 == dev->pci->subsystem_vendor && |
| 967 | 0 == dev->pci->subsystem_device) { |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 968 | printk(KERN_INFO |
| 969 | "%s: Board has no valid PCIe Subsystem ID and can't\n" |
| 970 | "%s: be autodetected. Pass card=<n> insmod option\n" |
| 971 | "%s: to workaround that. Redirect complaints to the\n" |
| 972 | "%s: vendor of the TV card. Best regards,\n" |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 973 | "%s: -- tux\n", |
| 974 | dev->name, dev->name, dev->name, dev->name, dev->name); |
| 975 | } else { |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 976 | printk(KERN_INFO |
| 977 | "%s: Your board isn't known (yet) to the driver.\n" |
| 978 | "%s: Try to pick one of the existing card configs via\n" |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 979 | "%s: card=<n> insmod option. Updating to the latest\n" |
| 980 | "%s: version might help as well.\n", |
| 981 | dev->name, dev->name, dev->name, dev->name); |
| 982 | } |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 983 | printk(KERN_INFO "%s: Here is a list of valid choices for the card=<n> insmod option:\n", |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 984 | dev->name); |
| 985 | for (i = 0; i < cx23885_bcount; i++) |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 986 | printk(KERN_INFO "%s: card=%d -> %s\n", |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 987 | dev->name, i, cx23885_boards[i].name); |
| 988 | } |
| 989 | |
| 990 | static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) |
| 991 | { |
| 992 | struct tveeprom tv; |
| 993 | |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 994 | tveeprom_hauppauge_analog(&dev->i2c_bus[0].i2c_client, &tv, |
| 995 | eeprom_data); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 996 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 997 | /* Make sure we support the board model */ |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 998 | switch (tv.model) { |
Michael Krufky | 5308cf0 | 2009-05-12 18:37:35 -0300 | [diff] [blame] | 999 | case 22001: |
| 1000 | /* WinTV-HVR1270 (PCIe, Retail, half height) |
| 1001 | * ATSC/QAM and basic analog, IR Blast */ |
| 1002 | case 22009: |
| 1003 | /* WinTV-HVR1210 (PCIe, Retail, half height) |
| 1004 | * DVB-T and basic analog, IR Blast */ |
| 1005 | case 22011: |
| 1006 | /* WinTV-HVR1270 (PCIe, Retail, half height) |
| 1007 | * ATSC/QAM and basic analog, IR Recv */ |
| 1008 | case 22019: |
| 1009 | /* WinTV-HVR1210 (PCIe, Retail, half height) |
| 1010 | * DVB-T and basic analog, IR Recv */ |
| 1011 | case 22021: |
| 1012 | /* WinTV-HVR1275 (PCIe, Retail, half height) |
| 1013 | * ATSC/QAM and basic analog, IR Recv */ |
| 1014 | case 22029: |
| 1015 | /* WinTV-HVR1210 (PCIe, Retail, half height) |
| 1016 | * DVB-T and basic analog, IR Recv */ |
| 1017 | case 22101: |
| 1018 | /* WinTV-HVR1270 (PCIe, Retail, full height) |
| 1019 | * ATSC/QAM and basic analog, IR Blast */ |
| 1020 | case 22109: |
| 1021 | /* WinTV-HVR1210 (PCIe, Retail, full height) |
| 1022 | * DVB-T and basic analog, IR Blast */ |
| 1023 | case 22111: |
| 1024 | /* WinTV-HVR1270 (PCIe, Retail, full height) |
| 1025 | * ATSC/QAM and basic analog, IR Recv */ |
| 1026 | case 22119: |
| 1027 | /* WinTV-HVR1210 (PCIe, Retail, full height) |
| 1028 | * DVB-T and basic analog, IR Recv */ |
| 1029 | case 22121: |
| 1030 | /* WinTV-HVR1275 (PCIe, Retail, full height) |
| 1031 | * ATSC/QAM and basic analog, IR Recv */ |
| 1032 | case 22129: |
| 1033 | /* WinTV-HVR1210 (PCIe, Retail, full height) |
| 1034 | * DVB-T and basic analog, IR Recv */ |
Michael Krufky | 36396c8 | 2008-05-02 16:14:33 -0300 | [diff] [blame] | 1035 | case 71009: |
| 1036 | /* WinTV-HVR1200 (PCIe, Retail, full height) |
| 1037 | * DVB-T and basic analog */ |
Hans Verkuil | cce11b0 | 2014-06-27 11:15:42 -0300 | [diff] [blame] | 1038 | case 71100: |
| 1039 | /* WinTV-ImpactVCB-e (PCIe, Retail, half height) |
| 1040 | * Basic analog */ |
Michael Krufky | 36396c8 | 2008-05-02 16:14:33 -0300 | [diff] [blame] | 1041 | case 71359: |
| 1042 | /* WinTV-HVR1200 (PCIe, OEM, half height) |
| 1043 | * DVB-T and basic analog */ |
| 1044 | case 71439: |
| 1045 | /* WinTV-HVR1200 (PCIe, OEM, half height) |
| 1046 | * DVB-T and basic analog */ |
| 1047 | case 71449: |
| 1048 | /* WinTV-HVR1200 (PCIe, OEM, full height) |
| 1049 | * DVB-T and basic analog */ |
| 1050 | case 71939: |
| 1051 | /* WinTV-HVR1200 (PCIe, OEM, half height) |
| 1052 | * DVB-T and basic analog */ |
| 1053 | case 71949: |
| 1054 | /* WinTV-HVR1200 (PCIe, OEM, full height) |
| 1055 | * DVB-T and basic analog */ |
| 1056 | case 71959: |
| 1057 | /* WinTV-HVR1200 (PCIe, OEM, full height) |
| 1058 | * DVB-T and basic analog */ |
| 1059 | case 71979: |
| 1060 | /* WinTV-HVR1200 (PCIe, OEM, half height) |
| 1061 | * DVB-T and basic analog */ |
| 1062 | case 71999: |
| 1063 | /* WinTV-HVR1200 (PCIe, OEM, full height) |
| 1064 | * DVB-T and basic analog */ |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 1065 | case 76601: |
| 1066 | /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual |
| 1067 | channel ATSC and MPEG2 HW Encoder */ |
| 1068 | case 77001: |
| 1069 | /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC |
| 1070 | and Basic analog */ |
| 1071 | case 77011: |
| 1072 | /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC |
| 1073 | and Basic analog */ |
| 1074 | case 77041: |
| 1075 | /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM |
| 1076 | and Basic analog */ |
| 1077 | case 77051: |
| 1078 | /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM |
| 1079 | and Basic analog */ |
| 1080 | case 78011: |
| 1081 | /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM, |
| 1082 | Dual channel ATSC and MPEG2 HW Encoder */ |
| 1083 | case 78501: |
| 1084 | /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, |
| 1085 | Dual channel ATSC and MPEG2 HW Encoder */ |
| 1086 | case 78521: |
| 1087 | /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, |
| 1088 | Dual channel ATSC and MPEG2 HW Encoder */ |
| 1089 | case 78531: |
| 1090 | /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM, |
| 1091 | Dual channel ATSC and MPEG2 HW Encoder */ |
| 1092 | case 78631: |
| 1093 | /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM, |
| 1094 | Dual channel ATSC and MPEG2 HW Encoder */ |
| 1095 | case 79001: |
| 1096 | /* WinTV-HVR1250 (PCIe, Retail, IR, full height, |
| 1097 | ATSC and Basic analog */ |
| 1098 | case 79101: |
| 1099 | /* WinTV-HVR1250 (PCIe, Retail, IR, half height, |
| 1100 | ATSC and Basic analog */ |
Andy Walls | ebbeb46 | 2010-07-18 17:35:00 -0300 | [diff] [blame] | 1101 | case 79501: |
| 1102 | /* WinTV-HVR1250 (PCIe, No IR, half height, |
| 1103 | ATSC [at least] and Basic analog) */ |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 1104 | case 79561: |
| 1105 | /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, |
| 1106 | ATSC and Basic analog */ |
| 1107 | case 79571: |
| 1108 | /* WinTV-HVR1250 (PCIe, OEM, No IR, full height, |
| 1109 | ATSC and Basic analog */ |
| 1110 | case 79671: |
| 1111 | /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, |
| 1112 | ATSC and Basic analog */ |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 1113 | case 80019: |
| 1114 | /* WinTV-HVR1400 (Express Card, Retail, IR, |
| 1115 | * DVB-T and Basic analog */ |
Michael Krufky | 36396c8 | 2008-05-02 16:14:33 -0300 | [diff] [blame] | 1116 | case 81509: |
| 1117 | /* WinTV-HVR1700 (PCIe, OEM, No IR, half height) |
| 1118 | * DVB-T and MPEG2 HW Encoder */ |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 1119 | case 81519: |
Michael Krufky | 36396c8 | 2008-05-02 16:14:33 -0300 | [diff] [blame] | 1120 | /* WinTV-HVR1700 (PCIe, OEM, No IR, full height) |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 1121 | * DVB-T and MPEG2 HW Encoder */ |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1122 | break; |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 1123 | case 85021: |
Michael Krufky | 73a5f41 | 2009-11-11 10:46:40 -0300 | [diff] [blame] | 1124 | /* WinTV-HVR1850 (PCIe, Retail, 3.5mm in, IR, FM, |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 1125 | Dual channel ATSC and MPEG2 HW Encoder */ |
| 1126 | break; |
Michael Krufky | 73a5f41 | 2009-11-11 10:46:40 -0300 | [diff] [blame] | 1127 | case 85721: |
| 1128 | /* WinTV-HVR1290 (PCIe, OEM, RCA in, IR, |
| 1129 | Dual channel ATSC and Basic analog */ |
| 1130 | break; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1131 | default: |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 1132 | printk(KERN_WARNING "%s: warning: " |
| 1133 | "unknown hauppauge model #%d\n", |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 1134 | dev->name, tv.model); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1135 | break; |
| 1136 | } |
| 1137 | |
| 1138 | printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n", |
| 1139 | dev->name, tv.model); |
| 1140 | } |
| 1141 | |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 1142 | /* Some TBS cards require initing a chip using a bitbanged SPI attached |
| 1143 | to the cx23885 gpio's. If this chip doesn't get init'ed the demod |
| 1144 | doesn't respond to any command. */ |
| 1145 | static void tbs_card_init(struct cx23885_dev *dev) |
| 1146 | { |
| 1147 | int i; |
| 1148 | const u8 buf[] = { |
| 1149 | 0xe0, 0x06, 0x66, 0x33, 0x65, |
| 1150 | 0x01, 0x17, 0x06, 0xde}; |
| 1151 | |
| 1152 | switch (dev->board) { |
| 1153 | case CX23885_BOARD_TBS_6980: |
| 1154 | case CX23885_BOARD_TBS_6981: |
| 1155 | cx_set(GP0_IO, 0x00070007); |
| 1156 | usleep_range(1000, 10000); |
| 1157 | cx_clear(GP0_IO, 2); |
| 1158 | usleep_range(1000, 10000); |
| 1159 | for (i = 0; i < 9 * 8; i++) { |
| 1160 | cx_clear(GP0_IO, 7); |
| 1161 | usleep_range(1000, 10000); |
| 1162 | cx_set(GP0_IO, |
| 1163 | ((buf[i >> 3] >> (7 - (i & 7))) & 1) | 4); |
| 1164 | usleep_range(1000, 10000); |
| 1165 | } |
| 1166 | cx_set(GP0_IO, 7); |
| 1167 | break; |
| 1168 | } |
| 1169 | } |
| 1170 | |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 1171 | int cx23885_tuner_callback(void *priv, int component, int command, int arg) |
Steven Toth | 8c70017 | 2008-01-05 16:55:45 -0300 | [diff] [blame] | 1172 | { |
Steven Toth | 89ce221 | 2008-08-04 22:18:19 -0300 | [diff] [blame] | 1173 | struct cx23885_tsport *port = priv; |
| 1174 | struct cx23885_dev *dev = port->dev; |
Steven Toth | 6df5169 | 2008-06-30 22:17:05 -0300 | [diff] [blame] | 1175 | u32 bitmask = 0; |
| 1176 | |
Anton Blanchard | c6cff16 | 2012-07-01 21:38:03 -0300 | [diff] [blame] | 1177 | if ((command == XC2028_RESET_CLK) || (command == XC2028_I2C_FLUSH)) |
Steven Toth | 89ce221 | 2008-08-04 22:18:19 -0300 | [diff] [blame] | 1178 | return 0; |
| 1179 | |
Steven Toth | 6df5169 | 2008-06-30 22:17:05 -0300 | [diff] [blame] | 1180 | if (command != 0) { |
| 1181 | printk(KERN_ERR "%s(): Unknown command 0x%x.\n", |
| 1182 | __func__, command); |
| 1183 | return -EINVAL; |
| 1184 | } |
Steven Toth | 8c70017 | 2008-01-05 16:55:45 -0300 | [diff] [blame] | 1185 | |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 1186 | switch (dev->board) { |
Steven Toth | 90a71b1 | 2008-08-04 21:38:46 -0300 | [diff] [blame] | 1187 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
| 1188 | case CX23885_BOARD_HAUPPAUGE_HVR1500: |
Steven Toth | 8c70017 | 2008-01-05 16:55:45 -0300 | [diff] [blame] | 1189 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1190 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
Anca Emanuel | 642ca1a | 2013-09-13 11:28:12 -0300 | [diff] [blame] | 1191 | case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200: |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 1192 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000: |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 1193 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
Vladimir Geroy | 34e383d | 2009-09-18 18:55:47 -0300 | [diff] [blame] | 1194 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: |
Kusanagi Kouichi | 0b32d65 | 2010-01-22 04:55:28 -0300 | [diff] [blame] | 1195 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: |
Steven Toth | 90a71b1 | 2008-08-04 21:38:46 -0300 | [diff] [blame] | 1196 | /* Tuner Reset Command */ |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1197 | bitmask = 0x04; |
Steven Toth | 6df5169 | 2008-06-30 22:17:05 -0300 | [diff] [blame] | 1198 | break; |
| 1199 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 1200 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
James Harper | 46b21bb | 2014-06-12 07:12:24 -0300 | [diff] [blame] | 1201 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2: |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1202 | /* Two identical tuners on two different i2c buses, |
| 1203 | * we need to reset the correct gpio. */ |
Christopher Pascoe | d4dc673 | 2009-04-27 11:27:04 -0300 | [diff] [blame] | 1204 | if (port->nr == 1) |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1205 | bitmask = 0x01; |
Christopher Pascoe | d4dc673 | 2009-04-27 11:27:04 -0300 | [diff] [blame] | 1206 | else if (port->nr == 2) |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1207 | bitmask = 0x04; |
Steven Toth | 8c70017 | 2008-01-05 16:55:45 -0300 | [diff] [blame] | 1208 | break; |
Alexey Chernov | 9028f58 | 2010-12-06 17:09:53 -0300 | [diff] [blame] | 1209 | case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: |
| 1210 | /* Tuner Reset Command */ |
| 1211 | bitmask = 0x02; |
| 1212 | break; |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 1213 | case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF: |
| 1214 | altera_ci_tuner_reset(dev, port->nr); |
| 1215 | break; |
Oleh Kravchenko | e8d4237 | 2012-12-08 18:20:59 -0300 | [diff] [blame] | 1216 | case CX23885_BOARD_AVERMEDIA_HC81R: |
| 1217 | /* XC3028L Reset Command */ |
| 1218 | bitmask = 1 << 2; |
| 1219 | break; |
Steven Toth | 8c70017 | 2008-01-05 16:55:45 -0300 | [diff] [blame] | 1220 | } |
| 1221 | |
Steven Toth | 6df5169 | 2008-06-30 22:17:05 -0300 | [diff] [blame] | 1222 | if (bitmask) { |
| 1223 | /* Drive the tuner into reset and back out */ |
| 1224 | cx_clear(GP0_IO, bitmask); |
| 1225 | mdelay(200); |
| 1226 | cx_set(GP0_IO, bitmask); |
| 1227 | } |
| 1228 | |
| 1229 | return 0; |
Steven Toth | 8c70017 | 2008-01-05 16:55:45 -0300 | [diff] [blame] | 1230 | } |
Steven Toth | 73c993a | 2008-01-05 17:08:05 -0300 | [diff] [blame] | 1231 | |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1232 | void cx23885_gpio_setup(struct cx23885_dev *dev) |
| 1233 | { |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 1234 | switch (dev->board) { |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1235 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
| 1236 | /* GPIO-0 cx24227 demodulator reset */ |
| 1237 | cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ |
| 1238 | break; |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 1239 | case CX23885_BOARD_HAUPPAUGE_HVR1500: |
| 1240 | /* GPIO-0 cx24227 demodulator */ |
| 1241 | /* GPIO-2 xc3028 tuner */ |
| 1242 | |
| 1243 | /* Put the parts into reset */ |
| 1244 | cx_set(GP0_IO, 0x00050000); |
| 1245 | cx_clear(GP0_IO, 0x00000005); |
| 1246 | msleep(5); |
| 1247 | |
| 1248 | /* Bring the parts out of reset */ |
| 1249 | cx_set(GP0_IO, 0x00050005); |
| 1250 | break; |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 1251 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
| 1252 | /* GPIO-0 cx24227 demodulator reset */ |
| 1253 | /* GPIO-2 xc5000 tuner reset */ |
| 1254 | cx_set(GP0_IO, 0x00050005); /* Bring the part out of reset */ |
| 1255 | break; |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1256 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
| 1257 | /* GPIO-0 656_CLK */ |
| 1258 | /* GPIO-1 656_D0 */ |
| 1259 | /* GPIO-2 8295A Reset */ |
| 1260 | /* GPIO-3-10 cx23417 data0-7 */ |
| 1261 | /* GPIO-11-14 cx23417 addr0-3 */ |
| 1262 | /* GPIO-15-18 cx23417 READY, CS, RD, WR */ |
| 1263 | /* GPIO-19 IR_RX */ |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 1264 | |
Steven Toth | a589b66 | 2008-01-13 23:44:47 -0300 | [diff] [blame] | 1265 | /* CX23417 GPIO's */ |
| 1266 | /* EIO15 Zilog Reset */ |
| 1267 | /* EIO14 S5H1409/CX24227 Reset */ |
Steven Toth | f659c51 | 2009-06-25 23:43:31 -0300 | [diff] [blame] | 1268 | mc417_gpio_enable(dev, GPIO_15 | GPIO_14, 1); |
| 1269 | |
| 1270 | /* Put the demod into reset and protect the eeprom */ |
| 1271 | mc417_gpio_clear(dev, GPIO_15 | GPIO_14); |
| 1272 | mdelay(100); |
| 1273 | |
| 1274 | /* Bring the demod and blaster out of reset */ |
| 1275 | mc417_gpio_set(dev, GPIO_15 | GPIO_14); |
| 1276 | mdelay(100); |
Steven Toth | a589b66 | 2008-01-13 23:44:47 -0300 | [diff] [blame] | 1277 | |
Steven Toth | 5206d6e | 2008-01-10 02:09:27 -0300 | [diff] [blame] | 1278 | /* Force the TDA8295A into reset and back */ |
Steven Toth | 21ff3e4 | 2009-06-25 23:50:39 -0300 | [diff] [blame] | 1279 | cx23885_gpio_enable(dev, GPIO_2, 1); |
| 1280 | cx23885_gpio_set(dev, GPIO_2); |
Steven Toth | 5206d6e | 2008-01-10 02:09:27 -0300 | [diff] [blame] | 1281 | mdelay(20); |
Steven Toth | 21ff3e4 | 2009-06-25 23:50:39 -0300 | [diff] [blame] | 1282 | cx23885_gpio_clear(dev, GPIO_2); |
Steven Toth | 5206d6e | 2008-01-10 02:09:27 -0300 | [diff] [blame] | 1283 | mdelay(20); |
Steven Toth | 21ff3e4 | 2009-06-25 23:50:39 -0300 | [diff] [blame] | 1284 | cx23885_gpio_set(dev, GPIO_2); |
Steven Toth | 5206d6e | 2008-01-10 02:09:27 -0300 | [diff] [blame] | 1285 | mdelay(20); |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1286 | break; |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 1287 | case CX23885_BOARD_HAUPPAUGE_HVR1200: |
| 1288 | /* GPIO-0 tda10048 demodulator reset */ |
| 1289 | /* GPIO-2 tda18271 tuner reset */ |
| 1290 | |
| 1291 | /* Put the parts into reset and back */ |
| 1292 | cx_set(GP0_IO, 0x00050000); |
| 1293 | mdelay(20); |
| 1294 | cx_clear(GP0_IO, 0x00000005); |
| 1295 | mdelay(20); |
| 1296 | cx_set(GP0_IO, 0x00050005); |
| 1297 | break; |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 1298 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
| 1299 | /* GPIO-0 TDA10048 demodulator reset */ |
| 1300 | /* GPIO-2 TDA8295A Reset */ |
| 1301 | /* GPIO-3-10 cx23417 data0-7 */ |
| 1302 | /* GPIO-11-14 cx23417 addr0-3 */ |
| 1303 | /* GPIO-15-18 cx23417 READY, CS, RD, WR */ |
| 1304 | |
| 1305 | /* The following GPIO's are on the interna AVCore (cx25840) */ |
| 1306 | /* GPIO-19 IR_RX */ |
| 1307 | /* GPIO-20 IR_TX 416/DVBT Select */ |
| 1308 | /* GPIO-21 IIS DAT */ |
| 1309 | /* GPIO-22 IIS WCLK */ |
| 1310 | /* GPIO-23 IIS BCLK */ |
| 1311 | |
| 1312 | /* Put the parts into reset and back */ |
| 1313 | cx_set(GP0_IO, 0x00050000); |
| 1314 | mdelay(20); |
| 1315 | cx_clear(GP0_IO, 0x00000005); |
| 1316 | mdelay(20); |
| 1317 | cx_set(GP0_IO, 0x00050005); |
| 1318 | break; |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 1319 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
| 1320 | /* GPIO-0 Dibcom7000p demodulator reset */ |
| 1321 | /* GPIO-2 xc3028L tuner reset */ |
| 1322 | /* GPIO-13 LED */ |
| 1323 | |
| 1324 | /* Put the parts into reset and back */ |
| 1325 | cx_set(GP0_IO, 0x00050000); |
| 1326 | mdelay(20); |
| 1327 | cx_clear(GP0_IO, 0x00000005); |
| 1328 | mdelay(20); |
| 1329 | cx_set(GP0_IO, 0x00050005); |
| 1330 | break; |
Steven Toth | 1ecc5ae | 2008-06-30 21:23:50 -0300 | [diff] [blame] | 1331 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
| 1332 | /* GPIO-0 xc5000 tuner reset i2c bus 0 */ |
| 1333 | /* GPIO-1 s5h1409 demod reset i2c bus 0 */ |
| 1334 | /* GPIO-2 xc5000 tuner reset i2c bus 1 */ |
| 1335 | /* GPIO-3 s5h1409 demod reset i2c bus 0 */ |
| 1336 | |
| 1337 | /* Put the parts into reset and back */ |
| 1338 | cx_set(GP0_IO, 0x000f0000); |
| 1339 | mdelay(20); |
| 1340 | cx_clear(GP0_IO, 0x0000000f); |
| 1341 | mdelay(20); |
| 1342 | cx_set(GP0_IO, 0x000f000f); |
| 1343 | break; |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 1344 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
James Harper | 46b21bb | 2014-06-12 07:12:24 -0300 | [diff] [blame] | 1345 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2: |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 1346 | /* GPIO-0 portb xc3028 reset */ |
| 1347 | /* GPIO-1 portb zl10353 reset */ |
| 1348 | /* GPIO-2 portc xc3028 reset */ |
| 1349 | /* GPIO-3 portc zl10353 reset */ |
| 1350 | |
| 1351 | /* Put the parts into reset and back */ |
| 1352 | cx_set(GP0_IO, 0x000f0000); |
| 1353 | mdelay(20); |
| 1354 | cx_clear(GP0_IO, 0x0000000f); |
| 1355 | mdelay(20); |
| 1356 | cx_set(GP0_IO, 0x000f000f); |
| 1357 | break; |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1358 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
Anca Emanuel | 642ca1a | 2013-09-13 11:28:12 -0300 | [diff] [blame] | 1359 | case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200: |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 1360 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000: |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 1361 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
Vladimir Geroy | 34e383d | 2009-09-18 18:55:47 -0300 | [diff] [blame] | 1362 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: |
Kusanagi Kouichi | 0b32d65 | 2010-01-22 04:55:28 -0300 | [diff] [blame] | 1363 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1364 | /* GPIO-2 xc3028 tuner reset */ |
| 1365 | |
| 1366 | /* The following GPIO's are on the internal AVCore (cx25840) */ |
| 1367 | /* GPIO-? zl10353 demod reset */ |
| 1368 | |
| 1369 | /* Put the parts into reset and back */ |
| 1370 | cx_set(GP0_IO, 0x00040000); |
| 1371 | mdelay(20); |
| 1372 | cx_clear(GP0_IO, 0x00000004); |
| 1373 | mdelay(20); |
| 1374 | cx_set(GP0_IO, 0x00040004); |
| 1375 | break; |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 1376 | case CX23885_BOARD_TBS_6920: |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 1377 | case CX23885_BOARD_TBS_6980: |
| 1378 | case CX23885_BOARD_TBS_6981: |
Mariusz Bia?o?czyk | f667190 | 2012-09-12 07:59:18 -0300 | [diff] [blame] | 1379 | case CX23885_BOARD_PROF_8000: |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 1380 | cx_write(MC417_CTL, 0x00000036); |
| 1381 | cx_write(MC417_OEN, 0x00001000); |
Igor M. Liplianin | 09ea33e | 2009-11-24 20:16:04 -0300 | [diff] [blame] | 1382 | cx_set(MC417_RWD, 0x00000002); |
| 1383 | mdelay(200); |
| 1384 | cx_clear(MC417_RWD, 0x00000800); |
| 1385 | mdelay(200); |
| 1386 | cx_set(MC417_RWD, 0x00000800); |
| 1387 | mdelay(200); |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 1388 | break; |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 1389 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: |
| 1390 | /* GPIO-0 INTA from CiMax1 |
| 1391 | GPIO-1 INTB from CiMax2 |
| 1392 | GPIO-2 reset chips |
| 1393 | GPIO-3 to GPIO-10 data/addr for CA |
| 1394 | GPIO-11 ~CS0 to CiMax1 |
| 1395 | GPIO-12 ~CS1 to CiMax2 |
| 1396 | GPIO-13 ADL0 load LSB addr |
| 1397 | GPIO-14 ADL1 load MSB addr |
| 1398 | GPIO-15 ~RDY from CiMax |
| 1399 | GPIO-17 ~RD to CiMax |
| 1400 | GPIO-18 ~WR to CiMax |
| 1401 | */ |
| 1402 | cx_set(GP0_IO, 0x00040000); /* GPIO as out */ |
| 1403 | /* GPIO1 and GPIO2 as INTA and INTB from CiMaxes, reset low */ |
| 1404 | cx_clear(GP0_IO, 0x00030004); |
| 1405 | mdelay(100);/* reset delay */ |
| 1406 | cx_set(GP0_IO, 0x00040004); /* GPIO as out, reset high */ |
| 1407 | cx_write(MC417_CTL, 0x00000037);/* enable GPIO3-18 pins */ |
| 1408 | /* GPIO-15 IN as ~ACK, rest as OUT */ |
| 1409 | cx_write(MC417_OEN, 0x00001000); |
| 1410 | /* ~RD, ~WR high; ADL0, ADL1 low; ~CS0, ~CS1 high */ |
| 1411 | cx_write(MC417_RWD, 0x0000c300); |
| 1412 | /* enable irq */ |
| 1413 | cx_write(GPIO_ISM, 0x00000000);/* INTERRUPTS active low*/ |
| 1414 | break; |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 1415 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 1416 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 1417 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 1418 | case CX23885_BOARD_HAUPPAUGE_HVR1255_22111: |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 1419 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 1420 | /* GPIO-5 RF Control: 0 = RF1 Terrestrial, 1 = RF2 Cable */ |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 1421 | /* GPIO-6 I2C Gate which can isolate the demod from the bus */ |
| 1422 | /* GPIO-9 Demod reset */ |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 1423 | |
| 1424 | /* Put the parts into reset and back */ |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 1425 | cx23885_gpio_enable(dev, GPIO_9 | GPIO_6 | GPIO_5, 1); |
| 1426 | cx23885_gpio_set(dev, GPIO_9 | GPIO_6 | GPIO_5); |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 1427 | cx23885_gpio_clear(dev, GPIO_9); |
| 1428 | mdelay(20); |
| 1429 | cx23885_gpio_set(dev, GPIO_9); |
| 1430 | break; |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 1431 | case CX23885_BOARD_MYGICA_X8506: |
David Wong | 2365b2d | 2009-06-17 01:38:12 -0300 | [diff] [blame] | 1432 | case CX23885_BOARD_MAGICPRO_PROHDTVE2: |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 1433 | case CX23885_BOARD_MYGICA_X8507: |
David T.L. Wong | 8e069bb | 2009-10-21 12:29:11 -0300 | [diff] [blame] | 1434 | /* GPIO-0 (0)Analog / (1)Digital TV */ |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 1435 | /* GPIO-1 reset XC5000 */ |
Mauro Carvalho Chehab | 0d1b526 | 2013-08-09 08:53:27 -0300 | [diff] [blame] | 1436 | /* GPIO-2 demod reset */ |
David T.L. Wong | 8e069bb | 2009-10-21 12:29:11 -0300 | [diff] [blame] | 1437 | cx23885_gpio_enable(dev, GPIO_0 | GPIO_1 | GPIO_2, 1); |
| 1438 | cx23885_gpio_clear(dev, GPIO_1 | GPIO_2); |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 1439 | mdelay(100); |
David T.L. Wong | 8e069bb | 2009-10-21 12:29:11 -0300 | [diff] [blame] | 1440 | cx23885_gpio_set(dev, GPIO_0 | GPIO_1 | GPIO_2); |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 1441 | mdelay(100); |
| 1442 | break; |
David T. L. Wong | ea5697f | 2009-10-26 08:54:04 -0300 | [diff] [blame] | 1443 | case CX23885_BOARD_MYGICA_X8558PRO: |
| 1444 | /* GPIO-0 reset first ATBM8830 */ |
| 1445 | /* GPIO-1 reset second ATBM8830 */ |
| 1446 | cx23885_gpio_enable(dev, GPIO_0 | GPIO_1, 1); |
| 1447 | cx23885_gpio_clear(dev, GPIO_0 | GPIO_1); |
| 1448 | mdelay(100); |
| 1449 | cx23885_gpio_set(dev, GPIO_0 | GPIO_1); |
| 1450 | mdelay(100); |
| 1451 | break; |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 1452 | case CX23885_BOARD_HAUPPAUGE_HVR1850: |
Michael Krufky | aee0b24 | 2009-11-11 01:52:45 -0300 | [diff] [blame] | 1453 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 1454 | /* GPIO-0 656_CLK */ |
| 1455 | /* GPIO-1 656_D0 */ |
| 1456 | /* GPIO-2 Wake# */ |
| 1457 | /* GPIO-3-10 cx23417 data0-7 */ |
| 1458 | /* GPIO-11-14 cx23417 addr0-3 */ |
| 1459 | /* GPIO-15-18 cx23417 READY, CS, RD, WR */ |
| 1460 | /* GPIO-19 IR_RX */ |
| 1461 | /* GPIO-20 C_IR_TX */ |
| 1462 | /* GPIO-21 I2S DAT */ |
| 1463 | /* GPIO-22 I2S WCLK */ |
| 1464 | /* GPIO-23 I2S BCLK */ |
| 1465 | /* ALT GPIO: EXP GPIO LATCH */ |
| 1466 | |
| 1467 | /* CX23417 GPIO's */ |
| 1468 | /* GPIO-14 S5H1411/CX24228 Reset */ |
| 1469 | /* GPIO-13 EEPROM write protect */ |
| 1470 | mc417_gpio_enable(dev, GPIO_14 | GPIO_13, 1); |
| 1471 | |
| 1472 | /* Put the demod into reset and protect the eeprom */ |
| 1473 | mc417_gpio_clear(dev, GPIO_14 | GPIO_13); |
| 1474 | mdelay(100); |
| 1475 | |
| 1476 | /* Bring the demod out of reset */ |
| 1477 | mc417_gpio_set(dev, GPIO_14); |
| 1478 | mdelay(100); |
| 1479 | |
| 1480 | /* CX24228 GPIO */ |
| 1481 | /* Connected to IF / Mux */ |
| 1482 | break; |
Alexey Chernov | 9028f58 | 2010-12-06 17:09:53 -0300 | [diff] [blame] | 1483 | case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: |
| 1484 | cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ |
| 1485 | break; |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 1486 | case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF: |
| 1487 | /* GPIO-0 ~INT in |
| 1488 | GPIO-1 TMS out |
| 1489 | GPIO-2 ~reset chips out |
| 1490 | GPIO-3 to GPIO-10 data/addr for CA in/out |
| 1491 | GPIO-11 ~CS out |
| 1492 | GPIO-12 ADDR out |
| 1493 | GPIO-13 ~WR out |
| 1494 | GPIO-14 ~RD out |
| 1495 | GPIO-15 ~RDY in |
| 1496 | GPIO-16 TCK out |
| 1497 | GPIO-17 TDO in |
| 1498 | GPIO-18 TDI out |
| 1499 | */ |
| 1500 | cx_set(GP0_IO, 0x00060000); /* GPIO-1,2 as out */ |
| 1501 | /* GPIO-0 as INT, reset & TMS low */ |
| 1502 | cx_clear(GP0_IO, 0x00010006); |
| 1503 | mdelay(100);/* reset delay */ |
| 1504 | cx_set(GP0_IO, 0x00000004); /* reset high */ |
| 1505 | cx_write(MC417_CTL, 0x00000037);/* enable GPIO-3..18 pins */ |
| 1506 | /* GPIO-17 is TDO in, GPIO-15 is ~RDY in, rest is out */ |
| 1507 | cx_write(MC417_OEN, 0x00005000); |
| 1508 | /* ~RD, ~WR high; ADDR low; ~CS high */ |
| 1509 | cx_write(MC417_RWD, 0x00000d00); |
| 1510 | /* enable irq */ |
| 1511 | cx_write(GPIO_ISM, 0x00000000);/* INTERRUPTS active low*/ |
| 1512 | break; |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1513 | case CX23885_BOARD_HAUPPAUGE_HVR4400: |
| 1514 | /* GPIO-8 tda10071 demod reset */ |
Matthias Schwarzott | 36efec4 | 2014-07-22 17:12:13 -0300 | [diff] [blame] | 1515 | /* GPIO-9 si2165 demod reset */ |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1516 | |
| 1517 | /* Put the parts into reset and back */ |
Matthias Schwarzott | 36efec4 | 2014-07-22 17:12:13 -0300 | [diff] [blame] | 1518 | cx23885_gpio_enable(dev, GPIO_8 | GPIO_9, 1); |
| 1519 | |
| 1520 | cx23885_gpio_clear(dev, GPIO_8 | GPIO_9); |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1521 | mdelay(100); |
Matthias Schwarzott | 36efec4 | 2014-07-22 17:12:13 -0300 | [diff] [blame] | 1522 | cx23885_gpio_set(dev, GPIO_8 | GPIO_9); |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1523 | mdelay(100); |
Matthias Schwarzott | 36efec4 | 2014-07-22 17:12:13 -0300 | [diff] [blame] | 1524 | |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1525 | break; |
Oleh Kravchenko | e8d4237 | 2012-12-08 18:20:59 -0300 | [diff] [blame] | 1526 | case CX23885_BOARD_AVERMEDIA_HC81R: |
| 1527 | cx_clear(MC417_CTL, 1); |
| 1528 | /* GPIO-0,1,2 setup direction as output */ |
| 1529 | cx_set(GP0_IO, 0x00070000); |
| 1530 | mdelay(10); |
| 1531 | /* AF9013 demod reset */ |
| 1532 | cx_set(GP0_IO, 0x00010001); |
| 1533 | mdelay(10); |
| 1534 | cx_clear(GP0_IO, 0x00010001); |
| 1535 | mdelay(10); |
| 1536 | cx_set(GP0_IO, 0x00010001); |
| 1537 | mdelay(10); |
| 1538 | /* demod tune? */ |
| 1539 | cx_clear(GP0_IO, 0x00030003); |
| 1540 | mdelay(10); |
| 1541 | cx_set(GP0_IO, 0x00020002); |
| 1542 | mdelay(10); |
| 1543 | cx_set(GP0_IO, 0x00010001); |
| 1544 | mdelay(10); |
| 1545 | cx_clear(GP0_IO, 0x00020002); |
| 1546 | /* XC3028L tuner reset */ |
| 1547 | cx_set(GP0_IO, 0x00040004); |
| 1548 | cx_clear(GP0_IO, 0x00040004); |
| 1549 | cx_set(GP0_IO, 0x00040004); |
| 1550 | mdelay(60); |
| 1551 | break; |
Olli Salonen | 2944226 | 2014-08-11 16:58:15 -0300 | [diff] [blame] | 1552 | case CX23885_BOARD_DVBSKY_T9580: |
| 1553 | /* enable GPIO3-18 pins */ |
| 1554 | cx_write(MC417_CTL, 0x00000037); |
| 1555 | cx23885_gpio_enable(dev, GPIO_2 | GPIO_11, 1); |
| 1556 | cx23885_gpio_clear(dev, GPIO_2 | GPIO_11); |
| 1557 | mdelay(100); |
| 1558 | cx23885_gpio_set(dev, GPIO_2 | GPIO_11); |
| 1559 | break; |
Olli Salonen | 82c1027 | 2014-09-29 04:44:16 -0300 | [diff] [blame] | 1560 | case CX23885_BOARD_DVBSKY_T980C: |
nibble.max | 0e6c7b0 | 2014-10-23 07:01:44 -0300 | [diff] [blame^] | 1561 | case CX23885_BOARD_DVBSKY_S950C: |
Olli Salonen | 82c1027 | 2014-09-29 04:44:16 -0300 | [diff] [blame] | 1562 | /* |
| 1563 | * GPIO-0 INTA from CiMax, input |
| 1564 | * GPIO-1 reset CiMax, output, high active |
| 1565 | * GPIO-2 reset demod, output, low active |
| 1566 | * GPIO-3 to GPIO-10 data/addr for CAM |
| 1567 | * GPIO-11 ~CS0 to CiMax1 |
| 1568 | * GPIO-12 ~CS1 to CiMax2 |
| 1569 | * GPIO-13 ADL0 load LSB addr |
| 1570 | * GPIO-14 ADL1 load MSB addr |
| 1571 | * GPIO-15 ~RDY from CiMax |
| 1572 | * GPIO-17 ~RD to CiMax |
| 1573 | * GPIO-18 ~WR to CiMax |
| 1574 | */ |
| 1575 | |
| 1576 | cx_set(GP0_IO, 0x00060002); /* GPIO 1/2 as output */ |
| 1577 | cx_clear(GP0_IO, 0x00010004); /* GPIO 0 as input */ |
| 1578 | mdelay(100); /* reset delay */ |
| 1579 | cx_set(GP0_IO, 0x00060004); /* GPIO as out, reset high */ |
| 1580 | cx_clear(GP0_IO, 0x00010002); |
| 1581 | cx_write(MC417_CTL, 0x00000037); /* enable GPIO3-18 pins */ |
| 1582 | |
| 1583 | /* GPIO-15 IN as ~ACK, rest as OUT */ |
| 1584 | cx_write(MC417_OEN, 0x00001000); |
| 1585 | |
| 1586 | /* ~RD, ~WR high; ADL0, ADL1 low; ~CS0, ~CS1 high */ |
| 1587 | cx_write(MC417_RWD, 0x0000c300); |
| 1588 | |
| 1589 | /* enable irq */ |
| 1590 | cx_write(GPIO_ISM, 0x00000000); /* INTERRUPTS active low */ |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1591 | } |
| 1592 | } |
| 1593 | |
| 1594 | int cx23885_ir_init(struct cx23885_dev *dev) |
| 1595 | { |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1596 | static struct v4l2_subdev_io_pin_config ir_rxtx_pin_cfg[] = { |
Andy Walls | 81f287d | 2010-07-18 20:26:37 -0300 | [diff] [blame] | 1597 | { |
| 1598 | .flags = V4L2_SUBDEV_IO_PIN_INPUT, |
| 1599 | .pin = CX23885_PIN_IR_RX_GPIO19, |
| 1600 | .function = CX23885_PAD_IR_RX, |
| 1601 | .value = 0, |
| 1602 | .strength = CX25840_PIN_DRIVE_MEDIUM, |
| 1603 | }, { |
| 1604 | .flags = V4L2_SUBDEV_IO_PIN_OUTPUT, |
| 1605 | .pin = CX23885_PIN_IR_TX_GPIO20, |
| 1606 | .function = CX23885_PAD_IR_TX, |
| 1607 | .value = 0, |
| 1608 | .strength = CX25840_PIN_DRIVE_MEDIUM, |
| 1609 | } |
| 1610 | }; |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1611 | const size_t ir_rxtx_pin_cfg_count = ARRAY_SIZE(ir_rxtx_pin_cfg); |
| 1612 | |
| 1613 | static struct v4l2_subdev_io_pin_config ir_rx_pin_cfg[] = { |
| 1614 | { |
| 1615 | .flags = V4L2_SUBDEV_IO_PIN_INPUT, |
| 1616 | .pin = CX23885_PIN_IR_RX_GPIO19, |
| 1617 | .function = CX23885_PAD_IR_RX, |
| 1618 | .value = 0, |
| 1619 | .strength = CX25840_PIN_DRIVE_MEDIUM, |
| 1620 | } |
| 1621 | }; |
| 1622 | const size_t ir_rx_pin_cfg_count = ARRAY_SIZE(ir_rx_pin_cfg); |
Andy Walls | 81f287d | 2010-07-18 20:26:37 -0300 | [diff] [blame] | 1623 | |
| 1624 | struct v4l2_subdev_ir_parameters params; |
Andy Walls | 29f8a0a | 2009-09-26 23:17:30 -0300 | [diff] [blame] | 1625 | int ret = 0; |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1626 | switch (dev->board) { |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 1627 | case CX23885_BOARD_HAUPPAUGE_HVR1500: |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 1628 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1629 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 1630 | case CX23885_BOARD_HAUPPAUGE_HVR1200: |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 1631 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 1632 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 1633 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 1634 | case CX23885_BOARD_HAUPPAUGE_HVR1255_22111: |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 1635 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1636 | /* FIXME: Implement me */ |
| 1637 | break; |
Andy Walls | 9b3d8ec | 2011-06-08 21:24:25 -0300 | [diff] [blame] | 1638 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
| 1639 | ret = cx23888_ir_probe(dev); |
| 1640 | if (ret) |
| 1641 | break; |
| 1642 | dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); |
| 1643 | v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, |
| 1644 | ir_rx_pin_cfg_count, ir_rx_pin_cfg); |
| 1645 | break; |
Andy Walls | 29f8a0a | 2009-09-26 23:17:30 -0300 | [diff] [blame] | 1646 | case CX23885_BOARD_HAUPPAUGE_HVR1850: |
Michael Krufky | 7fec6fe | 2009-11-11 15:46:09 -0300 | [diff] [blame] | 1647 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
Andy Walls | 29f8a0a | 2009-09-26 23:17:30 -0300 | [diff] [blame] | 1648 | ret = cx23888_ir_probe(dev); |
| 1649 | if (ret) |
| 1650 | break; |
| 1651 | dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); |
Andy Walls | 81f287d | 2010-07-18 20:26:37 -0300 | [diff] [blame] | 1652 | v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1653 | ir_rxtx_pin_cfg_count, ir_rxtx_pin_cfg); |
Andy Walls | 81f287d | 2010-07-18 20:26:37 -0300 | [diff] [blame] | 1654 | /* |
| 1655 | * For these boards we need to invert the Tx output via the |
| 1656 | * IR controller to have the LED off while idle |
| 1657 | */ |
| 1658 | v4l2_subdev_call(dev->sd_ir, ir, tx_g_parameters, ¶ms); |
| 1659 | params.enable = false; |
| 1660 | params.shutdown = false; |
| 1661 | params.invert_level = true; |
| 1662 | v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); |
| 1663 | params.shutdown = true; |
| 1664 | v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, ¶ms); |
Andy Walls | 29f8a0a | 2009-09-26 23:17:30 -0300 | [diff] [blame] | 1665 | break; |
Djuri Baars | 076f0e3 | 2012-07-28 09:01:38 -0300 | [diff] [blame] | 1666 | case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1667 | case CX23885_BOARD_TEVII_S470: |
Alfredo Jesús Delaiti | e5f670b | 2012-11-08 15:50:25 -0300 | [diff] [blame] | 1668 | case CX23885_BOARD_MYGICA_X8507: |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 1669 | case CX23885_BOARD_TBS_6980: |
| 1670 | case CX23885_BOARD_TBS_6981: |
nibble.max | d11a383 | 2014-09-29 11:17:36 -0300 | [diff] [blame] | 1671 | case CX23885_BOARD_DVBSKY_T9580: |
Andy Walls | fa647f2 | 2010-07-19 21:22:05 -0300 | [diff] [blame] | 1672 | if (!enable_885_ir) |
| 1673 | break; |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1674 | dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); |
| 1675 | if (dev->sd_ir == NULL) { |
| 1676 | ret = -ENODEV; |
| 1677 | break; |
| 1678 | } |
| 1679 | v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, |
| 1680 | ir_rx_pin_cfg_count, ir_rx_pin_cfg); |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1681 | break; |
| 1682 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
Andy Walls | fa647f2 | 2010-07-19 21:22:05 -0300 | [diff] [blame] | 1683 | if (!enable_885_ir) |
| 1684 | break; |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1685 | dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); |
| 1686 | if (dev->sd_ir == NULL) { |
| 1687 | ret = -ENODEV; |
| 1688 | break; |
| 1689 | } |
| 1690 | v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, |
| 1691 | ir_rxtx_pin_cfg_count, ir_rxtx_pin_cfg); |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1692 | break; |
Steven Toth | 1288687 | 2008-08-04 21:41:06 -0300 | [diff] [blame] | 1693 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
James Harper | 46b21bb | 2014-06-12 07:12:24 -0300 | [diff] [blame] | 1694 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2: |
Steven Toth | 1288687 | 2008-08-04 21:41:06 -0300 | [diff] [blame] | 1695 | request_module("ir-kbd-i2c"); |
| 1696 | break; |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1697 | } |
| 1698 | |
Andy Walls | 29f8a0a | 2009-09-26 23:17:30 -0300 | [diff] [blame] | 1699 | return ret; |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1700 | } |
| 1701 | |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1702 | void cx23885_ir_fini(struct cx23885_dev *dev) |
| 1703 | { |
| 1704 | switch (dev->board) { |
Andy Walls | 9b3d8ec | 2011-06-08 21:24:25 -0300 | [diff] [blame] | 1705 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1706 | case CX23885_BOARD_HAUPPAUGE_HVR1850: |
Michael Krufky | 7fec6fe | 2009-11-11 15:46:09 -0300 | [diff] [blame] | 1707 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
Andy Walls | dbe83a3 | 2010-07-19 01:19:43 -0300 | [diff] [blame] | 1708 | cx23885_irq_remove(dev, PCI_MSK_IR); |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1709 | cx23888_ir_remove(dev); |
| 1710 | dev->sd_ir = NULL; |
| 1711 | break; |
Djuri Baars | 076f0e3 | 2012-07-28 09:01:38 -0300 | [diff] [blame] | 1712 | case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1713 | case CX23885_BOARD_TEVII_S470: |
| 1714 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
Alfredo Jesús Delaiti | e5f670b | 2012-11-08 15:50:25 -0300 | [diff] [blame] | 1715 | case CX23885_BOARD_MYGICA_X8507: |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 1716 | case CX23885_BOARD_TBS_6980: |
| 1717 | case CX23885_BOARD_TBS_6981: |
nibble.max | d11a383 | 2014-09-29 11:17:36 -0300 | [diff] [blame] | 1718 | case CX23885_BOARD_DVBSKY_T9580: |
Andy Walls | dbe83a3 | 2010-07-19 01:19:43 -0300 | [diff] [blame] | 1719 | cx23885_irq_remove(dev, PCI_MSK_AV_CORE); |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1720 | /* sd_ir is a duplicate pointer to the AV Core, just clear it */ |
| 1721 | dev->sd_ir = NULL; |
| 1722 | break; |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1723 | } |
| 1724 | } |
| 1725 | |
Mauro Carvalho Chehab | ada73ee | 2012-10-27 11:29:23 -0300 | [diff] [blame] | 1726 | static int netup_jtag_io(void *device, int tms, int tdi, int read_tdo) |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 1727 | { |
| 1728 | int data; |
| 1729 | int tdo = 0; |
| 1730 | struct cx23885_dev *dev = (struct cx23885_dev *)device; |
| 1731 | /*TMS*/ |
| 1732 | data = ((cx_read(GP0_IO)) & (~0x00000002)); |
| 1733 | data |= (tms ? 0x00020002 : 0x00020000); |
| 1734 | cx_write(GP0_IO, data); |
| 1735 | |
| 1736 | /*TDI*/ |
| 1737 | data = ((cx_read(MC417_RWD)) & (~0x0000a000)); |
| 1738 | data |= (tdi ? 0x00008000 : 0); |
| 1739 | cx_write(MC417_RWD, data); |
| 1740 | if (read_tdo) |
| 1741 | tdo = (data & 0x00004000) ? 1 : 0; /*TDO*/ |
| 1742 | |
| 1743 | cx_write(MC417_RWD, data | 0x00002000); |
| 1744 | udelay(1); |
| 1745 | /*TCK*/ |
| 1746 | cx_write(MC417_RWD, data); |
| 1747 | |
| 1748 | return tdo; |
| 1749 | } |
| 1750 | |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1751 | void cx23885_ir_pci_int_enable(struct cx23885_dev *dev) |
| 1752 | { |
| 1753 | switch (dev->board) { |
Andy Walls | 9b3d8ec | 2011-06-08 21:24:25 -0300 | [diff] [blame] | 1754 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1755 | case CX23885_BOARD_HAUPPAUGE_HVR1850: |
Michael Krufky | 7fec6fe | 2009-11-11 15:46:09 -0300 | [diff] [blame] | 1756 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
Andy Walls | dbe83a3 | 2010-07-19 01:19:43 -0300 | [diff] [blame] | 1757 | if (dev->sd_ir) |
| 1758 | cx23885_irq_add_enable(dev, PCI_MSK_IR); |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1759 | break; |
Djuri Baars | 076f0e3 | 2012-07-28 09:01:38 -0300 | [diff] [blame] | 1760 | case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1761 | case CX23885_BOARD_TEVII_S470: |
| 1762 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
Alfredo Jesús Delaiti | e5f670b | 2012-11-08 15:50:25 -0300 | [diff] [blame] | 1763 | case CX23885_BOARD_MYGICA_X8507: |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 1764 | case CX23885_BOARD_TBS_6980: |
| 1765 | case CX23885_BOARD_TBS_6981: |
nibble.max | d11a383 | 2014-09-29 11:17:36 -0300 | [diff] [blame] | 1766 | case CX23885_BOARD_DVBSKY_T9580: |
Andy Walls | dbe83a3 | 2010-07-19 01:19:43 -0300 | [diff] [blame] | 1767 | if (dev->sd_ir) |
| 1768 | cx23885_irq_add_enable(dev, PCI_MSK_AV_CORE); |
Andy Walls | 98d109f | 2010-07-19 00:41:41 -0300 | [diff] [blame] | 1769 | break; |
Andy Walls | f59ad61 | 2009-09-27 19:51:50 -0300 | [diff] [blame] | 1770 | } |
| 1771 | } |
| 1772 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1773 | void cx23885_card_setup(struct cx23885_dev *dev) |
| 1774 | { |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1775 | struct cx23885_tsport *ts1 = &dev->ts1; |
| 1776 | struct cx23885_tsport *ts2 = &dev->ts2; |
| 1777 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1778 | static u8 eeprom[256]; |
| 1779 | |
| 1780 | if (dev->i2c_bus[0].i2c_rc == 0) { |
| 1781 | dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1; |
Michael Krufky | 44a6481 | 2007-03-20 23:00:18 -0300 | [diff] [blame] | 1782 | tveeprom_read(&dev->i2c_bus[0].i2c_client, |
| 1783 | eeprom, sizeof(eeprom)); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1784 | } |
| 1785 | |
| 1786 | switch (dev->board) { |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 1787 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
Andy Walls | ebbeb46 | 2010-07-18 17:35:00 -0300 | [diff] [blame] | 1788 | if (dev->i2c_bus[0].i2c_rc == 0) { |
| 1789 | if (eeprom[0x80] != 0x84) |
| 1790 | hauppauge_eeprom(dev, eeprom+0xc0); |
| 1791 | else |
| 1792 | hauppauge_eeprom(dev, eeprom+0x80); |
| 1793 | } |
| 1794 | break; |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 1795 | case CX23885_BOARD_HAUPPAUGE_HVR1500: |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 1796 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 1797 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
Steven Toth | c88133e | 2008-03-29 17:36:09 -0300 | [diff] [blame] | 1798 | if (dev->i2c_bus[0].i2c_rc == 0) |
| 1799 | hauppauge_eeprom(dev, eeprom+0x80); |
| 1800 | break; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1801 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
| 1802 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 1803 | case CX23885_BOARD_HAUPPAUGE_HVR1200: |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 1804 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 1805 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 1806 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 1807 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 1808 | case CX23885_BOARD_HAUPPAUGE_HVR1255_22111: |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 1809 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
Steven Toth | 13697380 | 2009-07-20 15:37:25 -0300 | [diff] [blame] | 1810 | case CX23885_BOARD_HAUPPAUGE_HVR1850: |
Michael Krufky | aee0b24 | 2009-11-11 01:52:45 -0300 | [diff] [blame] | 1811 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1812 | case CX23885_BOARD_HAUPPAUGE_HVR4400: |
Hans Verkuil | cce11b0 | 2014-06-27 11:15:42 -0300 | [diff] [blame] | 1813 | case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE: |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1814 | if (dev->i2c_bus[0].i2c_rc == 0) |
Steven Toth | c88133e | 2008-03-29 17:36:09 -0300 | [diff] [blame] | 1815 | hauppauge_eeprom(dev, eeprom+0xc0); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1816 | break; |
| 1817 | } |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1818 | |
| 1819 | switch (dev->board) { |
Oleh Kravchenko | e8d4237 | 2012-12-08 18:20:59 -0300 | [diff] [blame] | 1820 | case CX23885_BOARD_AVERMEDIA_HC81R: |
| 1821 | /* Defaults for VID B */ |
| 1822 | ts1->gen_ctrl_val = 0x4; /* Parallel */ |
| 1823 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1824 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1825 | /* Defaults for VID C */ |
| 1826 | /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */ |
| 1827 | ts2->gen_ctrl_val = 0x10e; |
| 1828 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1829 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1830 | break; |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 1831 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 1832 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
James Harper | 46b21bb | 2014-06-12 07:12:24 -0300 | [diff] [blame] | 1833 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2: |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 1834 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1835 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1836 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1837 | /* break omitted intentionally */ |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1838 | case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP: |
| 1839 | ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1840 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1841 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1842 | break; |
Steven Toth | 3504513 | 2012-01-04 21:08:35 -0300 | [diff] [blame] | 1843 | case CX23885_BOARD_HAUPPAUGE_HVR1850: |
Steven Toth | a589b66 | 2008-01-13 23:44:47 -0300 | [diff] [blame] | 1844 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
| 1845 | /* Defaults for VID B - Analog encoder */ |
| 1846 | /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */ |
| 1847 | ts1->gen_ctrl_val = 0x10e; |
| 1848 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1849 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1850 | |
| 1851 | /* APB_TSVALERR_POL (active low)*/ |
| 1852 | ts1->vld_misc_val = 0x2000; |
| 1853 | ts1->hw_sop_ctrl_val = (0x47 << 16 | 188 << 4 | 0xc); |
Steven Toth | 3504513 | 2012-01-04 21:08:35 -0300 | [diff] [blame] | 1854 | cx_write(0x130184, 0xc); |
Steven Toth | a589b66 | 2008-01-13 23:44:47 -0300 | [diff] [blame] | 1855 | |
| 1856 | /* Defaults for VID C */ |
| 1857 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1858 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1859 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1860 | break; |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 1861 | case CX23885_BOARD_TBS_6920: |
Igor M. Liplianin | 09ea33e | 2009-11-24 20:16:04 -0300 | [diff] [blame] | 1862 | ts1->gen_ctrl_val = 0x4; /* Parallel */ |
| 1863 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1864 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1865 | break; |
| 1866 | case CX23885_BOARD_TEVII_S470: |
Igor M. Liplianin | 7b134e8 | 2012-05-11 11:45:42 -0300 | [diff] [blame] | 1867 | case CX23885_BOARD_TEVII_S471: |
Igor M. Liplianin | c9b8b04 | 2009-01-17 12:23:31 -0300 | [diff] [blame] | 1868 | case CX23885_BOARD_DVBWORLD_2005: |
Mariusz Bia?o?czyk | f667190 | 2012-09-12 07:59:18 -0300 | [diff] [blame] | 1869 | case CX23885_BOARD_PROF_8000: |
Olli Salonen | 82c1027 | 2014-09-29 04:44:16 -0300 | [diff] [blame] | 1870 | case CX23885_BOARD_DVBSKY_T980C: |
nibble.max | 0e6c7b0 | 2014-10-23 07:01:44 -0300 | [diff] [blame^] | 1871 | case CX23885_BOARD_DVBSKY_S950C: |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 1872 | ts1->gen_ctrl_val = 0x5; /* Parallel */ |
| 1873 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1874 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1875 | break; |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 1876 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 1877 | case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF: |
Stefan Ringel | 722c90e | 2012-01-07 09:20:48 -0300 | [diff] [blame] | 1878 | case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 1879 | ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1880 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1881 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1882 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1883 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1884 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1885 | break; |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 1886 | case CX23885_BOARD_TBS_6980: |
| 1887 | case CX23885_BOARD_TBS_6981: |
| 1888 | ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1889 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1890 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1891 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1892 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1893 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1894 | tbs_card_init(dev); |
| 1895 | break; |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 1896 | case CX23885_BOARD_MYGICA_X8506: |
David Wong | 2365b2d | 2009-06-17 01:38:12 -0300 | [diff] [blame] | 1897 | case CX23885_BOARD_MAGICPRO_PROHDTVE2: |
Mauro Carvalho Chehab | 0d1b526 | 2013-08-09 08:53:27 -0300 | [diff] [blame] | 1898 | case CX23885_BOARD_MYGICA_X8507: |
David Wong | 493b712 | 2009-05-18 05:25:49 -0300 | [diff] [blame] | 1899 | ts1->gen_ctrl_val = 0x5; /* Parallel */ |
| 1900 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1901 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1902 | break; |
David T. L. Wong | ea5697f | 2009-10-26 08:54:04 -0300 | [diff] [blame] | 1903 | case CX23885_BOARD_MYGICA_X8558PRO: |
| 1904 | ts1->gen_ctrl_val = 0x5; /* Parallel */ |
| 1905 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1906 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1907 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1908 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1909 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1910 | break; |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1911 | case CX23885_BOARD_HAUPPAUGE_HVR4400: |
| 1912 | ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1913 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1914 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
Matthias Schwarzott | 36efec4 | 2014-07-22 17:12:13 -0300 | [diff] [blame] | 1915 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1916 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1917 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
Michael Krufky | 7c62f5a | 2012-12-15 23:34:09 -0300 | [diff] [blame] | 1918 | break; |
Olli Salonen | 2944226 | 2014-08-11 16:58:15 -0300 | [diff] [blame] | 1919 | case CX23885_BOARD_DVBSKY_T9580: |
| 1920 | ts1->gen_ctrl_val = 0x5; /* Parallel */ |
| 1921 | ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1922 | ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1923 | ts2->gen_ctrl_val = 0x8; /* Serial bus */ |
| 1924 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1925 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1926 | break; |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1927 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 1928 | case CX23885_BOARD_HAUPPAUGE_HVR1500: |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 1929 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1930 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 1931 | case CX23885_BOARD_HAUPPAUGE_HVR1200: |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 1932 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 1933 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
Hans Verkuil | cce11b0 | 2014-06-27 11:15:42 -0300 | [diff] [blame] | 1934 | case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE: |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1935 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
Anca Emanuel | 642ca1a | 2013-09-13 11:28:12 -0300 | [diff] [blame] | 1936 | case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200: |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 1937 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000: |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 1938 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
Steven Toth | 2074dff | 2009-05-02 11:39:46 -0300 | [diff] [blame] | 1939 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 1940 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 1941 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 1942 | case CX23885_BOARD_HAUPPAUGE_HVR1255_22111: |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 1943 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
Vladimir Geroy | 34e383d | 2009-09-18 18:55:47 -0300 | [diff] [blame] | 1944 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: |
Michael Krufky | aee0b24 | 2009-11-11 01:52:45 -0300 | [diff] [blame] | 1945 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
Alexey Chernov | 9028f58 | 2010-12-06 17:09:53 -0300 | [diff] [blame] | 1946 | case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: |
Steven Toth | a6a3f14 | 2007-09-08 21:31:56 -0300 | [diff] [blame] | 1947 | default: |
| 1948 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
| 1949 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
| 1950 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
| 1951 | } |
| 1952 | |
Steven Toth | ce89cfb | 2008-04-19 01:36:06 -0300 | [diff] [blame] | 1953 | /* Certain boards support analog, or require the avcore to be |
| 1954 | * loaded, ensure this happens. |
| 1955 | */ |
| 1956 | switch (dev->board) { |
Andy Walls | fa647f2 | 2010-07-19 21:22:05 -0300 | [diff] [blame] | 1957 | case CX23885_BOARD_TEVII_S470: |
Andy Walls | fa647f2 | 2010-07-19 21:22:05 -0300 | [diff] [blame] | 1958 | /* Currently only enabled for the integrated IR controller */ |
| 1959 | if (!enable_885_ir) |
| 1960 | break; |
Devin Heitmueller | d214ddc | 2012-07-01 16:15:13 -0300 | [diff] [blame] | 1961 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
Steven Toth | ce89cfb | 2008-04-19 01:36:06 -0300 | [diff] [blame] | 1962 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
Hans Verkuil | cce11b0 | 2014-06-27 11:15:42 -0300 | [diff] [blame] | 1963 | case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE: |
Steven Toth | ce89cfb | 2008-04-19 01:36:06 -0300 | [diff] [blame] | 1964 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
| 1965 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 1966 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
Anca Emanuel | 642ca1a | 2013-09-13 11:28:12 -0300 | [diff] [blame] | 1967 | case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200: |
istvan_v@mailbox.hu | 0cf8af5 | 2011-07-11 10:58:35 -0300 | [diff] [blame] | 1968 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000: |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 1969 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 1970 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 1971 | case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF: |
Vladimir Geroy | 34e383d | 2009-09-18 18:55:47 -0300 | [diff] [blame] | 1972 | case CX23885_BOARD_COMPRO_VIDEOMATE_E800: |
Devin Heitmueller | 0ac60ac | 2012-07-01 16:15:14 -0300 | [diff] [blame] | 1973 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
| 1974 | case CX23885_BOARD_HAUPPAUGE_HVR1255_22111: |
Andy Walls | 9b3d8ec | 2011-06-08 21:24:25 -0300 | [diff] [blame] | 1975 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
Andy Walls | c6b7053 | 2009-09-27 00:14:33 -0300 | [diff] [blame] | 1976 | case CX23885_BOARD_HAUPPAUGE_HVR1850: |
David T.L. Wong | bc1548a | 2009-10-21 11:09:28 -0300 | [diff] [blame] | 1977 | case CX23885_BOARD_MYGICA_X8506: |
| 1978 | case CX23885_BOARD_MAGICPRO_PROHDTVE2: |
Michael Krufky | aee0b24 | 2009-11-11 01:52:45 -0300 | [diff] [blame] | 1979 | case CX23885_BOARD_HAUPPAUGE_HVR1290: |
Kusanagi Kouichi | 0b32d65 | 2010-01-22 04:55:28 -0300 | [diff] [blame] | 1980 | case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: |
Alexey Chernov | 9028f58 | 2010-12-06 17:09:53 -0300 | [diff] [blame] | 1981 | case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: |
Mijhail Moreyra | 18d6447 | 2011-10-10 11:09:53 -0300 | [diff] [blame] | 1982 | case CX23885_BOARD_HAUPPAUGE_HVR1500: |
Steven Toth | 2cb9ccd | 2011-10-10 11:09:55 -0300 | [diff] [blame] | 1983 | case CX23885_BOARD_MPX885: |
Alfredo Jesús Delaiti | 8798875 | 2011-11-09 15:13:00 -0300 | [diff] [blame] | 1984 | case CX23885_BOARD_MYGICA_X8507: |
Stefan Ringel | 722c90e | 2012-01-07 09:20:48 -0300 | [diff] [blame] | 1985 | case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: |
Oleh Kravchenko | e8d4237 | 2012-12-08 18:20:59 -0300 | [diff] [blame] | 1986 | case CX23885_BOARD_AVERMEDIA_HC81R: |
Luis Alves | e600148 | 2013-10-01 22:11:35 -0300 | [diff] [blame] | 1987 | case CX23885_BOARD_TBS_6980: |
| 1988 | case CX23885_BOARD_TBS_6981: |
Olli Salonen | 2944226 | 2014-08-11 16:58:15 -0300 | [diff] [blame] | 1989 | case CX23885_BOARD_DVBSKY_T9580: |
Olli Salonen | 82c1027 | 2014-09-29 04:44:16 -0300 | [diff] [blame] | 1990 | case CX23885_BOARD_DVBSKY_T980C: |
nibble.max | 0e6c7b0 | 2014-10-23 07:01:44 -0300 | [diff] [blame^] | 1991 | case CX23885_BOARD_DVBSKY_S950C: |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 1992 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
| 1993 | &dev->i2c_bus[2].i2c_adap, |
Laurent Pinchart | 9a1f8b3 | 2010-09-24 10:16:44 -0300 | [diff] [blame] | 1994 | "cx25840", 0x88 >> 1, NULL); |
Andy Walls | d6b1850 | 2010-07-18 23:26:29 -0300 | [diff] [blame] | 1995 | if (dev->sd_cx25840) { |
| 1996 | dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE; |
| 1997 | v4l2_subdev_call(dev->sd_cx25840, core, load_fw); |
| 1998 | } |
Steven Toth | ce89cfb | 2008-04-19 01:36:06 -0300 | [diff] [blame] | 1999 | break; |
| 2000 | } |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 2001 | |
| 2002 | /* AUX-PLL 27MHz CLK */ |
| 2003 | switch (dev->board) { |
| 2004 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: |
| 2005 | netup_initialize(dev); |
| 2006 | break; |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 2007 | case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF: { |
| 2008 | int ret; |
| 2009 | const struct firmware *fw; |
| 2010 | const char *filename = "dvb-netup-altera-01.fw"; |
| 2011 | char *action = "configure"; |
Abylay Ospan | b8f0d30 | 2011-07-14 05:20:29 -0300 | [diff] [blame] | 2012 | static struct netup_card_info cinfo; |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 2013 | struct altera_config netup_config = { |
| 2014 | .dev = dev, |
| 2015 | .action = action, |
| 2016 | .jtag_io = netup_jtag_io, |
| 2017 | }; |
| 2018 | |
| 2019 | netup_initialize(dev); |
| 2020 | |
Abylay Ospan | b8f0d30 | 2011-07-14 05:20:29 -0300 | [diff] [blame] | 2021 | netup_get_card_info(&dev->i2c_bus[0].i2c_adap, &cinfo); |
Abylay Ospan | 2d12421 | 2011-07-18 04:14:28 -0300 | [diff] [blame] | 2022 | if (netup_card_rev) |
| 2023 | cinfo.rev = netup_card_rev; |
| 2024 | |
Abylay Ospan | b8f0d30 | 2011-07-14 05:20:29 -0300 | [diff] [blame] | 2025 | switch (cinfo.rev) { |
| 2026 | case 0x4: |
| 2027 | filename = "dvb-netup-altera-04.fw"; |
| 2028 | break; |
| 2029 | default: |
| 2030 | filename = "dvb-netup-altera-01.fw"; |
| 2031 | break; |
| 2032 | } |
| 2033 | printk(KERN_INFO "NetUP card rev=0x%x fw_filename=%s\n", |
| 2034 | cinfo.rev, filename); |
| 2035 | |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 2036 | ret = request_firmware(&fw, filename, &dev->pci->dev); |
| 2037 | if (ret != 0) |
| 2038 | printk(KERN_ERR "did not find the firmware file. (%s) " |
| 2039 | "Please see linux/Documentation/dvb/ for more details " |
| 2040 | "on firmware-problems.", filename); |
| 2041 | else |
| 2042 | altera_init(&netup_config, fw); |
| 2043 | |
Jesper Juhl | 3f84a4e | 2011-04-07 16:23:48 -0300 | [diff] [blame] | 2044 | release_firmware(fw); |
Igor M. Liplianin | 78db854 | 2011-01-25 17:04:00 -0300 | [diff] [blame] | 2045 | break; |
| 2046 | } |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 2047 | } |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 2048 | } |