aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2015-03-14 08:10:17 +0000
committerPeter Griffin <peter.griffin@linaro.org>2015-06-09 15:21:11 +0100
commit4c6b2e092d8c0a176ba9d71fdac312cfae030eba (patch)
tree4825e6a4af614258c5ffae63c3e06a72fd5367ae
parent123b85977ec158c2640563b02caaa8206861b33f (diff)
stih407.h: Add more configurations for dual NIM
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
-rw-r--r--drivers/media/dvb-soc/stih407.h162
1 files changed, 140 insertions, 22 deletions
diff --git a/drivers/media/dvb-soc/stih407.h b/drivers/media/dvb-soc/stih407.h
index 95d3b2a366d2..e1ce2d412b74 100644
--- a/drivers/media/dvb-soc/stih407.h
+++ b/drivers/media/dvb-soc/stih407.h
@@ -91,35 +91,61 @@ struct plat_frontend_config sat_plat_fe_config = {
#define STV0367_PLL_NIM 1
#define STV0367_TDA18212_NIM 2
-struct stv0367_config stv0367_pll_config = {
- .demod_address = 0x1d,
- .xtal = 27000000,
- .if_khz = 36166,
- .if_iq_mode = FE_TER_NORMAL_IF_TUNER,
- .ts_mode = STV0367_SERIAL_PUNCT_CLOCK,
- .clk_pol = STV0367_CLOCKPOLARITY_DEFAULT,
-};
-
-struct stv0367_config stv0367_tda18212_config = {
- .demod_address = 0x1d,
- .xtal = 16000000,
- .if_khz = 4500,
- .if_iq_mode = FE_TER_NORMAL_IF_TUNER,
- .ts_mode = STV0367_SERIAL_PUNCT_CLOCK,
- .clk_pol = STV0367_CLOCKPOLARITY_DEFAULT,
-};
-#ifdef HUGHES_NIM
+struct stv0367_config stv0367_pll_config[] = {
+ {
+ .demod_address = 0x1c,
+ .xtal = 27000000,
+ .if_khz = 36166,
+ .if_iq_mode = FE_TER_NORMAL_IF_TUNER,
+ .ts_mode = STV0367_SERIAL_PUNCT_CLOCK,
+ .clk_pol = STV0367_CLOCKPOLARITY_DEFAULT,
+ }, {
+ .demod_address = 0x1d,
+ .xtal = 27000000,
+ .if_khz = 36166,
+ .if_iq_mode = FE_TER_NORMAL_IF_TUNER,
+ .ts_mode = STV0367_SERIAL_PUNCT_CLOCK,
+ .clk_pol = STV0367_CLOCKPOLARITY_DEFAULT,
+ },
+};
+
+struct stv0367_config stv0367_tda18212_config[] = {
+ {
+ .demod_address = 0x1c,
+ .xtal = 16000000,
+ .if_khz = 4500,
+ .if_iq_mode = FE_TER_NORMAL_IF_TUNER,
+ .ts_mode = STV0367_SERIAL_PUNCT_CLOCK,
+ .clk_pol = STV0367_CLOCKPOLARITY_DEFAULT,
+ }, {
+ .demod_address = 0x1d,
+ .xtal = 16000000,
+ .if_khz = 4500,
+ .if_iq_mode = FE_TER_NORMAL_IF_TUNER,
+ .ts_mode = STV0367_SERIAL_PUNCT_CLOCK,
+ .clk_pol = STV0367_CLOCKPOLARITY_DEFAULT,
+ },
+};
+
static struct tda18212_config tda18212_conf = {
- .i2c_address = 0x60 /* (0xc0 >> 1)*/,
+ /* .i2c_address = 0x60 /* (0xc0 >> 1),*/
.if_dvbt_6 = 4150,
.if_dvbt_7 = 4150,
.if_dvbt_8 = 4500,
.if_dvbc = 5000,
};
-#endif
-struct fe_config stv0367_pll_fe_config = {
+
+struct fe_config stv0367_pll_fe_config_nimb = {
.tuner_id = DVB_PLL_THOMSON_DTT7546X,
.tuner_address = 0x60,
+ .demod_address = 0x1d,
+ .nim_board = STV0367_PLL_NIM,
+};
+
+struct fe_config stv0367_pll_fe_config_nima = {
+ .tuner_id = DVB_PLL_THOMSON_DTT7546X,
+ .tuner_address = 0x60,
+ .demod_address = 0x1c,
.nim_board = STV0367_PLL_NIM,
};
@@ -127,7 +153,24 @@ struct fe_config stv0367_pll_fe_config = {
struct plat_frontend_channel ter_stv0367_pll_nimb = {
.option = STM_TSM_CHANNEL_3 | STM_SERIAL_NOT_PARALLEL,
- .config = &stv0367_pll_fe_config,
+ .config = &stv0367_pll_fe_config_nimb,
+
+ .demod_attach = demod_367_attach,
+ .demod_i2c_bus = 1,
+
+ .tuner_attach = tuner_attach,
+ .tuner_i2c_bus = 1,
+
+ .lock = 1,
+ .drop = 1,
+
+};
+
+/* tsin 2 for NIM A */
+struct plat_frontend_channel ter_stv0367_pll_nima = {
+ .option = STM_TSM_CHANNEL_2 | STM_SERIAL_NOT_PARALLEL,
+
+ .config = &stv0367_pll_fe_config_nima,
.demod_attach = demod_367_attach,
.demod_i2c_bus = 1,
@@ -161,6 +204,39 @@ struct plat_frontend_channel ter_stv0367_tda18212_nimb = {
};
+struct plat_frontend_channel multiple_channel_config[] = {
+
+ {
+ .option = STM_TSM_CHANNEL_0 | STM_SERIAL_NOT_PARALLEL,
+
+ .config = &stv0367_pll_fe_config_nima,
+
+ .demod_attach = demod_367_attach,
+ .demod_i2c_bus = 0,
+
+ .tuner_attach = tuner_attach,
+ .tuner_i2c_bus = 0,
+
+ .lock = 1,
+ .drop = 1,
+ },
+ {
+ .option = STM_TSM_CHANNEL_3 | STM_SERIAL_NOT_PARALLEL,
+
+ .config = &stv0367_pll_fe_config_nimb,
+
+ .demod_attach = demod_367_attach,
+ .demod_i2c_bus = 1,
+
+ .tuner_attach = tuner_attach,
+ .tuner_i2c_bus = 1,
+
+ .lock = 1,
+ .drop = 1,
+
+ },
+};
+
struct plat_frontend_config ter_plat_fe_config_tda = {
.nr_channels = 1,
.channels = &ter_stv0367_tda18212_nimb,
@@ -171,4 +247,46 @@ struct plat_frontend_config ter_plat_fe_config = {
.channels = &ter_stv0367_pll_nimb,
};
+struct plat_frontend_config ter_plat_fe_config_multiple = {
+ .nr_channels = 2,
+ .channels = &multiple_channel_config,
+};
+
+/*
+struct plat_frontend_config ter_plat_fe_config_multiple = {
+ .nr_channels = 2,
+
+ .channels = {
+ {
+ .option = STM_TSM_CHANNEL_3 | STM_SERIAL_NOT_PARALLEL,
+
+ .config = &stv0367_tda18212_fe_config,
+
+ .demod_attach = demod_367_attach,
+ .demod_i2c_bus = 1,
+
+ .tuner_attach = tda18212_tuner_attach,
+ .tuner_i2c_bus = 1,
+
+ .lock = 1,
+ .drop = 1,
+
+ }, {
+ .option = STM_TSM_CHANNEL_2 | STM_SERIAL_NOT_PARALLEL,
+
+ .config = &stv0367_pll_fe_config_nima,
+
+ .demod_attach = demod_367_attach,
+ .demod_i2c_bus = 1,
+
+ .tuner_attach = tuner_attach,
+ .tuner_i2c_bus = 1,
+
+ .lock = 1,
+ .drop = 1,
+ },
+ },
+};
+*/
+
#endif