blob: 8b9392cfc00dd13ddfb6d6834bbe370e6b474438 [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
Antti Palosaaria71103a2012-09-12 11:37:28 -030032#define AF9013_FIRMWARE "dvb-fe-af9013.fw"
Antti Palosaari825b9672008-09-15 15:01:52 -030033
Antti Palosaarif571e002011-11-28 20:58:11 -030034struct af9013_reg_bit {
Antti Palosaari825b9672008-09-15 15:01:52 -030035 u16 addr;
36 u8 pos:4;
37 u8 len:4;
38 u8 val;
39};
40
Antti Palosaarif571e002011-11-28 20:58:11 -030041struct af9013_snr {
Antti Palosaari825b9672008-09-15 15:01:52 -030042 u32 val;
43 u8 snr;
44};
45
Antti Palosaarif571e002011-11-28 20:58:11 -030046struct af9013_coeff {
47 u32 clock;
48 u32 bandwidth_hz;
Antti Palosaariedb709b2010-10-06 21:35:20 -030049 u8 val[24];
Antti Palosaari9b22edd2010-09-12 20:48:58 -030050};
51
Antti Palosaariedb709b2010-10-06 21:35:20 -030052/* pre-calculated coeff lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -030053static const struct af9013_coeff coeff_lut[] = {
Antti Palosaari9b22edd2010-09-12 20:48:58 -030054 /* 28.800 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030055 { 28800000, 8000000, { 0x02, 0x8a, 0x28, 0xa3, 0x05, 0x14,
Antti Palosaariedb709b2010-10-06 21:35:20 -030056 0x51, 0x11, 0x00, 0xa2, 0x8f, 0x3d, 0x00, 0xa2, 0x8a,
57 0x29, 0x00, 0xa2, 0x85, 0x14, 0x01, 0x45, 0x14, 0x14 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030058 { 28800000, 7000000, { 0x02, 0x38, 0xe3, 0x8e, 0x04, 0x71,
Antti Palosaariedb709b2010-10-06 21:35:20 -030059 0xc7, 0x07, 0x00, 0x8e, 0x3d, 0x55, 0x00, 0x8e, 0x38,
60 0xe4, 0x00, 0x8e, 0x34, 0x72, 0x01, 0x1c, 0x71, 0x32 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030061 { 28800000, 6000000, { 0x01, 0xe7, 0x9e, 0x7a, 0x03, 0xcf,
Antti Palosaariedb709b2010-10-06 21:35:20 -030062 0x3c, 0x3d, 0x00, 0x79, 0xeb, 0x6e, 0x00, 0x79, 0xe7,
63 0x9e, 0x00, 0x79, 0xe3, 0xcf, 0x00, 0xf3, 0xcf, 0x0f } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -030064 /* 20.480 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030065 { 20480000, 8000000, { 0x03, 0x92, 0x49, 0x26, 0x07, 0x24,
Antti Palosaariedb709b2010-10-06 21:35:20 -030066 0x92, 0x13, 0x00, 0xe4, 0x99, 0x6e, 0x00, 0xe4, 0x92,
67 0x49, 0x00, 0xe4, 0x8b, 0x25, 0x01, 0xc9, 0x24, 0x25 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030068 { 20480000, 7000000, { 0x03, 0x20, 0x00, 0x01, 0x06, 0x40,
Antti Palosaariedb709b2010-10-06 21:35:20 -030069 0x00, 0x00, 0x00, 0xc8, 0x06, 0x40, 0x00, 0xc8, 0x00,
70 0x00, 0x00, 0xc7, 0xf9, 0xc0, 0x01, 0x90, 0x00, 0x00 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030071 { 20480000, 6000000, { 0x02, 0xad, 0xb6, 0xdc, 0x05, 0x5b,
Antti Palosaariedb709b2010-10-06 21:35:20 -030072 0x6d, 0x2e, 0x00, 0xab, 0x73, 0x13, 0x00, 0xab, 0x6d,
73 0xb7, 0x00, 0xab, 0x68, 0x5c, 0x01, 0x56, 0xdb, 0x1c } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -030074 /* 28.000 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030075 { 28000000, 8000000, { 0x02, 0x9c, 0xbc, 0x15, 0x05, 0x39,
Antti Palosaariedb709b2010-10-06 21:35:20 -030076 0x78, 0x0a, 0x00, 0xa7, 0x34, 0x3f, 0x00, 0xa7, 0x2f,
77 0x05, 0x00, 0xa7, 0x29, 0xcc, 0x01, 0x4e, 0x5e, 0x03 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030078 { 28000000, 7000000, { 0x02, 0x49, 0x24, 0x92, 0x04, 0x92,
Antti Palosaariedb709b2010-10-06 21:35:20 -030079 0x49, 0x09, 0x00, 0x92, 0x4d, 0xb7, 0x00, 0x92, 0x49,
80 0x25, 0x00, 0x92, 0x44, 0x92, 0x01, 0x24, 0x92, 0x12 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030081 { 28000000, 6000000, { 0x01, 0xf5, 0x8d, 0x10, 0x03, 0xeb,
Antti Palosaariedb709b2010-10-06 21:35:20 -030082 0x1a, 0x08, 0x00, 0x7d, 0x67, 0x2f, 0x00, 0x7d, 0x63,
83 0x44, 0x00, 0x7d, 0x5f, 0x59, 0x00, 0xfa, 0xc6, 0x22 } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -030084 /* 25.000 MHz */
Antti Palosaarif571e002011-11-28 20:58:11 -030085 { 25000000, 8000000, { 0x02, 0xec, 0xfb, 0x9d, 0x05, 0xd9,
Antti Palosaariedb709b2010-10-06 21:35:20 -030086 0xf7, 0x0e, 0x00, 0xbb, 0x44, 0xc1, 0x00, 0xbb, 0x3e,
87 0xe7, 0x00, 0xbb, 0x39, 0x0d, 0x01, 0x76, 0x7d, 0x34 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030088 { 25000000, 7000000, { 0x02, 0x8f, 0x5c, 0x29, 0x05, 0x1e,
Antti Palosaariedb709b2010-10-06 21:35:20 -030089 0xb8, 0x14, 0x00, 0xa3, 0xdc, 0x29, 0x00, 0xa3, 0xd7,
90 0x0a, 0x00, 0xa3, 0xd1, 0xec, 0x01, 0x47, 0xae, 0x05 } },
Antti Palosaarif571e002011-11-28 20:58:11 -030091 { 25000000, 6000000, { 0x02, 0x31, 0xbc, 0xb5, 0x04, 0x63,
Antti Palosaariedb709b2010-10-06 21:35:20 -030092 0x79, 0x1b, 0x00, 0x8c, 0x73, 0x91, 0x00, 0x8c, 0x6f,
93 0x2d, 0x00, 0x8c, 0x6a, 0xca, 0x01, 0x18, 0xde, 0x17 } },
Antti Palosaari9b22edd2010-09-12 20:48:58 -030094};
95
Antti Palosaari825b9672008-09-15 15:01:52 -030096/* QPSK SNR lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -030097static const struct af9013_snr qpsk_snr_lut[] = {
98 { 0x000000, 0 },
Antti Palosaari825b9672008-09-15 15:01:52 -030099 { 0x0b4771, 0 },
100 { 0x0c1aed, 1 },
101 { 0x0d0d27, 2 },
102 { 0x0e4d19, 3 },
103 { 0x0e5da8, 4 },
104 { 0x107097, 5 },
105 { 0x116975, 6 },
106 { 0x1252d9, 7 },
107 { 0x131fa4, 8 },
108 { 0x13d5e1, 9 },
109 { 0x148e53, 10 },
110 { 0x15358b, 11 },
111 { 0x15dd29, 12 },
112 { 0x168112, 13 },
113 { 0x170b61, 14 },
114 { 0xffffff, 15 },
115};
116
117/* QAM16 SNR lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -0300118static const struct af9013_snr qam16_snr_lut[] = {
119 { 0x000000, 0 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300120 { 0x05eb62, 5 },
121 { 0x05fecf, 6 },
122 { 0x060b80, 7 },
123 { 0x062501, 8 },
124 { 0x064865, 9 },
125 { 0x069604, 10 },
126 { 0x06f356, 11 },
127 { 0x07706a, 12 },
128 { 0x0804d3, 13 },
129 { 0x089d1a, 14 },
130 { 0x093e3d, 15 },
131 { 0x09e35d, 16 },
132 { 0x0a7c3c, 17 },
133 { 0x0afaf8, 18 },
134 { 0x0b719d, 19 },
135 { 0xffffff, 20 },
136};
137
138/* QAM64 SNR lookup table */
Antti Palosaarif571e002011-11-28 20:58:11 -0300139static const struct af9013_snr qam64_snr_lut[] = {
140 { 0x000000, 0 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300141 { 0x03109b, 12 },
142 { 0x0310d4, 13 },
143 { 0x031920, 14 },
144 { 0x0322d0, 15 },
145 { 0x0339fc, 16 },
146 { 0x0364a1, 17 },
147 { 0x038bcc, 18 },
148 { 0x03c7d3, 19 },
149 { 0x0408cc, 20 },
150 { 0x043bed, 21 },
151 { 0x048061, 22 },
152 { 0x04be95, 23 },
153 { 0x04fa7d, 24 },
154 { 0x052405, 25 },
155 { 0x05570d, 26 },
156 { 0xffffff, 27 },
157};
158
Antti Palosaarif571e002011-11-28 20:58:11 -0300159static const struct af9013_reg_bit ofsm_init[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300160 { 0xd73a, 0, 8, 0xa1 },
161 { 0xd73b, 0, 8, 0x1f },
162 { 0xd73c, 4, 4, 0x0a },
163 { 0xd732, 3, 1, 0x00 },
164 { 0xd731, 4, 2, 0x03 },
165 { 0xd73d, 7, 1, 0x01 },
166 { 0xd740, 0, 1, 0x00 },
167 { 0xd740, 1, 1, 0x00 },
168 { 0xd740, 2, 1, 0x00 },
169 { 0xd740, 3, 1, 0x01 },
170 { 0xd3c1, 4, 1, 0x01 },
Antti Palosaari3b11f4e2010-05-14 13:59:50 -0300171 { 0x9124, 0, 8, 0x58 },
172 { 0x9125, 0, 2, 0x02 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300173 { 0xd3a2, 0, 8, 0x00 },
174 { 0xd3a3, 0, 8, 0x04 },
175 { 0xd305, 0, 8, 0x32 },
176 { 0xd306, 0, 8, 0x10 },
177 { 0xd304, 0, 8, 0x04 },
178 { 0x9112, 0, 1, 0x01 },
179 { 0x911d, 0, 1, 0x01 },
180 { 0x911a, 0, 1, 0x01 },
181 { 0x911b, 0, 1, 0x01 },
182 { 0x9bce, 0, 4, 0x02 },
183 { 0x9116, 0, 1, 0x01 },
Antti Palosaari3b11f4e2010-05-14 13:59:50 -0300184 { 0x9122, 0, 8, 0xd0 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300185 { 0xd2e0, 0, 8, 0xd0 },
186 { 0xd2e9, 0, 4, 0x0d },
187 { 0xd38c, 0, 8, 0xfc },
188 { 0xd38d, 0, 8, 0x00 },
189 { 0xd38e, 0, 8, 0x7e },
190 { 0xd38f, 0, 8, 0x00 },
191 { 0xd390, 0, 8, 0x2f },
192 { 0xd145, 4, 1, 0x01 },
193 { 0xd1a9, 4, 1, 0x01 },
194 { 0xd158, 5, 3, 0x01 },
195 { 0xd159, 0, 6, 0x06 },
196 { 0xd167, 0, 8, 0x00 },
197 { 0xd168, 0, 4, 0x07 },
198 { 0xd1c3, 5, 3, 0x00 },
199 { 0xd1c4, 0, 6, 0x00 },
200 { 0xd1c5, 0, 7, 0x10 },
201 { 0xd1c6, 0, 3, 0x02 },
202 { 0xd080, 2, 5, 0x03 },
203 { 0xd081, 4, 4, 0x09 },
204 { 0xd098, 4, 4, 0x0f },
205 { 0xd098, 0, 4, 0x03 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300206 { 0xdbc0, 4, 1, 0x01 },
207 { 0xdbc7, 0, 8, 0x08 },
208 { 0xdbc8, 4, 4, 0x00 },
209 { 0xdbc9, 0, 5, 0x01 },
210 { 0xd280, 0, 8, 0xe0 },
211 { 0xd281, 0, 8, 0xff },
212 { 0xd282, 0, 8, 0xff },
213 { 0xd283, 0, 8, 0xc3 },
214 { 0xd284, 0, 8, 0xff },
215 { 0xd285, 0, 4, 0x01 },
216 { 0xd0f0, 0, 7, 0x1a },
217 { 0xd0f1, 4, 1, 0x01 },
218 { 0xd0f2, 0, 8, 0x0c },
Antti Palosaari3b11f4e2010-05-14 13:59:50 -0300219 { 0xd101, 5, 3, 0x06 },
Antti Palosaari825b9672008-09-15 15:01:52 -0300220 { 0xd103, 0, 4, 0x08 },
221 { 0xd0f8, 0, 7, 0x20 },
222 { 0xd111, 5, 1, 0x00 },
223 { 0xd111, 6, 1, 0x00 },
224 { 0x910b, 0, 8, 0x0a },
225 { 0x9115, 0, 8, 0x02 },
226 { 0x910c, 0, 8, 0x02 },
227 { 0x910d, 0, 8, 0x08 },
228 { 0x910e, 0, 8, 0x0a },
229 { 0x9bf6, 0, 8, 0x06 },
230 { 0x9bf8, 0, 8, 0x02 },
231 { 0x9bf7, 0, 8, 0x05 },
232 { 0x9bf9, 0, 8, 0x0f },
233 { 0x9bfc, 0, 8, 0x13 },
234 { 0x9bd3, 0, 8, 0xff },
235 { 0x9bbe, 0, 1, 0x01 },
236 { 0x9bcc, 0, 1, 0x01 },
237};
238
239/* Panasonic ENV77H11D5 tuner init
240 AF9013_TUNER_ENV77H11D5 = 129 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300241static const struct af9013_reg_bit tuner_init_env77h11d5[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300242 { 0x9bd5, 0, 8, 0x01 },
243 { 0x9bd6, 0, 8, 0x03 },
244 { 0x9bbe, 0, 8, 0x01 },
245 { 0xd1a0, 1, 1, 0x01 },
246 { 0xd000, 0, 1, 0x01 },
247 { 0xd000, 1, 1, 0x00 },
248 { 0xd001, 1, 1, 0x01 },
249 { 0xd001, 0, 1, 0x00 },
250 { 0xd001, 5, 1, 0x00 },
251 { 0xd002, 0, 5, 0x19 },
252 { 0xd003, 0, 5, 0x1a },
253 { 0xd004, 0, 5, 0x19 },
254 { 0xd005, 0, 5, 0x1a },
255 { 0xd00e, 0, 5, 0x10 },
256 { 0xd00f, 0, 3, 0x04 },
257 { 0xd00f, 3, 3, 0x05 },
258 { 0xd010, 0, 3, 0x04 },
259 { 0xd010, 3, 3, 0x05 },
260 { 0xd016, 4, 4, 0x03 },
261 { 0xd01f, 0, 6, 0x0a },
262 { 0xd020, 0, 6, 0x0a },
263 { 0x9bda, 0, 8, 0x00 },
264 { 0x9be3, 0, 8, 0x00 },
265 { 0xd015, 0, 8, 0x50 },
266 { 0xd016, 0, 1, 0x00 },
267 { 0xd044, 0, 8, 0x46 },
268 { 0xd045, 0, 1, 0x00 },
269 { 0xd008, 0, 8, 0xdf },
270 { 0xd009, 0, 2, 0x02 },
271 { 0xd006, 0, 8, 0x44 },
272 { 0xd007, 0, 2, 0x01 },
273 { 0xd00c, 0, 8, 0xeb },
274 { 0xd00d, 0, 2, 0x02 },
275 { 0xd00a, 0, 8, 0xf4 },
276 { 0xd00b, 0, 2, 0x01 },
277 { 0x9bba, 0, 8, 0xf9 },
278 { 0x9bc3, 0, 8, 0xdf },
279 { 0x9bc4, 0, 8, 0x02 },
280 { 0x9bc5, 0, 8, 0xeb },
281 { 0x9bc6, 0, 8, 0x02 },
282 { 0x9bc9, 0, 8, 0x52 },
283 { 0xd011, 0, 8, 0x3c },
284 { 0xd012, 0, 2, 0x01 },
285 { 0xd013, 0, 8, 0xf7 },
286 { 0xd014, 0, 2, 0x02 },
287 { 0xd040, 0, 8, 0x0b },
288 { 0xd041, 0, 2, 0x02 },
289 { 0xd042, 0, 8, 0x4d },
290 { 0xd043, 0, 2, 0x00 },
291 { 0xd045, 1, 1, 0x00 },
292 { 0x9bcf, 0, 1, 0x01 },
293 { 0xd045, 2, 1, 0x01 },
294 { 0xd04f, 0, 8, 0x9a },
295 { 0xd050, 0, 1, 0x01 },
296 { 0xd051, 0, 8, 0x5a },
297 { 0xd052, 0, 1, 0x01 },
298 { 0xd053, 0, 8, 0x50 },
299 { 0xd054, 0, 8, 0x46 },
300 { 0x9bd7, 0, 8, 0x0a },
301 { 0x9bd8, 0, 8, 0x14 },
302 { 0x9bd9, 0, 8, 0x08 },
303};
304
305/* Microtune MT2060 tuner init
306 AF9013_TUNER_MT2060 = 130 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300307static const struct af9013_reg_bit tuner_init_mt2060[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300308 { 0x9bd5, 0, 8, 0x01 },
309 { 0x9bd6, 0, 8, 0x07 },
310 { 0xd1a0, 1, 1, 0x01 },
311 { 0xd000, 0, 1, 0x01 },
312 { 0xd000, 1, 1, 0x00 },
313 { 0xd001, 1, 1, 0x01 },
314 { 0xd001, 0, 1, 0x00 },
315 { 0xd001, 5, 1, 0x00 },
316 { 0xd002, 0, 5, 0x19 },
317 { 0xd003, 0, 5, 0x1a },
318 { 0xd004, 0, 5, 0x19 },
319 { 0xd005, 0, 5, 0x1a },
320 { 0xd00e, 0, 5, 0x10 },
321 { 0xd00f, 0, 3, 0x04 },
322 { 0xd00f, 3, 3, 0x05 },
323 { 0xd010, 0, 3, 0x04 },
324 { 0xd010, 3, 3, 0x05 },
325 { 0xd016, 4, 4, 0x03 },
326 { 0xd01f, 0, 6, 0x0a },
327 { 0xd020, 0, 6, 0x0a },
328 { 0x9bda, 0, 8, 0x00 },
329 { 0x9be3, 0, 8, 0x00 },
330 { 0x9bbe, 0, 1, 0x00 },
331 { 0x9bcc, 0, 1, 0x00 },
332 { 0x9bb9, 0, 8, 0x75 },
333 { 0x9bcd, 0, 8, 0x24 },
334 { 0x9bff, 0, 8, 0x30 },
335 { 0xd015, 0, 8, 0x46 },
336 { 0xd016, 0, 1, 0x00 },
337 { 0xd044, 0, 8, 0x46 },
338 { 0xd045, 0, 1, 0x00 },
339 { 0xd008, 0, 8, 0x0f },
340 { 0xd009, 0, 2, 0x02 },
341 { 0xd006, 0, 8, 0x32 },
342 { 0xd007, 0, 2, 0x01 },
343 { 0xd00c, 0, 8, 0x36 },
344 { 0xd00d, 0, 2, 0x03 },
345 { 0xd00a, 0, 8, 0x35 },
346 { 0xd00b, 0, 2, 0x01 },
347 { 0x9bc7, 0, 8, 0x07 },
348 { 0x9bc8, 0, 8, 0x90 },
349 { 0x9bc3, 0, 8, 0x0f },
350 { 0x9bc4, 0, 8, 0x02 },
351 { 0x9bc5, 0, 8, 0x36 },
352 { 0x9bc6, 0, 8, 0x03 },
353 { 0x9bba, 0, 8, 0xc9 },
354 { 0x9bc9, 0, 8, 0x79 },
355 { 0xd011, 0, 8, 0x10 },
356 { 0xd012, 0, 2, 0x01 },
357 { 0xd013, 0, 8, 0x45 },
358 { 0xd014, 0, 2, 0x03 },
359 { 0xd040, 0, 8, 0x98 },
360 { 0xd041, 0, 2, 0x00 },
361 { 0xd042, 0, 8, 0xcf },
362 { 0xd043, 0, 2, 0x03 },
363 { 0xd045, 1, 1, 0x00 },
364 { 0x9bcf, 0, 1, 0x01 },
365 { 0xd045, 2, 1, 0x01 },
366 { 0xd04f, 0, 8, 0x9a },
367 { 0xd050, 0, 1, 0x01 },
368 { 0xd051, 0, 8, 0x5a },
369 { 0xd052, 0, 1, 0x01 },
370 { 0xd053, 0, 8, 0x50 },
371 { 0xd054, 0, 8, 0x46 },
372 { 0x9bd7, 0, 8, 0x0a },
373 { 0x9bd8, 0, 8, 0x14 },
374 { 0x9bd9, 0, 8, 0x08 },
375 { 0x9bd0, 0, 8, 0xcc },
376 { 0x9be4, 0, 8, 0xa0 },
377 { 0x9bbd, 0, 8, 0x8e },
378 { 0x9be2, 0, 8, 0x4d },
379 { 0x9bee, 0, 1, 0x01 },
380};
381
382/* Microtune MT2060 tuner init
383 AF9013_TUNER_MT2060_2 = 147 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300384static const struct af9013_reg_bit tuner_init_mt2060_2[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300385 { 0x9bd5, 0, 8, 0x01 },
386 { 0x9bd6, 0, 8, 0x06 },
387 { 0x9bbe, 0, 8, 0x01 },
388 { 0xd1a0, 1, 1, 0x01 },
389 { 0xd000, 0, 1, 0x01 },
390 { 0xd000, 1, 1, 0x00 },
391 { 0xd001, 1, 1, 0x01 },
392 { 0xd001, 0, 1, 0x00 },
393 { 0xd001, 5, 1, 0x00 },
394 { 0xd002, 0, 5, 0x19 },
395 { 0xd003, 0, 5, 0x1a },
396 { 0xd004, 0, 5, 0x19 },
397 { 0xd005, 0, 5, 0x1a },
398 { 0xd00e, 0, 5, 0x10 },
399 { 0xd00f, 0, 3, 0x04 },
400 { 0xd00f, 3, 3, 0x05 },
401 { 0xd010, 0, 3, 0x04 },
402 { 0xd010, 3, 3, 0x05 },
403 { 0xd016, 4, 4, 0x03 },
404 { 0xd01f, 0, 6, 0x0a },
405 { 0xd020, 0, 6, 0x0a },
406 { 0xd015, 0, 8, 0x46 },
407 { 0xd016, 0, 1, 0x00 },
408 { 0xd044, 0, 8, 0x46 },
409 { 0xd045, 0, 1, 0x00 },
410 { 0xd008, 0, 8, 0x0f },
411 { 0xd009, 0, 2, 0x02 },
412 { 0xd006, 0, 8, 0x32 },
413 { 0xd007, 0, 2, 0x01 },
414 { 0xd00c, 0, 8, 0x36 },
415 { 0xd00d, 0, 2, 0x03 },
416 { 0xd00a, 0, 8, 0x35 },
417 { 0xd00b, 0, 2, 0x01 },
418 { 0x9bc7, 0, 8, 0x07 },
419 { 0x9bc8, 0, 8, 0x90 },
420 { 0x9bc3, 0, 8, 0x0f },
421 { 0x9bc4, 0, 8, 0x02 },
422 { 0x9bc5, 0, 8, 0x36 },
423 { 0x9bc6, 0, 8, 0x03 },
424 { 0x9bba, 0, 8, 0xc9 },
425 { 0x9bc9, 0, 8, 0x79 },
426 { 0xd011, 0, 8, 0x10 },
427 { 0xd012, 0, 2, 0x01 },
428 { 0xd013, 0, 8, 0x45 },
429 { 0xd014, 0, 2, 0x03 },
430 { 0xd040, 0, 8, 0x98 },
431 { 0xd041, 0, 2, 0x00 },
432 { 0xd042, 0, 8, 0xcf },
433 { 0xd043, 0, 2, 0x03 },
434 { 0xd045, 1, 1, 0x00 },
435 { 0x9bcf, 0, 8, 0x01 },
436 { 0xd045, 2, 1, 0x01 },
437 { 0xd04f, 0, 8, 0x9a },
438 { 0xd050, 0, 1, 0x01 },
439 { 0xd051, 0, 8, 0x5a },
440 { 0xd052, 0, 1, 0x01 },
441 { 0xd053, 0, 8, 0x96 },
442 { 0xd054, 0, 8, 0x46 },
443 { 0xd045, 7, 1, 0x00 },
444 { 0x9bd7, 0, 8, 0x0a },
445 { 0x9bd8, 0, 8, 0x14 },
446 { 0x9bd9, 0, 8, 0x08 },
447};
448
449/* MaxLinear MXL5003 tuner init
450 AF9013_TUNER_MXL5003D = 3 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300451static const struct af9013_reg_bit tuner_init_mxl5003d[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300452 { 0x9bd5, 0, 8, 0x01 },
453 { 0x9bd6, 0, 8, 0x09 },
454 { 0xd1a0, 1, 1, 0x01 },
455 { 0xd000, 0, 1, 0x01 },
456 { 0xd000, 1, 1, 0x00 },
457 { 0xd001, 1, 1, 0x01 },
458 { 0xd001, 0, 1, 0x00 },
459 { 0xd001, 5, 1, 0x00 },
460 { 0xd002, 0, 5, 0x19 },
461 { 0xd003, 0, 5, 0x1a },
462 { 0xd004, 0, 5, 0x19 },
463 { 0xd005, 0, 5, 0x1a },
464 { 0xd00e, 0, 5, 0x10 },
465 { 0xd00f, 0, 3, 0x04 },
466 { 0xd00f, 3, 3, 0x05 },
467 { 0xd010, 0, 3, 0x04 },
468 { 0xd010, 3, 3, 0x05 },
469 { 0xd016, 4, 4, 0x03 },
470 { 0xd01f, 0, 6, 0x0a },
471 { 0xd020, 0, 6, 0x0a },
472 { 0x9bda, 0, 8, 0x00 },
473 { 0x9be3, 0, 8, 0x00 },
474 { 0x9bfc, 0, 8, 0x0f },
475 { 0x9bf6, 0, 8, 0x01 },
476 { 0x9bbe, 0, 1, 0x01 },
477 { 0xd015, 0, 8, 0x33 },
478 { 0xd016, 0, 1, 0x00 },
479 { 0xd044, 0, 8, 0x40 },
480 { 0xd045, 0, 1, 0x00 },
481 { 0xd008, 0, 8, 0x0f },
482 { 0xd009, 0, 2, 0x02 },
483 { 0xd006, 0, 8, 0x6c },
484 { 0xd007, 0, 2, 0x00 },
485 { 0xd00c, 0, 8, 0x3d },
486 { 0xd00d, 0, 2, 0x00 },
487 { 0xd00a, 0, 8, 0x45 },
488 { 0xd00b, 0, 2, 0x01 },
489 { 0x9bc7, 0, 8, 0x07 },
490 { 0x9bc8, 0, 8, 0x52 },
491 { 0x9bc3, 0, 8, 0x0f },
492 { 0x9bc4, 0, 8, 0x02 },
493 { 0x9bc5, 0, 8, 0x3d },
494 { 0x9bc6, 0, 8, 0x00 },
495 { 0x9bba, 0, 8, 0xa2 },
496 { 0x9bc9, 0, 8, 0xa0 },
497 { 0xd011, 0, 8, 0x56 },
498 { 0xd012, 0, 2, 0x00 },
499 { 0xd013, 0, 8, 0x50 },
500 { 0xd014, 0, 2, 0x00 },
501 { 0xd040, 0, 8, 0x56 },
502 { 0xd041, 0, 2, 0x00 },
503 { 0xd042, 0, 8, 0x50 },
504 { 0xd043, 0, 2, 0x00 },
505 { 0xd045, 1, 1, 0x00 },
506 { 0x9bcf, 0, 8, 0x01 },
507 { 0xd045, 2, 1, 0x01 },
508 { 0xd04f, 0, 8, 0x9a },
509 { 0xd050, 0, 1, 0x01 },
510 { 0xd051, 0, 8, 0x5a },
511 { 0xd052, 0, 1, 0x01 },
512 { 0xd053, 0, 8, 0x50 },
513 { 0xd054, 0, 8, 0x46 },
514 { 0x9bd7, 0, 8, 0x0a },
515 { 0x9bd8, 0, 8, 0x14 },
516 { 0x9bd9, 0, 8, 0x08 },
517};
518
Antti Palosaaria4f31d02010-09-09 14:53:59 -0300519/* MaxLinear MXL5005S & MXL5007T tuner init
Antti Palosaari825b9672008-09-15 15:01:52 -0300520 AF9013_TUNER_MXL5005D = 13
Antti Palosaaria4f31d02010-09-09 14:53:59 -0300521 AF9013_TUNER_MXL5005R = 30
522 AF9013_TUNER_MXL5007T = 177 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300523static const struct af9013_reg_bit tuner_init_mxl5005[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300524 { 0x9bd5, 0, 8, 0x01 },
525 { 0x9bd6, 0, 8, 0x07 },
526 { 0xd1a0, 1, 1, 0x01 },
527 { 0xd000, 0, 1, 0x01 },
528 { 0xd000, 1, 1, 0x00 },
529 { 0xd001, 1, 1, 0x01 },
530 { 0xd001, 0, 1, 0x00 },
531 { 0xd001, 5, 1, 0x00 },
532 { 0xd002, 0, 5, 0x19 },
533 { 0xd003, 0, 5, 0x1a },
534 { 0xd004, 0, 5, 0x19 },
535 { 0xd005, 0, 5, 0x1a },
536 { 0xd00e, 0, 5, 0x10 },
537 { 0xd00f, 0, 3, 0x04 },
538 { 0xd00f, 3, 3, 0x05 },
539 { 0xd010, 0, 3, 0x04 },
540 { 0xd010, 3, 3, 0x05 },
541 { 0xd016, 4, 4, 0x03 },
542 { 0xd01f, 0, 6, 0x0a },
543 { 0xd020, 0, 6, 0x0a },
544 { 0x9bda, 0, 8, 0x01 },
545 { 0x9be3, 0, 8, 0x01 },
546 { 0x9bbe, 0, 1, 0x01 },
547 { 0x9bcc, 0, 1, 0x01 },
548 { 0x9bb9, 0, 8, 0x00 },
549 { 0x9bcd, 0, 8, 0x28 },
550 { 0x9bff, 0, 8, 0x24 },
551 { 0xd015, 0, 8, 0x40 },
552 { 0xd016, 0, 1, 0x00 },
553 { 0xd044, 0, 8, 0x40 },
554 { 0xd045, 0, 1, 0x00 },
555 { 0xd008, 0, 8, 0x0f },
556 { 0xd009, 0, 2, 0x02 },
557 { 0xd006, 0, 8, 0x73 },
558 { 0xd007, 0, 2, 0x01 },
559 { 0xd00c, 0, 8, 0xfa },
560 { 0xd00d, 0, 2, 0x01 },
561 { 0xd00a, 0, 8, 0xff },
562 { 0xd00b, 0, 2, 0x01 },
563 { 0x9bc7, 0, 8, 0x23 },
564 { 0x9bc8, 0, 8, 0x55 },
565 { 0x9bc3, 0, 8, 0x01 },
566 { 0x9bc4, 0, 8, 0x02 },
567 { 0x9bc5, 0, 8, 0xfa },
568 { 0x9bc6, 0, 8, 0x01 },
569 { 0x9bba, 0, 8, 0xff },
570 { 0x9bc9, 0, 8, 0xff },
571 { 0x9bd3, 0, 8, 0x95 },
572 { 0xd011, 0, 8, 0x70 },
573 { 0xd012, 0, 2, 0x01 },
574 { 0xd013, 0, 8, 0xfb },
575 { 0xd014, 0, 2, 0x01 },
576 { 0xd040, 0, 8, 0x70 },
577 { 0xd041, 0, 2, 0x01 },
578 { 0xd042, 0, 8, 0xfb },
579 { 0xd043, 0, 2, 0x01 },
580 { 0xd045, 1, 1, 0x00 },
581 { 0x9bcf, 0, 1, 0x01 },
582 { 0xd045, 2, 1, 0x01 },
583 { 0xd04f, 0, 8, 0x9a },
584 { 0xd050, 0, 1, 0x01 },
585 { 0xd051, 0, 8, 0x5a },
586 { 0xd052, 0, 1, 0x01 },
587 { 0xd053, 0, 8, 0x50 },
588 { 0xd054, 0, 8, 0x46 },
589 { 0x9bd7, 0, 8, 0x0a },
590 { 0x9bd8, 0, 8, 0x14 },
591 { 0x9bd9, 0, 8, 0x08 },
592 { 0x9bd0, 0, 8, 0x93 },
593 { 0x9be4, 0, 8, 0xfe },
594 { 0x9bbd, 0, 8, 0x63 },
595 { 0x9be2, 0, 8, 0xfe },
596 { 0x9bee, 0, 1, 0x01 },
597};
598
599/* Quantek QT1010 tuner init
600 AF9013_TUNER_QT1010 = 134
601 AF9013_TUNER_QT1010A = 162 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300602static const struct af9013_reg_bit tuner_init_qt1010[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300603 { 0x9bd5, 0, 8, 0x01 },
604 { 0x9bd6, 0, 8, 0x09 },
605 { 0xd1a0, 1, 1, 0x01 },
606 { 0xd000, 0, 1, 0x01 },
607 { 0xd000, 1, 1, 0x00 },
608 { 0xd001, 1, 1, 0x01 },
609 { 0xd001, 0, 1, 0x00 },
610 { 0xd001, 5, 1, 0x00 },
611 { 0xd002, 0, 5, 0x19 },
612 { 0xd003, 0, 5, 0x1a },
613 { 0xd004, 0, 5, 0x19 },
614 { 0xd005, 0, 5, 0x1a },
615 { 0xd00e, 0, 5, 0x10 },
616 { 0xd00f, 0, 3, 0x04 },
617 { 0xd00f, 3, 3, 0x05 },
618 { 0xd010, 0, 3, 0x04 },
619 { 0xd010, 3, 3, 0x05 },
620 { 0xd016, 4, 4, 0x03 },
621 { 0xd01f, 0, 6, 0x0a },
622 { 0xd020, 0, 6, 0x0a },
623 { 0x9bda, 0, 8, 0x01 },
624 { 0x9be3, 0, 8, 0x01 },
625 { 0xd015, 0, 8, 0x46 },
626 { 0xd016, 0, 1, 0x00 },
627 { 0xd044, 0, 8, 0x46 },
628 { 0xd045, 0, 1, 0x00 },
629 { 0x9bbe, 0, 1, 0x01 },
630 { 0x9bcc, 0, 1, 0x01 },
631 { 0x9bb9, 0, 8, 0x00 },
632 { 0x9bcd, 0, 8, 0x28 },
633 { 0x9bff, 0, 8, 0x20 },
634 { 0xd008, 0, 8, 0x0f },
635 { 0xd009, 0, 2, 0x02 },
636 { 0xd006, 0, 8, 0x99 },
637 { 0xd007, 0, 2, 0x01 },
638 { 0xd00c, 0, 8, 0x0f },
639 { 0xd00d, 0, 2, 0x02 },
640 { 0xd00a, 0, 8, 0x50 },
641 { 0xd00b, 0, 2, 0x01 },
642 { 0x9bc7, 0, 8, 0x00 },
643 { 0x9bc8, 0, 8, 0x00 },
644 { 0x9bc3, 0, 8, 0x0f },
645 { 0x9bc4, 0, 8, 0x02 },
646 { 0x9bc5, 0, 8, 0x0f },
647 { 0x9bc6, 0, 8, 0x02 },
648 { 0x9bba, 0, 8, 0xc5 },
649 { 0x9bc9, 0, 8, 0xff },
650 { 0xd011, 0, 8, 0x58 },
651 { 0xd012, 0, 2, 0x02 },
652 { 0xd013, 0, 8, 0x89 },
653 { 0xd014, 0, 2, 0x01 },
654 { 0xd040, 0, 8, 0x58 },
655 { 0xd041, 0, 2, 0x02 },
656 { 0xd042, 0, 8, 0x89 },
657 { 0xd043, 0, 2, 0x01 },
658 { 0xd045, 1, 1, 0x00 },
659 { 0x9bcf, 0, 1, 0x01 },
660 { 0xd045, 2, 1, 0x01 },
661 { 0xd04f, 0, 8, 0x9a },
662 { 0xd050, 0, 1, 0x01 },
663 { 0xd051, 0, 8, 0x5a },
664 { 0xd052, 0, 1, 0x01 },
665 { 0xd053, 0, 8, 0x50 },
666 { 0xd054, 0, 8, 0x46 },
667 { 0x9bd7, 0, 8, 0x0a },
668 { 0x9bd8, 0, 8, 0x14 },
669 { 0x9bd9, 0, 8, 0x08 },
670 { 0x9bd0, 0, 8, 0xcd },
671 { 0x9be4, 0, 8, 0xbb },
672 { 0x9bbd, 0, 8, 0x93 },
673 { 0x9be2, 0, 8, 0x80 },
674 { 0x9bee, 0, 1, 0x01 },
675};
676
677/* Freescale MC44S803 tuner init
678 AF9013_TUNER_MC44S803 = 133 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300679static const struct af9013_reg_bit tuner_init_mc44s803[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300680 { 0x9bd5, 0, 8, 0x01 },
681 { 0x9bd6, 0, 8, 0x06 },
682 { 0xd1a0, 1, 1, 0x01 },
683 { 0xd000, 0, 1, 0x01 },
684 { 0xd000, 1, 1, 0x00 },
685 { 0xd001, 1, 1, 0x01 },
686 { 0xd001, 0, 1, 0x00 },
687 { 0xd001, 5, 1, 0x00 },
688 { 0xd002, 0, 5, 0x19 },
689 { 0xd003, 0, 5, 0x1a },
690 { 0xd004, 0, 5, 0x19 },
691 { 0xd005, 0, 5, 0x1a },
692 { 0xd00e, 0, 5, 0x10 },
693 { 0xd00f, 0, 3, 0x04 },
694 { 0xd00f, 3, 3, 0x05 },
695 { 0xd010, 0, 3, 0x04 },
696 { 0xd010, 3, 3, 0x05 },
697 { 0xd016, 4, 4, 0x03 },
698 { 0xd01f, 0, 6, 0x0a },
699 { 0xd020, 0, 6, 0x0a },
700 { 0x9bda, 0, 8, 0x00 },
701 { 0x9be3, 0, 8, 0x00 },
702 { 0x9bf6, 0, 8, 0x01 },
703 { 0x9bf8, 0, 8, 0x02 },
704 { 0x9bf9, 0, 8, 0x02 },
705 { 0x9bfc, 0, 8, 0x1f },
706 { 0x9bbe, 0, 1, 0x01 },
707 { 0x9bcc, 0, 1, 0x01 },
708 { 0x9bb9, 0, 8, 0x00 },
709 { 0x9bcd, 0, 8, 0x24 },
710 { 0x9bff, 0, 8, 0x24 },
711 { 0xd015, 0, 8, 0x46 },
712 { 0xd016, 0, 1, 0x00 },
713 { 0xd044, 0, 8, 0x46 },
714 { 0xd045, 0, 1, 0x00 },
715 { 0xd008, 0, 8, 0x01 },
716 { 0xd009, 0, 2, 0x02 },
717 { 0xd006, 0, 8, 0x7b },
718 { 0xd007, 0, 2, 0x00 },
719 { 0xd00c, 0, 8, 0x7c },
720 { 0xd00d, 0, 2, 0x02 },
721 { 0xd00a, 0, 8, 0xfe },
722 { 0xd00b, 0, 2, 0x01 },
723 { 0x9bc7, 0, 8, 0x08 },
724 { 0x9bc8, 0, 8, 0x9a },
725 { 0x9bc3, 0, 8, 0x01 },
726 { 0x9bc4, 0, 8, 0x02 },
727 { 0x9bc5, 0, 8, 0x7c },
728 { 0x9bc6, 0, 8, 0x02 },
729 { 0x9bba, 0, 8, 0xfc },
730 { 0x9bc9, 0, 8, 0xaa },
731 { 0xd011, 0, 8, 0x6b },
732 { 0xd012, 0, 2, 0x00 },
733 { 0xd013, 0, 8, 0x88 },
734 { 0xd014, 0, 2, 0x02 },
735 { 0xd040, 0, 8, 0x6b },
736 { 0xd041, 0, 2, 0x00 },
737 { 0xd042, 0, 8, 0x7c },
738 { 0xd043, 0, 2, 0x02 },
739 { 0xd045, 1, 1, 0x00 },
740 { 0x9bcf, 0, 1, 0x01 },
741 { 0xd045, 2, 1, 0x01 },
742 { 0xd04f, 0, 8, 0x9a },
743 { 0xd050, 0, 1, 0x01 },
744 { 0xd051, 0, 8, 0x5a },
745 { 0xd052, 0, 1, 0x01 },
746 { 0xd053, 0, 8, 0x50 },
747 { 0xd054, 0, 8, 0x46 },
748 { 0x9bd7, 0, 8, 0x0a },
749 { 0x9bd8, 0, 8, 0x14 },
750 { 0x9bd9, 0, 8, 0x08 },
751 { 0x9bd0, 0, 8, 0x9e },
752 { 0x9be4, 0, 8, 0xff },
753 { 0x9bbd, 0, 8, 0x9e },
754 { 0x9be2, 0, 8, 0x25 },
755 { 0x9bee, 0, 1, 0x01 },
756 { 0xd73b, 3, 1, 0x00 },
757};
758
759/* unknown, probably for tin can tuner, tuner init
760 AF9013_TUNER_UNKNOWN = 140 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300761static const struct af9013_reg_bit tuner_init_unknown[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300762 { 0x9bd5, 0, 8, 0x01 },
763 { 0x9bd6, 0, 8, 0x02 },
764 { 0xd1a0, 1, 1, 0x01 },
765 { 0xd000, 0, 1, 0x01 },
766 { 0xd000, 1, 1, 0x00 },
767 { 0xd001, 1, 1, 0x01 },
768 { 0xd001, 0, 1, 0x00 },
769 { 0xd001, 5, 1, 0x00 },
770 { 0xd002, 0, 5, 0x19 },
771 { 0xd003, 0, 5, 0x1a },
772 { 0xd004, 0, 5, 0x19 },
773 { 0xd005, 0, 5, 0x1a },
774 { 0xd00e, 0, 5, 0x10 },
775 { 0xd00f, 0, 3, 0x04 },
776 { 0xd00f, 3, 3, 0x05 },
777 { 0xd010, 0, 3, 0x04 },
778 { 0xd010, 3, 3, 0x05 },
779 { 0xd016, 4, 4, 0x03 },
780 { 0xd01f, 0, 6, 0x0a },
781 { 0xd020, 0, 6, 0x0a },
782 { 0x9bda, 0, 8, 0x01 },
783 { 0x9be3, 0, 8, 0x01 },
784 { 0xd1a0, 1, 1, 0x00 },
785 { 0x9bbe, 0, 1, 0x01 },
786 { 0x9bcc, 0, 1, 0x01 },
787 { 0x9bb9, 0, 8, 0x00 },
788 { 0x9bcd, 0, 8, 0x18 },
789 { 0x9bff, 0, 8, 0x2c },
790 { 0xd015, 0, 8, 0x46 },
791 { 0xd016, 0, 1, 0x00 },
792 { 0xd044, 0, 8, 0x46 },
793 { 0xd045, 0, 1, 0x00 },
794 { 0xd008, 0, 8, 0xdf },
795 { 0xd009, 0, 2, 0x02 },
796 { 0xd006, 0, 8, 0x44 },
797 { 0xd007, 0, 2, 0x01 },
798 { 0xd00c, 0, 8, 0x00 },
799 { 0xd00d, 0, 2, 0x02 },
800 { 0xd00a, 0, 8, 0xf6 },
801 { 0xd00b, 0, 2, 0x01 },
802 { 0x9bba, 0, 8, 0xf9 },
803 { 0x9bc8, 0, 8, 0xaa },
804 { 0x9bc3, 0, 8, 0xdf },
805 { 0x9bc4, 0, 8, 0x02 },
806 { 0x9bc5, 0, 8, 0x00 },
807 { 0x9bc6, 0, 8, 0x02 },
808 { 0x9bc9, 0, 8, 0xf0 },
809 { 0xd011, 0, 8, 0x3c },
810 { 0xd012, 0, 2, 0x01 },
811 { 0xd013, 0, 8, 0xf7 },
812 { 0xd014, 0, 2, 0x02 },
813 { 0xd040, 0, 8, 0x0b },
814 { 0xd041, 0, 2, 0x02 },
815 { 0xd042, 0, 8, 0x4d },
816 { 0xd043, 0, 2, 0x00 },
817 { 0xd045, 1, 1, 0x00 },
818 { 0x9bcf, 0, 1, 0x01 },
819 { 0xd045, 2, 1, 0x01 },
820 { 0xd04f, 0, 8, 0x9a },
821 { 0xd050, 0, 1, 0x01 },
822 { 0xd051, 0, 8, 0x5a },
823 { 0xd052, 0, 1, 0x01 },
824 { 0xd053, 0, 8, 0x50 },
825 { 0xd054, 0, 8, 0x46 },
826 { 0x9bd7, 0, 8, 0x0a },
827 { 0x9bd8, 0, 8, 0x14 },
828 { 0x9bd9, 0, 8, 0x08 },
829};
830
Antti Palosaari2158e502010-08-13 03:49:24 -0300831/* NXP TDA18271 & TDA18218 tuner init
832 AF9013_TUNER_TDA18271 = 156
833 AF9013_TUNER_TDA18218 = 179 */
Antti Palosaarif571e002011-11-28 20:58:11 -0300834static const struct af9013_reg_bit tuner_init_tda18271[] = {
Antti Palosaari825b9672008-09-15 15:01:52 -0300835 { 0x9bd5, 0, 8, 0x01 },
836 { 0x9bd6, 0, 8, 0x04 },
837 { 0xd1a0, 1, 1, 0x01 },
838 { 0xd000, 0, 1, 0x01 },
839 { 0xd000, 1, 1, 0x00 },
840 { 0xd001, 1, 1, 0x01 },
841 { 0xd001, 0, 1, 0x00 },
842 { 0xd001, 5, 1, 0x00 },
843 { 0xd002, 0, 5, 0x19 },
844 { 0xd003, 0, 5, 0x1a },
845 { 0xd004, 0, 5, 0x19 },
846 { 0xd005, 0, 5, 0x1a },
847 { 0xd00e, 0, 5, 0x10 },
848 { 0xd00f, 0, 3, 0x04 },
849 { 0xd00f, 3, 3, 0x05 },
850 { 0xd010, 0, 3, 0x04 },
851 { 0xd010, 3, 3, 0x05 },
852 { 0xd016, 4, 4, 0x03 },
853 { 0xd01f, 0, 6, 0x0a },
854 { 0xd020, 0, 6, 0x0a },
855 { 0x9bda, 0, 8, 0x01 },
856 { 0x9be3, 0, 8, 0x01 },
857 { 0xd1a0, 1, 1, 0x00 },
858 { 0x9bbe, 0, 1, 0x01 },
859 { 0x9bcc, 0, 1, 0x01 },
860 { 0x9bb9, 0, 8, 0x00 },
861 { 0x9bcd, 0, 8, 0x18 },
862 { 0x9bff, 0, 8, 0x2c },
863 { 0xd015, 0, 8, 0x46 },
864 { 0xd016, 0, 1, 0x00 },
865 { 0xd044, 0, 8, 0x46 },
866 { 0xd045, 0, 1, 0x00 },
867 { 0xd008, 0, 8, 0xdf },
868 { 0xd009, 0, 2, 0x02 },
869 { 0xd006, 0, 8, 0x44 },
870 { 0xd007, 0, 2, 0x01 },
871 { 0xd00c, 0, 8, 0x00 },
872 { 0xd00d, 0, 2, 0x02 },
873 { 0xd00a, 0, 8, 0xf6 },
874 { 0xd00b, 0, 2, 0x01 },
875 { 0x9bba, 0, 8, 0xf9 },
876 { 0x9bc8, 0, 8, 0xaa },
877 { 0x9bc3, 0, 8, 0xdf },
878 { 0x9bc4, 0, 8, 0x02 },
879 { 0x9bc5, 0, 8, 0x00 },
880 { 0x9bc6, 0, 8, 0x02 },
881 { 0x9bc9, 0, 8, 0xf0 },
882 { 0xd011, 0, 8, 0x3c },
883 { 0xd012, 0, 2, 0x01 },
884 { 0xd013, 0, 8, 0xf7 },
885 { 0xd014, 0, 2, 0x02 },
886 { 0xd040, 0, 8, 0x0b },
887 { 0xd041, 0, 2, 0x02 },
888 { 0xd042, 0, 8, 0x4d },
889 { 0xd043, 0, 2, 0x00 },
890 { 0xd045, 1, 1, 0x00 },
891 { 0x9bcf, 0, 1, 0x01 },
892 { 0xd045, 2, 1, 0x01 },
893 { 0xd04f, 0, 8, 0x9a },
894 { 0xd050, 0, 1, 0x01 },
895 { 0xd051, 0, 8, 0x5a },
896 { 0xd052, 0, 1, 0x01 },
897 { 0xd053, 0, 8, 0x50 },
898 { 0xd054, 0, 8, 0x46 },
899 { 0x9bd7, 0, 8, 0x0a },
900 { 0x9bd8, 0, 8, 0x14 },
901 { 0x9bd9, 0, 8, 0x08 },
902 { 0x9bd0, 0, 8, 0xa8 },
903 { 0x9be4, 0, 8, 0x7f },
904 { 0x9bbd, 0, 8, 0xa8 },
905 { 0x9be2, 0, 8, 0x20 },
906 { 0x9bee, 0, 1, 0x01 },
907};
908
Antti Palosaarif571e002011-11-28 20:58:11 -0300909#endif /* AF9013_PRIV_H */