Commit e6089fec authored by Brad Love's avatar Brad Love Committed by Mauro Carvalho Chehab

media: m88ds3103: Add support for ds3103b demod

The ds3103b demodulator identifies as an m88rs600, but requires different
clock settings and firmware, along with differences in register settings.

Changes were reverse engineered using an instrumented downstream GPLv2
driver to compare i2c traffic and clocking. The mclk functions are from
the downstream GPLv2 driver.
Signed-off-by: default avatarBrad Love <brad@nextdimension.cc>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e6c6d7d4
This diff is collapsed.
...@@ -16,13 +16,20 @@ ...@@ -16,13 +16,20 @@
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/math64.h> #include <linux/math64.h>
#define M88DS3103B_FIRMWARE "dvb-demod-m88ds3103b.fw"
#define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw" #define M88DS3103_FIRMWARE "dvb-demod-m88ds3103.fw"
#define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw" #define M88RS6000_FIRMWARE "dvb-demod-m88rs6000.fw"
#define M88RS6000_CHIP_ID 0x74 #define M88RS6000_CHIP_ID 0x74
#define M88DS3103_CHIP_ID 0x70 #define M88DS3103_CHIP_ID 0x70
#define M88DS3103_CHIPTYPE_3103 0
#define M88DS3103_CHIPTYPE_RS6000 1
#define M88DS3103_CHIPTYPE_3103B 2
struct m88ds3103_dev { struct m88ds3103_dev {
struct i2c_client *client; struct i2c_client *client;
struct i2c_client *dt_client;
struct regmap_config regmap_config; struct regmap_config regmap_config;
struct regmap *regmap; struct regmap *regmap;
struct m88ds3103_config config; struct m88ds3103_config config;
...@@ -35,10 +42,13 @@ struct m88ds3103_dev { ...@@ -35,10 +42,13 @@ struct m88ds3103_dev {
struct i2c_mux_core *muxc; struct i2c_mux_core *muxc;
/* auto detect chip id to do different config */ /* auto detect chip id to do different config */
u8 chip_id; u8 chip_id;
/* chip type to differentiate m88rs6000 from m88ds3103b */
u8 chiptype;
/* main mclk is calculated for M88RS6000 dynamically */ /* main mclk is calculated for M88RS6000 dynamically */
s32 mclk; s32 mclk;
u64 post_bit_error; u64 post_bit_error;
u64 post_bit_count; u64 post_bit_count;
u8 dt_addr;
}; };
struct m88ds3103_reg_val { struct m88ds3103_reg_val {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment