blob: 04ee6cecc6ab65672fbd16d944018a131a6c844b [file] [log] [blame]
Antti Palosaari825b9672008-09-15 15:01:52 -03001/*
Antti Palosaaric89f66f2010-06-17 21:19:13 -03002 * Afatech AF9013 demodulator driver
Antti Palosaari825b9672008-09-15 15:01:52 -03003 *
4 * Copyright (C) 2007 Antti Palosaari <crope@iki.fi>
Antti Palosaarif571e002011-11-28 20:58:11 -03005 * Copyright (C) 2011 Antti Palosaari <crope@iki.fi>
Antti Palosaari825b9672008-09-15 15:01:52 -03006 *
7 * Thanks to Afatech who kindly provided information.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
Antti Palosaarif571e002011-11-28 20:58:11 -030025#ifndef AF9013_PRIV_H
26#define AF9013_PRIV_H
27
28#include "dvb_frontend.h"
29#include "af9013.h"
30#include <linux/firmware.h>
Antti Palosaari825b9672008-09-15 15:01:52 -030031
32#define LOG_PREFIX "af9013"
Antti Palosaari825b9672008-09-15 15:01:52 -030033
Antti Palosaarif571e002011-11-28 20:58:11 -030034#undef dbg
35#define dbg(f, arg...) \
36 if (af9013_debug) \
37 printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
Antti Palosaari825b9672008-09-15 15:01:52 -030038#undef err
39#define err(f, arg...) printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg)
40#undef info
41#define info(f, arg...) printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
42#undef warn
43#define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
44
Antti Palosaaria71103a2012-09-12 11:37:28 -030045#define AF9013_FIRMWARE "dvb-fe-af9013.fw"
Antti Palosaari825b9672008-09-15 15:01:52 -030046
Antti Palosaarif571e002011-11-28 20:58:11 -030047struct af9013_reg_bit {
Antti Palosaari825b9672008-09-15 15:01:52 -030048 u16 addr;
49 u8 pos:4;
50 u8 len:4;
51 u8 val;
52};
53
Antti Palosaarif571e002011-11-28 20:58:11 -030054struct af9013_snr {
Antti Palosaari825b9672008-09-15 15:01:52 -030055 u32 val;
56 u8 snr;
57};
58
Antti Palosaarif571e002011-11-28 20:58:11 -030059struct af9013_coeff {
60 u32 clock;
61 u32 bandwidth_hz;
Antti Palosaariedb709b2010-10-06 21:35:20 -030062 u8 val[24];
Antti Palosaari9b22edd2010-09-12 20:48:58 -030063};
64
Antti Palosaariedb709b2010-10-06 21:35:20 -030065/* pre-calculated coeff lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -030066static const struct af9013_coeff coeff_lut[] = {
Antti Palosaari9b22edd2010-09-12 20:48:58 -030067 /* 28.800 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030068 { 28800000, 8000000, { 0x02, 0x8a, 0x28, 0xa3, 0x05, 0x14,
Antti Palosaariedb709b2010-10-06 21:35:20 -030069 0x51, 0x11, 0x00, 0xa2, 0x8f, 0x3d, 0x00, 0xa2, 0x8a,
70 0x29, 0x00, 0xa2, 0x85, 0x14, 0x01, 0x45, 0x14, 0x14 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030071 { 28800000, 7000000, { 0x02, 0x38, 0xe3, 0x8e, 0x04, 0x71,
Antti Palosaariedb709b2010-10-06 21:35:20 -030072 0xc7, 0x07, 0x00, 0x8e, 0x3d, 0x55, 0x00, 0x8e, 0x38,
73 0xe4, 0x00, 0x8e, 0x34, 0x72, 0x01, 0x1c, 0x71, 0x32 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030074 { 28800000, 6000000, { 0x01, 0xe7, 0x9e, 0x7a, 0x03, 0xcf,
Antti Palosaariedb709b2010-10-06 21:35:20 -030075 0x3c, 0x3d, 0x00, 0x79, 0xeb, 0x6e, 0x00, 0x79, 0xe7,
76 0x9e, 0x00, 0x79, 0xe3, 0xcf, 0x00, 0xf3, 0xcf, 0x0f } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -030077 /* 20.480 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030078 { 20480000, 8000000, { 0x03, 0x92, 0x49, 0x26, 0x07, 0x24,
Antti Palosaariedb709b2010-10-06 21:35:20 -030079 0x92, 0x13, 0x00, 0xe4, 0x99, 0x6e, 0x00, 0xe4, 0x92,
80 0x49, 0x00, 0xe4, 0x8b, 0x25, 0x01, 0xc9, 0x24, 0x25 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030081 { 20480000, 7000000, { 0x03, 0x20, 0x00, 0x01, 0x06, 0x40,
Antti Palosaariedb709b2010-10-06 21:35:20 -030082 0x00, 0x00, 0x00, 0xc8, 0x06, 0x40, 0x00, 0xc8, 0x00,
83 0x00, 0x00, 0xc7, 0xf9, 0xc0, 0x01, 0x90, 0x00, 0x00 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030084 { 20480000, 6000000, { 0x02, 0xad, 0xb6, 0xdc, 0x05, 0x5b,
Antti Palosaariedb709b2010-10-06 21:35:20 -030085 0x6d, 0x2e, 0x00, 0xab, 0x73, 0x13, 0x00, 0xab, 0x6d,
86 0xb7, 0x00, 0xab, 0x68, 0x5c, 0x01, 0x56, 0xdb, 0x1c } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -030087 /* 28.000 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030088 { 28000000, 8000000, { 0x02, 0x9c, 0xbc, 0x15, 0x05, 0x39,
Antti Palosaariedb709b2010-10-06 21:35:20 -030089 0x78, 0x0a, 0x00, 0xa7, 0x34, 0x3f, 0x00, 0xa7, 0x2f,
90 0x05, 0x00, 0xa7, 0x29, 0xcc, 0x01, 0x4e, 0x5e, 0x03 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030091 { 28000000, 7000000, { 0x02, 0x49, 0x24, 0x92, 0x04, 0x92,
Antti Palosaariedb709b2010-10-06 21:35:20 -030092 0x49, 0x09, 0x00, 0x92, 0x4d, 0xb7, 0x00, 0x92, 0x49,
93 0x25, 0x00, 0x92, 0x44, 0x92, 0x01, 0x24, 0x92, 0x12 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030094 { 28000000, 6000000, { 0x01, 0xf5, 0x8d, 0x10, 0x03, 0xeb,
Antti Palosaariedb709b2010-10-06 21:35:20 -030095 0x1a, 0x08, 0x00, 0x7d, 0x67, 0x2f, 0x00, 0x7d, 0x63,
96 0x44, 0x00, 0x7d, 0x5f, 0x59, 0x00, 0xfa, 0xc6, 0x22 } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -030097 /* 25.000 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030098 { 25000000, 8000000, { 0x02, 0xec, 0xfb, 0x9d, 0x05, 0xd9,
Antti Palosaariedb709b2010-10-06 21:35:20 -030099 0xf7, 0x0e, 0x00, 0xbb, 0x44, 0xc1, 0x00, 0xbb, 0x3e,
100 0xe7, 0x00, 0xbb, 0x39, 0x0d, 0x01, 0x76, 0x7d, 0x34 } },
Antti Palosaarif571e002011-11-28 20:58:11 -0300101 { 25000000, 7000000, { 0x02, 0x8f, 0x5c, 0x29, 0x05, 0x1e,
Antti Palosaariedb709b2010-10-06 21:35:20 -0300102 0xb8, 0x14, 0x00, 0xa3, 0xdc, 0x29, 0x00, 0xa3, 0xd7,
103 0x0a, 0x00, 0xa3, 0xd1, 0xec, 0x01, 0x47, 0xae, 0x05 } },
Antti Palosaarif571e002011-11-28 20:58:11 -0300104 { 25000000, 6000000, { 0x02, 0x31, 0xbc, 0xb5, 0x04, 0x63,
Antti Palosaariedb709b2010-10-06 21:35:20 -0300105 0x79, 0x1b, 0x00, 0x8c, 0x73, 0x91, 0x00, 0x8c, 0x6f,
106 0x2d, 0x00, 0x8c, 0x6a, 0xca, 0x01, 0x18, 0xde, 0x17 } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -0300107};
108
Antti Palosaari825b9672008-09-15 15:01:52 -0300109/* QPSK SNR lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -0300110static const struct af9013_snr qpsk_snr_lut[] = {
111 { 0x000000, 0 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300112 { 0x0b4771, 0 },
113 { 0x0c1aed, 1 },
114 { 0x0d0d27, 2 },
115 { 0x0e4d19, 3 },
116 { 0x0e5da8, 4 },
117 { 0x107097, 5 },
118 { 0x116975, 6 },
119 { 0x1252d9, 7 },
120 { 0x131fa4, 8 },
121 { 0x13d5e1, 9 },
122 { 0x148e53, 10 },
123 { 0x15358b, 11 },
124 { 0x15dd29, 12 },
125 { 0x168112, 13 },
126 { 0x170b61, 14 },
127 { 0xffffff, 15 },
128};
129
130/* QAM16 SNR lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -0300131static const struct af9013_snr qam16_snr_lut[] = {
132 { 0x000000, 0 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300133 { 0x05eb62, 5 },
134 { 0x05fecf, 6 },
135 { 0x060b80, 7 },
136 { 0x062501, 8 },
137 { 0x064865, 9 },
138 { 0x069604, 10 },
139 { 0x06f356, 11 },
140 { 0x07706a, 12 },
141 { 0x0804d3, 13 },
142 { 0x089d1a, 14 },
143 { 0x093e3d, 15 },
144 { 0x09e35d, 16 },
145 { 0x0a7c3c, 17 },
146 { 0x0afaf8, 18 },
147 { 0x0b719d, 19 },
148 { 0xffffff, 20 },
149};
150
151/* QAM64 SNR lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -0300152static const struct af9013_snr qam64_snr_lut[] = {
153 { 0x000000, 0 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300154 { 0x03109b, 12 },
155 { 0x0310d4, 13 },
156 { 0x031920, 14 },
157 { 0x0322d0, 15 },
158 { 0x0339fc, 16 },
159 { 0x0364a1, 17 },
160 { 0x038bcc, 18 },
161 { 0x03c7d3, 19 },
162 { 0x0408cc, 20 },
163 { 0x043bed, 21 },
164 { 0x048061, 22 },
165 { 0x04be95, 23 },
166 { 0x04fa7d, 24 },
167 { 0x052405, 25 },
168 { 0x05570d, 26 },
169 { 0xffffff, 27 },
170};
171
Antti Palosaarif571e002011-11-28 20:58:11 -0300172static const struct af9013_reg_bit ofsm_init[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300173 { 0xd73a, 0, 8, 0xa1 },
174 { 0xd73b, 0, 8, 0x1f },
175 { 0xd73c, 4, 4, 0x0a },
176 { 0xd732, 3, 1, 0x00 },
177 { 0xd731, 4, 2, 0x03 },
178 { 0xd73d, 7, 1, 0x01 },
179 { 0xd740, 0, 1, 0x00 },
180 { 0xd740, 1, 1, 0x00 },
181 { 0xd740, 2, 1, 0x00 },
182 { 0xd740, 3, 1, 0x01 },
183 { 0xd3c1, 4, 1, 0x01 },
Antti Palosaari3b11f4e2010-05-14 13:59:50 -0300184 { 0x9124, 0, 8, 0x58 },
185 { 0x9125, 0, 2, 0x02 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300186 { 0xd3a2, 0, 8, 0x00 },
187 { 0xd3a3, 0, 8, 0x04 },
188 { 0xd305, 0, 8, 0x32 },
189 { 0xd306, 0, 8, 0x10 },
190 { 0xd304, 0, 8, 0x04 },
191 { 0x9112, 0, 1, 0x01 },
192 { 0x911d, 0, 1, 0x01 },
193 { 0x911a, 0, 1, 0x01 },
194 { 0x911b, 0, 1, 0x01 },
195 { 0x9bce, 0, 4, 0x02 },
196 { 0x9116, 0, 1, 0x01 },
Antti Palosaari3b11f4e2010-05-14 13:59:50 -0300197 { 0x9122, 0, 8, 0xd0 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300198 { 0xd2e0, 0, 8, 0xd0 },
199 { 0xd2e9, 0, 4, 0x0d },
200 { 0xd38c, 0, 8, 0xfc },
201 { 0xd38d, 0, 8, 0x00 },
202 { 0xd38e, 0, 8, 0x7e },
203 { 0xd38f, 0, 8, 0x00 },
204 { 0xd390, 0, 8, 0x2f },
205 { 0xd145, 4, 1, 0x01 },
206 { 0xd1a9, 4, 1, 0x01 },
207 { 0xd158, 5, 3, 0x01 },
208 { 0xd159, 0, 6, 0x06 },
209 { 0xd167, 0, 8, 0x00 },
210 { 0xd168, 0, 4, 0x07 },
211 { 0xd1c3, 5, 3, 0x00 },
212 { 0xd1c4, 0, 6, 0x00 },
213 { 0xd1c5, 0, 7, 0x10 },
214 { 0xd1c6, 0, 3, 0x02 },
215 { 0xd080, 2, 5, 0x03 },
216 { 0xd081, 4, 4, 0x09 },
217 { 0xd098, 4, 4, 0x0f },
218 { 0xd098, 0, 4, 0x03 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300219 { 0xdbc0, 4, 1, 0x01 },
220 { 0xdbc7, 0, 8, 0x08 },
221 { 0xdbc8, 4, 4, 0x00 },
222 { 0xdbc9, 0, 5, 0x01 },
223 { 0xd280, 0, 8, 0xe0 },
224 { 0xd281, 0, 8, 0xff },
225 { 0xd282, 0, 8, 0xff },
226 { 0xd283, 0, 8, 0xc3 },
227 { 0xd284, 0, 8, 0xff },
228 { 0xd285, 0, 4, 0x01 },
229 { 0xd0f0, 0, 7, 0x1a },
230 { 0xd0f1, 4, 1, 0x01 },
231 { 0xd0f2, 0, 8, 0x0c },
Antti Palosaari3b11f4e2010-05-14 13:59:50 -0300232 { 0xd101, 5, 3, 0x06 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300233 { 0xd103, 0, 4, 0x08 },
234 { 0xd0f8, 0, 7, 0x20 },
235 { 0xd111, 5, 1, 0x00 },
236 { 0xd111, 6, 1, 0x00 },
237 { 0x910b, 0, 8, 0x0a },
238 { 0x9115, 0, 8, 0x02 },
239 { 0x910c, 0, 8, 0x02 },
240 { 0x910d, 0, 8, 0x08 },
241 { 0x910e, 0, 8, 0x0a },
242 { 0x9bf6, 0, 8, 0x06 },
243 { 0x9bf8, 0, 8, 0x02 },
244 { 0x9bf7, 0, 8, 0x05 },
245 { 0x9bf9, 0, 8, 0x0f },
246 { 0x9bfc, 0, 8, 0x13 },
247 { 0x9bd3, 0, 8, 0xff },
248 { 0x9bbe, 0, 1, 0x01 },
249 { 0x9bcc, 0, 1, 0x01 },
250};
251
252/* Panasonic ENV77H11D5 tuner init
253 AF9013_TUNER_ENV77H11D5 = 129 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300254static const struct af9013_reg_bit tuner_init_env77h11d5[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300255 { 0x9bd5, 0, 8, 0x01 },
256 { 0x9bd6, 0, 8, 0x03 },
257 { 0x9bbe, 0, 8, 0x01 },
258 { 0xd1a0, 1, 1, 0x01 },
259 { 0xd000, 0, 1, 0x01 },
260 { 0xd000, 1, 1, 0x00 },
261 { 0xd001, 1, 1, 0x01 },
262 { 0xd001, 0, 1, 0x00 },
263 { 0xd001, 5, 1, 0x00 },
264 { 0xd002, 0, 5, 0x19 },
265 { 0xd003, 0, 5, 0x1a },
266 { 0xd004, 0, 5, 0x19 },
267 { 0xd005, 0, 5, 0x1a },
268 { 0xd00e, 0, 5, 0x10 },
269 { 0xd00f, 0, 3, 0x04 },
270 { 0xd00f, 3, 3, 0x05 },
271 { 0xd010, 0, 3, 0x04 },
272 { 0xd010, 3, 3, 0x05 },
273 { 0xd016, 4, 4, 0x03 },
274 { 0xd01f, 0, 6, 0x0a },
275 { 0xd020, 0, 6, 0x0a },
276 { 0x9bda, 0, 8, 0x00 },
277 { 0x9be3, 0, 8, 0x00 },
278 { 0xd015, 0, 8, 0x50 },
279 { 0xd016, 0, 1, 0x00 },
280 { 0xd044, 0, 8, 0x46 },
281 { 0xd045, 0, 1, 0x00 },
282 { 0xd008, 0, 8, 0xdf },
283 { 0xd009, 0, 2, 0x02 },
284 { 0xd006, 0, 8, 0x44 },
285 { 0xd007, 0, 2, 0x01 },
286 { 0xd00c, 0, 8, 0xeb },
287 { 0xd00d, 0, 2, 0x02 },
288 { 0xd00a, 0, 8, 0xf4 },
289 { 0xd00b, 0, 2, 0x01 },
290 { 0x9bba, 0, 8, 0xf9 },
291 { 0x9bc3, 0, 8, 0xdf },
292 { 0x9bc4, 0, 8, 0x02 },
293 { 0x9bc5, 0, 8, 0xeb },
294 { 0x9bc6, 0, 8, 0x02 },
295 { 0x9bc9, 0, 8, 0x52 },
296 { 0xd011, 0, 8, 0x3c },
297 { 0xd012, 0, 2, 0x01 },
298 { 0xd013, 0, 8, 0xf7 },
299 { 0xd014, 0, 2, 0x02 },
300 { 0xd040, 0, 8, 0x0b },
301 { 0xd041, 0, 2, 0x02 },
302 { 0xd042, 0, 8, 0x4d },
303 { 0xd043, 0, 2, 0x00 },
304 { 0xd045, 1, 1, 0x00 },
305 { 0x9bcf, 0, 1, 0x01 },
306 { 0xd045, 2, 1, 0x01 },
307 { 0xd04f, 0, 8, 0x9a },
308 { 0xd050, 0, 1, 0x01 },
309 { 0xd051, 0, 8, 0x5a },
310 { 0xd052, 0, 1, 0x01 },
311 { 0xd053, 0, 8, 0x50 },
312 { 0xd054, 0, 8, 0x46 },
313 { 0x9bd7, 0, 8, 0x0a },
314 { 0x9bd8, 0, 8, 0x14 },
315 { 0x9bd9, 0, 8, 0x08 },
316};
317
318/* Microtune MT2060 tuner init
319 AF9013_TUNER_MT2060 = 130 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300320static const struct af9013_reg_bit tuner_init_mt2060[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300321 { 0x9bd5, 0, 8, 0x01 },
322 { 0x9bd6, 0, 8, 0x07 },
323 { 0xd1a0, 1, 1, 0x01 },
324 { 0xd000, 0, 1, 0x01 },
325 { 0xd000, 1, 1, 0x00 },
326 { 0xd001, 1, 1, 0x01 },
327 { 0xd001, 0, 1, 0x00 },
328 { 0xd001, 5, 1, 0x00 },
329 { 0xd002, 0, 5, 0x19 },
330 { 0xd003, 0, 5, 0x1a },
331 { 0xd004, 0, 5, 0x19 },
332 { 0xd005, 0, 5, 0x1a },
333 { 0xd00e, 0, 5, 0x10 },
334 { 0xd00f, 0, 3, 0x04 },
335 { 0xd00f, 3, 3, 0x05 },
336 { 0xd010, 0, 3, 0x04 },
337 { 0xd010, 3, 3, 0x05 },
338 { 0xd016, 4, 4, 0x03 },
339 { 0xd01f, 0, 6, 0x0a },
340 { 0xd020, 0, 6, 0x0a },
341 { 0x9bda, 0, 8, 0x00 },
342 { 0x9be3, 0, 8, 0x00 },
343 { 0x9bbe, 0, 1, 0x00 },
344 { 0x9bcc, 0, 1, 0x00 },
345 { 0x9bb9, 0, 8, 0x75 },
346 { 0x9bcd, 0, 8, 0x24 },
347 { 0x9bff, 0, 8, 0x30 },
348 { 0xd015, 0, 8, 0x46 },
349 { 0xd016, 0, 1, 0x00 },
350 { 0xd044, 0, 8, 0x46 },
351 { 0xd045, 0, 1, 0x00 },
352 { 0xd008, 0, 8, 0x0f },
353 { 0xd009, 0, 2, 0x02 },
354 { 0xd006, 0, 8, 0x32 },
355 { 0xd007, 0, 2, 0x01 },
356 { 0xd00c, 0, 8, 0x36 },
357 { 0xd00d, 0, 2, 0x03 },
358 { 0xd00a, 0, 8, 0x35 },
359 { 0xd00b, 0, 2, 0x01 },
360 { 0x9bc7, 0, 8, 0x07 },
361 { 0x9bc8, 0, 8, 0x90 },
362 { 0x9bc3, 0, 8, 0x0f },
363 { 0x9bc4, 0, 8, 0x02 },
364 { 0x9bc5, 0, 8, 0x36 },
365 { 0x9bc6, 0, 8, 0x03 },
366 { 0x9bba, 0, 8, 0xc9 },
367 { 0x9bc9, 0, 8, 0x79 },
368 { 0xd011, 0, 8, 0x10 },
369 { 0xd012, 0, 2, 0x01 },
370 { 0xd013, 0, 8, 0x45 },
371 { 0xd014, 0, 2, 0x03 },
372 { 0xd040, 0, 8, 0x98 },
373 { 0xd041, 0, 2, 0x00 },
374 { 0xd042, 0, 8, 0xcf },
375 { 0xd043, 0, 2, 0x03 },
376 { 0xd045, 1, 1, 0x00 },
377 { 0x9bcf, 0, 1, 0x01 },
378 { 0xd045, 2, 1, 0x01 },
379 { 0xd04f, 0, 8, 0x9a },
380 { 0xd050, 0, 1, 0x01 },
381 { 0xd051, 0, 8, 0x5a },
382 { 0xd052, 0, 1, 0x01 },
383 { 0xd053, 0, 8, 0x50 },
384 { 0xd054, 0, 8, 0x46 },
385 { 0x9bd7, 0, 8, 0x0a },
386 { 0x9bd8, 0, 8, 0x14 },
387 { 0x9bd9, 0, 8, 0x08 },
388 { 0x9bd0, 0, 8, 0xcc },
389 { 0x9be4, 0, 8, 0xa0 },
390 { 0x9bbd, 0, 8, 0x8e },
391 { 0x9be2, 0, 8, 0x4d },
392 { 0x9bee, 0, 1, 0x01 },
393};
394
395/* Microtune MT2060 tuner init
396 AF9013_TUNER_MT2060_2 = 147 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300397static const struct af9013_reg_bit tuner_init_mt2060_2[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300398 { 0x9bd5, 0, 8, 0x01 },
399 { 0x9bd6, 0, 8, 0x06 },
400 { 0x9bbe, 0, 8, 0x01 },
401 { 0xd1a0, 1, 1, 0x01 },
402 { 0xd000, 0, 1, 0x01 },
403 { 0xd000, 1, 1, 0x00 },
404 { 0xd001, 1, 1, 0x01 },
405 { 0xd001, 0, 1, 0x00 },
406 { 0xd001, 5, 1, 0x00 },
407 { 0xd002, 0, 5, 0x19 },
408 { 0xd003, 0, 5, 0x1a },
409 { 0xd004, 0, 5, 0x19 },
410 { 0xd005, 0, 5, 0x1a },
411 { 0xd00e, 0, 5, 0x10 },
412 { 0xd00f, 0, 3, 0x04 },
413 { 0xd00f, 3, 3, 0x05 },
414 { 0xd010, 0, 3, 0x04 },
415 { 0xd010, 3, 3, 0x05 },
416 { 0xd016, 4, 4, 0x03 },
417 { 0xd01f, 0, 6, 0x0a },
418 { 0xd020, 0, 6, 0x0a },
419 { 0xd015, 0, 8, 0x46 },
420 { 0xd016, 0, 1, 0x00 },
421 { 0xd044, 0, 8, 0x46 },
422 { 0xd045, 0, 1, 0x00 },
423 { 0xd008, 0, 8, 0x0f },
424 { 0xd009, 0, 2, 0x02 },
425 { 0xd006, 0, 8, 0x32 },
426 { 0xd007, 0, 2, 0x01 },
427 { 0xd00c, 0, 8, 0x36 },
428 { 0xd00d, 0, 2, 0x03 },
429 { 0xd00a, 0, 8, 0x35 },
430 { 0xd00b, 0, 2, 0x01 },
431 { 0x9bc7, 0, 8, 0x07 },
432 { 0x9bc8, 0, 8, 0x90 },
433 { 0x9bc3, 0, 8, 0x0f },
434 { 0x9bc4, 0, 8, 0x02 },
435 { 0x9bc5, 0, 8, 0x36 },
436 { 0x9bc6, 0, 8, 0x03 },
437 { 0x9bba, 0, 8, 0xc9 },
438 { 0x9bc9, 0, 8, 0x79 },
439 { 0xd011, 0, 8, 0x10 },
440 { 0xd012, 0, 2, 0x01 },
441 { 0xd013, 0, 8, 0x45 },
442 { 0xd014, 0, 2, 0x03 },
443 { 0xd040, 0, 8, 0x98 },
444 { 0xd041, 0, 2, 0x00 },
445 { 0xd042, 0, 8, 0xcf },
446 { 0xd043, 0, 2, 0x03 },
447 { 0xd045, 1, 1, 0x00 },
448 { 0x9bcf, 0, 8, 0x01 },
449 { 0xd045, 2, 1, 0x01 },
450 { 0xd04f, 0, 8, 0x9a },
451 { 0xd050, 0, 1, 0x01 },
452 { 0xd051, 0, 8, 0x5a },
453 { 0xd052, 0, 1, 0x01 },
454 { 0xd053, 0, 8, 0x96 },
455 { 0xd054, 0, 8, 0x46 },
456 { 0xd045, 7, 1, 0x00 },
457 { 0x9bd7, 0, 8, 0x0a },
458 { 0x9bd8, 0, 8, 0x14 },
459 { 0x9bd9, 0, 8, 0x08 },
460};
461
462/* MaxLinear MXL5003 tuner init
463 AF9013_TUNER_MXL5003D = 3 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300464static const struct af9013_reg_bit tuner_init_mxl5003d[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300465 { 0x9bd5, 0, 8, 0x01 },
466 { 0x9bd6, 0, 8, 0x09 },
467 { 0xd1a0, 1, 1, 0x01 },
468 { 0xd000, 0, 1, 0x01 },
469 { 0xd000, 1, 1, 0x00 },
470 { 0xd001, 1, 1, 0x01 },
471 { 0xd001, 0, 1, 0x00 },
472 { 0xd001, 5, 1, 0x00 },
473 { 0xd002, 0, 5, 0x19 },
474 { 0xd003, 0, 5, 0x1a },
475 { 0xd004, 0, 5, 0x19 },
476 { 0xd005, 0, 5, 0x1a },
477 { 0xd00e, 0, 5, 0x10 },
478 { 0xd00f, 0, 3, 0x04 },
479 { 0xd00f, 3, 3, 0x05 },
480 { 0xd010, 0, 3, 0x04 },
481 { 0xd010, 3, 3, 0x05 },
482 { 0xd016, 4, 4, 0x03 },
483 { 0xd01f, 0, 6, 0x0a },
484 { 0xd020, 0, 6, 0x0a },
485 { 0x9bda, 0, 8, 0x00 },
486 { 0x9be3, 0, 8, 0x00 },
487 { 0x9bfc, 0, 8, 0x0f },
488 { 0x9bf6, 0, 8, 0x01 },
489 { 0x9bbe, 0, 1, 0x01 },
490 { 0xd015, 0, 8, 0x33 },
491 { 0xd016, 0, 1, 0x00 },
492 { 0xd044, 0, 8, 0x40 },
493 { 0xd045, 0, 1, 0x00 },
494 { 0xd008, 0, 8, 0x0f },
495 { 0xd009, 0, 2, 0x02 },
496 { 0xd006, 0, 8, 0x6c },
497 { 0xd007, 0, 2, 0x00 },
498 { 0xd00c, 0, 8, 0x3d },
499 { 0xd00d, 0, 2, 0x00 },
500 { 0xd00a, 0, 8, 0x45 },
501 { 0xd00b, 0, 2, 0x01 },
502 { 0x9bc7, 0, 8, 0x07 },
503 { 0x9bc8, 0, 8, 0x52 },
504 { 0x9bc3, 0, 8, 0x0f },
505 { 0x9bc4, 0, 8, 0x02 },
506 { 0x9bc5, 0, 8, 0x3d },
507 { 0x9bc6, 0, 8, 0x00 },
508 { 0x9bba, 0, 8, 0xa2 },
509 { 0x9bc9, 0, 8, 0xa0 },
510 { 0xd011, 0, 8, 0x56 },
511 { 0xd012, 0, 2, 0x00 },
512 { 0xd013, 0, 8, 0x50 },
513 { 0xd014, 0, 2, 0x00 },
514 { 0xd040, 0, 8, 0x56 },
515 { 0xd041, 0, 2, 0x00 },
516 { 0xd042, 0, 8, 0x50 },
517 { 0xd043, 0, 2, 0x00 },
518 { 0xd045, 1, 1, 0x00 },
519 { 0x9bcf, 0, 8, 0x01 },
520 { 0xd045, 2, 1, 0x01 },
521 { 0xd04f, 0, 8, 0x9a },
522 { 0xd050, 0, 1, 0x01 },
523 { 0xd051, 0, 8, 0x5a },
524 { 0xd052, 0, 1, 0x01 },
525 { 0xd053, 0, 8, 0x50 },
526 { 0xd054, 0, 8, 0x46 },
527 { 0x9bd7, 0, 8, 0x0a },
528 { 0x9bd8, 0, 8, 0x14 },
529 { 0x9bd9, 0, 8, 0x08 },
530};
531
Antti Palosaaria4f31d02010-09-09 14:53:59 -0300532/* MaxLinear MXL5005S & MXL5007T tuner init
Antti Palosaari825b9672008-09-15 15:01:52 -0300533 AF9013_TUNER_MXL5005D = 13
Antti Palosaaria4f31d02010-09-09 14:53:59 -0300534 AF9013_TUNER_MXL5005R = 30
535 AF9013_TUNER_MXL5007T = 177 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300536static const struct af9013_reg_bit tuner_init_mxl5005[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300537 { 0x9bd5, 0, 8, 0x01 },
538 { 0x9bd6, 0, 8, 0x07 },
539 { 0xd1a0, 1, 1, 0x01 },
540 { 0xd000, 0, 1, 0x01 },
541 { 0xd000, 1, 1, 0x00 },
542 { 0xd001, 1, 1, 0x01 },
543 { 0xd001, 0, 1, 0x00 },
544 { 0xd001, 5, 1, 0x00 },
545 { 0xd002, 0, 5, 0x19 },
546 { 0xd003, 0, 5, 0x1a },
547 { 0xd004, 0, 5, 0x19 },
548 { 0xd005, 0, 5, 0x1a },
549 { 0xd00e, 0, 5, 0x10 },
550 { 0xd00f, 0, 3, 0x04 },
551 { 0xd00f, 3, 3, 0x05 },
552 { 0xd010, 0, 3, 0x04 },
553 { 0xd010, 3, 3, 0x05 },
554 { 0xd016, 4, 4, 0x03 },
555 { 0xd01f, 0, 6, 0x0a },
556 { 0xd020, 0, 6, 0x0a },
557 { 0x9bda, 0, 8, 0x01 },
558 { 0x9be3, 0, 8, 0x01 },
559 { 0x9bbe, 0, 1, 0x01 },
560 { 0x9bcc, 0, 1, 0x01 },
561 { 0x9bb9, 0, 8, 0x00 },
562 { 0x9bcd, 0, 8, 0x28 },
563 { 0x9bff, 0, 8, 0x24 },
564 { 0xd015, 0, 8, 0x40 },
565 { 0xd016, 0, 1, 0x00 },
566 { 0xd044, 0, 8, 0x40 },
567 { 0xd045, 0, 1, 0x00 },
568 { 0xd008, 0, 8, 0x0f },
569 { 0xd009, 0, 2, 0x02 },
570 { 0xd006, 0, 8, 0x73 },
571 { 0xd007, 0, 2, 0x01 },
572 { 0xd00c, 0, 8, 0xfa },
573 { 0xd00d, 0, 2, 0x01 },
574 { 0xd00a, 0, 8, 0xff },
575 { 0xd00b, 0, 2, 0x01 },
576 { 0x9bc7, 0, 8, 0x23 },
577 { 0x9bc8, 0, 8, 0x55 },
578 { 0x9bc3, 0, 8, 0x01 },
579 { 0x9bc4, 0, 8, 0x02 },
580 { 0x9bc5, 0, 8, 0xfa },
581 { 0x9bc6, 0, 8, 0x01 },
582 { 0x9bba, 0, 8, 0xff },
583 { 0x9bc9, 0, 8, 0xff },
584 { 0x9bd3, 0, 8, 0x95 },
585 { 0xd011, 0, 8, 0x70 },
586 { 0xd012, 0, 2, 0x01 },
587 { 0xd013, 0, 8, 0xfb },
588 { 0xd014, 0, 2, 0x01 },
589 { 0xd040, 0, 8, 0x70 },
590 { 0xd041, 0, 2, 0x01 },
591 { 0xd042, 0, 8, 0xfb },
592 { 0xd043, 0, 2, 0x01 },
593 { 0xd045, 1, 1, 0x00 },
594 { 0x9bcf, 0, 1, 0x01 },
595 { 0xd045, 2, 1, 0x01 },
596 { 0xd04f, 0, 8, 0x9a },
597 { 0xd050, 0, 1, 0x01 },
598 { 0xd051, 0, 8, 0x5a },
599 { 0xd052, 0, 1, 0x01 },
600 { 0xd053, 0, 8, 0x50 },
601 { 0xd054, 0, 8, 0x46 },
602 { 0x9bd7, 0, 8, 0x0a },
603 { 0x9bd8, 0, 8, 0x14 },
604 { 0x9bd9, 0, 8, 0x08 },
605 { 0x9bd0, 0, 8, 0x93 },
606 { 0x9be4, 0, 8, 0xfe },
607 { 0x9bbd, 0, 8, 0x63 },
608 { 0x9be2, 0, 8, 0xfe },
609 { 0x9bee, 0, 1, 0x01 },
610};
611
612/* Quantek QT1010 tuner init
613 AF9013_TUNER_QT1010 = 134
614 AF9013_TUNER_QT1010A = 162 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300615static const struct af9013_reg_bit tuner_init_qt1010[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300616 { 0x9bd5, 0, 8, 0x01 },
617 { 0x9bd6, 0, 8, 0x09 },
618 { 0xd1a0, 1, 1, 0x01 },
619 { 0xd000, 0, 1, 0x01 },
620 { 0xd000, 1, 1, 0x00 },
621 { 0xd001, 1, 1, 0x01 },
622 { 0xd001, 0, 1, 0x00 },
623 { 0xd001, 5, 1, 0x00 },
624 { 0xd002, 0, 5, 0x19 },
625 { 0xd003, 0, 5, 0x1a },
626 { 0xd004, 0, 5, 0x19 },
627 { 0xd005, 0, 5, 0x1a },
628 { 0xd00e, 0, 5, 0x10 },
629 { 0xd00f, 0, 3, 0x04 },
630 { 0xd00f, 3, 3, 0x05 },
631 { 0xd010, 0, 3, 0x04 },
632 { 0xd010, 3, 3, 0x05 },
633 { 0xd016, 4, 4, 0x03 },
634 { 0xd01f, 0, 6, 0x0a },
635 { 0xd020, 0, 6, 0x0a },
636 { 0x9bda, 0, 8, 0x01 },
637 { 0x9be3, 0, 8, 0x01 },
638 { 0xd015, 0, 8, 0x46 },
639 { 0xd016, 0, 1, 0x00 },
640 { 0xd044, 0, 8, 0x46 },
641 { 0xd045, 0, 1, 0x00 },
642 { 0x9bbe, 0, 1, 0x01 },
643 { 0x9bcc, 0, 1, 0x01 },
644 { 0x9bb9, 0, 8, 0x00 },
645 { 0x9bcd, 0, 8, 0x28 },
646 { 0x9bff, 0, 8, 0x20 },
647 { 0xd008, 0, 8, 0x0f },
648 { 0xd009, 0, 2, 0x02 },
649 { 0xd006, 0, 8, 0x99 },
650 { 0xd007, 0, 2, 0x01 },
651 { 0xd00c, 0, 8, 0x0f },
652 { 0xd00d, 0, 2, 0x02 },
653 { 0xd00a, 0, 8, 0x50 },
654 { 0xd00b, 0, 2, 0x01 },
655 { 0x9bc7, 0, 8, 0x00 },
656 { 0x9bc8, 0, 8, 0x00 },
657 { 0x9bc3, 0, 8, 0x0f },
658 { 0x9bc4, 0, 8, 0x02 },
659 { 0x9bc5, 0, 8, 0x0f },
660 { 0x9bc6, 0, 8, 0x02 },
661 { 0x9bba, 0, 8, 0xc5 },
662 { 0x9bc9, 0, 8, 0xff },
663 { 0xd011, 0, 8, 0x58 },
664 { 0xd012, 0, 2, 0x02 },
665 { 0xd013, 0, 8, 0x89 },
666 { 0xd014, 0, 2, 0x01 },
667 { 0xd040, 0, 8, 0x58 },
668 { 0xd041, 0, 2, 0x02 },
669 { 0xd042, 0, 8, 0x89 },
670 { 0xd043, 0, 2, 0x01 },
671 { 0xd045, 1, 1, 0x00 },
672 { 0x9bcf, 0, 1, 0x01 },
673 { 0xd045, 2, 1, 0x01 },
674 { 0xd04f, 0, 8, 0x9a },
675 { 0xd050, 0, 1, 0x01 },
676 { 0xd051, 0, 8, 0x5a },
677 { 0xd052, 0, 1, 0x01 },
678 { 0xd053, 0, 8, 0x50 },
679 { 0xd054, 0, 8, 0x46 },
680 { 0x9bd7, 0, 8, 0x0a },
681 { 0x9bd8, 0, 8, 0x14 },
682 { 0x9bd9, 0, 8, 0x08 },
683 { 0x9bd0, 0, 8, 0xcd },
684 { 0x9be4, 0, 8, 0xbb },
685 { 0x9bbd, 0, 8, 0x93 },
686 { 0x9be2, 0, 8, 0x80 },
687 { 0x9bee, 0, 1, 0x01 },
688};
689
690/* Freescale MC44S803 tuner init
691 AF9013_TUNER_MC44S803 = 133 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300692static const struct af9013_reg_bit tuner_init_mc44s803[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300693 { 0x9bd5, 0, 8, 0x01 },
694 { 0x9bd6, 0, 8, 0x06 },
695 { 0xd1a0, 1, 1, 0x01 },
696 { 0xd000, 0, 1, 0x01 },
697 { 0xd000, 1, 1, 0x00 },
698 { 0xd001, 1, 1, 0x01 },
699 { 0xd001, 0, 1, 0x00 },
700 { 0xd001, 5, 1, 0x00 },
701 { 0xd002, 0, 5, 0x19 },
702 { 0xd003, 0, 5, 0x1a },
703 { 0xd004, 0, 5, 0x19 },
704 { 0xd005, 0, 5, 0x1a },
705 { 0xd00e, 0, 5, 0x10 },
706 { 0xd00f, 0, 3, 0x04 },
707 { 0xd00f, 3, 3, 0x05 },
708 { 0xd010, 0, 3, 0x04 },
709 { 0xd010, 3, 3, 0x05 },
710 { 0xd016, 4, 4, 0x03 },
711 { 0xd01f, 0, 6, 0x0a },
712 { 0xd020, 0, 6, 0x0a },
713 { 0x9bda, 0, 8, 0x00 },
714 { 0x9be3, 0, 8, 0x00 },
715 { 0x9bf6, 0, 8, 0x01 },
716 { 0x9bf8, 0, 8, 0x02 },
717 { 0x9bf9, 0, 8, 0x02 },
718 { 0x9bfc, 0, 8, 0x1f },
719 { 0x9bbe, 0, 1, 0x01 },
720 { 0x9bcc, 0, 1, 0x01 },
721 { 0x9bb9, 0, 8, 0x00 },
722 { 0x9bcd, 0, 8, 0x24 },
723 { 0x9bff, 0, 8, 0x24 },
724 { 0xd015, 0, 8, 0x46 },
725 { 0xd016, 0, 1, 0x00 },
726 { 0xd044, 0, 8, 0x46 },
727 { 0xd045, 0, 1, 0x00 },
728 { 0xd008, 0, 8, 0x01 },
729 { 0xd009, 0, 2, 0x02 },
730 { 0xd006, 0, 8, 0x7b },
731 { 0xd007, 0, 2, 0x00 },
732 { 0xd00c, 0, 8, 0x7c },
733 { 0xd00d, 0, 2, 0x02 },
734 { 0xd00a, 0, 8, 0xfe },
735 { 0xd00b, 0, 2, 0x01 },
736 { 0x9bc7, 0, 8, 0x08 },
737 { 0x9bc8, 0, 8, 0x9a },
738 { 0x9bc3, 0, 8, 0x01 },
739 { 0x9bc4, 0, 8, 0x02 },
740 { 0x9bc5, 0, 8, 0x7c },
741 { 0x9bc6, 0, 8, 0x02 },
742 { 0x9bba, 0, 8, 0xfc },
743 { 0x9bc9, 0, 8, 0xaa },
744 { 0xd011, 0, 8, 0x6b },
745 { 0xd012, 0, 2, 0x00 },
746 { 0xd013, 0, 8, 0x88 },
747 { 0xd014, 0, 2, 0x02 },
748 { 0xd040, 0, 8, 0x6b },
749 { 0xd041, 0, 2, 0x00 },
750 { 0xd042, 0, 8, 0x7c },
751 { 0xd043, 0, 2, 0x02 },
752 { 0xd045, 1, 1, 0x00 },
753 { 0x9bcf, 0, 1, 0x01 },
754 { 0xd045, 2, 1, 0x01 },
755 { 0xd04f, 0, 8, 0x9a },
756 { 0xd050, 0, 1, 0x01 },
757 { 0xd051, 0, 8, 0x5a },
758 { 0xd052, 0, 1, 0x01 },
759 { 0xd053, 0, 8, 0x50 },
760 { 0xd054, 0, 8, 0x46 },
761 { 0x9bd7, 0, 8, 0x0a },
762 { 0x9bd8, 0, 8, 0x14 },
763 { 0x9bd9, 0, 8, 0x08 },
764 { 0x9bd0, 0, 8, 0x9e },
765 { 0x9be4, 0, 8, 0xff },
766 { 0x9bbd, 0, 8, 0x9e },
767 { 0x9be2, 0, 8, 0x25 },
768 { 0x9bee, 0, 1, 0x01 },
769 { 0xd73b, 3, 1, 0x00 },
770};
771
772/* unknown, probably for tin can tuner, tuner init
773 AF9013_TUNER_UNKNOWN = 140 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300774static const struct af9013_reg_bit tuner_init_unknown[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300775 { 0x9bd5, 0, 8, 0x01 },
776 { 0x9bd6, 0, 8, 0x02 },
777 { 0xd1a0, 1, 1, 0x01 },
778 { 0xd000, 0, 1, 0x01 },
779 { 0xd000, 1, 1, 0x00 },
780 { 0xd001, 1, 1, 0x01 },
781 { 0xd001, 0, 1, 0x00 },
782 { 0xd001, 5, 1, 0x00 },
783 { 0xd002, 0, 5, 0x19 },
784 { 0xd003, 0, 5, 0x1a },
785 { 0xd004, 0, 5, 0x19 },
786 { 0xd005, 0, 5, 0x1a },
787 { 0xd00e, 0, 5, 0x10 },
788 { 0xd00f, 0, 3, 0x04 },
789 { 0xd00f, 3, 3, 0x05 },
790 { 0xd010, 0, 3, 0x04 },
791 { 0xd010, 3, 3, 0x05 },
792 { 0xd016, 4, 4, 0x03 },
793 { 0xd01f, 0, 6, 0x0a },
794 { 0xd020, 0, 6, 0x0a },
795 { 0x9bda, 0, 8, 0x01 },
796 { 0x9be3, 0, 8, 0x01 },
797 { 0xd1a0, 1, 1, 0x00 },
798 { 0x9bbe, 0, 1, 0x01 },
799 { 0x9bcc, 0, 1, 0x01 },
800 { 0x9bb9, 0, 8, 0x00 },
801 { 0x9bcd, 0, 8, 0x18 },
802 { 0x9bff, 0, 8, 0x2c },
803 { 0xd015, 0, 8, 0x46 },
804 { 0xd016, 0, 1, 0x00 },
805 { 0xd044, 0, 8, 0x46 },
806 { 0xd045, 0, 1, 0x00 },
807 { 0xd008, 0, 8, 0xdf },
808 { 0xd009, 0, 2, 0x02 },
809 { 0xd006, 0, 8, 0x44 },
810 { 0xd007, 0, 2, 0x01 },
811 { 0xd00c, 0, 8, 0x00 },
812 { 0xd00d, 0, 2, 0x02 },
813 { 0xd00a, 0, 8, 0xf6 },
814 { 0xd00b, 0, 2, 0x01 },
815 { 0x9bba, 0, 8, 0xf9 },
816 { 0x9bc8, 0, 8, 0xaa },
817 { 0x9bc3, 0, 8, 0xdf },
818 { 0x9bc4, 0, 8, 0x02 },
819 { 0x9bc5, 0, 8, 0x00 },
820 { 0x9bc6, 0, 8, 0x02 },
821 { 0x9bc9, 0, 8, 0xf0 },
822 { 0xd011, 0, 8, 0x3c },
823 { 0xd012, 0, 2, 0x01 },
824 { 0xd013, 0, 8, 0xf7 },
825 { 0xd014, 0, 2, 0x02 },
826 { 0xd040, 0, 8, 0x0b },
827 { 0xd041, 0, 2, 0x02 },
828 { 0xd042, 0, 8, 0x4d },
829 { 0xd043, 0, 2, 0x00 },
830 { 0xd045, 1, 1, 0x00 },
831 { 0x9bcf, 0, 1, 0x01 },
832 { 0xd045, 2, 1, 0x01 },
833 { 0xd04f, 0, 8, 0x9a },
834 { 0xd050, 0, 1, 0x01 },
835 { 0xd051, 0, 8, 0x5a },
836 { 0xd052, 0, 1, 0x01 },
837 { 0xd053, 0, 8, 0x50 },
838 { 0xd054, 0, 8, 0x46 },
839 { 0x9bd7, 0, 8, 0x0a },
840 { 0x9bd8, 0, 8, 0x14 },
841 { 0x9bd9, 0, 8, 0x08 },
842};
843
Antti Palosaari2158e502010-08-13 03:49:24 -0300844/* NXP TDA18271 & TDA18218 tuner init
845 AF9013_TUNER_TDA18271 = 156
846 AF9013_TUNER_TDA18218 = 179 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300847static const struct af9013_reg_bit tuner_init_tda18271[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300848 { 0x9bd5, 0, 8, 0x01 },
849 { 0x9bd6, 0, 8, 0x04 },
850 { 0xd1a0, 1, 1, 0x01 },
851 { 0xd000, 0, 1, 0x01 },
852 { 0xd000, 1, 1, 0x00 },
853 { 0xd001, 1, 1, 0x01 },
854 { 0xd001, 0, 1, 0x00 },
855 { 0xd001, 5, 1, 0x00 },
856 { 0xd002, 0, 5, 0x19 },
857 { 0xd003, 0, 5, 0x1a },
858 { 0xd004, 0, 5, 0x19 },
859 { 0xd005, 0, 5, 0x1a },
860 { 0xd00e, 0, 5, 0x10 },
861 { 0xd00f, 0, 3, 0x04 },
862 { 0xd00f, 3, 3, 0x05 },
863 { 0xd010, 0, 3, 0x04 },
864 { 0xd010, 3, 3, 0x05 },
865 { 0xd016, 4, 4, 0x03 },
866 { 0xd01f, 0, 6, 0x0a },
867 { 0xd020, 0, 6, 0x0a },
868 { 0x9bda, 0, 8, 0x01 },
869 { 0x9be3, 0, 8, 0x01 },
870 { 0xd1a0, 1, 1, 0x00 },
871 { 0x9bbe, 0, 1, 0x01 },
872 { 0x9bcc, 0, 1, 0x01 },
873 { 0x9bb9, 0, 8, 0x00 },
874 { 0x9bcd, 0, 8, 0x18 },
875 { 0x9bff, 0, 8, 0x2c },
876 { 0xd015, 0, 8, 0x46 },
877 { 0xd016, 0, 1, 0x00 },
878 { 0xd044, 0, 8, 0x46 },
879 { 0xd045, 0, 1, 0x00 },
880 { 0xd008, 0, 8, 0xdf },
881 { 0xd009, 0, 2, 0x02 },
882 { 0xd006, 0, 8, 0x44 },
883 { 0xd007, 0, 2, 0x01 },
884 { 0xd00c, 0, 8, 0x00 },
885 { 0xd00d, 0, 2, 0x02 },
886 { 0xd00a, 0, 8, 0xf6 },
887 { 0xd00b, 0, 2, 0x01 },
888 { 0x9bba, 0, 8, 0xf9 },
889 { 0x9bc8, 0, 8, 0xaa },
890 { 0x9bc3, 0, 8, 0xdf },
891 { 0x9bc4, 0, 8, 0x02 },
892 { 0x9bc5, 0, 8, 0x00 },
893 { 0x9bc6, 0, 8, 0x02 },
894 { 0x9bc9, 0, 8, 0xf0 },
895 { 0xd011, 0, 8, 0x3c },
896 { 0xd012, 0, 2, 0x01 },
897 { 0xd013, 0, 8, 0xf7 },
898 { 0xd014, 0, 2, 0x02 },
899 { 0xd040, 0, 8, 0x0b },
900 { 0xd041, 0, 2, 0x02 },
901 { 0xd042, 0, 8, 0x4d },
902 { 0xd043, 0, 2, 0x00 },
903 { 0xd045, 1, 1, 0x00 },
904 { 0x9bcf, 0, 1, 0x01 },
905 { 0xd045, 2, 1, 0x01 },
906 { 0xd04f, 0, 8, 0x9a },
907 { 0xd050, 0, 1, 0x01 },
908 { 0xd051, 0, 8, 0x5a },
909 { 0xd052, 0, 1, 0x01 },
910 { 0xd053, 0, 8, 0x50 },
911 { 0xd054, 0, 8, 0x46 },
912 { 0x9bd7, 0, 8, 0x0a },
913 { 0x9bd8, 0, 8, 0x14 },
914 { 0x9bd9, 0, 8, 0x08 },
915 { 0x9bd0, 0, 8, 0xa8 },
916 { 0x9be4, 0, 8, 0x7f },
917 { 0x9bbd, 0, 8, 0xa8 },
918 { 0x9be2, 0, 8, 0x20 },
919 { 0x9bee, 0, 1, 0x01 },
920};
921
Antti Palosaarif571e002011-11-28 20:58:11 -0300922#endif /* AF9013_PRIV_H */