media: em28xx: Add new dvb-t board ":Zolid Hybrid Tv Stick"
authorMarcel Stork <mjstork@gmail.com>
Thu, 26 Apr 2018 19:17:02 +0000 (15:17 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sat, 5 May 2018 14:34:09 +0000 (10:34 -0400)
Extra code to be able to use this stick, only digital, not analog
nor remote-control.

Signed-off-by: Marcel Stork <mjstork@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-dvb.c
drivers/media/usb/em28xx/em28xx.h

index e72633bc60ffe96a28b76d825fad0aa9c02e9ffc..9a68bdfeb967b9b321b0add25b3f8e322c8f2d30 100644 (file)
@@ -87,6 +87,21 @@ static const struct em28xx_reg_seq default_digital[] = {
        {       -1,             -1,     -1,             -1},
 };
 
+/* Board :Zolid Hybrid Tv Stick */
+static struct em28xx_reg_seq zolid_tuner[] = {
+       {EM2820_R08_GPIO_CTRL,          0xfd,           0xff,   100},
+       {EM2820_R08_GPIO_CTRL,          0xfe,           0xff,   100},
+       {               -1,                                     -1,                     -1,              -1},
+};
+
+static struct em28xx_reg_seq zolid_digital[] = {
+       {EM2820_R08_GPIO_CTRL,          0x6a,           0xff,   100},
+       {EM2820_R08_GPIO_CTRL,          0x7a,           0xff,   100},
+       {EM2880_R04_GPO,                        0x04,           0xff,   100},
+       {EM2880_R04_GPO,                        0x0c,           0xff,   100},
+       {       -1,                                             -1,                     -1,              -1},
+};
+
 /* Board Hauppauge WinTV HVR 900 analog */
 static const struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
        {EM2820_R08_GPIO_CTRL,  0x2d,   ~EM_GPIO_4,     10},
@@ -666,6 +681,16 @@ const struct em28xx_board em28xx_boards[] = {
                .tuner_type    = TUNER_ABSENT,
                .is_webcam     = 1,     /* To enable sensor probe */
        },
+       [EM2882_BOARD_ZOLID_HYBRID_TV_STICK] = {
+               .name                   = ":ZOLID HYBRID TV STICK",
+               .tuner_type             = TUNER_XC2028,
+               .tuner_gpio             = zolid_tuner,
+               .decoder                = EM28XX_TVP5150,
+               .xclk                   = EM28XX_XCLK_FREQUENCY_12MHZ,
+               .mts_firmware   = 1,
+               .has_dvb                = 1,
+               .dvb_gpio               = zolid_digital,
+       },
        [EM2750_BOARD_DLCW_130] = {
                /* Beijing Huaqi Information Digital Technology Co., Ltd */
                .name          = "Huaqi DLCW-130",
@@ -2493,7 +2518,7 @@ struct usb_device_id em28xx_id_table[] = {
                        .driver_info = EM2820_BOARD_UNKNOWN },
        { USB_DEVICE(0xeb1a, 0x2881),
                        .driver_info = EM2820_BOARD_UNKNOWN },
-       { USB_DEVICE(0xeb1a, 0x2883),
+       { USB_DEVICE(0xeb1a, 0x2883), /* used by :Zolid Hybrid Tv Stick */
                        .driver_info = EM2820_BOARD_UNKNOWN },
        { USB_DEVICE(0xeb1a, 0x2868),
                        .driver_info = EM2820_BOARD_UNKNOWN },
@@ -2690,6 +2715,7 @@ static const struct em28xx_hash_table em28xx_eeprom_hash[] = {
        {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
        {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
        {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
+       {0x85dd871e, EM2882_BOARD_ZOLID_HYBRID_TV_STICK, TUNER_XC2028},
 };
 
 /* I2C devicelist hash table for devices with generic USB IDs */
@@ -2701,6 +2727,7 @@ static const struct em28xx_hash_table em28xx_i2c_hash[] = {
        {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC},
        {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF},
        {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT},
+       {0x27e10080, EM2882_BOARD_ZOLID_HYBRID_TV_STICK, TUNER_XC2028},
 };
 
 /* NOTE: introduce a separate hash table for devices with 16 bit eeproms */
@@ -3187,6 +3214,7 @@ void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
        case EM2880_BOARD_TERRATEC_HYBRID_XS:
        case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
        case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+       case EM2882_BOARD_ZOLID_HYBRID_TV_STICK:
                ctl->demod = XC3028_FE_ZARLINK456;
                break;
        case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
index 8fe71ae9baf7abc65994425b04d74c0ba390f3f1..b330d40b5c21f0a24395da1a1c7d0adb37aaba70 100644 (file)
@@ -1490,6 +1490,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
        case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
        case EM2882_BOARD_TERRATEC_HYBRID_XS:
        case EM2880_BOARD_EMPIRE_DUAL_TV:
+       case EM2882_BOARD_ZOLID_HYBRID_TV_STICK:
                dvb->fe[0] = dvb_attach(zl10353_attach,
                                        &em28xx_zl10353_xc3028_no_i2c_gate,
                                        &dev->i2c_adap[dev->def_i2c_bus]);
index 63c7c61247072b8466f956f7552bd00866c35849..6e44edd2216ccb769c9e516bd9171307d523076c 100644 (file)
 #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB  99
 #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 100
 #define EM2884_BOARD_TERRATEC_H6                 101
+#define EM2882_BOARD_ZOLID_HYBRID_TV_STICK             102
 
 /* Limits minimum and default number of buffers */
 #define EM28XX_MIN_BUF 4