xref: /linux/drivers/media/dvb-frontends/af9033_priv.h (revision d267d2709196b2a2ef27850abd9189c9ed5e537a)
19a0bf528SMauro Carvalho Chehab /*
29a0bf528SMauro Carvalho Chehab  * Afatech AF9033 demodulator driver
39a0bf528SMauro Carvalho Chehab  *
49a0bf528SMauro Carvalho Chehab  * Copyright (C) 2009 Antti Palosaari <crope@iki.fi>
59a0bf528SMauro Carvalho Chehab  * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
69a0bf528SMauro Carvalho Chehab  *
79a0bf528SMauro Carvalho Chehab  *    This program is free software; you can redistribute it and/or modify
89a0bf528SMauro Carvalho Chehab  *    it under the terms of the GNU General Public License as published by
99a0bf528SMauro Carvalho Chehab  *    the Free Software Foundation; either version 2 of the License, or
109a0bf528SMauro Carvalho Chehab  *    (at your option) any later version.
119a0bf528SMauro Carvalho Chehab  *
129a0bf528SMauro Carvalho Chehab  *    This program is distributed in the hope that it will be useful,
139a0bf528SMauro Carvalho Chehab  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
149a0bf528SMauro Carvalho Chehab  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
159a0bf528SMauro Carvalho Chehab  *    GNU General Public License for more details.
169a0bf528SMauro Carvalho Chehab  *
179a0bf528SMauro Carvalho Chehab  *    You should have received a copy of the GNU General Public License along
189a0bf528SMauro Carvalho Chehab  *    with this program; if not, write to the Free Software Foundation, Inc.,
199a0bf528SMauro Carvalho Chehab  *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
209a0bf528SMauro Carvalho Chehab  */
219a0bf528SMauro Carvalho Chehab 
229a0bf528SMauro Carvalho Chehab #ifndef AF9033_PRIV_H
239a0bf528SMauro Carvalho Chehab #define AF9033_PRIV_H
249a0bf528SMauro Carvalho Chehab 
259a0bf528SMauro Carvalho Chehab #include "dvb_frontend.h"
269a0bf528SMauro Carvalho Chehab #include "af9033.h"
279a0bf528SMauro Carvalho Chehab 
289a0bf528SMauro Carvalho Chehab struct reg_val {
299a0bf528SMauro Carvalho Chehab 	u32 reg;
309a0bf528SMauro Carvalho Chehab 	u8  val;
319a0bf528SMauro Carvalho Chehab };
329a0bf528SMauro Carvalho Chehab 
339a0bf528SMauro Carvalho Chehab struct reg_val_mask {
349a0bf528SMauro Carvalho Chehab 	u32 reg;
359a0bf528SMauro Carvalho Chehab 	u8  val;
369a0bf528SMauro Carvalho Chehab 	u8  mask;
379a0bf528SMauro Carvalho Chehab };
389a0bf528SMauro Carvalho Chehab 
399a0bf528SMauro Carvalho Chehab struct coeff {
409a0bf528SMauro Carvalho Chehab 	u32 clock;
419a0bf528SMauro Carvalho Chehab 	u32 bandwidth_hz;
429a0bf528SMauro Carvalho Chehab 	u8 val[36];
439a0bf528SMauro Carvalho Chehab };
449a0bf528SMauro Carvalho Chehab 
459a0bf528SMauro Carvalho Chehab struct clock_adc {
469a0bf528SMauro Carvalho Chehab 	u32 clock;
479a0bf528SMauro Carvalho Chehab 	u32 adc;
489a0bf528SMauro Carvalho Chehab };
499a0bf528SMauro Carvalho Chehab 
509a0bf528SMauro Carvalho Chehab struct val_snr {
519a0bf528SMauro Carvalho Chehab 	u32 val;
529a0bf528SMauro Carvalho Chehab 	u8 snr;
539a0bf528SMauro Carvalho Chehab };
549a0bf528SMauro Carvalho Chehab 
559a0bf528SMauro Carvalho Chehab /* Xtal clock vs. ADC clock lookup table */
569a0bf528SMauro Carvalho Chehab static const struct clock_adc clock_adc_lut[] = {
579a0bf528SMauro Carvalho Chehab 	{ 16384000, 20480000 },
589a0bf528SMauro Carvalho Chehab 	{ 20480000, 20480000 },
599a0bf528SMauro Carvalho Chehab 	{ 36000000, 20250000 },
609a0bf528SMauro Carvalho Chehab 	{ 30000000, 20156250 },
619a0bf528SMauro Carvalho Chehab 	{ 26000000, 20583333 },
629a0bf528SMauro Carvalho Chehab 	{ 28000000, 20416667 },
639a0bf528SMauro Carvalho Chehab 	{ 32000000, 20500000 },
649a0bf528SMauro Carvalho Chehab 	{ 34000000, 20187500 },
659a0bf528SMauro Carvalho Chehab 	{ 24000000, 20500000 },
669a0bf528SMauro Carvalho Chehab 	{ 22000000, 20625000 },
679a0bf528SMauro Carvalho Chehab 	{ 12000000, 20250000 },
689a0bf528SMauro Carvalho Chehab };
699a0bf528SMauro Carvalho Chehab 
709a0bf528SMauro Carvalho Chehab /* pre-calculated coeff lookup table */
719a0bf528SMauro Carvalho Chehab static const struct coeff coeff_lut[] = {
729a0bf528SMauro Carvalho Chehab 	/* 12.000 MHz */
739a0bf528SMauro Carvalho Chehab 	{ 12000000, 8000000, {
749a0bf528SMauro Carvalho Chehab 		0x01, 0xce, 0x55, 0xc9, 0x00, 0xe7, 0x2a, 0xe4, 0x00, 0x73,
759a0bf528SMauro Carvalho Chehab 		0x99, 0x0f, 0x00, 0x73, 0x95, 0x72, 0x00, 0x73, 0x91, 0xd5,
769a0bf528SMauro Carvalho Chehab 		0x00, 0x39, 0xca, 0xb9, 0x00, 0xe7, 0x2a, 0xe4, 0x00, 0x73,
779a0bf528SMauro Carvalho Chehab 		0x95, 0x72, 0x37, 0x02, 0xce, 0x01 }
789a0bf528SMauro Carvalho Chehab 	},
799a0bf528SMauro Carvalho Chehab 	{ 12000000, 7000000, {
809a0bf528SMauro Carvalho Chehab 		0x01, 0x94, 0x8b, 0x10, 0x00, 0xca, 0x45, 0x88, 0x00, 0x65,
819a0bf528SMauro Carvalho Chehab 		0x25, 0xed, 0x00, 0x65, 0x22, 0xc4, 0x00, 0x65, 0x1f, 0x9b,
829a0bf528SMauro Carvalho Chehab 		0x00, 0x32, 0x91, 0x62, 0x00, 0xca, 0x45, 0x88, 0x00, 0x65,
839a0bf528SMauro Carvalho Chehab 		0x22, 0xc4, 0x88, 0x02, 0x95, 0x01 }
849a0bf528SMauro Carvalho Chehab 	},
859a0bf528SMauro Carvalho Chehab 	{ 12000000, 6000000, {
869a0bf528SMauro Carvalho Chehab 		0x01, 0x5a, 0xc0, 0x56, 0x00, 0xad, 0x60, 0x2b, 0x00, 0x56,
879a0bf528SMauro Carvalho Chehab 		0xb2, 0xcb, 0x00, 0x56, 0xb0, 0x15, 0x00, 0x56, 0xad, 0x60,
889a0bf528SMauro Carvalho Chehab 		0x00, 0x2b, 0x58, 0x0b, 0x00, 0xad, 0x60, 0x2b, 0x00, 0x56,
899a0bf528SMauro Carvalho Chehab 		0xb0, 0x15, 0xf4, 0x02, 0x5b, 0x01 }
909a0bf528SMauro Carvalho Chehab 	},
919a0bf528SMauro Carvalho Chehab };
929a0bf528SMauro Carvalho Chehab 
939a0bf528SMauro Carvalho Chehab /* QPSK SNR lookup table */
949a0bf528SMauro Carvalho Chehab static const struct val_snr qpsk_snr_lut[] = {
959a0bf528SMauro Carvalho Chehab 	{ 0x0b4771,  0 },
969a0bf528SMauro Carvalho Chehab 	{ 0x0c1aed,  1 },
979a0bf528SMauro Carvalho Chehab 	{ 0x0d0d27,  2 },
989a0bf528SMauro Carvalho Chehab 	{ 0x0e4d19,  3 },
999a0bf528SMauro Carvalho Chehab 	{ 0x0e5da8,  4 },
1009a0bf528SMauro Carvalho Chehab 	{ 0x107097,  5 },
1019a0bf528SMauro Carvalho Chehab 	{ 0x116975,  6 },
1029a0bf528SMauro Carvalho Chehab 	{ 0x1252d9,  7 },
1039a0bf528SMauro Carvalho Chehab 	{ 0x131fa4,  8 },
1049a0bf528SMauro Carvalho Chehab 	{ 0x13d5e1,  9 },
1059a0bf528SMauro Carvalho Chehab 	{ 0x148e53, 10 },
1069a0bf528SMauro Carvalho Chehab 	{ 0x15358b, 11 },
1079a0bf528SMauro Carvalho Chehab 	{ 0x15dd29, 12 },
1089a0bf528SMauro Carvalho Chehab 	{ 0x168112, 13 },
1099a0bf528SMauro Carvalho Chehab 	{ 0x170b61, 14 },
1109a0bf528SMauro Carvalho Chehab 	{ 0x17a532, 15 },
1119a0bf528SMauro Carvalho Chehab 	{ 0x180f94, 16 },
1129a0bf528SMauro Carvalho Chehab 	{ 0x186ed2, 17 },
1139a0bf528SMauro Carvalho Chehab 	{ 0x18b271, 18 },
1149a0bf528SMauro Carvalho Chehab 	{ 0x18e118, 19 },
1159a0bf528SMauro Carvalho Chehab 	{ 0x18ff4b, 20 },
1169a0bf528SMauro Carvalho Chehab 	{ 0x190af1, 21 },
1179a0bf528SMauro Carvalho Chehab 	{ 0x191451, 22 },
1189a0bf528SMauro Carvalho Chehab 	{ 0xffffff, 23 },
1199a0bf528SMauro Carvalho Chehab };
1209a0bf528SMauro Carvalho Chehab 
1219a0bf528SMauro Carvalho Chehab /* QAM16 SNR lookup table */
1229a0bf528SMauro Carvalho Chehab static const struct val_snr qam16_snr_lut[] = {
1239a0bf528SMauro Carvalho Chehab 	{ 0x04f0d5,  0 },
1249a0bf528SMauro Carvalho Chehab 	{ 0x05387a,  1 },
1259a0bf528SMauro Carvalho Chehab 	{ 0x0573a4,  2 },
1269a0bf528SMauro Carvalho Chehab 	{ 0x05a99e,  3 },
1279a0bf528SMauro Carvalho Chehab 	{ 0x05cc80,  4 },
1289a0bf528SMauro Carvalho Chehab 	{ 0x05eb62,  5 },
1299a0bf528SMauro Carvalho Chehab 	{ 0x05fecf,  6 },
1309a0bf528SMauro Carvalho Chehab 	{ 0x060b80,  7 },
1319a0bf528SMauro Carvalho Chehab 	{ 0x062501,  8 },
1329a0bf528SMauro Carvalho Chehab 	{ 0x064865,  9 },
1339a0bf528SMauro Carvalho Chehab 	{ 0x069604, 10 },
1349a0bf528SMauro Carvalho Chehab 	{ 0x06f356, 11 },
1359a0bf528SMauro Carvalho Chehab 	{ 0x07706a, 12 },
1369a0bf528SMauro Carvalho Chehab 	{ 0x0804d3, 13 },
1379a0bf528SMauro Carvalho Chehab 	{ 0x089d1a, 14 },
1389a0bf528SMauro Carvalho Chehab 	{ 0x093e3d, 15 },
1399a0bf528SMauro Carvalho Chehab 	{ 0x09e35d, 16 },
1409a0bf528SMauro Carvalho Chehab 	{ 0x0a7c3c, 17 },
1419a0bf528SMauro Carvalho Chehab 	{ 0x0afaf8, 18 },
1429a0bf528SMauro Carvalho Chehab 	{ 0x0b719d, 19 },
1439a0bf528SMauro Carvalho Chehab 	{ 0x0bda6a, 20 },
1449a0bf528SMauro Carvalho Chehab 	{ 0x0c0c75, 21 },
1459a0bf528SMauro Carvalho Chehab 	{ 0x0c3f7d, 22 },
1469a0bf528SMauro Carvalho Chehab 	{ 0x0c5e62, 23 },
1479a0bf528SMauro Carvalho Chehab 	{ 0x0c6c31, 24 },
1489a0bf528SMauro Carvalho Chehab 	{ 0x0c7925, 25 },
1499a0bf528SMauro Carvalho Chehab 	{ 0xffffff, 26 },
1509a0bf528SMauro Carvalho Chehab };
1519a0bf528SMauro Carvalho Chehab 
1529a0bf528SMauro Carvalho Chehab /* QAM64 SNR lookup table */
1539a0bf528SMauro Carvalho Chehab static const struct val_snr qam64_snr_lut[] = {
1549a0bf528SMauro Carvalho Chehab 	{ 0x0256d0,  0 },
1559a0bf528SMauro Carvalho Chehab 	{ 0x027a65,  1 },
1569a0bf528SMauro Carvalho Chehab 	{ 0x029873,  2 },
1579a0bf528SMauro Carvalho Chehab 	{ 0x02b7fe,  3 },
1589a0bf528SMauro Carvalho Chehab 	{ 0x02cf1e,  4 },
1599a0bf528SMauro Carvalho Chehab 	{ 0x02e234,  5 },
1609a0bf528SMauro Carvalho Chehab 	{ 0x02f409,  6 },
1619a0bf528SMauro Carvalho Chehab 	{ 0x030046,  7 },
1629a0bf528SMauro Carvalho Chehab 	{ 0x030844,  8 },
1639a0bf528SMauro Carvalho Chehab 	{ 0x030a02,  9 },
1649a0bf528SMauro Carvalho Chehab 	{ 0x030cde, 10 },
1659a0bf528SMauro Carvalho Chehab 	{ 0x031031, 11 },
1669a0bf528SMauro Carvalho Chehab 	{ 0x03144c, 12 },
1679a0bf528SMauro Carvalho Chehab 	{ 0x0315dd, 13 },
1689a0bf528SMauro Carvalho Chehab 	{ 0x031920, 14 },
1699a0bf528SMauro Carvalho Chehab 	{ 0x0322d0, 15 },
1709a0bf528SMauro Carvalho Chehab 	{ 0x0339fc, 16 },
1719a0bf528SMauro Carvalho Chehab 	{ 0x0364a1, 17 },
1729a0bf528SMauro Carvalho Chehab 	{ 0x038bcc, 18 },
1739a0bf528SMauro Carvalho Chehab 	{ 0x03c7d3, 19 },
1749a0bf528SMauro Carvalho Chehab 	{ 0x0408cc, 20 },
1759a0bf528SMauro Carvalho Chehab 	{ 0x043bed, 21 },
1769a0bf528SMauro Carvalho Chehab 	{ 0x048061, 22 },
1779a0bf528SMauro Carvalho Chehab 	{ 0x04be95, 23 },
1789a0bf528SMauro Carvalho Chehab 	{ 0x04fa7d, 24 },
1799a0bf528SMauro Carvalho Chehab 	{ 0x052405, 25 },
1809a0bf528SMauro Carvalho Chehab 	{ 0x05570d, 26 },
1819a0bf528SMauro Carvalho Chehab 	{ 0x059feb, 27 },
1829a0bf528SMauro Carvalho Chehab 	{ 0x05bf38, 28 },
1839a0bf528SMauro Carvalho Chehab 	{ 0xffffff, 29 },
1849a0bf528SMauro Carvalho Chehab };
1859a0bf528SMauro Carvalho Chehab 
1869a0bf528SMauro Carvalho Chehab static const struct reg_val ofsm_init[] = {
1879a0bf528SMauro Carvalho Chehab 	{ 0x800051, 0x01 },
1889a0bf528SMauro Carvalho Chehab 	{ 0x800070, 0x0a },
1899a0bf528SMauro Carvalho Chehab 	{ 0x80007e, 0x04 },
1909a0bf528SMauro Carvalho Chehab 	{ 0x800081, 0x0a },
1919a0bf528SMauro Carvalho Chehab 	{ 0x80008a, 0x01 },
1929a0bf528SMauro Carvalho Chehab 	{ 0x80008e, 0x01 },
1939a0bf528SMauro Carvalho Chehab 	{ 0x800092, 0x06 },
1949a0bf528SMauro Carvalho Chehab 	{ 0x800099, 0x01 },
1959a0bf528SMauro Carvalho Chehab 	{ 0x80009f, 0xe1 },
1969a0bf528SMauro Carvalho Chehab 	{ 0x8000a0, 0xcf },
1979a0bf528SMauro Carvalho Chehab 	{ 0x8000a3, 0x01 },
1989a0bf528SMauro Carvalho Chehab 	{ 0x8000a5, 0x01 },
1999a0bf528SMauro Carvalho Chehab 	{ 0x8000a6, 0x01 },
2009a0bf528SMauro Carvalho Chehab 	{ 0x8000a9, 0x00 },
2019a0bf528SMauro Carvalho Chehab 	{ 0x8000aa, 0x01 },
2029a0bf528SMauro Carvalho Chehab 	{ 0x8000b0, 0x01 },
203*d267d270SAntti Palosaari 	{ 0x8000c4, 0x05 },
204*d267d270SAntti Palosaari 	{ 0x8000c8, 0x19 },
2059a0bf528SMauro Carvalho Chehab 	{ 0x80f000, 0x0f },
2069a0bf528SMauro Carvalho Chehab 	{ 0x80f016, 0x10 },
2079a0bf528SMauro Carvalho Chehab 	{ 0x80f017, 0x04 },
2089a0bf528SMauro Carvalho Chehab 	{ 0x80f018, 0x05 },
2099a0bf528SMauro Carvalho Chehab 	{ 0x80f019, 0x04 },
2109a0bf528SMauro Carvalho Chehab 	{ 0x80f01a, 0x05 },
2119a0bf528SMauro Carvalho Chehab 	{ 0x80f021, 0x03 },
2129a0bf528SMauro Carvalho Chehab 	{ 0x80f022, 0x0a },
2139a0bf528SMauro Carvalho Chehab 	{ 0x80f023, 0x0a },
2149a0bf528SMauro Carvalho Chehab 	{ 0x80f02b, 0x00 },
2159a0bf528SMauro Carvalho Chehab 	{ 0x80f02c, 0x01 },
2169a0bf528SMauro Carvalho Chehab 	{ 0x80f064, 0x03 },
2179a0bf528SMauro Carvalho Chehab 	{ 0x80f065, 0xf9 },
2189a0bf528SMauro Carvalho Chehab 	{ 0x80f066, 0x03 },
2199a0bf528SMauro Carvalho Chehab 	{ 0x80f067, 0x01 },
2209a0bf528SMauro Carvalho Chehab 	{ 0x80f06f, 0xe0 },
2219a0bf528SMauro Carvalho Chehab 	{ 0x80f070, 0x03 },
2229a0bf528SMauro Carvalho Chehab 	{ 0x80f072, 0x0f },
2239a0bf528SMauro Carvalho Chehab 	{ 0x80f073, 0x03 },
2249a0bf528SMauro Carvalho Chehab 	{ 0x80f078, 0x00 },
2259a0bf528SMauro Carvalho Chehab 	{ 0x80f087, 0x00 },
2269a0bf528SMauro Carvalho Chehab 	{ 0x80f09b, 0x3f },
2279a0bf528SMauro Carvalho Chehab 	{ 0x80f09c, 0x00 },
2289a0bf528SMauro Carvalho Chehab 	{ 0x80f09d, 0x20 },
2299a0bf528SMauro Carvalho Chehab 	{ 0x80f09e, 0x00 },
2309a0bf528SMauro Carvalho Chehab 	{ 0x80f09f, 0x0c },
2319a0bf528SMauro Carvalho Chehab 	{ 0x80f0a0, 0x00 },
2329a0bf528SMauro Carvalho Chehab 	{ 0x80f130, 0x04 },
2339a0bf528SMauro Carvalho Chehab 	{ 0x80f132, 0x04 },
2349a0bf528SMauro Carvalho Chehab 	{ 0x80f144, 0x1a },
2359a0bf528SMauro Carvalho Chehab 	{ 0x80f146, 0x00 },
2369a0bf528SMauro Carvalho Chehab 	{ 0x80f14a, 0x01 },
2379a0bf528SMauro Carvalho Chehab 	{ 0x80f14c, 0x00 },
2389a0bf528SMauro Carvalho Chehab 	{ 0x80f14d, 0x00 },
2399a0bf528SMauro Carvalho Chehab 	{ 0x80f14f, 0x04 },
2409a0bf528SMauro Carvalho Chehab 	{ 0x80f158, 0x7f },
2419a0bf528SMauro Carvalho Chehab 	{ 0x80f15a, 0x00 },
2429a0bf528SMauro Carvalho Chehab 	{ 0x80f15b, 0x08 },
2439a0bf528SMauro Carvalho Chehab 	{ 0x80f15d, 0x03 },
2449a0bf528SMauro Carvalho Chehab 	{ 0x80f15e, 0x05 },
2459a0bf528SMauro Carvalho Chehab 	{ 0x80f163, 0x05 },
2469a0bf528SMauro Carvalho Chehab 	{ 0x80f166, 0x01 },
2479a0bf528SMauro Carvalho Chehab 	{ 0x80f167, 0x40 },
2489a0bf528SMauro Carvalho Chehab 	{ 0x80f168, 0x0f },
2499a0bf528SMauro Carvalho Chehab 	{ 0x80f17a, 0x00 },
2509a0bf528SMauro Carvalho Chehab 	{ 0x80f17b, 0x00 },
2519a0bf528SMauro Carvalho Chehab 	{ 0x80f183, 0x01 },
2529a0bf528SMauro Carvalho Chehab 	{ 0x80f19d, 0x40 },
2539a0bf528SMauro Carvalho Chehab 	{ 0x80f1bc, 0x36 },
2549a0bf528SMauro Carvalho Chehab 	{ 0x80f1bd, 0x00 },
2559a0bf528SMauro Carvalho Chehab 	{ 0x80f1cb, 0xa0 },
2569a0bf528SMauro Carvalho Chehab 	{ 0x80f1cc, 0x01 },
2579a0bf528SMauro Carvalho Chehab 	{ 0x80f204, 0x10 },
2589a0bf528SMauro Carvalho Chehab 	{ 0x80f214, 0x00 },
2599a0bf528SMauro Carvalho Chehab 	{ 0x80f40e, 0x0a },
2609a0bf528SMauro Carvalho Chehab 	{ 0x80f40f, 0x40 },
2619a0bf528SMauro Carvalho Chehab 	{ 0x80f410, 0x08 },
2629a0bf528SMauro Carvalho Chehab 	{ 0x80f55f, 0x0a },
2639a0bf528SMauro Carvalho Chehab 	{ 0x80f561, 0x15 },
2649a0bf528SMauro Carvalho Chehab 	{ 0x80f562, 0x20 },
2659a0bf528SMauro Carvalho Chehab 	{ 0x80f5df, 0xfb },
2669a0bf528SMauro Carvalho Chehab 	{ 0x80f5e0, 0x00 },
2679a0bf528SMauro Carvalho Chehab 	{ 0x80f5e3, 0x09 },
2689a0bf528SMauro Carvalho Chehab 	{ 0x80f5e4, 0x01 },
2699a0bf528SMauro Carvalho Chehab 	{ 0x80f5e5, 0x01 },
2709a0bf528SMauro Carvalho Chehab 	{ 0x80f5f8, 0x01 },
2719a0bf528SMauro Carvalho Chehab 	{ 0x80f5fd, 0x01 },
2729a0bf528SMauro Carvalho Chehab 	{ 0x80f600, 0x05 },
2739a0bf528SMauro Carvalho Chehab 	{ 0x80f601, 0x08 },
2749a0bf528SMauro Carvalho Chehab 	{ 0x80f602, 0x0b },
2759a0bf528SMauro Carvalho Chehab 	{ 0x80f603, 0x0e },
2769a0bf528SMauro Carvalho Chehab 	{ 0x80f604, 0x11 },
2779a0bf528SMauro Carvalho Chehab 	{ 0x80f605, 0x14 },
2789a0bf528SMauro Carvalho Chehab 	{ 0x80f606, 0x17 },
2799a0bf528SMauro Carvalho Chehab 	{ 0x80f607, 0x1f },
2809a0bf528SMauro Carvalho Chehab 	{ 0x80f60e, 0x00 },
2819a0bf528SMauro Carvalho Chehab 	{ 0x80f60f, 0x04 },
2829a0bf528SMauro Carvalho Chehab 	{ 0x80f610, 0x32 },
2839a0bf528SMauro Carvalho Chehab 	{ 0x80f611, 0x10 },
2849a0bf528SMauro Carvalho Chehab 	{ 0x80f707, 0xfc },
2859a0bf528SMauro Carvalho Chehab 	{ 0x80f708, 0x00 },
2869a0bf528SMauro Carvalho Chehab 	{ 0x80f709, 0x37 },
2879a0bf528SMauro Carvalho Chehab 	{ 0x80f70a, 0x00 },
2889a0bf528SMauro Carvalho Chehab 	{ 0x80f78b, 0x01 },
2899a0bf528SMauro Carvalho Chehab 	{ 0x80f80f, 0x40 },
2909a0bf528SMauro Carvalho Chehab 	{ 0x80f810, 0x54 },
2919a0bf528SMauro Carvalho Chehab 	{ 0x80f811, 0x5a },
2929a0bf528SMauro Carvalho Chehab 	{ 0x80f905, 0x01 },
2939a0bf528SMauro Carvalho Chehab 	{ 0x80fb06, 0x03 },
2949a0bf528SMauro Carvalho Chehab 	{ 0x80fd8b, 0x00 },
2959a0bf528SMauro Carvalho Chehab };
2969a0bf528SMauro Carvalho Chehab 
2979a0bf528SMauro Carvalho Chehab /* Infineon TUA 9001 tuner init
2989a0bf528SMauro Carvalho Chehab    AF9033_TUNER_TUA9001    = 0x27 */
2999a0bf528SMauro Carvalho Chehab static const struct reg_val tuner_init_tua9001[] = {
3009a0bf528SMauro Carvalho Chehab 	{ 0x800046, 0x27 },
3019a0bf528SMauro Carvalho Chehab 	{ 0x800057, 0x00 },
3029a0bf528SMauro Carvalho Chehab 	{ 0x800058, 0x01 },
3039a0bf528SMauro Carvalho Chehab 	{ 0x80005f, 0x00 },
3049a0bf528SMauro Carvalho Chehab 	{ 0x800060, 0x00 },
3059a0bf528SMauro Carvalho Chehab 	{ 0x80006d, 0x00 },
3069a0bf528SMauro Carvalho Chehab 	{ 0x800071, 0x05 },
3079a0bf528SMauro Carvalho Chehab 	{ 0x800072, 0x02 },
3089a0bf528SMauro Carvalho Chehab 	{ 0x800074, 0x01 },
3099a0bf528SMauro Carvalho Chehab 	{ 0x800075, 0x03 },
3109a0bf528SMauro Carvalho Chehab 	{ 0x800076, 0x02 },
3119a0bf528SMauro Carvalho Chehab 	{ 0x800077, 0x00 },
3129a0bf528SMauro Carvalho Chehab 	{ 0x800078, 0x01 },
3139a0bf528SMauro Carvalho Chehab 	{ 0x800079, 0x00 },
3149a0bf528SMauro Carvalho Chehab 	{ 0x80007a, 0x7e },
3159a0bf528SMauro Carvalho Chehab 	{ 0x80007b, 0x3e },
3169a0bf528SMauro Carvalho Chehab 	{ 0x800093, 0x00 },
3179a0bf528SMauro Carvalho Chehab 	{ 0x800094, 0x01 },
3189a0bf528SMauro Carvalho Chehab 	{ 0x800095, 0x02 },
3199a0bf528SMauro Carvalho Chehab 	{ 0x800096, 0x01 },
3209a0bf528SMauro Carvalho Chehab 	{ 0x800098, 0x0a },
3219a0bf528SMauro Carvalho Chehab 	{ 0x80009b, 0x05 },
3229a0bf528SMauro Carvalho Chehab 	{ 0x80009c, 0x80 },
3239a0bf528SMauro Carvalho Chehab 	{ 0x8000b3, 0x00 },
3249a0bf528SMauro Carvalho Chehab 	{ 0x8000c1, 0x01 },
3259a0bf528SMauro Carvalho Chehab 	{ 0x8000c2, 0x00 },
3269a0bf528SMauro Carvalho Chehab 	{ 0x80f007, 0x00 },
3279a0bf528SMauro Carvalho Chehab 	{ 0x80f01f, 0x82 },
3289a0bf528SMauro Carvalho Chehab 	{ 0x80f020, 0x00 },
3299a0bf528SMauro Carvalho Chehab 	{ 0x80f029, 0x82 },
3309a0bf528SMauro Carvalho Chehab 	{ 0x80f02a, 0x00 },
3319a0bf528SMauro Carvalho Chehab 	{ 0x80f047, 0x00 },
3329a0bf528SMauro Carvalho Chehab 	{ 0x80f054, 0x00 },
3339a0bf528SMauro Carvalho Chehab 	{ 0x80f055, 0x00 },
3349a0bf528SMauro Carvalho Chehab 	{ 0x80f077, 0x01 },
3359a0bf528SMauro Carvalho Chehab 	{ 0x80f1e6, 0x00 },
3369a0bf528SMauro Carvalho Chehab };
3379a0bf528SMauro Carvalho Chehab 
3389a0bf528SMauro Carvalho Chehab /* Fitipower fc0011 tuner init
3399a0bf528SMauro Carvalho Chehab    AF9033_TUNER_FC0011    = 0x28 */
3409a0bf528SMauro Carvalho Chehab static const struct reg_val tuner_init_fc0011[] = {
3419a0bf528SMauro Carvalho Chehab 	{ 0x800046, AF9033_TUNER_FC0011 },
3429a0bf528SMauro Carvalho Chehab 	{ 0x800057, 0x00 },
3439a0bf528SMauro Carvalho Chehab 	{ 0x800058, 0x01 },
3449a0bf528SMauro Carvalho Chehab 	{ 0x80005f, 0x00 },
3459a0bf528SMauro Carvalho Chehab 	{ 0x800060, 0x00 },
3469a0bf528SMauro Carvalho Chehab 	{ 0x800068, 0xa5 },
3479a0bf528SMauro Carvalho Chehab 	{ 0x80006e, 0x01 },
3489a0bf528SMauro Carvalho Chehab 	{ 0x800071, 0x0A },
3499a0bf528SMauro Carvalho Chehab 	{ 0x800072, 0x02 },
3509a0bf528SMauro Carvalho Chehab 	{ 0x800074, 0x01 },
3519a0bf528SMauro Carvalho Chehab 	{ 0x800079, 0x01 },
3529a0bf528SMauro Carvalho Chehab 	{ 0x800093, 0x00 },
3539a0bf528SMauro Carvalho Chehab 	{ 0x800094, 0x00 },
3549a0bf528SMauro Carvalho Chehab 	{ 0x800095, 0x00 },
3559a0bf528SMauro Carvalho Chehab 	{ 0x800096, 0x00 },
3569a0bf528SMauro Carvalho Chehab 	{ 0x80009b, 0x2D },
3579a0bf528SMauro Carvalho Chehab 	{ 0x80009c, 0x60 },
3589a0bf528SMauro Carvalho Chehab 	{ 0x80009d, 0x23 },
3599a0bf528SMauro Carvalho Chehab 	{ 0x8000a4, 0x50 },
3609a0bf528SMauro Carvalho Chehab 	{ 0x8000ad, 0x50 },
3619a0bf528SMauro Carvalho Chehab 	{ 0x8000b3, 0x01 },
3629a0bf528SMauro Carvalho Chehab 	{ 0x8000b7, 0x88 },
3639a0bf528SMauro Carvalho Chehab 	{ 0x8000b8, 0xa6 },
3649a0bf528SMauro Carvalho Chehab 	{ 0x8000c3, 0x01 },
3659a0bf528SMauro Carvalho Chehab 	{ 0x8000c4, 0x01 },
3669a0bf528SMauro Carvalho Chehab 	{ 0x8000c7, 0x69 },
3679a0bf528SMauro Carvalho Chehab 	{ 0x80F007, 0x00 },
3689a0bf528SMauro Carvalho Chehab 	{ 0x80F00A, 0x1B },
3699a0bf528SMauro Carvalho Chehab 	{ 0x80F00B, 0x1B },
3709a0bf528SMauro Carvalho Chehab 	{ 0x80F00C, 0x1B },
3719a0bf528SMauro Carvalho Chehab 	{ 0x80F00D, 0x1B },
3729a0bf528SMauro Carvalho Chehab 	{ 0x80F00E, 0xFF },
3739a0bf528SMauro Carvalho Chehab 	{ 0x80F00F, 0x01 },
3749a0bf528SMauro Carvalho Chehab 	{ 0x80F010, 0x00 },
3759a0bf528SMauro Carvalho Chehab 	{ 0x80F011, 0x02 },
3769a0bf528SMauro Carvalho Chehab 	{ 0x80F012, 0xFF },
3779a0bf528SMauro Carvalho Chehab 	{ 0x80F013, 0x01 },
3789a0bf528SMauro Carvalho Chehab 	{ 0x80F014, 0x00 },
3799a0bf528SMauro Carvalho Chehab 	{ 0x80F015, 0x02 },
3809a0bf528SMauro Carvalho Chehab 	{ 0x80F01B, 0xEF },
3819a0bf528SMauro Carvalho Chehab 	{ 0x80F01C, 0x01 },
3829a0bf528SMauro Carvalho Chehab 	{ 0x80F01D, 0x0f },
3839a0bf528SMauro Carvalho Chehab 	{ 0x80F01E, 0x02 },
3849a0bf528SMauro Carvalho Chehab 	{ 0x80F01F, 0x6E },
3859a0bf528SMauro Carvalho Chehab 	{ 0x80F020, 0x00 },
3869a0bf528SMauro Carvalho Chehab 	{ 0x80F025, 0xDE },
3879a0bf528SMauro Carvalho Chehab 	{ 0x80F026, 0x00 },
3889a0bf528SMauro Carvalho Chehab 	{ 0x80F027, 0x0A },
3899a0bf528SMauro Carvalho Chehab 	{ 0x80F028, 0x03 },
3909a0bf528SMauro Carvalho Chehab 	{ 0x80F029, 0x6E },
3919a0bf528SMauro Carvalho Chehab 	{ 0x80F02A, 0x00 },
3929a0bf528SMauro Carvalho Chehab 	{ 0x80F047, 0x00 },
3939a0bf528SMauro Carvalho Chehab 	{ 0x80F054, 0x00 },
3949a0bf528SMauro Carvalho Chehab 	{ 0x80F055, 0x00 },
3959a0bf528SMauro Carvalho Chehab 	{ 0x80F077, 0x01 },
3969a0bf528SMauro Carvalho Chehab 	{ 0x80F1E6, 0x00 },
3979a0bf528SMauro Carvalho Chehab };
3989a0bf528SMauro Carvalho Chehab 
399e713ad15SAntti Palosaari /* Fitipower FC0012 tuner init
400e713ad15SAntti Palosaari    AF9033_TUNER_FC0012    = 0x2e */
401e713ad15SAntti Palosaari static const struct reg_val tuner_init_fc0012[] = {
402e713ad15SAntti Palosaari 	{ 0x800046, 0x2e },
403e713ad15SAntti Palosaari 	{ 0x800057, 0x00 },
404e713ad15SAntti Palosaari 	{ 0x800058, 0x01 },
405e713ad15SAntti Palosaari 	{ 0x800059, 0x01 },
406e713ad15SAntti Palosaari 	{ 0x80005f, 0x00 },
407e713ad15SAntti Palosaari 	{ 0x800060, 0x00 },
408e713ad15SAntti Palosaari 	{ 0x80006d, 0x00 },
409e713ad15SAntti Palosaari 	{ 0x800071, 0x05 },
410e713ad15SAntti Palosaari 	{ 0x800072, 0x02 },
411e713ad15SAntti Palosaari 	{ 0x800074, 0x01 },
412e713ad15SAntti Palosaari 	{ 0x800075, 0x03 },
413e713ad15SAntti Palosaari 	{ 0x800076, 0x02 },
414e713ad15SAntti Palosaari 	{ 0x800077, 0x01 },
415e713ad15SAntti Palosaari 	{ 0x800078, 0x00 },
416e713ad15SAntti Palosaari 	{ 0x800079, 0x00 },
417e713ad15SAntti Palosaari 	{ 0x80007a, 0x90 },
418e713ad15SAntti Palosaari 	{ 0x80007b, 0x90 },
419e713ad15SAntti Palosaari 	{ 0x800093, 0x00 },
420e713ad15SAntti Palosaari 	{ 0x800094, 0x01 },
421e713ad15SAntti Palosaari 	{ 0x800095, 0x02 },
422e713ad15SAntti Palosaari 	{ 0x800096, 0x01 },
423e713ad15SAntti Palosaari 	{ 0x800098, 0x0a },
424e713ad15SAntti Palosaari 	{ 0x80009b, 0x05 },
425e713ad15SAntti Palosaari 	{ 0x80009c, 0x80 },
426e713ad15SAntti Palosaari 	{ 0x8000b3, 0x00 },
427e713ad15SAntti Palosaari 	{ 0x8000c5, 0x01 },
428e713ad15SAntti Palosaari 	{ 0x8000c6, 0x00 },
429e713ad15SAntti Palosaari 	{ 0x8000c9, 0x5d },
430e713ad15SAntti Palosaari 	{ 0x80f007, 0x00 },
431e713ad15SAntti Palosaari 	{ 0x80f01f, 0xa0 },
432e713ad15SAntti Palosaari 	{ 0x80f020, 0x00 },
433e713ad15SAntti Palosaari 	{ 0x80f029, 0x82 },
434e713ad15SAntti Palosaari 	{ 0x80f02a, 0x00 },
435e713ad15SAntti Palosaari 	{ 0x80f047, 0x00 },
436e713ad15SAntti Palosaari 	{ 0x80f054, 0x00 },
437e713ad15SAntti Palosaari 	{ 0x80f055, 0x00 },
438e713ad15SAntti Palosaari 	{ 0x80f077, 0x01 },
439e713ad15SAntti Palosaari 	{ 0x80f1e6, 0x00 },
440e713ad15SAntti Palosaari };
441e713ad15SAntti Palosaari 
4429a0bf528SMauro Carvalho Chehab /* MaxLinear MxL5007T tuner init
4439a0bf528SMauro Carvalho Chehab    AF9033_TUNER_MXL5007T    = 0xa0 */
4449a0bf528SMauro Carvalho Chehab static const struct reg_val tuner_init_mxl5007t[] = {
4459a0bf528SMauro Carvalho Chehab 	{ 0x800046, 0x1b },
4469a0bf528SMauro Carvalho Chehab 	{ 0x800057, 0x01 },
4479a0bf528SMauro Carvalho Chehab 	{ 0x800058, 0x01 },
4489a0bf528SMauro Carvalho Chehab 	{ 0x80005f, 0x00 },
4499a0bf528SMauro Carvalho Chehab 	{ 0x800060, 0x00 },
4509a0bf528SMauro Carvalho Chehab 	{ 0x800068, 0x96 },
4519a0bf528SMauro Carvalho Chehab 	{ 0x800071, 0x05 },
4529a0bf528SMauro Carvalho Chehab 	{ 0x800072, 0x02 },
4539a0bf528SMauro Carvalho Chehab 	{ 0x800074, 0x01 },
4549a0bf528SMauro Carvalho Chehab 	{ 0x800079, 0x01 },
4559a0bf528SMauro Carvalho Chehab 	{ 0x800093, 0x00 },
4569a0bf528SMauro Carvalho Chehab 	{ 0x800094, 0x00 },
4579a0bf528SMauro Carvalho Chehab 	{ 0x800095, 0x00 },
4589a0bf528SMauro Carvalho Chehab 	{ 0x800096, 0x00 },
4599a0bf528SMauro Carvalho Chehab 	{ 0x8000b3, 0x01 },
4609a0bf528SMauro Carvalho Chehab 	{ 0x8000c1, 0x01 },
4619a0bf528SMauro Carvalho Chehab 	{ 0x8000c2, 0x00 },
4629a0bf528SMauro Carvalho Chehab 	{ 0x80f007, 0x00 },
4639a0bf528SMauro Carvalho Chehab 	{ 0x80f00c, 0x19 },
4649a0bf528SMauro Carvalho Chehab 	{ 0x80f00d, 0x1a },
4659a0bf528SMauro Carvalho Chehab 	{ 0x80f012, 0xda },
4669a0bf528SMauro Carvalho Chehab 	{ 0x80f013, 0x00 },
4679a0bf528SMauro Carvalho Chehab 	{ 0x80f014, 0x00 },
4689a0bf528SMauro Carvalho Chehab 	{ 0x80f015, 0x02 },
4699a0bf528SMauro Carvalho Chehab 	{ 0x80f01f, 0x82 },
4709a0bf528SMauro Carvalho Chehab 	{ 0x80f020, 0x00 },
4719a0bf528SMauro Carvalho Chehab 	{ 0x80f029, 0x82 },
4729a0bf528SMauro Carvalho Chehab 	{ 0x80f02a, 0x00 },
4739a0bf528SMauro Carvalho Chehab 	{ 0x80f077, 0x02 },
4749a0bf528SMauro Carvalho Chehab 	{ 0x80f1e6, 0x00 },
4759a0bf528SMauro Carvalho Chehab };
4769a0bf528SMauro Carvalho Chehab 
4779a0bf528SMauro Carvalho Chehab /* NXP TDA 18218HN tuner init
4789a0bf528SMauro Carvalho Chehab    AF9033_TUNER_TDA18218    = 0xa1 */
4799a0bf528SMauro Carvalho Chehab static const struct reg_val tuner_init_tda18218[] = {
4809a0bf528SMauro Carvalho Chehab 	{0x800046, 0xa1},
4819a0bf528SMauro Carvalho Chehab 	{0x800057, 0x01},
4829a0bf528SMauro Carvalho Chehab 	{0x800058, 0x01},
4839a0bf528SMauro Carvalho Chehab 	{0x80005f, 0x00},
4849a0bf528SMauro Carvalho Chehab 	{0x800060, 0x00},
4859a0bf528SMauro Carvalho Chehab 	{0x800071, 0x05},
4869a0bf528SMauro Carvalho Chehab 	{0x800072, 0x02},
4879a0bf528SMauro Carvalho Chehab 	{0x800074, 0x01},
4889a0bf528SMauro Carvalho Chehab 	{0x800079, 0x01},
4899a0bf528SMauro Carvalho Chehab 	{0x800093, 0x00},
4909a0bf528SMauro Carvalho Chehab 	{0x800094, 0x00},
4919a0bf528SMauro Carvalho Chehab 	{0x800095, 0x00},
4929a0bf528SMauro Carvalho Chehab 	{0x800096, 0x00},
4939a0bf528SMauro Carvalho Chehab 	{0x8000b3, 0x01},
4949a0bf528SMauro Carvalho Chehab 	{0x8000c3, 0x01},
4959a0bf528SMauro Carvalho Chehab 	{0x8000c4, 0x00},
4969a0bf528SMauro Carvalho Chehab 	{0x80f007, 0x00},
4979a0bf528SMauro Carvalho Chehab 	{0x80f00c, 0x19},
4989a0bf528SMauro Carvalho Chehab 	{0x80f00d, 0x1a},
4999a0bf528SMauro Carvalho Chehab 	{0x80f012, 0xda},
5009a0bf528SMauro Carvalho Chehab 	{0x80f013, 0x00},
5019a0bf528SMauro Carvalho Chehab 	{0x80f014, 0x00},
5029a0bf528SMauro Carvalho Chehab 	{0x80f015, 0x02},
5039a0bf528SMauro Carvalho Chehab 	{0x80f01f, 0x82},
5049a0bf528SMauro Carvalho Chehab 	{0x80f020, 0x00},
5059a0bf528SMauro Carvalho Chehab 	{0x80f029, 0x82},
5069a0bf528SMauro Carvalho Chehab 	{0x80f02a, 0x00},
5079a0bf528SMauro Carvalho Chehab 	{0x80f077, 0x02},
5089a0bf528SMauro Carvalho Chehab 	{0x80f1e6, 0x00},
5099a0bf528SMauro Carvalho Chehab };
5109a0bf528SMauro Carvalho Chehab 
511d67ceb33SOliver Schinagl /* FCI FC2580 tuner init */
512d67ceb33SOliver Schinagl static const struct reg_val tuner_init_fc2580[] = {
513d67ceb33SOliver Schinagl 	{ 0x800046, 0x32 },
514d67ceb33SOliver Schinagl 	{ 0x800057, 0x01 },
515d67ceb33SOliver Schinagl 	{ 0x800058, 0x00 },
516d67ceb33SOliver Schinagl 	{ 0x80005f, 0x00 },
517d67ceb33SOliver Schinagl 	{ 0x800060, 0x00 },
518d67ceb33SOliver Schinagl 	{ 0x800071, 0x05 },
519d67ceb33SOliver Schinagl 	{ 0x800072, 0x02 },
520d67ceb33SOliver Schinagl 	{ 0x800074, 0x01 },
521d67ceb33SOliver Schinagl 	{ 0x800079, 0x01 },
522d67ceb33SOliver Schinagl 	{ 0x800093, 0x00 },
523d67ceb33SOliver Schinagl 	{ 0x800094, 0x00 },
524d67ceb33SOliver Schinagl 	{ 0x800095, 0x00 },
525d67ceb33SOliver Schinagl 	{ 0x800096, 0x05 },
526d67ceb33SOliver Schinagl 	{ 0x8000b3, 0x01 },
527d67ceb33SOliver Schinagl 	{ 0x8000c3, 0x01 },
528d67ceb33SOliver Schinagl 	{ 0x8000c4, 0x00 },
529d67ceb33SOliver Schinagl 	{ 0x80f007, 0x00 },
530d67ceb33SOliver Schinagl 	{ 0x80f00c, 0x19 },
531d67ceb33SOliver Schinagl 	{ 0x80f00d, 0x1A },
532d67ceb33SOliver Schinagl 	{ 0x80f00e, 0x00 },
533d67ceb33SOliver Schinagl 	{ 0x80f00f, 0x02 },
534d67ceb33SOliver Schinagl 	{ 0x80f010, 0x00 },
535d67ceb33SOliver Schinagl 	{ 0x80f011, 0x02 },
536d67ceb33SOliver Schinagl 	{ 0x80f012, 0x00 },
537d67ceb33SOliver Schinagl 	{ 0x80f013, 0x02 },
538d67ceb33SOliver Schinagl 	{ 0x80f014, 0x00 },
539d67ceb33SOliver Schinagl 	{ 0x80f015, 0x02 },
540d67ceb33SOliver Schinagl 	{ 0x80f01f, 0x96 },
541d67ceb33SOliver Schinagl 	{ 0x80f020, 0x00 },
542d67ceb33SOliver Schinagl 	{ 0x80f029, 0x96 },
543d67ceb33SOliver Schinagl 	{ 0x80f02a, 0x00 },
544d67ceb33SOliver Schinagl 	{ 0x80f077, 0x01 },
545d67ceb33SOliver Schinagl 	{ 0x80f1e6, 0x01 },
546d67ceb33SOliver Schinagl };
547d67ceb33SOliver Schinagl 
5489a0bf528SMauro Carvalho Chehab #endif /* AF9033_PRIV_H */
5499a0bf528SMauro Carvalho Chehab 
550