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
71#define TS_MASK 0x6
72enum TS_PORT{
73 NO_TS_PORT = 0x0,
74
75 TS1_PORT = 0x4,
76
77 TS1_TS2_PORT = 0x6,
78
79
80 TS1_EXT_CLOCK = 0x6,
81
82 TS1VIP_TS2_PORT = 0x2
83
84};
85
86#define EAVP_MASK 0x8
87enum EAV_PRESENT{
88 NO_EXTERNAL_AV = 0x0,
89
90
91 EXTERNAL_AV = 0x8
92
93};
94
95#define ATM_MASK 0x30
96enum AT_MODE{
97 DIF_TUNER = 0x30,
98 BASEBAND_SOUND = 0x20,
99
100 NO_TUNER = 0x10
101};
102
103#define PWR_SEL_MASK 0x40
104enum POWE_TYPE{
105 SELF_POWER = 0x0,
106 BUS_POWER = 0x40
107};
108
109enum USB_POWE_TYPE{
110 USB_SELF_POWER = 0,
111 USB_BUS_POWER
112};
113
114#define BO_0_MASK 0x80
115enum AVDEC_STATUS{
116 AVDEC_DISABLE = 0x0,
117 AVDEC_ENABLE = 0x80
118};
119
120#define BO_1_MASK 0x100
121
122#define BUSPOWER_MASK 0xC4
123#define SELFPOWER_MASK 0x86
124
125
126#define NOT_DECIDE_YET 0xFE
127#define NOT_SUPPORTED 0xFF
128
129
130
131
132#define MOD_DIGITAL 0x1
133#define MOD_ANALOG 0x2
134#define MOD_DIF 0x4
135#define MOD_EXTERNAL 0x8
136#define CAP_ALL_MOD 0x0f
137
138
139
140
141#define SOURCE_DIGITAL 0x1
142#define SOURCE_ANALOG 0x2
143#define SOURCE_DIF 0x4
144#define SOURCE_EXTERNAL 0x8
145#define SOURCE_TS_BDA 0x10
146#define SOURCE_TS_ENCODE 0x20
147#define SOURCE_TS_EXTERNAL 0x40
148
149
150
151
152struct INTERFACE_INFO {
153 u8 interrupt_index;
154 u8 ts1_index;
155 u8 ts2_index;
156 u8 audio_index;
157 u8 video_index;
158 u8 vanc_index;
159 u8 hanc_index;
160 u8 ir_index;
161};
162
163enum INDEX_INTERFACE_INFO{
164 INDEX_INTERRUPT = 0x0,
165 INDEX_TS1,
166 INDEX_TS2,
167 INDEX_AUDIO,
168 INDEX_VIDEO,
169 INDEX_VANC,
170 INDEX_HANC,
171 INDEX_IR,
172};
173
174
175
176
177struct CONFIG_INFO {
178 u8 config_index;
179 struct INTERFACE_INFO interface_info;
180};
181
182struct pcb_config {
183 u8 index;
184 u8 type;
185
186 u8 speed;
187 u8 mode;
188 u32 ts1_source;
189 u32 ts2_source;
190 u32 analog_source;
191 u8 digital_index;
192 u8 analog_index;
193 u8 dif_index;
194 u8 external_index;
195 u8 config_num;
196
197 struct CONFIG_INFO hs_config_info[3];
198 struct CONFIG_INFO fs_config_info[3];
199};
200
201enum INDEX_PCB_CONFIG{
202 INDEX_SELFPOWER_DIGITAL_ONLY = 0x0,
203 INDEX_SELFPOWER_DUAL_DIGITAL,
204 INDEX_SELFPOWER_ANALOG_ONLY,
205 INDEX_SELFPOWER_DUAL,
206 INDEX_SELFPOWER_TRIPLE,
207 INDEX_SELFPOWER_COMPRESSOR,
208 INDEX_BUSPOWER_DIGITAL_ONLY,
209 INDEX_BUSPOWER_ANALOG_ONLY,
210 INDEX_BUSPOWER_DIF_ONLY,
211 INDEX_BUSPOWER_EXTERNAL_ONLY,
212 INDEX_BUSPOWER_EXTERNAL_ANALOG,
213 INDEX_BUSPOWER_EXTERNAL_DIF,
214 INDEX_BUSPOWER_EXTERNAL_DIGITAL,
215 INDEX_BUSPOWER_DIGITAL_ANALOG,
216 INDEX_BUSPOWER_DIGITAL_DIF,
217 INDEX_BUSPOWER_DIGITAL_ANALOG_EXTERNAL,
218 INDEX_BUSPOWER_DIGITAL_DIF_EXTERNAL,
219};
220
221
222struct cx231xx;
223
224int initialize_cx231xx(struct cx231xx *p_dev);
225
226#endif
227