1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 MaxLinear MXL5005S VSB/QAM/DVBT tuner driver
5 Copyright (C) 2008 MaxLinear
6 Copyright (C) 2008 Steven Toth <stoth@linuxtv.org>
14 #include <linux/i2c.h>
15 #include <media/dvb_frontend.h>
17 struct mxl5005s_config
{
19 /* 7 bit i2c address */
22 #define IF_FREQ_4570000HZ 4570000
23 #define IF_FREQ_4571429HZ 4571429
24 #define IF_FREQ_5380000HZ 5380000
25 #define IF_FREQ_36000000HZ 36000000
26 #define IF_FREQ_36125000HZ 36125000
27 #define IF_FREQ_36166667HZ 36166667
28 #define IF_FREQ_44000000HZ 44000000
31 #define CRYSTAL_FREQ_4000000HZ 4000000
32 #define CRYSTAL_FREQ_16000000HZ 16000000
33 #define CRYSTAL_FREQ_25000000HZ 25000000
34 #define CRYSTAL_FREQ_28800000HZ 28800000
37 #define MXL_DUAL_AGC 0
38 #define MXL_SINGLE_AGC 1
41 #define MXL_TF_DEFAULT 0
54 #define MXL_RSSI_DISABLE 0
55 #define MXL_RSSI_ENABLE 1
58 #define MXL_CAP_SEL_DISABLE 0
59 #define MXL_CAP_SEL_ENABLE 1
62 #define MXL_DIV_OUT_1 0
63 #define MXL_DIV_OUT_4 1
66 #define MXL_CLOCK_OUT_DISABLE 0
67 #define MXL_CLOCK_OUT_ENABLE 1
70 #define MXL5005S_IF_OUTPUT_LOAD_200_OHM 200
71 #define MXL5005S_IF_OUTPUT_LOAD_300_OHM 300
74 #define MXL5005S_TOP_5P5 55
75 #define MXL5005S_TOP_7P2 72
76 #define MXL5005S_TOP_9P2 92
77 #define MXL5005S_TOP_11P0 110
78 #define MXL5005S_TOP_12P9 129
79 #define MXL5005S_TOP_14P7 147
80 #define MXL5005S_TOP_16P8 168
81 #define MXL5005S_TOP_19P4 194
82 #define MXL5005S_TOP_21P2 212
83 #define MXL5005S_TOP_23P2 232
84 #define MXL5005S_TOP_25P2 252
85 #define MXL5005S_TOP_27P1 271
86 #define MXL5005S_TOP_29P2 292
87 #define MXL5005S_TOP_31P7 317
88 #define MXL5005S_TOP_34P9 349
91 #define MXL_ANALOG_MODE 0
92 #define MXL_DIGITAL_MODE 1
99 /* Some boards need to override the built-in logic for determining
100 the gain when in QAM mode (the HVR-1600 is one such case) */
103 /* Stuff I don't know what to do with */
107 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MXL5005S)
108 extern struct dvb_frontend
*mxl5005s_attach(struct dvb_frontend
*fe
,
109 struct i2c_adapter
*i2c
,
110 struct mxl5005s_config
*config
);
112 static inline struct dvb_frontend
*mxl5005s_attach(struct dvb_frontend
*fe
,
113 struct i2c_adapter
*i2c
,
114 struct mxl5005s_config
*config
)
116 printk(KERN_WARNING
"%s: driver disabled by Kconfig\n", __func__
);
119 #endif /* CONFIG_DVB_TUNER_MXL5005S */
121 #endif /* __MXL5005S_H */