| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Montage Technology M88DS3103/M88RS6000 demodulator driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2013 Antti Palosaari <crope@iki.fi> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 8 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | | - * (at your option) any later version. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License for more details. |
|---|
| 15 | 6 | */ |
|---|
| 16 | 7 | |
|---|
| 17 | 8 | #ifndef M88DS3103_PRIV_H |
|---|
| .. | .. |
|---|
| 25 | 16 | #include <linux/regmap.h> |
|---|
| 26 | 17 | #include <linux/math64.h> |
|---|
| 27 | 18 | |
|---|
| 28 | | -#define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw" |
|---|
| 29 | | -#define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw" |
|---|
| 19 | +#define M88DS3103B_FIRMWARE "dvb-demod-m88ds3103b.fw" |
|---|
| 20 | +#define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw" |
|---|
| 21 | +#define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw" |
|---|
| 22 | + |
|---|
| 30 | 23 | #define M88RS6000_CHIP_ID 0x74 |
|---|
| 31 | 24 | #define M88DS3103_CHIP_ID 0x70 |
|---|
| 32 | 25 | |
|---|
| 26 | +#define M88DS3103_CHIPTYPE_3103 0 |
|---|
| 27 | +#define M88DS3103_CHIPTYPE_RS6000 1 |
|---|
| 28 | +#define M88DS3103_CHIPTYPE_3103B 2 |
|---|
| 29 | + |
|---|
| 33 | 30 | struct m88ds3103_dev { |
|---|
| 34 | 31 | struct i2c_client *client; |
|---|
| 32 | + struct i2c_client *dt_client; |
|---|
| 35 | 33 | struct regmap_config regmap_config; |
|---|
| 36 | 34 | struct regmap *regmap; |
|---|
| 37 | 35 | struct m88ds3103_config config; |
|---|
| .. | .. |
|---|
| 44 | 42 | struct i2c_mux_core *muxc; |
|---|
| 45 | 43 | /* auto detect chip id to do different config */ |
|---|
| 46 | 44 | u8 chip_id; |
|---|
| 45 | + /* chip type to differentiate m88rs6000 from m88ds3103b */ |
|---|
| 46 | + u8 chiptype; |
|---|
| 47 | 47 | /* main mclk is calculated for M88RS6000 dynamically */ |
|---|
| 48 | 48 | s32 mclk; |
|---|
| 49 | 49 | u64 post_bit_error; |
|---|
| 50 | 50 | u64 post_bit_count; |
|---|
| 51 | + u8 dt_addr; |
|---|
| 51 | 52 | }; |
|---|
| 52 | 53 | |
|---|
| 53 | 54 | struct m88ds3103_reg_val { |
|---|