6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
#ifndef _ADV7842_
#define _ADV7842_
enum adv7842_ain_sel {
ADV7842_AIN1_2_3_NC_SYNC_1_2 = 0,
ADV7842_AIN4_5_6_NC_SYNC_2_1 = 1,
ADV7842_AIN7_8_9_NC_SYNC_3_1 = 2,
ADV7842_AIN10_11_12_NC_SYNC_4_1 = 3,
ADV7842_AIN9_4_5_6_SYNC_2_1 = 4,
};
enum adv7842_op_ch_sel {
ADV7842_OP_CH_SEL_GBR = 0,
ADV7842_OP_CH_SEL_GRB = 1,
ADV7842_OP_CH_SEL_BGR = 2,
ADV7842_OP_CH_SEL_RGB = 3,
ADV7842_OP_CH_SEL_BRG = 4,
ADV7842_OP_CH_SEL_RBG = 5,
};
enum adv7842_mode {
ADV7842_MODE_SDP,
ADV7842_MODE_COMP,
ADV7842_MODE_RGB,
ADV7842_MODE_HDMI
};
enum adv7842_vid_std_select {
ADV7842_SDP_VID_STD_CVBS_SD_4x1 = 0x01,
ADV7842_SDP_VID_STD_YC_SD4_x1 = 0x09,
ADV7842_RGB_VID_STD_AUTO_GRAPH_MODE = 0x07,
ADV7842_HDMI_GR_VID_STD_AUTO_GRAPH_MODE = 0x02,
ADV7842_HDMI_COMP_VID_STD_HD_1250P = 0x1e,
};
enum adv7842_inp_color_space {
ADV7842_INP_COLOR_SPACE_LIM_RGB = 0,
ADV7842_INP_COLOR_SPACE_FULL_RGB = 1,
ADV7842_INP_COLOR_SPACE_LIM_YCbCr_601 = 2,
ADV7842_INP_COLOR_SPACE_LIM_YCbCr_709 = 3,
ADV7842_INP_COLOR_SPACE_XVYCC_601 = 4,
ADV7842_INP_COLOR_SPACE_XVYCC_709 = 5,
ADV7842_INP_COLOR_SPACE_FULL_YCbCr_601 = 6,
ADV7842_INP_COLOR_SPACE_FULL_YCbCr_709 = 7,
ADV7842_INP_COLOR_SPACE_AUTO = 0xf,
};
enum adv7842_op_format_sel {
ADV7842_OP_FORMAT_SEL_SDR_ITU656_8 = 0x00,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_10 = 0x01,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_12_MODE0 = 0x02,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_12_MODE1 = 0x06,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_12_MODE2 = 0x0a,
ADV7842_OP_FORMAT_SEL_DDR_422_8 = 0x20,
ADV7842_OP_FORMAT_SEL_DDR_422_10 = 0x21,
ADV7842_OP_FORMAT_SEL_DDR_422_12_MODE0 = 0x22,
ADV7842_OP_FORMAT_SEL_DDR_422_12_MODE1 = 0x23,
ADV7842_OP_FORMAT_SEL_DDR_422_12_MODE2 = 0x24,
ADV7842_OP_FORMAT_SEL_SDR_444_24 = 0x40,
ADV7842_OP_FORMAT_SEL_SDR_444_30 = 0x41,
ADV7842_OP_FORMAT_SEL_SDR_444_36_MODE0 = 0x42,
ADV7842_OP_FORMAT_SEL_DDR_444_24 = 0x60,
ADV7842_OP_FORMAT_SEL_DDR_444_30 = 0x61,
ADV7842_OP_FORMAT_SEL_DDR_444_36 = 0x62,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_16 = 0x80,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_20 = 0x81,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_24_MODE0 = 0x82,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_24_MODE1 = 0x86,
ADV7842_OP_FORMAT_SEL_SDR_ITU656_24_MODE2 = 0x8a,
};
enum adv7842_select_input {
ADV7842_SELECT_HDMI_PORT_A,
ADV7842_SELECT_HDMI_PORT_B,
ADV7842_SELECT_VGA_RGB,
ADV7842_SELECT_VGA_COMP,
ADV7842_SELECT_SDP_CVBS,
ADV7842_SELECT_SDP_YC,
};
enum adv7842_drive_strength {
ADV7842_DR_STR_LOW = 0,
ADV7842_DR_STR_MEDIUM_LOW = 1,
ADV7842_DR_STR_MEDIUM_HIGH = 2,
ADV7842_DR_STR_HIGH = 3,
};
struct adv7842_sdp_csc_coeff {
bool manual;
uint16_t scaling;
uint16_t A1;
uint16_t A2;
uint16_t A3;
uint16_t A4;
uint16_t B1;
uint16_t B2;
uint16_t B3;
uint16_t B4;
uint16_t C1;
uint16_t C2;
uint16_t C3;
uint16_t C4;
};
struct adv7842_sdp_io_sync_adjustment {
bool adjust;
uint16_t hs_beg;
uint16_t hs_width;
uint16_t de_beg;
uint16_t de_end;
uint8_t vs_beg_o;
uint8_t vs_beg_e;
uint8_t vs_end_o;
uint8_t vs_end_e;
uint8_t de_v_beg_o;
uint8_t de_v_beg_e;
uint8_t de_v_end_o;
uint8_t de_v_end_e;
};
struct adv7842_platform_data {
unsigned chip_reset:1;
unsigned disable_pwrdnb:1;
unsigned disable_cable_det_rst:1;
enum adv7842_ain_sel ain_sel;
enum adv7842_op_ch_sel op_ch_sel;
enum adv7842_mode mode;
unsigned input;
enum adv7842_vid_std_select vid_std_select;
enum adv7842_op_format_sel op_format_sel;
unsigned alt_gamma:1;
unsigned op_656_range:1;
unsigned rgb_out:1;
unsigned alt_data_sat:1;
unsigned blank_data:1;
unsigned insert_av_codes:1;
unsigned replicate_av_codes:1;
unsigned invert_cbcr:1;
unsigned output_bus_lsb_to_msb:1;
enum adv7842_drive_strength dr_str_data;
enum adv7842_drive_strength dr_str_clk;
enum adv7842_drive_strength dr_str_sync;
unsigned llc_dll_phase:5;
unsigned sd_ram_size;
unsigned sd_ram_ddr:1;
unsigned hdmi_free_run_enable:1;
unsigned hdmi_free_run_mode:1;
unsigned sdp_free_run_auto:1;
unsigned sdp_free_run_man_col_en:1;
unsigned sdp_free_run_cbar_en:1;
unsigned sdp_free_run_force:1;
struct adv7842_sdp_csc_coeff sdp_csc_coeff;
struct adv7842_sdp_io_sync_adjustment sdp_io_sync_625;
struct adv7842_sdp_io_sync_adjustment sdp_io_sync_525;
u8 i2c_sdp_io;
u8 i2c_sdp;
u8 i2c_cp;
u8 i2c_vdp;
u8 i2c_afe;
u8 i2c_hdmi;
u8 i2c_repeater;
u8 i2c_edid;
u8 i2c_infoframe;
u8 i2c_cec;
u8 i2c_avlink;
};
#define V4L2_CID_ADV_RX_ANALOG_SAMPLING_PHASE (V4L2_CID_DV_CLASS_BASE + 0x1000)
#define V4L2_CID_ADV_RX_FREE_RUN_COLOR_MANUAL (V4L2_CID_DV_CLASS_BASE + 0x1001)
#define V4L2_CID_ADV_RX_FREE_RUN_COLOR (V4L2_CID_DV_CLASS_BASE + 0x1002)
#define ADV7842_FMT_CHANGE 1
#define ADV7842_CMD_RAM_TEST _IO('V', BASE_VIDIOC_PRIVATE)
#define ADV7842_EDID_PORT_A 0
#define ADV7842_EDID_PORT_B 1
#define ADV7842_EDID_PORT_VGA 2
#endif
|