Commit 5ccaf905 authored by Chris Pascoe's avatar Chris Pascoe Committed by Mauro Carvalho Chehab

V4L/DVB (6653): Add support for the DViCO FusionHDTV NANO2 w/ZL10353 and firmware

Add support for the DViCO FusionHDTV DVB-T NANO with zl10353 demodulator and
firmware in ROM on the device.

Again, this is based on the great work of Mike Krufky with my modifications
to use the in-tree XC2028 driver.
Signed-off-by: default avatarChris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 1ad0b796
...@@ -98,6 +98,11 @@ static void cxusb_bluebird_gpio_pulse(struct dvb_usb_device *d, u8 pin, int low) ...@@ -98,6 +98,11 @@ static void cxusb_bluebird_gpio_pulse(struct dvb_usb_device *d, u8 pin, int low)
cxusb_bluebird_gpio_rw(d, pin, low ? pin : 0); cxusb_bluebird_gpio_rw(d, pin, low ? pin : 0);
} }
static void cxusb_nano2_led(struct dvb_usb_device *d, int onoff)
{
cxusb_bluebird_gpio_rw(d, 0x40, onoff ? 0 : 0x40);
}
/* I2C */ /* I2C */
static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
int num) int num)
...@@ -200,6 +205,17 @@ static int cxusb_bluebird_power_ctrl(struct dvb_usb_device *d, int onoff) ...@@ -200,6 +205,17 @@ static int cxusb_bluebird_power_ctrl(struct dvb_usb_device *d, int onoff)
return 0; return 0;
} }
static int cxusb_nano2_power_ctrl(struct dvb_usb_device *d, int onoff)
{
int rc = 0;
rc = cxusb_power_ctrl(d, onoff);
if (!onoff)
cxusb_nano2_led(d, 0);
return rc;
}
static int cxusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) static int cxusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
{ {
u8 buf[2] = { 0x03, 0x00 }; u8 buf[2] = { 0x03, 0x00 };
...@@ -606,6 +622,26 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) ...@@ -606,6 +622,26 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap)
return 0; return 0;
} }
static int cxusb_nano2_frontend_attach(struct dvb_usb_adapter *adap)
{
if (usb_set_interface(adap->dev->udev, 0, 1) < 0)
err("set interface failed");
cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0);
/* reset the tuner and demodulator */
cxusb_bluebird_gpio_rw(adap->dev, 0x04, 0);
cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1);
cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1);
if ((adap->fe = dvb_attach(zl10353_attach,
&cxusb_zl10353_xc3028_config,
&adap->dev->i2c_adap)) != NULL)
return 0;
return -EIO;
}
/* /*
* DViCO bluebird firmware needs the "warm" product ID to be patched into the * DViCO bluebird firmware needs the "warm" product ID to be patched into the
* firmware file before download. * firmware file before download.
...@@ -639,6 +675,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties; ...@@ -639,6 +675,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties;
static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties; static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties;
static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties; static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties;
static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties; static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties;
static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties;
static int cxusb_probe(struct usb_interface *intf, static int cxusb_probe(struct usb_interface *intf,
const struct usb_device_id *id) const struct usb_device_id *id)
...@@ -648,7 +685,8 @@ static int cxusb_probe(struct usb_interface *intf, ...@@ -648,7 +685,8 @@ static int cxusb_probe(struct usb_interface *intf,
dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0 || dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_lgz201_properties,THIS_MODULE,NULL) == 0 || dvb_usb_device_init(intf,&cxusb_bluebird_lgz201_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0 || dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_dualdig4_properties,THIS_MODULE,NULL) == 0) { dvb_usb_device_init(intf,&cxusb_bluebird_dualdig4_properties,THIS_MODULE,NULL) == 0 ||
dvb_usb_device_init(intf,&cxusb_bluebird_nano2_properties,THIS_MODULE,NULL) == 0) {
return 0; return 0;
} }
...@@ -670,6 +708,7 @@ static struct usb_device_id cxusb_table [] = { ...@@ -670,6 +708,7 @@ static struct usb_device_id cxusb_table [] = {
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD) }, { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM) }, { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4) }, { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2) },
{} /* Terminating entry */ {} /* Terminating entry */
}; };
MODULE_DEVICE_TABLE (usb, cxusb_table); MODULE_DEVICE_TABLE (usb, cxusb_table);
...@@ -975,6 +1014,53 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { ...@@ -975,6 +1014,53 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = {
} }
}; };
static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = {
.caps = DVB_USB_IS_AN_I2C_ADAPTER,
.usb_ctrl = CYPRESS_FX2,
.size_of_priv = sizeof(struct cxusb_state),
.num_adapters = 1,
.adapter = {
{
.streaming_ctrl = cxusb_streaming_ctrl,
.frontend_attach = cxusb_nano2_frontend_attach,
.tuner_attach = cxusb_dvico_xc3028_tuner_attach,
/* parameter for the MPEG2-data transfer */
.stream = {
.type = USB_BULK,
.count = 5,
.endpoint = 0x02,
.u = {
.bulk = {
.buffersize = 8192,
}
}
},
},
},
.power_ctrl = cxusb_nano2_power_ctrl,
.i2c_algo = &cxusb_i2c_algo,
.generic_bulk_ctrl_endpoint = 0x01,
.rc_interval = 100,
.rc_key_map = dvico_portable_rc_keys,
.rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys),
.rc_query = cxusb_bluebird2_rc_query,
.num_device_descs = 1,
.devices = {
{ "DViCO FusionHDTV DVB-T NANO2",
{ NULL },
{ &cxusb_table[14], NULL },
},
}
};
static struct usb_driver cxusb_driver = { static struct usb_driver cxusb_driver = {
.name = "dvb_usb_cxusb", .name = "dvb_usb_cxusb",
.probe = cxusb_probe, .probe = cxusb_probe,
......
...@@ -148,6 +148,7 @@ ...@@ -148,6 +148,7 @@
#define USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD 0xdb58 #define USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD 0xdb58
#define USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM 0xdb59 #define USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM 0xdb59
#define USB_PID_DVICO_BLUEBIRD_DUAL_4 0xdb78 #define USB_PID_DVICO_BLUEBIRD_DUAL_4 0xdb78
#define USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2 0xdb70
#define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_COLD 0xdb54 #define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_COLD 0xdb54
#define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM 0xdb55 #define USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM 0xdb55
#define USB_PID_MEDION_MD95700 0x0932 #define USB_PID_MEDION_MD95700 0x0932
......
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