Commit 7f882c2e authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] Afatech AF9035 DVB USB driver

AF9035 is integrated DVB USB interface and DVB-T demodulator.
Integrated demodulator is AF9033 and its driver is attached
runtime as a own module.

Driver currently supports only one device,
TerraTec Cinergy T Stick [0ccd:0093].

TerraTec Cinergy T Stick is based of Afatech AF9035 +
Infineon TUA 9001 silicon tuner.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4b64bb26
...@@ -422,3 +422,12 @@ config DVB_USB_RTL28XXU ...@@ -422,3 +422,12 @@ config DVB_USB_RTL28XXU
select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE
help help
Say Y here to support the Realtek RTL28xxU DVB USB receiver. Say Y here to support the Realtek RTL28xxU DVB USB receiver.
config DVB_USB_AF9035
tristate "Afatech AF9035 DVB-T USB2.0 support"
depends on DVB_USB
select DVB_AF9033
select MEDIA_TUNER_TUA9001 if !MEDIA_TUNER_CUSTOMISE
help
Say Y here to support the Afatech AF9035 based DVB USB receiver.
...@@ -110,6 +110,9 @@ obj-$(CONFIG_DVB_USB_MXL111SF) += mxl111sf-tuner.o ...@@ -110,6 +110,9 @@ obj-$(CONFIG_DVB_USB_MXL111SF) += mxl111sf-tuner.o
dvb-usb-rtl28xxu-objs = rtl28xxu.o dvb-usb-rtl28xxu-objs = rtl28xxu.o
obj-$(CONFIG_DVB_USB_RTL28XXU) += dvb-usb-rtl28xxu.o obj-$(CONFIG_DVB_USB_RTL28XXU) += dvb-usb-rtl28xxu.o
dvb-usb-af9035-objs = af9035.o
obj-$(CONFIG_DVB_USB_AF9035) += dvb-usb-af9035.o
ccflags-y += -I$(srctree)/drivers/media/dvb/dvb-core ccflags-y += -I$(srctree)/drivers/media/dvb/dvb-core
ccflags-y += -I$(srctree)/drivers/media/dvb/frontends/ ccflags-y += -I$(srctree)/drivers/media/dvb/frontends/
# due to tuner-xc3028 # due to tuner-xc3028
......
This diff is collapsed.
/*
* Afatech AF9035 DVB USB driver
*
* Copyright (C) 2009 Antti Palosaari <crope@iki.fi>
* Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef AF9035_H
#define AF9035_H
#include "dvb-usb.h"
struct reg_val {
u32 reg;
u8 val;
};
struct reg_val_mask {
u32 reg;
u8 val;
u8 mask;
};
struct usb_req {
u8 cmd;
u8 mbox;
u8 wlen;
u8 *wbuf;
u8 rlen;
u8 *rbuf;
};
struct config {
bool dual_mode;
};
struct fw_segment {
#define SEGMENT_FW_DL 0
#define SEGMENT_ROM_COPY 1
#define SEGMENT_DIRECT_CMD 2
u8 type;
u32 len;
};
struct fw_header {
#define SEGMENT_MAX_COUNT 6
u8 segment_count;
struct fw_segment segment[SEGMENT_MAX_COUNT];
};
u32 clock_lut[] = {
20480000, /* FPGA */
16384000, /* 16.38 MHz */
20480000, /* 20.48 MHz */
36000000, /* 36.00 MHz */
30000000, /* 30.00 MHz */
26000000, /* 26.00 MHz */
28000000, /* 28.00 MHz */
32000000, /* 32.00 MHz */
34000000, /* 34.00 MHz */
24000000, /* 24.00 MHz */
22000000, /* 22.00 MHz */
12000000, /* 12.00 MHz */
};
/* EEPROM locations */
#define EEPROM_IR_MODE 0x430d
#define EEPROM_DUAL_MODE 0x4326
#define EEPROM_IR_TYPE 0x4329
#define EEPROM_1_IFFREQ_L 0x432d
#define EEPROM_1_IFFREQ_H 0x432e
#define EEPROM_1_TUNER_ID 0x4331
#define EEPROM_2_IFFREQ_L 0x433d
#define EEPROM_2_IFFREQ_H 0x433e
#define EEPROM_2_TUNER_ID 0x4341
/* USB commands */
#define CMD_MEM_RD 0x00
#define CMD_MEM_WR 0x01
#define CMD_I2C_RD 0x02
#define CMD_I2C_WR 0x03
#define CMD_FW_DL 0x21
#define CMD_FW_QUERYINFO 0x22
#define CMD_FW_BOOT 0x23
#define CMD_FW_DL_BEGIN 0x24
#define CMD_FW_DL_END 0x25
#endif
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
#define USB_PID_KWORLD_VSTREAM_WARM 0x17df #define USB_PID_KWORLD_VSTREAM_WARM 0x17df
#define USB_PID_TERRATEC_CINERGY_T_USB_XE 0x0055 #define USB_PID_TERRATEC_CINERGY_T_USB_XE 0x0055
#define USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2 0x0069 #define USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2 0x0069
#define USB_PID_TERRATEC_CINERGY_T_STICK 0x0093
#define USB_PID_TERRATEC_CINERGY_T_STICK_RC 0x0097 #define USB_PID_TERRATEC_CINERGY_T_STICK_RC 0x0097
#define USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC 0x0099 #define USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC 0x0099
#define USB_PID_TWINHAN_VP7041_COLD 0x3201 #define USB_PID_TWINHAN_VP7041_COLD 0x3201
......
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