1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Montage Technology M88DS3103/M88RS6000 demodulator driver
5 * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
8 #ifndef M88DS3103_PRIV_H
9 #define M88DS3103_PRIV_H
11 #include <media/dvb_frontend.h>
12 #include "m88ds3103.h"
13 #include <media/dvb_math.h>
14 #include <linux/firmware.h>
15 #include <linux/i2c-mux.h>
16 #include <linux/regmap.h>
17 #include <linux/math64.h>
19 #define M88DS3103B_FIRMWARE "/*(DEBLOBBED)*/"
20 #define M88DS3103_FIRMWARE "/*(DEBLOBBED)*/"
21 #define M88RS6000_FIRMWARE "/*(DEBLOBBED)*/"
23 #define M88RS6000_CHIP_ID 0x74
24 #define M88DS3103_CHIP_ID 0x70
26 #define M88DS3103_CHIPTYPE_3103 0
27 #define M88DS3103_CHIPTYPE_RS6000 1
28 #define M88DS3103_CHIPTYPE_3103B 2
30 struct m88ds3103_dev {
31 struct i2c_client *client;
32 struct i2c_client *dt_client;
33 struct regmap_config regmap_config;
34 struct regmap *regmap;
35 struct m88ds3103_config config;
36 const struct m88ds3103_config *cfg;
37 struct dvb_frontend fe;
38 enum fe_delivery_system delivery_system;
39 enum fe_status fe_status;
40 u32 dvbv3_ber; /* for old DVBv3 API read_ber */
41 bool warm; /* FW running */
42 struct i2c_mux_core *muxc;
43 /* auto detect chip id to do different config */
45 /* chip type to differentiate m88rs6000 from m88ds3103b */
47 /* main mclk is calculated for M88RS6000 dynamically */
54 struct m88ds3103_reg_val {
59 static const struct m88ds3103_reg_val m88ds3103_dvbs_init_reg_vals[] = {
142 static const struct m88ds3103_reg_val m88ds3103_dvbs2_init_reg_vals[] = {
228 static const struct m88ds3103_reg_val m88rs6000_dvbs_init_reg_vals[] = {
314 static const struct m88ds3103_reg_val m88rs6000_dvbs2_init_reg_vals[] = {