state->chip_type);
if (state->chip_type == 0x9135) {
- if (state->chip_version == 2)
+ if (state->chip_version == 0x02)
*name = AF9035_FIRMWARE_IT9135_V2;
else
*name = AF9035_FIRMWARE_IT9135_V1;
/* eeprom memory mapped location */
if (state->chip_type == 0x9135) {
+ if (state->chip_version == 0x02) {
+ state->af9033_config[0].tuner = AF9033_TUNER_IT9135_60;
+ tmp16 = 0x00461d;
+ } else {
+ state->af9033_config[0].tuner = AF9033_TUNER_IT9135_38;
+ tmp16 = 0x00461b;
+ }
+
/* check if eeprom exists */
- if (state->chip_version == 2)
- ret = af9035_rd_reg(d, 0x00461d, &tmp);
- else
- ret = af9035_rd_reg(d, 0x00461b, &tmp);
+ ret = af9035_rd_reg(d, tmp16, &tmp);
if (ret < 0)
goto err;
if (tmp) {
addr = EEPROM_BASE_IT9135;
} else {
- state->af9033_config[0].tuner = AF9033_TUNER_IT9135_38;
+ dev_dbg(&d->udev->dev, "%s: no eeprom\n", __func__);
goto skip_eeprom;
}
} else {
if (ret < 0)
goto err;
- state->af9033_config[i].tuner = tmp;
- dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n",
- __func__, i, tmp);
+ if (tmp == 0x00)
+ dev_dbg(&d->udev->dev,
+ "%s: [%d]tuner not set, using default\n",
+ __func__, i);
+ else
+ state->af9033_config[i].tuner = tmp;
- if (state->chip_type == 0x9135 && tmp == 0x00)
- state->af9033_config[i].tuner = AF9033_TUNER_IT9135_38;
+ dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n",
+ __func__, i, state->af9033_config[i].tuner);
switch (state->af9033_config[i].tuner) {
case AF9033_TUNER_TUA9001:
};
static struct ite_config af9035_it913x_config = {
- .chip_ver = 0x01,
+ .chip_ver = 0x02,
.chip_type = 0x9135,
.firmware = 0x00000000,
.firmware_ver = 1,
.adc_x2 = 1,
- .tuner_id_0 = AF9033_TUNER_IT9135_38,
+ .tuner_id_0 = 0x00,
.tuner_id_1 = 0x00,
.dual_mode = 0x00,
.adf = 0x00,
case AF9033_TUNER_IT9135_38:
case AF9033_TUNER_IT9135_51:
case AF9033_TUNER_IT9135_52:
+ af9035_it913x_config.chip_ver = 0x01;
case AF9033_TUNER_IT9135_60:
case AF9033_TUNER_IT9135_61:
case AF9033_TUNER_IT9135_62:
};
static const struct usb_device_id af9035_id_table[] = {
+ /* AF9035 devices */
{ DVB_USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9035_9035,
&af9035_props, "Afatech AF9035 reference design", NULL) },
{ DVB_USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9035_1000,
&af9035_props, "Asus U3100Mini Plus", NULL) },
{ DVB_USB_DEVICE(USB_VID_TERRATEC, 0x00aa,
&af9035_props, "TerraTec Cinergy T Stick (rev. 2)", NULL) },
+ /* IT9135 devices */
+#if 0
+ { DVB_USB_DEVICE(0x048d, 0x9135,
+ &af9035_props, "IT9135 reference design", NULL) },
+ { DVB_USB_DEVICE(0x048d, 0x9006,
+ &af9035_props, "IT9135 reference design", NULL) },
+#endif
/* XXX: that same ID [0ccd:0099] is used by af9015 driver too */
{ DVB_USB_DEVICE(USB_VID_TERRATEC, 0x0099,
&af9035_props, "TerraTec Cinergy T Stick Dual RC (rev. 2)", NULL) },