xref: /openbmc/linux/drivers/media/usb/dvb-usb/ttusb2.h (revision 3cf3cdea)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* DVB USB compliant linux driver for Technotrend DVB USB boxes and clones
3  * (e.g. Pinnacle 400e DVB-S USB2.0).
4  *
5  * Copyright (c) 2002 Holger Waechtler <holger@convergence.de>
6  * Copyright (c) 2003 Felix Domke <tmbinc@elitedvb.net>
7  * Copyright (C) 2005-6 Patrick Boettcher <pb@linuxtv.de>
8  *
9  * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
10  */
11 #ifndef _DVB_USB_TTUSB2_H_
12 #define _DVB_USB_TTUSB2_H_
13 
14 /* TTUSB protocol
15  *
16  * always to messages (out/in)
17  * out message:
18  * 0xaa <id> <cmdbyte> <datalen> <data...>
19  *
20  * in message (complete block is always 0x40 bytes long)
21  * 0x55 <id> <cmdbyte> <datalen> <data...>
22  *
23  * id is incremented for each transaction
24  */
25 
26 #define CMD_DSP_DOWNLOAD    0x13
27 /* out data: <byte>[28]
28  * last block must be empty */
29 
30 #define CMD_DSP_BOOT        0x14
31 /* out data: nothing */
32 
33 #define CMD_POWER           0x15
34 /* out data: <on=1/off=0> */
35 
36 #define CMD_LNB             0x16
37 /* out data: <power=1> <18V=0,13V=1> <tone> <??=1> <??=1> */
38 
39 #define CMD_GET_VERSION     0x17
40 /* in  data: <version_byte>[5] */
41 
42 #define CMD_DISEQC          0x18
43 /* out data: <master=0xff/burst=??> <cmdlen> <cmdbytes>[cmdlen] */
44 
45 #define CMD_PID_ENABLE      0x22
46 /* out data: <index> <type: ts=1/sec=2> <pid msb> <pid lsb> */
47 
48 #define CMD_PID_DISABLE     0x23
49 /* out data: <index> */
50 
51 #define CMD_FILTER_ENABLE   0x24
52 /* out data: <index> <pid_idx> <filter>[12] <mask>[12] */
53 
54 #define CMD_FILTER_DISABLE  0x25
55 /* out data: <index> */
56 
57 #define CMD_GET_DSP_VERSION 0x26
58 /* in  data: <version_byte>[28] */
59 
60 #define CMD_I2C_XFER        0x31
61 /* out data: <addr << 1> <sndlen> <rcvlen> <data>[sndlen]
62  * in  data: <addr << 1> <sndlen> <rcvlen> <data>[rcvlen] */
63 
64 #define CMD_I2C_BITRATE     0x32
65 /* out data: <default=0> */
66 
67 #endif
68