1 // SPDX-License-Identifier: GPL-2.0-or-later
5 Copyright (C) Manu Abraham (abraham.manu@gmail.com)
9 #include <linux/signal.h>
10 #include <linux/sched.h>
11 #include <linux/interrupt.h>
13 #include <media/dmxdev.h>
14 #include <media/dvbdev.h>
15 #include <media/dvb_demux.h>
16 #include <media/dvb_frontend.h>
17 #include <media/dvb_net.h>
21 #include "mantis_common.h"
22 #include "mantis_ioc.h"
23 #include "mantis_dvb.h"
24 #include "mantis_vp3030.h"
26 static struct zl10353_config mantis_vp3030_config = {
27 .demod_address = 0x0f,
30 static struct tda665x_config env57h12d5_config = {
31 .name = "ENV57H12D5 (ET-50DT)",
33 .frequency_min = 47 * MHz,
34 .frequency_max = 862 * MHz,
35 .frequency_offst = 3616667,
36 .ref_multiplier = 6, /* 1/6 MHz */
37 .ref_divider = 100000, /* 1/6 MHz */
40 #define MANTIS_MODEL_NAME "VP-3030"
41 #define MANTIS_DEV_TYPE "DVB-T"
44 static int vp3030_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe)
46 struct i2c_adapter *adapter = &mantis->adapter;
47 struct mantis_hwconfig *config = mantis->hwconfig;
50 mantis_gpio_set_bits(mantis, config->reset, 0);
52 err = mantis_frontend_power(mantis, POWER_ON);
54 mantis_gpio_set_bits(mantis, config->reset, 1);
58 dprintk(MANTIS_ERROR, 1, "Probing for 10353 (DVB-T)");
59 fe = dvb_attach(zl10353_attach, &mantis_vp3030_config, adapter);
64 dvb_attach(tda665x_attach, fe, &env57h12d5_config, adapter);
66 dprintk(MANTIS_ERROR, 1, "Frontend on <%s> POWER ON failed! <%d>",
74 dprintk(MANTIS_ERROR, 1, "Done!");
79 struct mantis_hwconfig vp3030_config = {
80 .model_name = MANTIS_MODEL_NAME,
81 .dev_type = MANTIS_DEV_TYPE,
82 .ts_size = MANTIS_TS_188,
84 .baud_rate = MANTIS_BAUD_9600,
85 .parity = MANTIS_PARITY_NONE,
88 .frontend_init = vp3030_frontend_init,
92 .i2c_mode = MANTIS_BYTE_MODE