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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
|
/*++
* linux/drivers/video/wmt/hw/wmt-hdmi-reg.h
* WonderMedia video post processor (VPP) driver
*
* Copyright c 2014 WonderMedia Technologies, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* WonderMedia Technologies, Inc.
* 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
--*/
#ifndef WMT_HDMI_REG_H
#define WMT_HDMI_REG_H
#define WMT_FTBLK_HDMI
#define HDMI_BASE_ADDR (HDMI_TRANSMITTE_BASE_ADDR + 0xC000)
struct hdmi_base1_regs {
unsigned int _100_11c[8];
union {
unsigned int val;
struct {
unsigned int eeprom_reset:1;
unsigned int encode_enable:1;
unsigned int hden:1;
unsigned int eess_enable:1;
unsigned int verify_pj_enable:1;
unsigned int i2c_enable:1;
unsigned int auth_test_key:1;
unsigned int _7:1;
unsigned int cipher_1_1:1;
unsigned int _9_11:3;
unsigned int preamble:4;
unsigned int _16_19:4;
unsigned int encode_window:3;
} b;
} ctrl; /* 0x120 */
union {
unsigned int val;
struct {
unsigned int _0_6:7;
unsigned int force_exit_fsm:1;
unsigned int key_read_word:7;
unsigned int i2c_sw_reset:1;
unsigned int i2c_clk_divider:16;
} b;
} i2c_ctrl; /* 0x124 */
union {
unsigned int val;
struct {
unsigned int wr_data:8;
unsigned int rd_data:8;
unsigned int sw_start_req:1;
unsigned int sw_stop_req:1;
unsigned int wr_data_avail:1;
unsigned int i2c_status:1; /* 0-not using,1-in using */
unsigned int cp_key_req:1;
unsigned int cp_key_read:1;
unsigned int cp_key_last:1;
unsigned int _23:1;
unsigned int cp_src_sel:1;
unsigned int sw_read:1;
unsigned int sw_i2c_req:1;
unsigned int ksv_list_avail:1;
unsigned int ksv_verify_done:1;
} b;
} i2c_ctrl2; /* 0x128 */
unsigned int _12c_27c[85];
union {
unsigned int val;
struct {
unsigned int reset:1;
unsigned int enable:1;
unsigned int _2_5:4;
unsigned int dvi_mode_enable:1;
unsigned int output_format:2; /* 0-RGB,
1-YUV444,2-YUV422 */
unsigned int convert_yuv422:1;
unsigned int hsync_low_active:1; /* 0-active hi,1-lo */
unsigned int dbg_bus_select:1; /* 0-before,1-after */
unsigned int _12:1;
unsigned int vsync_low_active:1; /* 0-active hi,1-lo */
unsigned int _14_15:2;
unsigned int cp_delay:7;
unsigned int _23:1;
unsigned int vsync_enable:3; /* write only */
unsigned int state_machine_status:5;
} b;
} general_ctrl; /* 0x280 */
union {
unsigned int val;
struct {
unsigned int select:1; /* 0-fifo1,1-fifo2 */
unsigned int fifo1_rdy:1; /* Info frame FIFO 1 ready */
unsigned int fifo2_rdy:1; /* Info frame FIFO 2 ready */
unsigned int _3:1;
unsigned int fifo1_addr:4; /* FIFO 1 start address */
unsigned int fifo1_len:5; /* FIFO 1 length */
unsigned int _13_15:3;
unsigned int fifo2_addr:4; /* FIFO 2 start address */
unsigned int fifo2_len:5; /* FIFO 2 length */
unsigned int _25_27:3;
unsigned int horiz_blank_max_pck:3; /* Max packets
that insert during HSYNC */
} b;
} infoframe_ctrl; /* 0x284 */
unsigned int _288_290[3];
union {
unsigned int val;
struct {
unsigned int pck_insert_reset:1;
unsigned int pck_insert_enable:1;
unsigned int avmute_set_enable:1;
unsigned int avmute_clr_enable:1;
unsigned int insert_delay:12;
unsigned int _16_29:14;
unsigned int pixel_repetition:2; /* 0-none,1-2x,2-4x */
} b;
} aud_insert_ctrl; /* 0x294 */
unsigned int _298;
union {
unsigned int val;
struct {
unsigned int _0_7:8;
unsigned int acr_ratio:20;
unsigned int acr_enable:1;
unsigned int mute:1;
} b;
} aud_ratio; /* 0x29c */
unsigned int aud_enable; /* 0x2a0 */
unsigned int _2a4_2a8[2];
union {
unsigned int val;
struct {
unsigned int sub_packet:4;
unsigned int spflat:4;
unsigned int _2ch_eco:1;
unsigned int _9:1;
unsigned int layout:1; /* 0-2 channel,1-8 channel */
unsigned int pwr_saving:1; /* 0-normal,1-power saving */
} b;
} aud_mode; /* 0x2ac */
unsigned int _2b0_38c[56];
unsigned int aud_chan_status0; /* 0x390 */
unsigned int aud_chan_status1; /* 0x394 */
unsigned int aud_chan_status2; /* 0x398 */
unsigned int aud_chan_status3; /* 0x39c */
unsigned int aud_chan_status4; /* 0x3a0 */
unsigned int aud_chan_status5; /* 0x3a4 */
union {
unsigned int val;
struct {
unsigned int n_20bits:20;
unsigned int cts_low_12bits:12;
} b;
} aud_sample_rate1; /* 0x3a8 */
union {
unsigned int val;
struct {
unsigned int cts_hi_8bits:8;
unsigned int _8_27:20;
unsigned int aipclk_rate:2; /* 0-N/2,1-N,2-N/4,3-N*2 */
unsigned int cts_select:1; /* 0-auto,1-fixed from reg */
} b;
} aud_sample_rate2; /* 0x3ac */
unsigned int _3b0_3bc[4];
unsigned int wr_fifo_addr[9]; /* 0x3c0 - 0x3e0 */
union {
unsigned int val;
struct {
unsigned int wr_strobe:1;
unsigned int rd_strobe:1;
unsigned int _2_7:6;
unsigned int addr:8;
} b;
} fifo_ctrl; /* 0x3e4 */
union {
unsigned int val;
struct {
unsigned int ch0_data:10;
unsigned int ch0_enable:1;
unsigned int _11_15:5;
unsigned int ch1_data:10;
unsigned int ch1_enable:1;
} b;
} channel_test; /* 0x3e8 */
union {
unsigned int val;
struct {
unsigned int ch2_data:10;
unsigned int ch2_enable:1;
unsigned int _11_15:5;
unsigned int in_enable:1;
unsigned int out_enable:1;
unsigned int _18_23:6;
unsigned int in_sts:1;
unsigned int out_sts:1;
unsigned int _26_30:5;
unsigned int sts:1; /* 0-plug out,1-plug in */
} b;
} hotplug_detect; /* 0x3ec */
union {
unsigned int val;
struct {
unsigned int sample:8;
unsigned int _8_15:8;
unsigned int detect:9;
} b;
} hotplug_debounce; /* 0x3f0 */
unsigned int _3f4;
union {
unsigned int val;
struct {
unsigned int test_enable:1;
unsigned int test_format:1;
unsigned int _2_9:8;
unsigned int infoframe_sram_enable:1;
unsigned int _11_15:5;
unsigned int clock_select:1; /* 0-clk 1x, 1-clk 2x */
} b;
} tmds_ctrl; /* 0x3f8 */
unsigned int _3fc;
unsigned int rd_fifo_addr[9]; /* 0x400 - 0x420 */
};
struct hdmi_base2_regs {
union {
unsigned int val;
struct {
unsigned int inv_clk:1;
unsigned int _1_3:3;
unsigned int dual_channel:1;
unsigned int _5_7:3;
unsigned int test:4;
unsigned int _12_18:7;
unsigned int internal_ldo:1;
} b;
} status; /* 0x00 */
union {
unsigned int val;
struct {
unsigned int drv_pdmode:1;
unsigned int _1:1;
unsigned int vbg_sel:2;
unsigned int _4_7:4;
unsigned int pd:1;
unsigned int tre_en:2;
unsigned int _11:1;
unsigned int pllck_dly:3;
unsigned int _15:1;
unsigned int pll_cpset:2;
unsigned int pll_r_f:1;
} b;
} test; /* 0x04 */
union {
unsigned int val;
struct {
unsigned int update:1;
unsigned int _1_7:7;
unsigned int level:1;
} b;
} level; /* 0x08 */
union {
unsigned int val;
struct {
unsigned int bpp_type:3; /* 0-888,1-555,2-666,3-565 */
unsigned int _3_7:5;
unsigned int ldi_shift_left:1; /* 0-right,1-left */
} b;
} igs; /* 0x0c */
union {
unsigned int val;
struct {
unsigned int out_data_12:1; /* 0-24bit,1-12bit */
unsigned int hsync_polar_lo:1; /* 0-act hi,1-act low */
unsigned int dvo_enable:1;
unsigned int vsync_polar_lo:1; /* 0-act hi,1-act low */
} b;
} set; /* 0x10 */
union {
unsigned int val;
struct {
unsigned int colfmt_rgb:1;/* 0-RGB or YUV444,1-YUV422 */
unsigned int colfmt_yuv422:1;
} b;
} set2; /* 0x14 */
union {
unsigned int val;
struct {
unsigned int pll_ready:1;
unsigned int _1_7:7;
unsigned int rsen:1;
} b;
} detect; /* 0x18 */
union {
unsigned int val;
struct {
unsigned int pll_tsync:1;
unsigned int tp2s_type:1;
unsigned int div_sel:2;
unsigned int pd_v2i:1;
unsigned int vco_sx:1;
unsigned int vco_mode:1;
unsigned int _7:1;
unsigned int vsref_sel:2;
unsigned int mode:1;
unsigned int pd_l2ha:1;
unsigned int pd_l2hb:1;
unsigned int l2ha_hsen:1;
unsigned int resa_en:1;
unsigned int resa_s:1;
unsigned int pll_lpfs:2;
} b;
} test2; /* 0x1c */
unsigned int test3; /* 0x20 */
union {
unsigned int val;
struct {
unsigned int _0_15:16;
unsigned int reset_pll:1;
} b;
} dftset2; /* 0x24 */
};
#define REG_HDMI_BEGIN (HDMI_BASE_ADDR + 0x100)
#define REG_HDMI_END (HDMI_BASE_ADDR + 0x420)
#define REG_HDMI2_BEGIN (HDMI_BASE2_ADDR + 0x00)
#define REG_HDMI2_END (HDMI_BASE2_ADDR + 0x28)
#ifndef HDMI_C
extern HW_REG struct hdmi_base1_regs *hdmi_regs1;
extern HW_REG struct hdmi_base2_regs *hdmi_regs2;
#endif
#endif /* WMT_HDMI_REG_H */
|