diff options
author | Akihiro Tsukada <tskd2@yahoo.co.jp> | 2009-08-25 01:39:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:51:48 -0400 |
commit | 5eca4823ea8f99a7109779f68cedb00535aa6834 (patch) | |
tree | b7edf65332d3d8ea48fce594580e10e188dbf612 /drivers/media/dvb/dvb-usb/friio.h | |
parent | 3d17fb1be937c8c025fc9f54b4e17e91081e7a4f (diff) |
V4L/DVB (13000): add driver for 774 Friio White USB ISDB-T receiver
This patch adds driver for 774 Friio White, ISDB-T USB receiver
Friio White is an USB 2.0 ISDB-T receiver. (http://www.friio.com/)
The device has a GL861 chip and a Comtech JDVBT90502 canned tuner module.
This driver ignores all the frontend_parameters except frequency,
as ISDB-T shares the same parameter configuration across the country
and thus the device can work like an intelligent one.
As this device does not include a CAM nor hardware descrambling feature,
the driver passes through scrambled TS streams.
There is Friio Black, a variant for ISDB-S, which shares the same USB
Vendor/Product ID with White, but it is not supported in this driver.
They should be identified in the initialization sequence,
but this feature is not tested.
Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/friio.h')
-rw-r--r-- | drivers/media/dvb/dvb-usb/friio.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/friio.h b/drivers/media/dvb/dvb-usb/friio.h new file mode 100644 index 000000000000..af8d55e390fb --- /dev/null +++ b/drivers/media/dvb/dvb-usb/friio.h | |||
@@ -0,0 +1,99 @@ | |||
1 | /* DVB USB compliant Linux driver for the Friio USB2.0 ISDB-T receiver. | ||
2 | * | ||
3 | * Copyright (C) 2009 Akihiro Tsukada <tskd2@yahoo.co.jp> | ||
4 | * | ||
5 | * This module is based off the the gl861 and vp702x modules. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the Free | ||
9 | * Software Foundation, version 2. | ||
10 | * | ||
11 | * see Documentation/dvb/README.dvb-usb for more information | ||
12 | */ | ||
13 | #ifndef _DVB_USB_FRIIO_H_ | ||
14 | #define _DVB_USB_FRIIO_H_ | ||
15 | |||
16 | /** | ||
17 | * Friio Components | ||
18 | * USB hub: AU4254 | ||
19 | * USB controller(+ TS dmx & streaming): GL861 | ||
20 | * Frontend: comtech JDVBT-90502 | ||
21 | * (tuner PLL: tua6034, I2C addr:(0xC0 >> 1)) | ||
22 | * (OFDM demodulator: TC90502, I2C addr:(0x30 >> 1)) | ||
23 | * LED x3 (+LNB) controll: PIC 16F676 | ||
24 | * EEPROM: 24C08 | ||
25 | * | ||
26 | * (USB smart card reader: AU9522) | ||
27 | * | ||
28 | */ | ||
29 | |||
30 | #define DVB_USB_LOG_PREFIX "friio" | ||
31 | #include "dvb-usb.h" | ||
32 | |||
33 | extern int dvb_usb_friio_debug; | ||
34 | #define deb_info(args...) dprintk(dvb_usb_friio_debug, 0x01, args) | ||
35 | #define deb_xfer(args...) dprintk(dvb_usb_friio_debug, 0x02, args) | ||
36 | #define deb_rc(args...) dprintk(dvb_usb_friio_debug, 0x04, args) | ||
37 | #define deb_fe(args...) dprintk(dvb_usb_friio_debug, 0x08, args) | ||
38 | |||
39 | /* Vendor requests */ | ||
40 | #define GL861_WRITE 0x40 | ||
41 | #define GL861_READ 0xc0 | ||
42 | |||
43 | /* command bytes */ | ||
44 | #define GL861_REQ_I2C_WRITE 0x01 | ||
45 | #define GL861_REQ_I2C_READ 0x02 | ||
46 | /* For control msg with data argument */ | ||
47 | /* Used for accessing the PLL on the secondary I2C bus of FE via GL861 */ | ||
48 | #define GL861_REQ_I2C_DATA_CTRL_WRITE 0x03 | ||
49 | |||
50 | #define GL861_ALTSETTING_COUNT 2 | ||
51 | #define FRIIO_BULK_ALTSETTING 0 | ||
52 | #define FRIIO_ISOC_ALTSETTING 1 | ||
53 | |||
54 | /* LED & LNB control via PIC. */ | ||
55 | /* basically, it's serial control with clock and strobe. */ | ||
56 | /* write the below 4bit control data to the reg 0x00 at the I2C addr 0x00 */ | ||
57 | /* when controlling the LEDs, 32bit(saturation, R, G, B) is sent on the bit3*/ | ||
58 | #define FRIIO_CTL_LNB (1 << 0) | ||
59 | #define FRIIO_CTL_STROBE (1 << 1) | ||
60 | #define FRIIO_CTL_CLK (1 << 2) | ||
61 | #define FRIIO_CTL_LED (1 << 3) | ||
62 | |||
63 | /* Front End related */ | ||
64 | |||
65 | #define FRIIO_DEMOD_ADDR (0x30 >> 1) | ||
66 | #define FRIIO_PLL_ADDR (0xC0 >> 1) | ||
67 | |||
68 | #define JDVBT90502_PLL_CLK 4000000 | ||
69 | #define JDVBT90502_PLL_DIVIDER 28 | ||
70 | |||
71 | #define JDVBT90502_2ND_I2C_REG 0xFE | ||
72 | |||
73 | /* byte index for pll i2c command data structure*/ | ||
74 | /* see datasheet for tua6034 */ | ||
75 | #define DEMOD_REDIRECT_REG 0 | ||
76 | #define ADDRESS_BYTE 1 | ||
77 | #define DIVIDER_BYTE1 2 | ||
78 | #define DIVIDER_BYTE2 3 | ||
79 | #define CONTROL_BYTE 4 | ||
80 | #define BANDSWITCH_BYTE 5 | ||
81 | #define AGC_CTRL_BYTE 5 | ||
82 | #define PLL_CMD_LEN 6 | ||
83 | |||
84 | /* bit masks for PLL STATUS response */ | ||
85 | #define PLL_STATUS_POR_MODE 0x80 /* 1: Power on Reset (test) Mode */ | ||
86 | #define PLL_STATUS_LOCKED 0x40 /* 1: locked */ | ||
87 | #define PLL_STATUS_AGC_ACTIVE 0x08 /* 1:active */ | ||
88 | #define PLL_STATUS_TESTMODE 0x07 /* digital output level (5 level) */ | ||
89 | /* 0.15Vcc step 0x00: < 0.15Vcc, ..., 0x04: >= 0.6Vcc (<= 1Vcc) */ | ||
90 | |||
91 | |||
92 | struct jdvbt90502_config { | ||
93 | u8 demod_address; /* i2c addr for demodulator IC */ | ||
94 | u8 pll_address; /* PLL addr on the secondary i2c*/ | ||
95 | }; | ||
96 | extern struct jdvbt90502_config friio_fe_config; | ||
97 | |||
98 | extern struct dvb_frontend *jdvbt90502_attach(struct dvb_usb_device *d); | ||
99 | #endif | ||