2 * NXP TDA10071 + Conexant CX24118A DVB-S/S2 demodulator + tuner driver
4 * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include "dvb_frontend.h"
26 #include <linux/firmware.h>
28 struct tda10071_priv
{
29 struct i2c_adapter
*i2c
;
30 struct dvb_frontend fe
;
31 struct tda10071_config cfg
;
36 fe_status_t fe_status
;
37 fe_delivery_system_t delivery_system
;
38 bool warm
; /* FW running */
41 static struct tda10071_modcod
{
42 fe_delivery_system_t delivery_system
;
43 fe_modulation_t modulation
;
46 } TDA10071_MODCOD
[] = {
48 { SYS_DVBS2
, QPSK
, FEC_AUTO
, 0x00 },
49 { SYS_DVBS2
, QPSK
, FEC_1_2
, 0x04 },
50 { SYS_DVBS2
, QPSK
, FEC_3_5
, 0x05 },
51 { SYS_DVBS2
, QPSK
, FEC_2_3
, 0x06 },
52 { SYS_DVBS2
, QPSK
, FEC_3_4
, 0x07 },
53 { SYS_DVBS2
, QPSK
, FEC_4_5
, 0x08 },
54 { SYS_DVBS2
, QPSK
, FEC_5_6
, 0x09 },
55 { SYS_DVBS2
, QPSK
, FEC_8_9
, 0x0a },
56 { SYS_DVBS2
, QPSK
, FEC_9_10
, 0x0b },
58 { SYS_DVBS2
, PSK_8
, FEC_3_5
, 0x0c },
59 { SYS_DVBS2
, PSK_8
, FEC_2_3
, 0x0d },
60 { SYS_DVBS2
, PSK_8
, FEC_3_4
, 0x0e },
61 { SYS_DVBS2
, PSK_8
, FEC_5_6
, 0x0f },
62 { SYS_DVBS2
, PSK_8
, FEC_8_9
, 0x10 },
63 { SYS_DVBS2
, PSK_8
, FEC_9_10
, 0x11 },
65 { SYS_DVBS
, QPSK
, FEC_AUTO
, 0x2d },
66 { SYS_DVBS
, QPSK
, FEC_1_2
, 0x2e },
67 { SYS_DVBS
, QPSK
, FEC_2_3
, 0x2f },
68 { SYS_DVBS
, QPSK
, FEC_3_4
, 0x30 },
69 { SYS_DVBS
, QPSK
, FEC_5_6
, 0x31 },
70 { SYS_DVBS
, QPSK
, FEC_7_8
, 0x32 },
73 struct tda10071_reg_val_mask
{
79 /* firmware filename */
80 #define TDA10071_FIRMWARE "dvb-fe-tda10071.fw"
82 /* firmware commands */
83 #define CMD_DEMOD_INIT 0x10
84 #define CMD_CHANGE_CHANNEL 0x11
85 #define CMD_MPEG_CONFIG 0x13
86 #define CMD_TUNER_INIT 0x15
87 #define CMD_GET_AGCACC 0x1a
89 #define CMD_LNB_CONFIG 0x20
90 #define CMD_LNB_SEND_DISEQC 0x21
91 #define CMD_LNB_SET_DC_LEVEL 0x22
92 #define CMD_LNB_PCB_CONFIG 0x23
93 #define CMD_LNB_SEND_TONEBURST 0x24
94 #define CMD_LNB_UPDATE_REPLY 0x25
96 #define CMD_GET_FW_VERSION 0x35
97 #define CMD_SET_SLEEP_MODE 0x36
98 #define CMD_BER_CONTROL 0x3e
99 #define CMD_BER_UPDATE_COUNTERS 0x3f
101 /* firmare command struct */
102 #define TDA10071_ARGLEN 30
103 struct tda10071_cmd
{
104 u8 args
[TDA10071_ARGLEN
];
109 #endif /* TDA10071_PRIV */