Commit ce02704d authored by Timothy Lee's avatar Timothy Lee Committed by Mauro Carvalho Chehab

[media] saa7134: support MagicPro ProHDTV Pro2 Hybrid DMB-TH PCI card

This card has a TD18271 silicon tuner, and uses TDA8290 and LGS8G75 to
demodulate analog and digital broadcast respectively.  GPIO configurations
were derived using DScaler regspy.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5398b622
...@@ -5591,6 +5591,47 @@ struct saa7134_board saa7134_boards[] = { ...@@ -5591,6 +5591,47 @@ struct saa7134_board saa7134_boards[] = {
.amux = TV, .amux = TV,
}, },
}, },
[SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2] = {
/* Timothy Lee <timothy.lee@siriushk.com> */
.name = "MagicPro ProHDTV Pro2 DMB-TH/Hybrid",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
.radio_type = UNSET,
.tuner_config = 3,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 0x02050000,
.mpeg = SAA7134_MPEG_DVB,
.ts_type = SAA7134_MPEG_TS_PARALLEL,
.inputs = { {
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
.gpio = 0x00050000,
}, {
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
.gpio = 0x00050000,
}, {
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
.gpio = 0x00050000,
} },
.radio = {
.name = name_radio,
.amux = TV,
.gpio = 0x00050000,
},
.mute = {
.name = name_mute,
.vmux = 0,
.amux = TV,
.gpio = 0x00050000,
},
},
}; };
...@@ -6795,6 +6836,12 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -6795,6 +6836,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x185b, .subvendor = 0x185b,
.subdevice = 0xc900, .subdevice = 0xc900,
.driver_data = SAA7134_BOARD_VIDEOMATE_M1F, .driver_data = SAA7134_BOARD_VIDEOMATE_M1F,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134,
.subvendor = 0x17de,
.subdevice = 0xd136,
.driver_data = SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2,
}, { }, {
/* --- boards without eeprom + subsystem ID --- */ /* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
...@@ -6988,6 +7035,7 @@ static int saa7134_tda8290_18271_callback(struct saa7134_dev *dev, ...@@ -6988,6 +7035,7 @@ static int saa7134_tda8290_18271_callback(struct saa7134_dev *dev,
switch (dev->board) { switch (dev->board) {
case SAA7134_BOARD_HAUPPAUGE_HVR1150: case SAA7134_BOARD_HAUPPAUGE_HVR1150:
case SAA7134_BOARD_HAUPPAUGE_HVR1120: case SAA7134_BOARD_HAUPPAUGE_HVR1120:
case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2:
ret = saa7134_tda18271_hvr11x0_toggle_agc(dev, arg); ret = saa7134_tda18271_hvr11x0_toggle_agc(dev, arg);
break; break;
case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG: case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG:
...@@ -7014,6 +7062,7 @@ static int saa7134_tda8290_callback(struct saa7134_dev *dev, ...@@ -7014,6 +7062,7 @@ static int saa7134_tda8290_callback(struct saa7134_dev *dev,
case SAA7134_BOARD_HAUPPAUGE_HVR1120: case SAA7134_BOARD_HAUPPAUGE_HVR1120:
case SAA7134_BOARD_AVERMEDIA_M733A: case SAA7134_BOARD_AVERMEDIA_M733A:
case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG: case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG:
case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2:
/* tda8290 + tda18271 */ /* tda8290 + tda18271 */
ret = saa7134_tda8290_18271_callback(dev, command, arg); ret = saa7134_tda8290_18271_callback(dev, command, arg);
break; break;
...@@ -7326,6 +7375,11 @@ int saa7134_board_init1(struct saa7134_dev *dev) ...@@ -7326,6 +7375,11 @@ int saa7134_board_init1(struct saa7134_dev *dev)
saa7134_set_gpio(dev, 1, 1); saa7134_set_gpio(dev, 1, 1);
dev->has_remote = SAA7134_REMOTE_GPIO; dev->has_remote = SAA7134_REMOTE_GPIO;
break; break;
case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2:
/* enable LGS-8G75 */
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0e050000, 0x0c050000);
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0e050000, 0x0c050000);
break;
} }
return 0; return 0;
} }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "lgdt3305.h" #include "lgdt3305.h"
#include "tda8290.h" #include "tda8290.h"
#include "mb86a20s.h" #include "mb86a20s.h"
#include "lgs8gxx.h"
#include "zl10353.h" #include "zl10353.h"
...@@ -1123,6 +1124,26 @@ static struct tda18271_config dtv1000s_tda18271_config = { ...@@ -1123,6 +1124,26 @@ static struct tda18271_config dtv1000s_tda18271_config = {
.gate = TDA18271_GATE_ANALOG, .gate = TDA18271_GATE_ANALOG,
}; };
static struct lgs8gxx_config prohdtv_pro2_lgs8g75_config = {
.prod = LGS8GXX_PROD_LGS8G75,
.demod_address = 0x1d,
.serial_ts = 0,
.ts_clk_pol = 1,
.ts_clk_gated = 0,
.if_clk_freq = 30400, /* 30.4 MHz */
.if_freq = 4000, /* 4.00 MHz */
.if_neg_center = 0,
.ext_adc = 0,
.adc_signed = 1,
.adc_vpp = 3, /* 2.0 Vpp */
.if_neg_edge = 1,
};
static struct tda18271_config prohdtv_pro2_tda18271_config = {
.gate = TDA18271_GATE_ANALOG,
.output_opt = TDA18271_OUTPUT_LT_OFF,
};
/* ================================================================== /* ==================================================================
* Core code * Core code
*/ */
...@@ -1674,6 +1695,19 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1674,6 +1695,19 @@ static int dvb_init(struct saa7134_dev *dev)
/* mb86a20s need to use the I2C gateway */ /* mb86a20s need to use the I2C gateway */
break; break;
case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2:
fe0->dvb.frontend = dvb_attach(lgs8gxx_attach,
&prohdtv_pro2_lgs8g75_config,
&dev->i2c_adap);
if (fe0->dvb.frontend != NULL) {
dvb_attach(tda829x_attach, fe0->dvb.frontend,
&dev->i2c_adap, 0x4b,
&tda829x_no_probe);
dvb_attach(tda18271_attach, fe0->dvb.frontend,
0x60, &dev->i2c_adap,
&prohdtv_pro2_tda18271_config);
}
break;
default: default:
wprintk("Huh? unknown DVB card?\n"); wprintk("Huh? unknown DVB card?\n");
break; break;
......
...@@ -328,6 +328,7 @@ struct saa7134_card_ir { ...@@ -328,6 +328,7 @@ struct saa7134_card_ir {
#define SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG 182 #define SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG 182
#define SAA7134_BOARD_VIDEOMATE_M1F 183 #define SAA7134_BOARD_VIDEOMATE_M1F 183
#define SAA7134_BOARD_ENCORE_ENLTV_FM3 184 #define SAA7134_BOARD_ENCORE_ENLTV_FM3 184
#define SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2 185
#define SAA7134_MAXBOARDS 32 #define SAA7134_MAXBOARDS 32
#define SAA7134_INPUT_MAX 8 #define SAA7134_INPUT_MAX 8
......
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