1 // SPDX-License-Identifier: GPL-2.0
3 * ddbridge-hw.c: Digital Devices bridge hardware maps
5 * Copyright (C) 2010-2017 Digital Devices GmbH
6 * Ralph Metzler <rjkm@metzlerbros.de>
7 * Marcus Metzler <mocm@metzlerbros.de>
11 #include "ddbridge-hw.h"
13 /******************************************************************************/
15 static const struct ddb_regset octopus_input
= {
21 static const struct ddb_regset octopus_output
= {
27 static const struct ddb_regset octopus_idma
= {
33 static const struct ddb_regset octopus_idma_buf
= {
39 static const struct ddb_regset octopus_odma
= {
45 static const struct ddb_regset octopus_odma_buf
= {
51 static const struct ddb_regset octopus_i2c
= {
57 static const struct ddb_regset octopus_i2c_buf
= {
63 /****************************************************************************/
65 static const struct ddb_regmap octopus_map
= {
70 .i2c_buf
= &octopus_i2c_buf
,
71 .idma
= &octopus_idma
,
72 .idma_buf
= &octopus_idma_buf
,
73 .odma
= &octopus_odma
,
74 .odma_buf
= &octopus_odma_buf
,
75 .input
= &octopus_input
,
76 .output
= &octopus_output
,
79 /****************************************************************************/
81 static const struct ddb_info ddb_none
= {
83 .name
= "unknown Digital Devices PCIe card, install newer driver",
84 .regmap
= &octopus_map
,
87 static const struct ddb_info ddb_octopus
= {
89 .name
= "Digital Devices Octopus DVB adapter",
90 .regmap
= &octopus_map
,
95 static const struct ddb_info ddb_octopusv3
= {
97 .name
= "Digital Devices Octopus V3 DVB adapter",
98 .regmap
= &octopus_map
,
103 static const struct ddb_info ddb_octopus_le
= {
105 .name
= "Digital Devices Octopus LE DVB adapter",
106 .regmap
= &octopus_map
,
111 static const struct ddb_info ddb_octopus_oem
= {
113 .name
= "Digital Devices Octopus OEM",
114 .regmap
= &octopus_map
,
123 static const struct ddb_info ddb_octopus_mini
= {
125 .name
= "Digital Devices Octopus Mini",
126 .regmap
= &octopus_map
,
131 static const struct ddb_info ddb_v6
= {
133 .name
= "Digital Devices Cine S2 V6 DVB adapter",
134 .regmap
= &octopus_map
,
139 static const struct ddb_info ddb_v6_5
= {
141 .name
= "Digital Devices Cine S2 V6.5 DVB adapter",
142 .regmap
= &octopus_map
,
147 static const struct ddb_info ddb_v7
= {
149 .name
= "Digital Devices Cine S2 V7 DVB adapter",
150 .regmap
= &octopus_map
,
154 .board_control_2
= 4,
155 .ts_quirks
= TS_QUIRK_REVERSED
,
158 static const struct ddb_info ddb_v7a
= {
160 .name
= "Digital Devices Cine S2 V7 Advanced DVB adapter",
161 .regmap
= &octopus_map
,
165 .board_control_2
= 4,
166 .ts_quirks
= TS_QUIRK_REVERSED
,
169 static const struct ddb_info ddb_ctv7
= {
171 .name
= "Digital Devices Cine CT V7 DVB adapter",
172 .regmap
= &octopus_map
,
176 .board_control_2
= 4,
179 static const struct ddb_info ddb_satixs2v3
= {
181 .name
= "Mystique SaTiX-S2 V3 DVB adapter",
182 .regmap
= &octopus_map
,
187 static const struct ddb_info ddb_ci
= {
188 .type
= DDB_OCTOPUS_CI
,
189 .name
= "Digital Devices Octopus CI",
190 .regmap
= &octopus_map
,
195 static const struct ddb_info ddb_cis
= {
196 .type
= DDB_OCTOPUS_CI
,
197 .name
= "Digital Devices Octopus CI single",
198 .regmap
= &octopus_map
,
203 static const struct ddb_info ddb_ci_s2_pro
= {
204 .type
= DDB_OCTOPUS_CI
,
205 .name
= "Digital Devices Octopus CI S2 Pro",
206 .regmap
= &octopus_map
,
210 .board_control_2
= 4,
213 static const struct ddb_info ddb_ci_s2_pro_a
= {
214 .type
= DDB_OCTOPUS_CI
,
215 .name
= "Digital Devices Octopus CI S2 Pro Advanced",
216 .regmap
= &octopus_map
,
220 .board_control_2
= 4,
223 static const struct ddb_info ddb_dvbct
= {
225 .name
= "Digital Devices DVBCT V6.1 DVB adapter",
226 .regmap
= &octopus_map
,
231 /****************************************************************************/
233 static const struct ddb_info ddb_ct2_8
= {
234 .type
= DDB_OCTOPUS_MAX_CT
,
235 .name
= "Digital Devices MAX A8 CT2",
236 .regmap
= &octopus_map
,
239 .board_control
= 0x0ff,
240 .board_control_2
= 0xf00,
241 .ts_quirks
= TS_QUIRK_SERIAL
,
245 static const struct ddb_info ddb_c2t2_8
= {
246 .type
= DDB_OCTOPUS_MAX_CT
,
247 .name
= "Digital Devices MAX A8 C2T2",
248 .regmap
= &octopus_map
,
251 .board_control
= 0x0ff,
252 .board_control_2
= 0xf00,
253 .ts_quirks
= TS_QUIRK_SERIAL
,
257 static const struct ddb_info ddb_isdbt_8
= {
258 .type
= DDB_OCTOPUS_MAX_CT
,
259 .name
= "Digital Devices MAX A8 ISDBT",
260 .regmap
= &octopus_map
,
263 .board_control
= 0x0ff,
264 .board_control_2
= 0xf00,
265 .ts_quirks
= TS_QUIRK_SERIAL
,
269 static const struct ddb_info ddb_c2t2i_v0_8
= {
270 .type
= DDB_OCTOPUS_MAX_CT
,
271 .name
= "Digital Devices MAX A8 C2T2I V0",
272 .regmap
= &octopus_map
,
275 .board_control
= 0x0ff,
276 .board_control_2
= 0xf00,
277 .ts_quirks
= TS_QUIRK_SERIAL
| TS_QUIRK_ALT_OSC
,
281 static const struct ddb_info ddb_c2t2i_8
= {
282 .type
= DDB_OCTOPUS_MAX_CT
,
283 .name
= "Digital Devices MAX A8 C2T2I",
284 .regmap
= &octopus_map
,
287 .board_control
= 0x0ff,
288 .board_control_2
= 0xf00,
289 .ts_quirks
= TS_QUIRK_SERIAL
,
293 /****************************************************************************/
295 static const struct ddb_info ddb_s2_48
= {
296 .type
= DDB_OCTOPUS_MAX
,
297 .name
= "Digital Devices MAX S8 4/8",
298 .regmap
= &octopus_map
,
305 static const struct ddb_info ddb_s2x_48
= {
306 .type
= DDB_OCTOPUS_MCI
,
307 .name
= "Digital Devices MAX SX8",
308 .regmap
= &octopus_map
,
316 /****************************************************************************/
317 /****************************************************************************/
318 /****************************************************************************/
320 #define DDB_DEVID(_device, _subdevice, _info) { \
323 .subvendor = DDVID, \
324 .subdevice = _subdevice, \
327 static const struct ddb_device_id ddb_device_ids
[] = {
329 DDB_DEVID(0x0002, 0x0001, ddb_octopus
),
330 DDB_DEVID(0x0003, 0x0001, ddb_octopus
),
331 DDB_DEVID(0x0005, 0x0004, ddb_octopusv3
),
332 DDB_DEVID(0x0003, 0x0002, ddb_octopus_le
),
333 DDB_DEVID(0x0003, 0x0003, ddb_octopus_oem
),
334 DDB_DEVID(0x0003, 0x0010, ddb_octopus_mini
),
335 DDB_DEVID(0x0005, 0x0011, ddb_octopus_mini
),
336 DDB_DEVID(0x0003, 0x0020, ddb_v6
),
337 DDB_DEVID(0x0003, 0x0021, ddb_v6_5
),
338 DDB_DEVID(0x0006, 0x0022, ddb_v7
),
339 DDB_DEVID(0x0006, 0x0024, ddb_v7a
),
340 DDB_DEVID(0x0003, 0x0030, ddb_dvbct
),
341 DDB_DEVID(0x0003, 0xdb03, ddb_satixs2v3
),
342 DDB_DEVID(0x0006, 0x0031, ddb_ctv7
),
343 DDB_DEVID(0x0006, 0x0032, ddb_ctv7
),
344 DDB_DEVID(0x0006, 0x0033, ddb_ctv7
),
345 DDB_DEVID(0x0007, 0x0023, ddb_s2_48
),
346 DDB_DEVID(0x0008, 0x0034, ddb_ct2_8
),
347 DDB_DEVID(0x0008, 0x0035, ddb_c2t2_8
),
348 DDB_DEVID(0x0008, 0x0036, ddb_isdbt_8
),
349 DDB_DEVID(0x0008, 0x0037, ddb_c2t2i_v0_8
),
350 DDB_DEVID(0x0008, 0x0038, ddb_c2t2i_8
),
351 DDB_DEVID(0x0009, 0x0025, ddb_s2x_48
),
352 DDB_DEVID(0x0006, 0x0039, ddb_ctv7
),
353 DDB_DEVID(0x0011, 0x0040, ddb_ci
),
354 DDB_DEVID(0x0011, 0x0041, ddb_cis
),
355 DDB_DEVID(0x0012, 0x0042, ddb_ci
),
356 DDB_DEVID(0x0013, 0x0043, ddb_ci_s2_pro
),
357 DDB_DEVID(0x0013, 0x0044, ddb_ci_s2_pro_a
),
360 /****************************************************************************/
362 const struct ddb_info
*get_ddb_info(u16 vendor
, u16 device
,
363 u16 subvendor
, u16 subdevice
)
367 for (i
= 0; i
< ARRAY_SIZE(ddb_device_ids
); i
++) {
368 const struct ddb_device_id
*id
= &ddb_device_ids
[i
];
370 if (vendor
== id
->vendor
&&
371 device
== id
->device
&&
372 subvendor
== id
->subvendor
&&
373 (subdevice
== id
->subdevice
||
374 id
->subdevice
== 0xffff))