[media] em28xx: add Terratec Cinergy T XS (MT2060)
authorAlberto Mardegan <mardy@users.sourceforge.net>
Tue, 27 Oct 2015 19:24:14 +0000 (17:24 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 19 Nov 2015 11:29:16 +0000 (09:29 -0200)
The Terratec Cinergy T XS is a DVB-T receiver with no analog TV tuner.
This patch adds support for the cards carrying the mt2060 tuner; it's
unclear whether there are cards sold under the same name which use a
different tuner.
As long as there are no reports of such cards, and indeed as long as
there are no working drivers for them, we assume that the USB device
[0ccd:0043] is carrying the mt2060 tuner.

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Documentation/video4linux/CARDLIST.em28xx
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-dvb.c

index 9e57ce43c4f499fbe3bf8c27775bcd3f5a50bc69..67209998a439ee55c9169194c368e7c6a192c40d 100644 (file)
@@ -41,8 +41,8 @@
  40 -> Plextor ConvertX PX-TV100U               (em2861)        [093b:a005]
  41 -> Kworld 350 U DVB-T                       (em2870)        [eb1a:e350]
  42 -> Kworld 355 U DVB-T                       (em2870)        [eb1a:e355,eb1a:e357,eb1a:e359]
- 43 -> Terratec Cinergy T XS                    (em2870)        [0ccd:0043]
- 44 -> Terratec Cinergy T XS (MT2060)           (em2870)
+ 43 -> Terratec Cinergy T XS                    (em2870)
+ 44 -> Terratec Cinergy T XS (MT2060)           (em2870)        [0ccd:0043]
  45 -> Pinnacle PCTV DVB-T                      (em2870)
  46 -> Compro, VideoMate U3                     (em2870)        [185b:2870]
  47 -> KWorld DVB-T 305U                        (em2880)        [eb1a:e305]
index 5718c4f7517a72211182754b4ad1313a19d65048..5373dce4f4caabfa57984b2039cbf0649222d6c8 100644 (file)
@@ -1051,8 +1051,12 @@ struct em28xx_board em28xx_boards[] = {
        },
        [EM2870_BOARD_TERRATEC_XS_MT2060] = {
                .name         = "Terratec Cinergy T XS (MT2060)",
-               .valid        = EM28XX_BOARD_NOT_VALIDATED,
+               .xclk         = EM28XX_XCLK_IR_RC5_MODE |
+                               EM28XX_XCLK_FREQUENCY_12MHZ,
+               .i2c_speed    = EM28XX_I2C_CLK_WAIT_ENABLE,
                .tuner_type   = TUNER_ABSENT, /* MT2060 */
+               .has_dvb      = 1,
+               .tuner_gpio   = default_tuner_gpio,
        },
        [EM2870_BOARD_KWORLD_350U] = {
                .name         = "Kworld 350 U DVB-T",
@@ -2368,7 +2372,7 @@ struct usb_device_id em28xx_id_table[] = {
        { USB_DEVICE(0x0ccd, 0x0042),
                        .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
        { USB_DEVICE(0x0ccd, 0x0043),
-                       .driver_info = EM2870_BOARD_TERRATEC_XS },
+                       .driver_info = EM2870_BOARD_TERRATEC_XS_MT2060 },
        { USB_DEVICE(0x0ccd, 0x008e),   /* Cinergy HTC USB XS Rev. 1 */
                        .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS },
        { USB_DEVICE(0x0ccd, 0x00ac),   /* Cinergy HTC USB XS Rev. 2 */
index 357be76c7a5523e7e9ff0a11c7f70f1a35571a94..bf5c24467c65bec87b43c14b3f2552cb9dce6aab 100644 (file)
@@ -38,6 +38,7 @@
 #include "lgdt3305.h"
 #include "zl10353.h"
 #include "s5h1409.h"
+#include "mt2060.h"
 #include "mt352.h"
 #include "mt352_priv.h" /* FIXME */
 #include "tda1002x.h"
@@ -815,6 +816,10 @@ static struct zl10353_config em28xx_zl10353_no_i2c_gate_dev = {
        .parallel_ts = 1,
 };
 
+static struct mt2060_config em28xx_mt2060_config = {
+       .i2c_address = 0x60,
+};
+
 static struct qt1010_config em28xx_qt1010_config = {
        .i2c_address = 0x62
 };
@@ -1142,6 +1147,16 @@ static int em28xx_dvb_init(struct em28xx *dev)
                        goto out_free;
                }
                break;
+       case EM2870_BOARD_TERRATEC_XS_MT2060:
+               dvb->fe[0] = dvb_attach(zl10353_attach,
+                                               &em28xx_zl10353_no_i2c_gate_dev,
+                                               &dev->i2c_adap[dev->def_i2c_bus]);
+               if (dvb->fe[0] != NULL) {
+                       dvb_attach(mt2060_attach, dvb->fe[0],
+                                       &dev->i2c_adap[dev->def_i2c_bus],
+                                       &em28xx_mt2060_config, 1220);
+               }
+               break;
        case EM2870_BOARD_KWORLD_355U:
                dvb->fe[0] = dvb_attach(zl10353_attach,
                                           &em28xx_zl10353_no_i2c_gate_dev,