diff options
author | Antti Palosaari <crope@iki.fi> | 2011-04-07 15:34:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:30:11 -0400 |
commit | d6a5f921fb8cbd418b298e5bbe83e5c8c8e1da16 (patch) | |
tree | d940e49635606143992af86911205c220884d5ca /drivers/media/video/em28xx | |
parent | 27cfc85e3dae187a470f7aa54123689a487970f2 (diff) |
[media] Add support for PCTV nanoStick T2 290e [2013:024f]
Supports DVB-T/T2/C, USB ID: 2013:024f.
Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 23 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 49 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 1 |
4 files changed, 74 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/video/em28xx/Kconfig index 04760b2a032c..3cb78f26df90 100644 --- a/drivers/media/video/em28xx/Kconfig +++ b/drivers/media/video/em28xx/Kconfig | |||
@@ -39,6 +39,7 @@ config VIDEO_EM28XX_DVB | |||
39 | select DVB_TDA10023 if !DVB_FE_CUSTOMISE | 39 | select DVB_TDA10023 if !DVB_FE_CUSTOMISE |
40 | select DVB_S921 if !DVB_FE_CUSTOMISE | 40 | select DVB_S921 if !DVB_FE_CUSTOMISE |
41 | select DVB_DRXD if !DVB_FE_CUSTOMISE | 41 | select DVB_DRXD if !DVB_FE_CUSTOMISE |
42 | select DVB_CXD2820R if !DVB_FE_CUSTOMISE | ||
42 | select VIDEOBUF_DVB | 43 | select VIDEOBUF_DVB |
43 | ---help--- | 44 | ---help--- |
44 | This adds support for DVB cards based on the | 45 | This adds support for DVB cards based on the |
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 9a5ac562ee33..4e37375decf5 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -289,6 +289,16 @@ static struct em28xx_reg_seq leadership_reset[] = { | |||
289 | { -1, -1, -1, -1}, | 289 | { -1, -1, -1, -1}, |
290 | }; | 290 | }; |
291 | 291 | ||
292 | /* 2013:024f PCTV Systems nanoStick T2 290e | ||
293 | * GPIO_6 - demod reset | ||
294 | * GPIO_7 - LED | ||
295 | */ | ||
296 | static struct em28xx_reg_seq pctv_290e[] = { | ||
297 | {EM2874_R80_GPIO, 0x00, 0xff, 80}, | ||
298 | {EM2874_R80_GPIO, 0x40, 0xff, 80}, /* GPIO_6 = 1 */ | ||
299 | {EM2874_R80_GPIO, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */ | ||
300 | {-1, -1, -1, -1}, | ||
301 | }; | ||
292 | 302 | ||
293 | /* | 303 | /* |
294 | * Board definitions | 304 | * Board definitions |
@@ -1760,6 +1770,17 @@ struct em28xx_board em28xx_boards[] = { | |||
1760 | .dvb_gpio = kworld_a340_digital, | 1770 | .dvb_gpio = kworld_a340_digital, |
1761 | .tuner_gpio = default_tuner_gpio, | 1771 | .tuner_gpio = default_tuner_gpio, |
1762 | }, | 1772 | }, |
1773 | /* 2013:024f PCTV Systems nanoStick T2 290e. | ||
1774 | * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */ | ||
1775 | [EM28174_BOARD_PCTV_290E] = { | ||
1776 | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | | ||
1777 | EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ, | ||
1778 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, | ||
1779 | .name = "PCTV Systems nanoStick T2 290e", | ||
1780 | .tuner_type = TUNER_ABSENT, | ||
1781 | .tuner_gpio = pctv_290e, | ||
1782 | .has_dvb = 1, | ||
1783 | }, | ||
1763 | }; | 1784 | }; |
1764 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); | 1785 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
1765 | 1786 | ||
@@ -1887,6 +1908,8 @@ struct usb_device_id em28xx_id_table[] = { | |||
1887 | .driver_info = EM2860_BOARD_GADMEI_UTV330 }, | 1908 | .driver_info = EM2860_BOARD_GADMEI_UTV330 }, |
1888 | { USB_DEVICE(0x1b80, 0xa340), | 1909 | { USB_DEVICE(0x1b80, 0xa340), |
1889 | .driver_info = EM2870_BOARD_KWORLD_A340 }, | 1910 | .driver_info = EM2870_BOARD_KWORLD_A340 }, |
1911 | { USB_DEVICE(0x2013, 0x024f), | ||
1912 | .driver_info = EM28174_BOARD_PCTV_290E }, | ||
1890 | { }, | 1913 | { }, |
1891 | }; | 1914 | }; |
1892 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); | 1915 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 0766bc6be14b..7904ca4b6913 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "tda18271.h" | 39 | #include "tda18271.h" |
40 | #include "s921.h" | 40 | #include "s921.h" |
41 | #include "drxd.h" | 41 | #include "drxd.h" |
42 | #include "cxd2820r.h" | ||
42 | 43 | ||
43 | MODULE_DESCRIPTION("driver for em28xx based DVB cards"); | 44 | MODULE_DESCRIPTION("driver for em28xx based DVB cards"); |
44 | MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>"); | 45 | MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>"); |
@@ -334,6 +335,26 @@ static struct tda10023_config em28xx_tda10023_config = { | |||
334 | .invert = 1, | 335 | .invert = 1, |
335 | }; | 336 | }; |
336 | 337 | ||
338 | static struct cxd2820r_config em28xx_cxd2820r_config = { | ||
339 | .i2c_address = (0xd8 >> 1), | ||
340 | .ts_mode = CXD2820R_TS_SERIAL, | ||
341 | .if_dvbt_6 = 3300, | ||
342 | .if_dvbt_7 = 3500, | ||
343 | .if_dvbt_8 = 4000, | ||
344 | .if_dvbt2_6 = 3300, | ||
345 | .if_dvbt2_7 = 3500, | ||
346 | .if_dvbt2_8 = 4000, | ||
347 | .if_dvbc = 5000, | ||
348 | |||
349 | /* enable LNA for DVB-T2 and DVB-C */ | ||
350 | .gpio_dvbt2[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L, | ||
351 | .gpio_dvbc[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L, | ||
352 | }; | ||
353 | |||
354 | static struct tda18271_config em28xx_cxd2820r_tda18271_config = { | ||
355 | .output_opt = TDA18271_OUTPUT_LT_OFF, | ||
356 | }; | ||
357 | |||
337 | /* ------------------------------------------------------------------ */ | 358 | /* ------------------------------------------------------------------ */ |
338 | 359 | ||
339 | static int attach_xc3028(u8 addr, struct em28xx *dev) | 360 | static int attach_xc3028(u8 addr, struct em28xx *dev) |
@@ -640,6 +661,34 @@ static int dvb_init(struct em28xx *dev) | |||
640 | dvb_attach(tda18271_attach, dvb->fe[0], 0x60, | 661 | dvb_attach(tda18271_attach, dvb->fe[0], 0x60, |
641 | &dev->i2c_adap, &kworld_a340_config); | 662 | &dev->i2c_adap, &kworld_a340_config); |
642 | break; | 663 | break; |
664 | case EM28174_BOARD_PCTV_290E: | ||
665 | /* MFE | ||
666 | * FE 0 = DVB-T/T2 + FE 1 = DVB-C, both sharing same tuner. */ | ||
667 | /* FE 0 */ | ||
668 | dvb->fe[0] = dvb_attach(cxd2820r_attach, | ||
669 | &em28xx_cxd2820r_config, &dev->i2c_adap, NULL); | ||
670 | if (dvb->fe[0]) { | ||
671 | struct i2c_adapter *i2c_tuner; | ||
672 | i2c_tuner = cxd2820r_get_tuner_i2c_adapter(dvb->fe[0]); | ||
673 | /* FE 0 attach tuner */ | ||
674 | if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, | ||
675 | i2c_tuner, &em28xx_cxd2820r_tda18271_config)) { | ||
676 | dvb_frontend_detach(dvb->fe[0]); | ||
677 | result = -EINVAL; | ||
678 | goto out_free; | ||
679 | } | ||
680 | /* FE 1. This dvb_attach() cannot fail. */ | ||
681 | dvb->fe[1] = dvb_attach(cxd2820r_attach, NULL, NULL, | ||
682 | dvb->fe[0]); | ||
683 | dvb->fe[1]->id = 1; | ||
684 | /* FE 1 attach tuner */ | ||
685 | if (!dvb_attach(tda18271_attach, dvb->fe[1], 0x60, | ||
686 | i2c_tuner, &em28xx_cxd2820r_tda18271_config)) { | ||
687 | dvb_frontend_detach(dvb->fe[1]); | ||
688 | /* leave FE 0 still active */ | ||
689 | } | ||
690 | } | ||
691 | break; | ||
643 | default: | 692 | default: |
644 | em28xx_errdev("/2: The frontend of your DVB/ATSC card" | 693 | em28xx_errdev("/2: The frontend of your DVB/ATSC card" |
645 | " isn't supported yet\n"); | 694 | " isn't supported yet\n"); |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index a2222fc6c016..3cca33122450 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -118,6 +118,7 @@ | |||
118 | #define EM2882_BOARD_DIKOM_DK300 75 | 118 | #define EM2882_BOARD_DIKOM_DK300 75 |
119 | #define EM2870_BOARD_KWORLD_A340 76 | 119 | #define EM2870_BOARD_KWORLD_A340 76 |
120 | #define EM2874_LEADERSHIP_ISDBT 77 | 120 | #define EM2874_LEADERSHIP_ISDBT 77 |
121 | #define EM28174_BOARD_PCTV_290E 78 | ||
121 | 122 | ||
122 | 123 | ||
123 | /* Limits minimum and default number of buffers */ | 124 | /* Limits minimum and default number of buffers */ |