2 * Afatech AF9033 demodulator driver
4 * Copyright (C) 2009 Antti Palosaari <crope@iki.fi>
5 * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #include "dvb_frontend.h"
27 #include <linux/math64.h>
56 /* Xtal clock vs. ADC clock lookup table */
57 static const struct clock_adc clock_adc_lut
[] = {
58 { 16384000, 20480000 },
59 { 20480000, 20480000 },
60 { 36000000, 20250000 },
61 { 30000000, 20156250 },
62 { 26000000, 20583333 },
63 { 28000000, 20416667 },
64 { 32000000, 20500000 },
65 { 34000000, 20187500 },
66 { 24000000, 20500000 },
67 { 22000000, 20625000 },
68 { 12000000, 20250000 },
71 /* pre-calculated coeff lookup table */
72 static const struct coeff coeff_lut
[] = {
74 { 12000000, 8000000, {
75 0x01, 0xce, 0x55, 0xc9, 0x00, 0xe7, 0x2a, 0xe4, 0x00, 0x73,
76 0x99, 0x0f, 0x00, 0x73, 0x95, 0x72, 0x00, 0x73, 0x91, 0xd5,
77 0x00, 0x39, 0xca, 0xb9, 0x00, 0xe7, 0x2a, 0xe4, 0x00, 0x73,
78 0x95, 0x72, 0x37, 0x02, 0xce, 0x01 }
80 { 12000000, 7000000, {
81 0x01, 0x94, 0x8b, 0x10, 0x00, 0xca, 0x45, 0x88, 0x00, 0x65,
82 0x25, 0xed, 0x00, 0x65, 0x22, 0xc4, 0x00, 0x65, 0x1f, 0x9b,
83 0x00, 0x32, 0x91, 0x62, 0x00, 0xca, 0x45, 0x88, 0x00, 0x65,
84 0x22, 0xc4, 0x88, 0x02, 0x95, 0x01 }
86 { 12000000, 6000000, {
87 0x01, 0x5a, 0xc0, 0x56, 0x00, 0xad, 0x60, 0x2b, 0x00, 0x56,
88 0xb2, 0xcb, 0x00, 0x56, 0xb0, 0x15, 0x00, 0x56, 0xad, 0x60,
89 0x00, 0x2b, 0x58, 0x0b, 0x00, 0xad, 0x60, 0x2b, 0x00, 0x56,
90 0xb0, 0x15, 0xf4, 0x02, 0x5b, 0x01 }
94 /* QPSK SNR lookup table */
95 static const struct val_snr qpsk_snr_lut
[] = {
122 /* QAM16 SNR lookup table */
123 static const struct val_snr qam16_snr_lut
[] = {
153 /* QAM64 SNR lookup table */
154 static const struct val_snr qam64_snr_lut
[] = {
190 static const struct reg_val ofsm_init
[] = {
301 /* Infineon TUA 9001 tuner init
302 AF9033_TUNER_TUA9001 = 0x27 */
303 static const struct reg_val tuner_init_tua9001
[] = {
343 /* Fitipower fc0011 tuner init
344 AF9033_TUNER_FC0011 = 0x28 */
345 static const struct reg_val tuner_init_fc0011
[] = {
404 /* Fitipower FC0012 tuner init
405 AF9033_TUNER_FC0012 = 0x2e */
406 static const struct reg_val tuner_init_fc0012
[] = {
447 /* MaxLinear MxL5007T tuner init
448 AF9033_TUNER_MXL5007T = 0xa0 */
449 static const struct reg_val tuner_init_mxl5007t
[] = {
482 /* NXP TDA 18218HN tuner init
483 AF9033_TUNER_TDA18218 = 0xa1 */
484 static const struct reg_val tuner_init_tda18218
[] = {
516 /* FCI FC2580 tuner init */
517 static const struct reg_val tuner_init_fc2580
[] = {
554 static const struct reg_val ofsm_init_it9135_v1
[] = {
665 /* ITE Tech IT9135 Omega tuner init
666 AF9033_TUNER_IT9135_38 = 0x38 */
667 static const struct reg_val tuner_init_it9135_38
[] = {
882 /* ITE Tech IT9135 Omega LNA config 1 tuner init
883 AF9033_TUNER_IT9135_51 = 0x51 */
884 static const struct reg_val tuner_init_it9135_51
[] = {
1099 /* ITE Tech IT9135 Omega LNA config 2 tuner init
1100 AF9033_TUNER_IT9135_52 = 0x52 */
1101 static const struct reg_val tuner_init_it9135_52
[] = {
1316 static const struct reg_val ofsm_init_it9135_v2
[] = {
1414 /* ITE Tech IT9135 Omega v2 tuner init
1415 AF9033_TUNER_IT9135_60 = 0x60 */
1416 static const struct reg_val tuner_init_it9135_60
[] = {
1628 /* ITE Tech IT9135 Omega v2 LNA config 1 tuner init
1629 AF9033_TUNER_IT9135_61 = 0x61 */
1630 static const struct reg_val tuner_init_it9135_61
[] = {
1842 /* ITE Tech IT9135 Omega v2 LNA config 2 tuner init
1843 AF9033_TUNER_IT9135_62 = 0x62 */
1844 static const struct reg_val tuner_init_it9135_62
[] = {
2057 /* NorDig power reference table */
2058 static const int power_reference
[][5] = {
2059 {-93, -91, -90, -89, -88}, /* QPSK 1/2 ~ 7/8 */
2060 {-87, -85, -84, -83, -82}, /* 16QAM 1/2 ~ 7/8 */
2061 {-82, -80, -78, -77, -76}, /* 64QAM 1/2 ~ 7/8 */
2063 #endif /* AF9033_PRIV_H */