aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2012-09-20 13:57:17 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-27 14:14:17 -0400
commitd67ceb3398d7ae7fda78ec753639296f442ecf66 (patch)
tree2a175c65a3b9516a6c6c814f39cdfca54a7ec993 /drivers
parent3d8a60d5de1aefd40c8e874a9db342bc974c6031 (diff)
[media] Support for Asus MyCinema U3100Mini Plus
This is initial support for the Asus MyCinema U3100Mini Plus. The driver in its current form gets detected and loads properly. Scanning using dvbscan works without problems, Locking onto a channel using tzap also works fine. Only playback using tzap -r + mplayer was tested and was fully functional. It uses the af9035 USB Bridge chip, with an af9033 demodulator. The tuner used is the FCI FC2580. Signed-off-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb-core/dvb-usb-ids.h1
-rw-r--r--drivers/media/dvb-frontends/af9033.c4
-rw-r--r--drivers/media/dvb-frontends/af9033.h1
-rw-r--r--drivers/media/dvb-frontends/af9033_priv.h37
-rw-r--r--drivers/media/tuners/fc2580.c3
-rw-r--r--drivers/media/usb/dvb-usb-v2/Kconfig1
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.c27
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.h1
8 files changed, 74 insertions, 1 deletions
diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
index d572307353e9..58e0220447c0 100644
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -329,6 +329,7 @@
329#define USB_PID_ASUS_U3000 0x171f 329#define USB_PID_ASUS_U3000 0x171f
330#define USB_PID_ASUS_U3000H 0x1736 330#define USB_PID_ASUS_U3000H 0x1736
331#define USB_PID_ASUS_U3100 0x173f 331#define USB_PID_ASUS_U3100 0x173f
332#define USB_PID_ASUS_U3100MINI_PLUS 0x1779
332#define USB_PID_YUAN_EC372S 0x1edc 333#define USB_PID_YUAN_EC372S 0x1edc
333#define USB_PID_YUAN_STK7700PH 0x1f08 334#define USB_PID_YUAN_STK7700PH 0x1f08
334#define USB_PID_YUAN_PD378S 0x2edc 335#define USB_PID_YUAN_PD378S 0x2edc
diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c
index 56e9611c0abb..8162d939c4b2 100644
--- a/drivers/media/dvb-frontends/af9033.c
+++ b/drivers/media/dvb-frontends/af9033.c
@@ -314,6 +314,10 @@ static int af9033_init(struct dvb_frontend *fe)
314 len = ARRAY_SIZE(tuner_init_tda18218); 314 len = ARRAY_SIZE(tuner_init_tda18218);
315 init = tuner_init_tda18218; 315 init = tuner_init_tda18218;
316 break; 316 break;
317 case AF9033_TUNER_FC2580:
318 len = ARRAY_SIZE(tuner_init_fc2580);
319 init = tuner_init_fc2580;
320 break;
317 default: 321 default:
318 dev_dbg(&state->i2c->dev, "%s: unsupported tuner ID=%d\n", 322 dev_dbg(&state->i2c->dev, "%s: unsupported tuner ID=%d\n",
319 __func__, state->cfg.tuner); 323 __func__, state->cfg.tuner);
diff --git a/drivers/media/dvb-frontends/af9033.h b/drivers/media/dvb-frontends/af9033.h
index 288622b54e8b..bfa4313fde21 100644
--- a/drivers/media/dvb-frontends/af9033.h
+++ b/drivers/media/dvb-frontends/af9033.h
@@ -42,6 +42,7 @@ struct af9033_config {
42#define AF9033_TUNER_FC0011 0x28 /* Fitipower FC0011 */ 42#define AF9033_TUNER_FC0011 0x28 /* Fitipower FC0011 */
43#define AF9033_TUNER_MXL5007T 0xa0 /* MaxLinear MxL5007T */ 43#define AF9033_TUNER_MXL5007T 0xa0 /* MaxLinear MxL5007T */
44#define AF9033_TUNER_TDA18218 0xa1 /* NXP TDA 18218HN */ 44#define AF9033_TUNER_TDA18218 0xa1 /* NXP TDA 18218HN */
45#define AF9033_TUNER_FC2580 0x32 /* FCI FC2580 */
45 u8 tuner; 46 u8 tuner;
46 47
47 /* 48 /*
diff --git a/drivers/media/dvb-frontends/af9033_priv.h b/drivers/media/dvb-frontends/af9033_priv.h
index 0b783b9ed75e..34dddcd77538 100644
--- a/drivers/media/dvb-frontends/af9033_priv.h
+++ b/drivers/media/dvb-frontends/af9033_priv.h
@@ -466,5 +466,42 @@ static const struct reg_val tuner_init_tda18218[] = {
466 {0x80f1e6, 0x00}, 466 {0x80f1e6, 0x00},
467}; 467};
468 468
469/* FCI FC2580 tuner init */
470static const struct reg_val tuner_init_fc2580[] = {
471 { 0x800046, 0x32 },
472 { 0x800057, 0x01 },
473 { 0x800058, 0x00 },
474 { 0x80005f, 0x00 },
475 { 0x800060, 0x00 },
476 { 0x800071, 0x05 },
477 { 0x800072, 0x02 },
478 { 0x800074, 0x01 },
479 { 0x800079, 0x01 },
480 { 0x800093, 0x00 },
481 { 0x800094, 0x00 },
482 { 0x800095, 0x00 },
483 { 0x800096, 0x05 },
484 { 0x8000b3, 0x01 },
485 { 0x8000c3, 0x01 },
486 { 0x8000c4, 0x00 },
487 { 0x80f007, 0x00 },
488 { 0x80f00c, 0x19 },
489 { 0x80f00d, 0x1A },
490 { 0x80f00e, 0x00 },
491 { 0x80f00f, 0x02 },
492 { 0x80f010, 0x00 },
493 { 0x80f011, 0x02 },
494 { 0x80f012, 0x00 },
495 { 0x80f013, 0x02 },
496 { 0x80f014, 0x00 },
497 { 0x80f015, 0x02 },
498 { 0x80f01f, 0x96 },
499 { 0x80f020, 0x00 },
500 { 0x80f029, 0x96 },
501 { 0x80f02a, 0x00 },
502 { 0x80f077, 0x01 },
503 { 0x80f1e6, 0x01 },
504};
505
469#endif /* AF9033_PRIV_H */ 506#endif /* AF9033_PRIV_H */
470 507
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
index afc04915f5ae..51bc39ca0090 100644
--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -498,8 +498,9 @@ struct dvb_frontend *fc2580_attach(struct dvb_frontend *fe,
498 498
499 dev_dbg(&priv->i2c->dev, "%s: chip_id=%02x\n", __func__, chip_id); 499 dev_dbg(&priv->i2c->dev, "%s: chip_id=%02x\n", __func__, chip_id);
500 500
501 if (chip_id != 0x56) 501 if ((chip_id != 0x56) && (chip_id != 0x5a)) {
502 goto err; 502 goto err;
503 }
503 504
504 dev_info(&priv->i2c->dev, 505 dev_info(&priv->i2c->dev,
505 "%s: FCI FC2580 successfully identified\n", 506 "%s: FCI FC2580 successfully identified\n",
diff --git a/drivers/media/usb/dvb-usb-v2/Kconfig b/drivers/media/usb/dvb-usb-v2/Kconfig
index e09930c6b4f9..834bfecbed73 100644
--- a/drivers/media/usb/dvb-usb-v2/Kconfig
+++ b/drivers/media/usb/dvb-usb-v2/Kconfig
@@ -40,6 +40,7 @@ config DVB_USB_AF9035
40 select MEDIA_TUNER_FC0011 if MEDIA_SUBDRV_AUTOSELECT 40 select MEDIA_TUNER_FC0011 if MEDIA_SUBDRV_AUTOSELECT
41 select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT 41 select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
42 select MEDIA_TUNER_TDA18218 if MEDIA_SUBDRV_AUTOSELECT 42 select MEDIA_TUNER_TDA18218 if MEDIA_SUBDRV_AUTOSELECT
43 select MEDIA_TUNER_FC2580 if MEDIA_SUBDRV_AUTOSELECT
43 help 44 help
44 Say Y here to support the Afatech AF9035 based DVB USB receiver. 45 Say Y here to support the Afatech AF9035 based DVB USB receiver.
45 46
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index 84b3b27db979..aabd3fc03ea7 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -513,6 +513,7 @@ static int af9035_read_config(struct dvb_usb_device *d)
513 case AF9033_TUNER_FC0011: 513 case AF9033_TUNER_FC0011:
514 case AF9033_TUNER_MXL5007T: 514 case AF9033_TUNER_MXL5007T:
515 case AF9033_TUNER_TDA18218: 515 case AF9033_TUNER_TDA18218:
516 case AF9033_TUNER_FC2580:
516 state->af9033_config[i].spec_inv = 1; 517 state->af9033_config[i].spec_inv = 1;
517 break; 518 break;
518 default: 519 default:
@@ -798,6 +799,11 @@ static struct tda18218_config af9035_tda18218_config = {
798 .i2c_wr_max = 21, 799 .i2c_wr_max = 21,
799}; 800};
800 801
802static const struct fc2580_config af9035_fc2580_config = {
803 .i2c_addr = 0x56,
804 .clock = 16384000,
805};
806
801static int af9035_tuner_attach(struct dvb_usb_adapter *adap) 807static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
802{ 808{
803 struct state *state = adap_to_priv(adap); 809 struct state *state = adap_to_priv(adap);
@@ -882,6 +888,25 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
882 fe = dvb_attach(tda18218_attach, adap->fe[0], 888 fe = dvb_attach(tda18218_attach, adap->fe[0],
883 &d->i2c_adap, &af9035_tda18218_config); 889 &d->i2c_adap, &af9035_tda18218_config);
884 break; 890 break;
891 case AF9033_TUNER_FC2580:
892 /* Tuner enable using gpiot2_o, gpiot2_en and gpiot2_on */
893 ret = af9035_wr_reg_mask(d, 0xd8eb, 0x01, 0x01);
894 if (ret < 0)
895 goto err;
896
897 ret = af9035_wr_reg_mask(d, 0xd8ec, 0x01, 0x01);
898 if (ret < 0)
899 goto err;
900
901 ret = af9035_wr_reg_mask(d, 0xd8ed, 0x01, 0x01);
902 if (ret < 0)
903 goto err;
904
905 usleep_range(10000, 50000);
906 /* attach tuner */
907 fe = dvb_attach(fc2580_attach, adap->fe[0],
908 &d->i2c_adap, &af9035_fc2580_config);
909 break;
885 default: 910 default:
886 fe = NULL; 911 fe = NULL;
887 } 912 }
@@ -1106,6 +1131,8 @@ static const struct usb_device_id af9035_id_table[] = {
1106 &af9035_props, "AVerMedia HD Volar (A867)", NULL) }, 1131 &af9035_props, "AVerMedia HD Volar (A867)", NULL) },
1107 { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TWINSTAR, 1132 { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TWINSTAR,
1108 &af9035_props, "AVerMedia Twinstar (A825)", NULL) }, 1133 &af9035_props, "AVerMedia Twinstar (A825)", NULL) },
1134 { DVB_USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3100MINI_PLUS,
1135 &af9035_props, "Asus U3100Mini Plus", NULL) },
1109 { } 1136 { }
1110}; 1137};
1111MODULE_DEVICE_TABLE(usb, af9035_id_table); 1138MODULE_DEVICE_TABLE(usb, af9035_id_table);
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h
index de8e761bb203..75ef1ec13fbf 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.h
+++ b/drivers/media/usb/dvb-usb-v2/af9035.h
@@ -28,6 +28,7 @@
28#include "fc0011.h" 28#include "fc0011.h"
29#include "mxl5007t.h" 29#include "mxl5007t.h"
30#include "tda18218.h" 30#include "tda18218.h"
31#include "fc2580.h"
31 32
32struct reg_val { 33struct reg_val {
33 u32 reg; 34 u32 reg;