1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22#ifndef _PCB_CONFIG_H_
23#define _PCB_CONFIG_H_
24
25#include <linux/init.h>
26#include <linux/module.h>
27
28
29
30
31#define CLASS_DEFAULT 0xFF
32
33enum VENDOR_REQUEST_TYPE {
34
35 VRT_SET_I2C0 = 0x0,
36 VRT_SET_I2C1 = 0x1,
37 VRT_SET_I2C2 = 0x2,
38 VRT_GET_I2C0 = 0x4,
39 VRT_GET_I2C1 = 0x5,
40 VRT_GET_I2C2 = 0x6,
41
42
43 VRT_SET_GPIO = 0x8,
44 VRT_GET_GPIO = 0x9,
45
46
47 VRT_SET_GPIE = 0xA,
48 VRT_GET_GPIE = 0xB,
49
50
51 VRT_SET_REGISTER = 0xC,
52 VRT_GET_REGISTER = 0xD,
53
54
55 VRT_GET_EXTCID_DESC = 0xFF,
56};
57
58enum BYTE_ENABLE_MASK {
59 ENABLE_ONE_BYTE = 0x1,
60 ENABLE_TWE_BYTE = 0x3,
61 ENABLE_THREE_BYTE = 0x7,
62 ENABLE_FOUR_BYTE = 0xF,
63};
64
65#define SPEED_MASK 0x1
66enum USB_SPEED{
67 FULL_SPEED = 0x0,
68 HIGH_SPEED = 0x1
69};
70
71enum _true_false{
72 FALSE = 0,
73 TRUE = 1
74};
75
76#define TS_MASK 0x6
77enum TS_PORT{
78 NO_TS_PORT = 0x0,
79
80 TS1_PORT = 0x4,
81
82 TS1_TS2_PORT = 0x6,
83
84
85 TS1_EXT_CLOCK = 0x6,
86
87 TS1VIP_TS2_PORT = 0x2
88
89};
90
91#define EAVP_MASK 0x8
92enum EAV_PRESENT{
93 NO_EXTERNAL_AV = 0x0,
94
95
96 EXTERNAL_AV = 0x8
97
98};
99
100#define ATM_MASK 0x30
101enum AT_MODE{
102 DIF_TUNER = 0x30,
103 BASEBAND_SOUND = 0x20,
104
105 NO_TUNER = 0x10
106};
107
108#define PWR_SEL_MASK 0x40
109enum POWE_TYPE{
110 SELF_POWER = 0x0,
111 BUS_POWER = 0x40
112};
113
114enum USB_POWE_TYPE{
115 USB_SELF_POWER = 0,
116 USB_BUS_POWER
117};
118
119#define BO_0_MASK 0x80
120enum AVDEC_STATUS{
121 AVDEC_DISABLE = 0x0,
122 AVDEC_ENABLE = 0x80
123};
124
125#define BO_1_MASK 0x100
126
127#define BUSPOWER_MASK 0xC4
128#define SELFPOWER_MASK 0x86
129
130
131#define NOT_DECIDE_YET 0xFE
132#define NOT_SUPPORTED 0xFF
133
134
135
136
137#define MOD_DIGITAL 0x1
138#define MOD_ANALOG 0x2
139#define MOD_DIF 0x4
140#define MOD_EXTERNAL 0x8
141#define CAP_ALL_MOD 0x0f
142
143
144
145
146#define SOURCE_DIGITAL 0x1
147#define SOURCE_ANALOG 0x2
148#define SOURCE_DIF 0x4
149#define SOURCE_EXTERNAL 0x8
150#define SOURCE_TS_BDA 0x10
151#define SOURCE_TS_ENCODE 0x20
152#define SOURCE_TS_EXTERNAL 0x40
153
154
155
156
157struct INTERFACE_INFO {
158 u8 interrupt_index;
159 u8 ts1_index;
160 u8 ts2_index;
161 u8 audio_index;
162 u8 video_index;
163 u8 vanc_index;
164 u8 hanc_index;
165 u8 ir_index;
166};
167
168enum INDEX_INTERFACE_INFO{
169 INDEX_INTERRUPT = 0x0,
170 INDEX_TS1,
171 INDEX_TS2,
172 INDEX_AUDIO,
173 INDEX_VIDEO,
174 INDEX_VANC,
175 INDEX_HANC,
176 INDEX_IR,
177};
178
179
180
181
182struct CONFIG_INFO {
183 u8 config_index;
184 struct INTERFACE_INFO interface_info;
185};
186
187struct pcb_config {
188 u8 index;
189 u8 type;
190
191 u8 speed;
192 u8 mode;
193 u32 ts1_source;
194 u32 ts2_source;
195 u32 analog_source;
196 u8 digital_index;
197 u8 analog_index;
198 u8 dif_index;
199 u8 external_index;
200 u8 config_num;
201
202 struct CONFIG_INFO hs_config_info[3];
203 struct CONFIG_INFO fs_config_info[3];
204};
205
206enum INDEX_PCB_CONFIG{
207 INDEX_SELFPOWER_DIGITAL_ONLY = 0x0,
208 INDEX_SELFPOWER_DUAL_DIGITAL,
209 INDEX_SELFPOWER_ANALOG_ONLY,
210 INDEX_SELFPOWER_DUAL,
211 INDEX_SELFPOWER_TRIPLE,
212 INDEX_SELFPOWER_COMPRESSOR,
213 INDEX_BUSPOWER_DIGITAL_ONLY,
214 INDEX_BUSPOWER_ANALOG_ONLY,
215 INDEX_BUSPOWER_DIF_ONLY,
216 INDEX_BUSPOWER_EXTERNAL_ONLY,
217 INDEX_BUSPOWER_EXTERNAL_ANALOG,
218 INDEX_BUSPOWER_EXTERNAL_DIF,
219 INDEX_BUSPOWER_EXTERNAL_DIGITAL,
220 INDEX_BUSPOWER_DIGITAL_ANALOG,
221 INDEX_BUSPOWER_DIGITAL_DIF,
222 INDEX_BUSPOWER_DIGITAL_ANALOG_EXTERNAL,
223 INDEX_BUSPOWER_DIGITAL_DIF_EXTERNAL,
224};
225
226
227struct cx231xx;
228
229u32 initialize_cx231xx(struct cx231xx *p_dev);
230
231#endif
232