tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8825 / lcdc_reg_v3.h
1 /******************************************************************************
2  ** File Name:    lcdc_v3_reg.h                                     *
3  ** Author:       Shan.He                                           *
4  ** DATE:         01/22/2009                                        *
5  ** Copyright:    2009 Spreatrum, Incoporated. All Rights Reserved. *
6  ** Description:                                                    *
7  ******************************************************************************/
8 /******************************************************************************
9  **                   Edit    History                               *
10  **---------------------------------------------------------------------------*
11  ** DATE          NAME            DESCRIPTION                       *
12
13  ******************************************************************************/
14 #ifndef _LCDC_V3_REG_H_
15 #define _LCDC_V3_REG_H_
16 /*----------------------------------------------------------------------------*
17  **                          Dependencies                           *
18  **---------------------------------------------------------------------------*/
19 #include "lcm_reg_v3.h"
20 /**---------------------------------------------------------------------------*
21  **                          Compiler Flag                          *
22  **---------------------------------------------------------------------------*/
23 #ifdef   __cplusplus
24 extern   "C"
25 {
26 #endif
27 /**---------------------------------------------------------------------------*
28 **                               Micro Define                      **
29 **----------------------------------------------------------------------------*/
30
31 #define REG_LCDC_BASE       LCDC_CTL_BEGIN
32
33 #define LCDC_CTRL                 (REG_LCDC_BASE + 0x0000)
34 #define LCDC_DISP_SIZE            (REG_LCDC_BASE + 0x0004)
35 #define LCDC_LCM_START            (REG_LCDC_BASE + 0x0008)
36 #define LCDC_LCM_SIZE             (REG_LCDC_BASE + 0x000c)
37 #define LCDC_BG_COLOR             (REG_LCDC_BASE + 0x0010)
38 #define LCDC_FIFO_STATUS          (REG_LCDC_BASE + 0x0014)
39
40
41 #define LCDC_IMG_CTRL             (REG_LCDC_BASE + 0x0020)
42 #define LCDC_IMG_Y_BASE_ADDR      (REG_LCDC_BASE + 0x0024)
43 #define LCDC_IMG_UV_BASE_ADDR     (REG_LCDC_BASE + 0x0028)
44 #define LCDC_IMG_SIZE_XY          (REG_LCDC_BASE + 0x002c)
45 #define LCDC_IMG_PITCH            (REG_LCDC_BASE + 0x0030)
46 #define LCDC_IMG_DISP_XY          (REG_LCDC_BASE + 0x0034)
47
48
49 #define LCDC_OSD1_CTRL            (REG_LCDC_BASE + 0x0050)  
50 #define LCDC_OSD1_BASE_ADDR       (REG_LCDC_BASE + 0x0054) 
51 #define LCDC_OSD1_ALPHA_BASE_ADDR (REG_LCDC_BASE + 0x0058) 
52 #define LCDC_OSD1_SIZE_XY         (REG_LCDC_BASE + 0x005c) 
53 #define LCDC_OSD1_PITCH           (REG_LCDC_BASE + 0x0060) 
54 #define LCDC_OSD1_DISP_XY         (REG_LCDC_BASE + 0x0064)  
55 #define LCDC_OSD1_ALPHA           (REG_LCDC_BASE + 0x0068) 
56 #define LCDC_OSD1_GREY_RGB        (REG_LCDC_BASE + 0x006c) 
57 #define LCDC_OSD1_CK              (REG_LCDC_BASE + 0x0070) 
58
59 #define LCDC_OSD2_CTRL            (REG_LCDC_BASE + 0x0080)  
60 #define LCDC_OSD2_BASE_ADDR       (REG_LCDC_BASE + 0x0084) 
61 #define LCDC_OSD2_SIZE_XY         (REG_LCDC_BASE + 0x008c) 
62 #define LCDC_OSD2_PITCH           (REG_LCDC_BASE + 0x0090) 
63 #define LCDC_OSD2_DISP_XY         (REG_LCDC_BASE + 0x0094)  
64 #define LCDC_OSD2_ALPHA           (REG_LCDC_BASE + 0x0098) 
65 #define LCDC_OSD2_GREY_RGB        (REG_LCDC_BASE + 0x009c) 
66 #define LCDC_OSD2_CK              (REG_LCDC_BASE + 0x00a0) 
67
68 #define LCDC_OSD3_CTRL            (REG_LCDC_BASE + 0x00b0)  
69 #define LCDC_OSD3_BASE_ADDR       (REG_LCDC_BASE + 0x00b4) 
70 #define LCDC_OSD3_SIZE_XY         (REG_LCDC_BASE + 0x00bc) 
71 #define LCDC_OSD3_PITCH           (REG_LCDC_BASE + 0x00c0) 
72 #define LCDC_OSD3_DISP_XY         (REG_LCDC_BASE + 0x00c4)  
73 #define LCDC_OSD3_ALPHA           (REG_LCDC_BASE + 0x00c8) 
74 #define LCDC_OSD3_GREY_RGB        (REG_LCDC_BASE + 0x00cc) 
75 #define LCDC_OSD3_CK              (REG_LCDC_BASE + 0x00d0) 
76
77 #define LCDC_OSD4_CTRL            (REG_LCDC_BASE + 0x00e0)  
78 #define LCDC_OSD4_BASE_ADDR       (REG_LCDC_BASE + 0x00e4) 
79 #define LCDC_OSD4_SIZE_XY         (REG_LCDC_BASE + 0x00ec) 
80 #define LCDC_OSD4_PITCH           (REG_LCDC_BASE + 0x00f0) 
81 #define LCDC_OSD4_DISP_XY         (REG_LCDC_BASE + 0x00f4)  
82 #define LCDC_OSD4_ALPHA           (REG_LCDC_BASE + 0x00f8) 
83 #define LCDC_OSD4_GREY_RGB        (REG_LCDC_BASE + 0x00fc) 
84 #define LCDC_OSD4_CK              (REG_LCDC_BASE + 0x0100) 
85
86 #define LCDC_OSD5_CTRL            (REG_LCDC_BASE + 0x0110)  
87 #define LCDC_OSD5_BASE_ADDR       (REG_LCDC_BASE + 0x0114) 
88 #define LCDC_OSD5_SIZE_XY         (REG_LCDC_BASE + 0x011c) 
89 #define LCDC_OSD5_PITCH           (REG_LCDC_BASE + 0x0120) 
90 #define LCDC_OSD5_DISP_XY         (REG_LCDC_BASE + 0x0124)  
91 #define LCDC_OSD5_ALPHA           (REG_LCDC_BASE + 0x0128) 
92 #define LCDC_OSD5_GREY_RGB        (REG_LCDC_BASE + 0x012c) 
93 #define LCDC_OSD5_CK              (REG_LCDC_BASE + 0x0130) 
94
95
96
97
98 #define LCDC_IRQ_EN               (REG_LCDC_BASE + 0x0170)  
99 #define LCDC_IRQ_CLR              (REG_LCDC_BASE + 0x0174)  
100 #define LCDC_IRQ_STATUS           (REG_LCDC_BASE + 0x0178)  
101 #define LCDC_IRQ_RAW              (REG_LCDC_BASE + 0x017c)  
102
103 /**---------------------------------------------------------------------------*
104 **                               Data Prototype                              **
105 **----------------------------------------------------------------------------*/
106 #ifdef CHIP_ENDIAN_LITTLE
107 typedef union _lcdc_ctrl_tag
108 {
109     struct _lcdc_ctrl_map
110     {
111         volatile unsigned int lcd_enable        :1; //[0] 0:LCDC Disable;1:LCDC Enable
112         volatile unsigned int fmark_mode        :1; //[1] 0: fmark device; 1: non-fmark device
113         volatile unsigned int fmark_pol         :1; //[2] 0: fmark valid at 1; 1: fmark valid at 0
114         volatile unsigned int lcdc_run          :1; //[3] 0: stop; 1:run
115         volatile unsigned int dither_en         :1; //[4] 0:disable; 1:enable
116         volatile unsigned int reserved_2        :3;  //[7:5] Reserved ;
117         volatile unsigned int req_gap           :8;  //[15:8] The interval between 2 AHB master requests for each client.
118         volatile unsigned int reserved_1        :16; //[31:16] Reserved ;
119     } mBits ;
120     volatile unsigned int dwValue ;
121 } LCDC_CTRL_U;
122
123
124 typedef union _lcdc_disp_size_tag
125 {
126     struct _lcdc_disp_size_map
127     {
128         volatile unsigned int disp_size_x       :10;  //[9:0] display window horizontal size, should be >0 and <1024
129         volatile unsigned int reserved_2        :6;  //[15: 10] Reserved
130         volatile unsigned int disp_size_y       :10;  //[25:16] display window vertical size, should be >0 and <1024
131         volatile unsigned int reserved_1        :6;  //[31:26] Reserved
132     } mBits;
133     volatile unsigned int dwValue;
134 } LCDC_DISP_SIZE_U;
135
136 typedef union _lcdc_lcm_start_tag
137 {
138     struct _lcdc_lcm_start_map
139     {
140         volatile unsigned int lcm_start_x   :10;  //[9:0] LCM refresh window start X, should be >0 and <1024, guarantee the window in display region.
141         volatile unsigned int reserved_2        :6;  //[15: 10] Reserved
142         volatile unsigned int lcm_start_y   :10;  //[25:16] LCM refresh window start Y, should be >0 and <1024, guarantee the window in display region.
143         volatile unsigned int reserved_1        :6;  //[31:26] Reserved
144     } mBits;
145     volatile unsigned int dValue;
146 } LCDC_LCM_START_U;
147
148 typedef union _lcdc_lcm_size_tag
149 {
150     struct _lcdc_lcm_size_map
151     {
152         volatile unsigned int lcm_size_x        :10;  //[9:0] LCM refresh window horizontal size, should be >0 and <1024, guarantee the window in display region.
153         volatile unsigned int reserved_2        :6;  //[15: 10] Reserved
154         volatile unsigned int lcm_size_y        :10;  //[25:16] LCM refresh window vertical size, should be >0 and <1024, guarantee the window in display region.
155         volatile unsigned int reserved_1        :6;  //[31:26] Reserved
156     } mBits;
157     volatile unsigned int dValue;
158 } LCDC_LCM_SIZE_U;
159
160 typedef union _lcdc_bg_color_tag
161 {
162     struct _lcdc_bg_color_map
163     {
164         volatile unsigned int bg_b              :8; //[7:0] Background blue
165         volatile unsigned int bg_g              :8; //[15:8] Background green
166         volatile unsigned int bg_r              :8; //[23:16] Background red
167         volatile unsigned int reserved          :8; //[31:24] Reserved
168     } mBits;
169     volatile unsigned int dwValue;
170 } LCDC_BG_COLOR_U;
171
172 typedef union _lcdc_fifo_status_tag
173 {
174     struct _lcdc_fifo_status_map
175     {
176         volatile unsigned int img_y_fifo_status     :2;  //[1:0] Image layer FIFO info. When image is YUV format, it is for Y data; when image is RGB format, it is for RGB data.
177         //status, '1' for full; [0] - FIFO empty status, '1' for empty.
178         volatile unsigned int img_uv_fifo_status    :2;  //[3:2] Image layer FIFO info. It is active when image is YUV422 and YUV420 format. It is for UV data.
179         //[3] - FIFO full status, '1' for full; [2] - FIFO empty status, '1' for empty.
180         volatile unsigned int osd1_alpha_fifo_status  :2; //[5:4] Osd1 layer FIFO info. It is active when osd1 is RGB565 format with pixel alpha.
181         //[5] - FIFO full status, '1' for full; [4] - FIFO empty status, '1' for empty.
182         volatile unsigned int osd1_fifo_status      :2;  //[7:6] Osd1 layer FIFO info. It is for osd1 layer data.
183         //[7] - FIFO full status, '1' for full; [6] - FIFO empty status, '1' for empty.
184         volatile unsigned int osd2_fifo_status      :2;  //[9:8] Osd2 layer FIFO info.It is for osd2 layer data.
185         //[9] - FIFO full status, '1' for full; [8] - FIFO empty status, '1' for empty.
186         volatile unsigned int osd3_fifo_status      :2;  //[11:10]
187         volatile unsigned int osd4_fifo_status      :2;  //[13:12]
188         volatile unsigned int osd5_fifo_status      :2;  //[15:14]
189         volatile unsigned int y2r_fifo_status       :2;  //[17:16] YUV to RGB work FIFO
190         //[11] - FIFO full status, '1' for full; [10] - FIFO empty status, '1' for empty.
191         volatile unsigned int dither_fifo_status    :2;  //[19:18] Dithering output FIFO, it is shared by capture and display.
192         //[13] - FIFO full status, '1' for full; [12]-FIFO empty status, '1' for empty.
193         volatile unsigned int output_fifo_status    :2;  //[21:20] Cross domain FIFO;
194         //[15] - FIFO full status, '1' for full; [14] - FIFO empty status, '1' for empty.
195         volatile unsigned int reserved              :10;  //[31:16] reserved
196     } mBits;
197     volatile unsigned int dwValue;
198 } LCDC_FIFO_STATUS_U;
199
200 typedef union _img_ctrl_tag
201 {
202     struct _img_ctrl_map
203     {
204         volatile unsigned int img_en            :1;     //[0] Image layer enable; 0: disable; 1: enable
205         volatile unsigned int img_format        :4;     //[1:4] Image layer data format, it supports following ones:
206         //0000-YUV422;
207         //0001-YUV420;
208         //0010-YUV400;
209         //0011-RGB888;
210         //0100-RGB666;
211         //0101-RGB565;
212         //0110-RGB555;
213         volatile unsigned int img_y_endian      :2;     //[5:6] Image layer data endian; 0: big endian(0123); 1: little endian(3210)
214         volatile unsigned int img_uv_endian     :2;           //[7:8]
215         volatile unsigned int reserved          :23;    //[31:9]
216     } mBits;
217     volatile unsigned int dwValue;
218 } IMG_CTRL_U;
219
220 typedef union _img_y_base_addr_tag
221 {
222     struct _img_y_base_addr_map
223     {
224         volatile unsigned int img_y_base_addr   :30;    //[29:0]  //When image is YUV format, it is Y data base address;
225         volatile unsigned int reserved          :2;     //[31:30]
226     } mBits;
227     volatile unsigned int dwValue;
228 } IMG_Y_BASE_ADDR_U;
229
230 typedef union _img_uv_base_addr_tag
231 {
232     struct _img_uv_base_addr_map
233     {
234         volatile unsigned int img_uv_base_addr  :30;    //[29:0]  //When image is YUV format, it is UV base address;
235         volatile unsigned int reserved          :2;     //[31:30]
236     } mBits;
237     volatile unsigned int dwValue;
238 } IMG_UV_BASE_ADDR_U;
239
240 typedef union _img_size_xy_tag
241 {
242     struct _img_size_xy_map
243     {
244         volatile unsigned int img_size_x        :10;  //[9:0] Image layer window size in X, should be >0 and <1024
245         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
246         volatile unsigned int img_size_y        :10;  //[25:16] Image layer window size in Y, should be >0 and <1024
247         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
248     } mBits;
249     volatile unsigned int dwValue;
250 } IMG_SIZE_XY_U;
251
252 typedef union _img_pitch_tag
253 {
254     struct _img_pitch_map
255     {
256         volatile unsigned int img_pitch         :10;      //[9:0] Image layer data storage pitch, should be >0 and <1024.
257         volatile unsigned int reserved_1        :22;      //[31:10] Reserved
258     } mBits;
259     volatile unsigned int dwValue;
260 } IMG_PITCH_U;
261
262 typedef union _img_disp_xy_tag
263 {
264     struct _img_disp_xy_map
265     {
266         volatile unsigned int img_disp_x        :10;  //[9:0] Image layer window start X position in display plane, should be >0 and <1024
267         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
268         volatile unsigned int img_disp_y        :10;  //[25:16] Image layer window start Y position in display plane, should be >0 and <1024
269         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
270     } mBits;
271     volatile unsigned int dwValue;
272 } IMG_DISP_XY_U;
273
274 typedef union _osd1_ctrl_tag
275 {
276     struct _osd1_ctrl_map
277     {
278         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
279         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
280         volatile unsigned int blk_alpha_sel     :1;     //[1] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
281         volatile unsigned int blk_format        :4;     //[6:3] osd data format
282         volatile unsigned int blk_endian        :2;     //[7] block data endian, 0: big endian (0123); 1: little endian (3210)
283         volatile unsigned int alpha_endian      :2;
284         volatile unsigned int reserved          :21;    //[31:8] Reserved
285     } mBits;
286     volatile unsigned int dwValue;
287 } OSD1_CTRL_U;
288
289 typedef union _osd2_ctrl_tag
290 {
291     struct _osd2_ctrl_map
292     {
293         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
294         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
295         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
296         volatile unsigned int blk_format        :4;     //[6:3] osd data format
297         volatile unsigned int blk_endian        :2;     //[8:7] block data endian, 0: big endian (0123); 1: little endian (3210)
298         volatile unsigned int reserved          :23;    //[31:10] Reserved
299     } mBits;
300     volatile unsigned int dwValue;
301 } OSD2_CTRL_U;
302
303 typedef union _osd3_ctrl_tag
304 {
305     struct _osd3_ctrl_map
306     {
307         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
308         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
309         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
310         volatile unsigned int blk_format        :4;     //[6:3] osd data format
311         volatile unsigned int blk_endian        :2;     //[8:7] block data endian, 0: big endian (0123); 1: little endian (3210)
312         volatile unsigned int reserved          :23;    //[31:10] Reserved
313     } mBits;
314     volatile unsigned int dwValue;
315 } OSD3_CTRL_U;
316
317 typedef union _osd4_ctrl_tag
318 {
319     struct _osd4_ctrl_map
320     {
321         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
322         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
323         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
324         volatile unsigned int blk_format        :4;     //[6:3] osd data format
325         volatile unsigned int blk_endian        :2;     //[8:7] block data endian, 0: big endian (0123); 1: little endian (3210)
326         volatile unsigned int reserved          :23;    //[31:10] Reserved
327     } mBits;
328     volatile unsigned int dwValue;
329 } OSD4_CTRL_U;
330
331 typedef union _osd5_ctrl_tag
332 {
333     struct _osd5_ctrl_map
334     {
335         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
336         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
337         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
338         volatile unsigned int blk_format        :4;     //[6:3] osd data format
339         volatile unsigned int blk_endian        :2;     //[8:7] block data endian, 0: big endian (0123); 1: little endian (3210)
340         volatile unsigned int reserved          :24;    //[31:9] Reserved
341     } mBits;
342     volatile unsigned int dwValue;
343 } OSD5_CTRL_U;
344
345 typedef union _osd_ctrl_tag
346 {
347     struct _osd_ctrl_map
348     {
349         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
350         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
351         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
352         volatile unsigned int blk_format        :4;     //[6:3] osd data format
353         volatile unsigned int blk_endian        :2;     //[8:7] block data endian, 0: big endian (0123); 1: little endian (3210)
354         volatile unsigned int reserved          :23;    //[31:9] Reserved
355     } mBits;
356     volatile unsigned int dwValue;
357 } OSD_CTRL_U;
358
359 typedef union _osd_colorkey_rgb_tag
360 {
361     struct _osd_colorkey_map
362     {
363         volatile unsigned int osd_ck            :24;    //[23:0] Color-key value in OSD layer
364         volatile unsigned int reserved          :8;     //[31:24] Reserved
365     } mBits;
366     volatile unsigned int dwValue;
367 } OSD_COLORKEY_U;
368
369
370 typedef union _osd_base_addr_ctrl_tag
371 {
372     struct _osd_base_addr_map
373     {
374         volatile unsigned int blk_base_addr     :30;    //[29:0] block base address
375         volatile unsigned int reserved          :2;     //[31:30] Reserved
376     } mBits;
377     volatile unsigned int dwValue;
378 } OSD_BASE_ADDR_U;
379
380 typedef union _osd_alpha_base_addr_ctrl_tag
381 {
382     struct _osd_alpha_base_addr_map
383     {
384         volatile unsigned int blk_alpha_base_addr   :30;    //[29:0] block base address
385         volatile unsigned int reserved              :2;     //[31:30] Reserved
386     } mBits;
387     volatile unsigned int dwValue;
388 } OSD_ALPHA_BASE_ADDR_U;
389
390 typedef union _osd_size_xy_tag
391 {
392     struct _osd_size_xy_map
393     {
394         volatile unsigned int blk_size_x        :10;  //[9:0] Image layer window size in X, should be >0 and <1024
395         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
396         volatile unsigned int blk_size_y        :10;  //[25:16] Image layer window size in Y, should be >0 and <1024
397         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
398     } mBits;
399     volatile unsigned int dwValue;
400 } OSD_SIZE_XY_U;
401
402 typedef union _osd_pitch_tag
403 {
404     struct _osd_pitch_map
405     {
406         volatile unsigned int blk_pitch         :10;      //[9:0] Image layer data storage pitch, should be >0 and <1024.
407         volatile unsigned int reserved_1        :22;      //[31:10] Reserved
408     } mBits;
409     volatile unsigned int dwValue;
410 } OSD_PITCH_U;
411
412 typedef union _osd_disp_xy_tag
413 {
414     struct _osd_disp_xy_map
415     {
416         volatile unsigned int blk_disp_x    :10;  //[9:0] Image layer window start X position in display plane, should be >0 and <1024
417         volatile unsigned int reserved_2    :6;   //[15: 10] Reserved
418         volatile unsigned int blk_disp_y    :10;  //[25:16] Image layer window start Y position in display plane, should be >0 and <1024
419         volatile unsigned int reserved_1    :6;   //[31:26] Reserved
420     } mBits;
421     volatile unsigned int dwValue;
422 } OSD_DISP_XY_U;
423
424 typedef union _osd_alpha_tag
425 {
426     struct _osd_alpha_map
427     {
428         volatile unsigned int blk_alpha         :8;       //[7:0] Block alpha for block1 in OSD layer1, it is in 0~255
429         volatile unsigned int reserved_1        :24;      //[31:8] Reserved
430     } mBits;
431     volatile unsigned int dwValue;
432 } OSD_ALPHA_U;
433
434 typedef union _osd_grey_rgb_tag
435 {
436     struct _osd_grey_rgb_map
437     {
438         volatile unsigned int blk_grey_rgb      :24;    //[23:0] Constant RGB for GREY data format.
439         volatile unsigned int reserved_1        :8;     //[31:24] Reserved
440     } mBits;
441     volatile unsigned int dwValue;
442 } OSD_GREY_RGB_U;
443
444 typedef union _lcdc_cap_ctrl_tag
445 {
446     struct _lcdc_cap_ctrl_map
447     {
448         volatile unsigned int cap_en            :1;     //[1] Capture blended data control, 0: disable, 1: enable
449         volatile unsigned int cap_format        :2;     //[2:1] data save format, 00: RGB888, 01: rgb666, 10: RGB565, 11: reserved
450         volatile unsigned int cap_endian        :2;     //[3] Capture endian, 0: big endian, 1: little endian
451         volatile unsigned int reserved          :27;     //[31:4] Reserved
452     } mBits;
453     volatile unsigned int dwValue;
454 } LCDC_CAP_CTRL_U;
455
456 typedef union _cap_base_addr_tag
457 {
458     struct _cap_base_addr_map
459     {
460         volatile unsigned int base_addr         :30;    //[29:0] Capture base address
461         volatile unsigned int reserved          :2;     //[31:30] Reserved
462     } mBits;
463     volatile unsigned int dwValue;
464 } CAP_BASE_ADDR_U;
465
466 typedef union _cap_size_xy_tag
467 {
468     struct _cap_size_xy_map
469     {
470         volatile unsigned int cap_size_x        :10;  //[9:0] Image layer window size in X, should be >0 and <1024
471         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
472         volatile unsigned int cap_size_y        :10;  //[25:16] Image layer window size in Y, should be >0 and <1024
473         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
474     } mBits;
475     volatile unsigned int dwValue;
476 } CAP_SIZE_XY_U;
477
478 typedef union _cap_pitch_tag
479 {
480     struct _cap_pitch_map
481     {
482         volatile unsigned int cap_pitch         :10;      //[9:0] Image layer data storage pitch, should be >0 and <1024.
483         volatile unsigned int reserved          :22;      //[31:10] Reserved
484     } mBits;
485     volatile unsigned int dwValue;
486 } CAP_PITCH_U;
487
488 typedef union _cap_start_xy_tag
489 {
490     struct _cap_start_xy_map
491     {
492         volatile unsigned int cap_start_x       :10;  //[9:0] Image layer window start X position in display plane, should be >0 and <1024
493         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
494         volatile unsigned int cap_start_y       :10;  //[25:16] Image layer window start Y position in display plane, should be >0 and <1024
495         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
496     } mBits;
497     volatile unsigned int dwValue;
498 } CAP_START_XY_U;
499
500 typedef union _y2r_ctrl_tag
501 {
502     struct _y2r_ctrl_map
503     {
504         volatile unsigned int upsample_mode     :1;     //[0] UV horizontal up-sampling mode, 0: duplicate, 1: average
505         volatile unsigned int reserved          :31;    //[31:1] Reserved
506     } mBits;
507     volatile unsigned int dwValue;
508 } Y2R_CTRL_U;
509
510 typedef union _y2r_contrast_tag
511 {
512     struct _y2r_contrast_map
513     {
514         volatile unsigned int contrast          :8;     //[7:0] Contrast config, 0~255
515         volatile unsigned int reserved          :24;    //[31:8] Reserved
516     } mBits;
517     volatile unsigned int dwValue;
518 } Y2R_CONTRAST_U;
519
520 typedef union _y2r_saturation_tag
521 {
522     struct _y2r_saturation_map
523     {
524         volatile unsigned int saturation        :8;     //[7:0] Saturation config, 0~255
525         volatile unsigned int reserved          :24;    //[31:8] Reserved
526     } mBits;
527     volatile unsigned int dwValue;
528 } Y2R_SATURATION_U;
529
530 typedef union _y2r_brightness_tag
531 {
532     struct _y2r_brightness_map
533     {
534         volatile unsigned int brightness        :9;     //[8:0] Brightness config (S1.8), -256~255
535         volatile unsigned int reserved          :23;    //[31:9] Reserved
536     } mBits;
537     volatile unsigned int dwValue;
538 } Y2R_BRIGHTNESS_U;
539
540
541 typedef union _lcdc_irq_en_tag
542 {
543     struct _lcdc_irq_en_map
544     {
545         volatile unsigned int irq_lcdc_done_en  :1;     //[0] Enable LCDC_DONE interrupt
546         volatile unsigned int irq_lcm_eof_en    :1;     //[1] Enable FRAME_END Interrupt
547         volatile unsigned int irq_lcm_sof_en    :1;     //[2] Enable CAP_DONE interrupt
548         volatile unsigned int irq_fmark_en      :1;     //[3] Enable FMARK interrupt, the interrupt is for LCDC detect a FMARK input.
549         volatile unsigned int reserved          :28;    //[31:3] Reserved
550     } mBits;
551     volatile unsigned int dwValue;
552 } LCDC_IRQ_EN_U;
553
554 typedef union _lcdc_irq_clr_tag
555 {
556     struct _lcdc_irq_clr_map
557     {
558         volatile unsigned int irq_lcdc_done_clr :1;     //[0] Write '1' to clear the DISP_DONE interrupt bit, and itself is cleared by HW.
559         volatile unsigned int irq_lcm_eof_clr   :1;     //[1] Write '1' to clear the FRAME_END interrupt bit, and itself is cleared by HW.
560         volatile unsigned int irq_lcm_sof_clr   :1;     //[2] Write '1' to clear the CAP_DONE interrupt bit, and itself is cleared by HW.
561         volatile unsigned int irq_fmark_clr     :1;     //[3] Write '1' to clear the FMARK interrupt bit, and itself is cleared by HW.
562         volatile unsigned int reserved          :28;    //[31:3] Reserved
563     } mBits;
564     volatile unsigned int dwValue;
565 } LCDC_IRQ_CLR_U;
566
567
568 typedef union _lcdc_irq_status_tag
569 {
570     struct _lcdc_irq_status_map
571     {
572         volatile unsigned int irq_lcdc_done_status  :1;     //[0] DISP_DONE interrupt status
573         volatile unsigned int irq_lcm_eof_status    :1;     //[1] FRAME_END interrupt status
574         volatile unsigned int irq_lcm_sof_status    :1;     //[2] CAP DONE interrupt status
575         volatile unsigned int irq_fmark_status      :1;     //[3] FMARK interrupt status
576         volatile unsigned int reserved              :28;    //[31:3] Reserved
577     } mBits;
578     volatile unsigned int dwValue;
579 } LCDC_IRQ_STATUS_U;
580
581 typedef union _lcdc_irq_raw_tag
582 {
583     struct _lcdc_irq_raw_map
584     {
585         volatile unsigned int irq_lcdc_done_raw :1;     //[0] DISP_DONE raw interrupt
586         volatile unsigned int irq_lcm_eof_raw   :1;     //[1] FRAME_END raw interrupt
587         volatile unsigned int irq_lcm_sof_raw   :1;     //[2] CAP DONE raw interrupt
588         volatile unsigned int irq_fmark_raw     :1;     //[3] FMARK raw interrupt
589         volatile unsigned int reserved          :28;    //[31:3] Reserved
590     } mBits;
591     volatile unsigned int dwValue;
592 } LCDC_IRQ_RAW_U;
593 #else
594 typedef union _lcdc_ctrl_tag
595 {
596     struct _lcdc_ctrl_map
597     {
598         volatile unsigned int reserved_1        :16; //[31:16] Reserved ;
599         volatile unsigned int req_gap           :8;  //[15:8] The interval between 2 AHB master requests for each client.
600         volatile unsigned int reserved_2        :3;  //[7:5] Reserved ;
601         volatile unsigned int dither_en         :1; //[4] 0:disable; 1:enable
602         volatile unsigned int lcdc_run          :1; //[3] 0: stop; 1:run
603         volatile unsigned int fmark_pol         :1; //[2] 0: fmark valid at 1; 1: fmark valid at 0
604         volatile unsigned int fmark_mode        :1; //[1] 0: fmark device; 1: non-fmark device
605         volatile unsigned int lcd_enable        :1; //[0] 0:LCDC Disable;1:LCDC Enable
606     } mBits ;
607     volatile unsigned int dwValue ;
608 } LCDC_CTRL_U;
609
610
611 typedef union _lcdc_disp_size_tag
612 {
613     struct _lcdc_disp_size_map
614     {
615         volatile unsigned int reserved_1        :6;  //[31:26] Reserved
616         volatile unsigned int disp_size_y       :10;  //[25:16] display window vertical size, should be >0 and <1024
617         volatile unsigned int reserved_2        :6;  //[15: 10] Reserved
618         volatile unsigned int disp_size_x       :10;  //[9:0] display window horizontal size, should be >0 and <1024
619     } mBits;
620     volatile unsigned int dwValue;
621 } LCDC_DISP_SIZE_U;
622
623 typedef union _lcdc_lcm_start_tag
624 {
625     struct _lcdc_lcm_start_map
626     {
627         volatile unsigned int reserved_1        :6;  //[31:26] Reserved
628         volatile unsigned int lcm_start_y   :10;  //[25:16] LCM refresh window start Y, should be >0 and <1024, guarantee the window in display region.
629         volatile unsigned int reserved_2        :6;  //[15: 10] Reserved
630         volatile unsigned int lcm_start_x   :10;  //[9:0] LCM refresh window start X, should be >0 and <1024, guarantee the window in display region.
631     } mBits;
632     volatile unsigned int dValue;
633 } LCDC_LCM_START_U;
634
635 typedef union _lcdc_lcm_size_tag
636 {
637     struct _lcdc_lcm_size_map
638     {
639         volatile unsigned int reserved_1        :6;  //[31:26] Reserved
640         volatile unsigned int lcm_size_y        :10;  //[25:16] LCM refresh window vertical size, should be >0 and <1024, guarantee the window in display region.
641         volatile unsigned int reserved_2        :6;  //[15: 10] Reserved
642         volatile unsigned int lcm_size_x        :10;  //[9:0] LCM refresh window horizontal size, should be >0 and <1024, guarantee the window in display region.
643     } mBits;
644     volatile unsigned int dValue;
645 } LCDC_LCM_SIZE_U;
646
647 typedef union _lcdc_bg_color_tag
648 {
649     struct _lcdc_bg_color_map
650     {
651         volatile unsigned int reserved          :8; //[31:24] Reserved
652         volatile unsigned int bg_r              :8; //[23:16] Background red
653         volatile unsigned int bg_g              :8; //[15:8] Background green
654         volatile unsigned int bg_b              :8; //[7:0] Background blue
655     } mBits;
656     volatile unsigned int dwValue;
657 } LCDC_BG_COLOR_U;
658
659 typedef union _lcdc_fifo_status_tag
660 {
661     struct _lcdc_fifo_status_map
662     {
663         volatile unsigned int reserved              :10;  //[31:16] reserved
664         volatile unsigned int output_fifo_status    :2;  //[21:20] Cross domain FIFO;
665         //[15] - FIFO full status, '1' for full; [14] - FIFO empty status, '1' for empty.
666         volatile unsigned int dither_fifo_status    :2;  //[19:18] Dithering output FIFO, it is shared by capture and display.
667         //[13] - FIFO full status, '1' for full; [12]-FIFO empty status, '1' for empty.
668         volatile unsigned int y2r_fifo_status       :2;  //[17:16] YUV to RGB work FIFO
669         //[11] - FIFO full status, '1' for full; [10] - FIFO empty status, '1' for empty.
670         volatile unsigned int osd5_fifo_status        :2;  //[15:14]
671         volatile unsigned int osd4_fifo_status      :2;  //[13:12]
672         volatile unsigned int osd3_fifo_status      :2;  //[11:10]
673         volatile unsigned int osd2_fifo_status      :2;  //[9:8] Osd2 layer FIFO info.It is for osd2 layer data.
674         //[9] - FIFO full status, '1' for full; [8] - FIFO empty status, '1' for empty.
675         volatile unsigned int osd1_fifo_status      :2;  //[7:6] Osd1 layer FIFO info. It is for osd1 layer data.
676         //[7] - FIFO full status, '1' for full; [6] - FIFO empty status, '1' for empty.
677         volatile unsigned int osd1_alpha_fifo_status  :2; //[5:4] Osd1 layer FIFO info. It is active when osd1 is RGB565 format with pixel alpha.
678         //[5] - FIFO full status, '1' for full; [4] - FIFO empty status, '1' for empty.
679         volatile unsigned int img_uv_fifo_status    :2;  //[3:2] Image layer FIFO info. It is active when image is YUV422 and YUV420 format. It is for UV data.
680         //[3] - FIFO full status, '1' for full; [2] - FIFO empty status, '1' for empty.
681         volatile unsigned int img_y_fifo_status     :2;  //[1:0] Image layer FIFO info. When image is YUV format, it is for Y data; when image is RGB format, it is for RGB data.
682         //status, '1' for full; [0] - FIFO empty status, '1' for empty.
683     } mBits;
684     volatile unsigned int dwValue;
685 } LCDC_FIFO_STATUS_U;
686
687 typedef union _img_ctrl_tag
688 {
689     struct _img_ctrl_map
690     {
691         volatile unsigned int reserved            :23;    //[31:6]
692         volatile unsigned int img_y_endian        :2;
693         volatile unsigned int img_uv_endian      :2;
694         volatile unsigned int img_format        :4;     //[1:4] Image layer data format, it supports following ones:
695         //0000-YUV422;
696         //0001-YUV420;
697         //0010-YUV400;
698         //0011-RGB888;
699         //0100-RGB666;
700         //0101-RGB565;
701         //0110-RGB555;
702
703         volatile unsigned int img_en            :1;     //[0] Image layer enable; 0: disable; 1: enable
704
705     } mBits;
706     volatile unsigned int dwValue;
707 } IMG_CTRL_U;
708
709 typedef union _img_y_base_addr_tag
710 {
711     struct _img_y_base_addr_map
712     {
713         volatile unsigned int reserved          :2;     //[31:30]
714         volatile unsigned int img_y_base_addr   :30;    //[29:0]  //When image is YUV format, it is Y data base address;
715     } mBits;
716     volatile unsigned int dwValue;
717 } IMG_Y_BASE_ADDR_U;
718
719 typedef union _img_uv_base_addr_tag
720 {
721     struct _img_uv_base_addr_map
722     {
723         volatile unsigned int reserved          :2;     //[31:30]
724         volatile unsigned int img_uv_base_addr  :30;    //[29:0]  //When image is YUV format, it is UV base address;
725     } mBits;
726     volatile unsigned int dwValue;
727 } IMG_UV_BASE_ADDR_U;
728
729 typedef union _img_size_xy_tag
730 {
731     struct _img_size_xy_map
732     {
733         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
734         volatile unsigned int img_size_y        :10;  //[25:16] Image layer window size in Y, should be >0 and <1024
735         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
736         volatile unsigned int img_size_x        :10;  //[9:0] Image layer window size in X, should be >0 and <1024
737     } mBits;
738     volatile unsigned int dwValue;
739 } IMG_SIZE_XY_U;
740
741 typedef union _img_pitch_tag
742 {
743     struct _img_pitch_map
744     {
745         volatile unsigned int reserved_1        :22;      //[31:10] Reserved
746         volatile unsigned int img_pitch         :10;      //[9:0] Image layer data storage pitch, should be >0 and <1024.
747     } mBits;
748     volatile unsigned int dwValue;
749 } IMG_PITCH_U;
750
751 typedef union _img_disp_xy_tag
752 {
753     struct _img_disp_xy_map
754     {
755         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
756         volatile unsigned int img_disp_y        :10;  //[25:16] Image layer window start Y position in display plane, should be >0 and <1024
757         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
758         volatile unsigned int img_disp_x        :10;  //[9:0] Image layer window start X position in display plane, should be >0 and <1024
759     } mBits;
760     volatile unsigned int dwValue;
761 } IMG_DISP_XY_U;
762
763 typedef union _osd1_ctrl_tag
764 {
765     struct _osd1_ctrl_map
766     {
767         volatile unsigned int reserved          :21;    //[31:8] Reserved
768         volatile unsigned int blk_endian        :2;     //[7] block data endian, 0: big endian (0123); 1: little endian (3210)
769         volatile unsigned int alpha_endian        :2;
770         volatile unsigned int blk_format        :4;     //[6:3] osd data format
771         volatile unsigned int blk_alpha_sel     :1;     //[1] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
772         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
773         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
774     } mBits;
775     volatile unsigned int dwValue;
776 } OSD1_CTRL_U;
777
778 typedef union _osd2_ctrl_tag
779 {
780     struct _osd2_ctrl_map
781     {
782         volatile unsigned int reserved          :23;    //[31:10] Reserved
783         volatile unsigned int blk_endian        :2;     //[9] block data endian, 0: big endian (0123); 1: little endian (3210)
784         volatile unsigned int blk_format        :4;     //[6:3] osd data format
785         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
786         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
787         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
788     } mBits;
789     volatile unsigned int dwValue;
790 } OSD2_CTRL_U;
791
792 typedef union _osd3_ctrl_tag
793 {
794     struct _osd3_ctrl_map
795     {
796         volatile unsigned int reserved          :23;    //[31:10] Reserved
797         volatile unsigned int blk_endian        :2;
798         volatile unsigned int blk_format        :4;     //[6:3] osd data format
799         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
800         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
801         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
802     } mBits;
803     volatile unsigned int dwValue;
804 } OSD3_CTRL_U;
805
806 typedef union _osd4_ctrl_tag
807 {
808     struct _osd4_ctrl_map
809     {
810         volatile unsigned int reserved          :23;    //[31:10] Reserved
811         volatile unsigned int blk_endian        :2;
812         volatile unsigned int blk_format        :4;     //[6:3] osd data format
813         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
814         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
815         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
816     } mBits;
817     volatile unsigned int dwValue;
818 } OSD4_CTRL_U;
819
820 typedef union _osd5_ctrl_tag
821 {
822     struct _osd5_ctrl_map
823     {
824         volatile unsigned int reserved          :23;    //[31:10] Reserved
825         volatile unsigned int blk_endian        :2;
826         volatile unsigned int blk_format        :4;     //[6:3] osd data format
827         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
828         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
829         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
830     } mBits;
831     volatile unsigned int dwValue;
832 } OSD5_CTRL_U;
833
834 typedef union _osd_ctrl_tag
835 {
836     struct _osd_ctrl_map
837     {
838         volatile unsigned int reserved          :23;    //[31:10] Reserved
839         volatile unsigned int blk_endian        :2;
840         volatile unsigned int blk_format        :4;     //[6:3] osd data format
841         volatile unsigned int blk_alpha_sel     :1;     //[2] OSD layer1 block1 alpha selection, 0: pixel alpha; 1: block alpha
842         volatile unsigned int blk_ck_en         :1;     //[1] block color key enable, 0: disable; 1: enable
843         volatile unsigned int blk_en            :1;     //[0] block enable, 0: disable; 1: enable
844     } mBits;
845     volatile unsigned int dwValue;
846 } OSD_CTRL_U;
847
848 typedef union _osd_colorkey_rgb_tag
849 {
850     struct _osd_colorkey_map
851     {
852         volatile unsigned int reserved          :8;     //[31:24] Reserved
853         volatile unsigned int osd_ck            :24;    //[23:0] Color-key value in OSD layer
854     } mBits;
855     volatile unsigned int dwValue;
856 } OSD_COLORKEY_U;
857
858
859 typedef union _osd_base_addr_ctrl_tag
860 {
861     struct _osd_base_addr_map
862     {
863         volatile unsigned int reserved          :2;     //[31:30] Reserved
864         volatile unsigned int blk_base_addr     :30;    //[29:0] block base address
865     } mBits;
866     volatile unsigned int dwValue;
867 } OSD_BASE_ADDR_U;
868
869 typedef union _osd_alpha_base_addr_ctrl_tag
870 {
871     struct _osd_alpha_base_addr_map
872     {
873         volatile unsigned int reserved              :2;     //[31:30] Reserved
874         volatile unsigned int blk_alpha_base_addr   :30;    //[29:0] block base address
875     } mBits;
876     volatile unsigned int dwValue;
877 } OSD_ALPHA_BASE_ADDR_U;
878
879 typedef union _osd_size_xy_tag
880 {
881     struct _osd_size_xy_map
882     {
883         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
884         volatile unsigned int blk_size_y        :10;  //[25:16] Image layer window size in Y, should be >0 and <1024
885         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
886         volatile unsigned int blk_size_x        :10;  //[9:0] Image layer window size in X, should be >0 and <1024
887     } mBits;
888     volatile unsigned int dwValue;
889 } OSD_SIZE_XY_U;
890
891 typedef union _osd_pitch_tag
892 {
893     struct _osd_pitch_map
894     {
895         volatile unsigned int reserved_1        :22;      //[31:10] Reserved
896         volatile unsigned int blk_pitch         :10;      //[9:0] Image layer data storage pitch, should be >0 and <1024.
897     } mBits;
898     volatile unsigned int dwValue;
899 } OSD_PITCH_U;
900
901 typedef union _osd_disp_xy_tag
902 {
903     struct _osd_disp_xy_map
904     {
905         volatile unsigned int reserved_1    :6;   //[31:26] Reserved
906         volatile unsigned int blk_disp_y    :10;  //[25:16] Image layer window start Y position in display plane, should be >0 and <1024
907         volatile unsigned int reserved_2    :6;   //[15: 10] Reserved
908         volatile unsigned int blk_disp_x    :10;  //[9:0] Image layer window start X position in display plane, should be >0 and <1024
909     } mBits;
910     volatile unsigned int dwValue;
911 } OSD_DISP_XY_U;
912
913 typedef union _osd_alpha_tag
914 {
915     struct _osd_alpha_map
916     {
917         volatile unsigned int reserved_1        :24;      //[31:8] Reserved
918         volatile unsigned int blk_alpha         :8;       //[7:0] Block alpha for block1 in OSD layer1, it is in 0~255
919     } mBits;
920     volatile unsigned int dwValue;
921 } OSD_ALPHA_U;
922
923 typedef union _osd_grey_rgb_tag
924 {
925     struct _osd_grey_rgb_map
926     {
927         volatile unsigned int reserved_1        :8;     //[31:24] Reserved
928         volatile unsigned int blk_grey_rgb      :24;    //[23:0] Constant RGB for GREY data format.
929     } mBits;
930     volatile unsigned int dwValue;
931 } OSD_GREY_RGB_U;
932
933 typedef union _lcdc_cap_ctrl_tag
934 {
935     struct _lcdc_cap_ctrl_map
936     {
937         volatile unsigned int reserved          :27;     //[31:4] Reserved
938         volatile unsigned int cap_endian        :2;
939         volatile unsigned int cap_format        :2;     //[2:1] data save format, 00: RGB888, 01: rgb666, 10: RGB565, 11: reserved
940         volatile unsigned int cap_en            :1;     //[1] Capture blended data control, 0: disable, 1: enable
941     } mBits;
942     volatile unsigned int dwValue;
943 } LCDC_CAP_CTRL_U;
944
945 typedef union _cap_base_addr_tag
946 {
947     struct _cap_base_addr_map
948     {
949         volatile unsigned int reserved          :2;     //[31:30] Reserved
950         volatile unsigned int base_addr         :30;    //[29:0] Capture base address
951     } mBits;
952     volatile unsigned int dwValue;
953 } CAP_BASE_ADDR_U;
954
955 typedef union _cap_size_xy_tag
956 {
957     struct _cap_size_xy_map
958     {
959         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
960         volatile unsigned int cap_size_y        :10;  //[25:16] Image layer window size in Y, should be >0 and <1024
961         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
962         volatile unsigned int cap_size_x        :10;  //[9:0] Image layer window size in X, should be >0 and <1024
963     } mBits;
964     volatile unsigned int dwValue;
965 } CAP_SIZE_XY_U;
966
967 typedef union _cap_pitch_tag
968 {
969     struct _cap_pitch_map
970     {
971         volatile unsigned int reserved          :22;      //[31:10] Reserved
972         volatile unsigned int cap_pitch         :10;      //[9:0] Image layer data storage pitch, should be >0 and <1024.
973     } mBits;
974     volatile unsigned int dwValue;
975 } CAP_PITCH_U;
976
977 typedef union _cap_start_xy_tag
978 {
979     struct _cap_start_xy_map
980     {
981         volatile unsigned int reserved_1        :6;   //[31:26] Reserved
982         volatile unsigned int cap_start_y       :10;  //[25:16] Image layer window start Y position in display plane, should be >0 and <1024
983         volatile unsigned int reserved_2        :6;   //[15: 10] Reserved
984         volatile unsigned int cap_start_x       :10;  //[9:0] Image layer window start X position in display plane, should be >0 and <1024
985     } mBits;
986     volatile unsigned int dwValue;
987 } CAP_START_XY_U;
988
989 typedef union _y2r_ctrl_tag
990 {
991     struct _y2r_ctrl_map
992     {
993         volatile unsigned int reserved          :31;    //[31:1] Reserved
994         volatile unsigned int upsample_mode     :1;     //[0] UV horizontal up-sampling mode, 0: duplicate, 1: average
995     } mBits;
996     volatile unsigned int dwValue;
997 } Y2R_CTRL_U;
998
999 typedef union _y2r_contrast_tag
1000 {
1001     struct _y2r_contrast_map
1002     {
1003         volatile unsigned int reserved          :24;    //[31:8] Reserved
1004         volatile unsigned int contrast          :8;     //[7:0] Contrast config, 0~255
1005     } mBits;
1006     volatile unsigned int dwValue;
1007 } Y2R_CONTRAST_U;
1008
1009 typedef union _y2r_saturation_tag
1010 {
1011     struct _y2r_saturation_map
1012     {
1013         volatile unsigned int reserved          :24;    //[31:8] Reserved
1014         volatile unsigned int saturation        :8;     //[7:0] Saturation config, 0~255
1015     } mBits;
1016     volatile unsigned int dwValue;
1017 } Y2R_SATURATION_U;
1018
1019 typedef union _y2r_brightness_tag
1020 {
1021     struct _y2r_brightness_map
1022     {
1023         volatile unsigned int reserved          :23;    //[31:9] Reserved
1024         volatile unsigned int brightness        :9;     //[8:0] Brightness config (S1.8), -256~255
1025     } mBits;
1026     volatile unsigned int dwValue;
1027 } Y2R_BRIGHTNESS_U;
1028
1029
1030 typedef union _lcdc_irq_en_tag
1031 {
1032     struct _lcdc_irq_en_map
1033     {
1034         volatile unsigned int reserved          :28;    //[31:3] Reserved
1035         volatile unsigned int irq_fmark_en      :1;     //[3] Enable FMARK interrupt, the interrupt is for LCDC detect a FMARK input.
1036         volatile unsigned int irq_lcm_sof_en    :1;     //[2] Enable CAP_DONE interrupt
1037         volatile unsigned int irq_lcm_eof_en    :1;     //[1] Enable FRAME_END Interrupt
1038         volatile unsigned int irq_lcdc_done_en  :1;     //[0] Enable LCDC_DONE interrupt
1039     } mBits;
1040     volatile unsigned int dwValue;
1041 } LCDC_IRQ_EN_U;
1042
1043 typedef union _lcdc_irq_clr_tag
1044 {
1045     struct _lcdc_irq_clr_map
1046     {
1047         volatile unsigned int reserved          :28;    //[31:3] Reserved
1048         volatile unsigned int irq_fmark_clr     :1;     //[3] Write '1' to clear the FMARK interrupt bit, and itself is cleared by HW.
1049         volatile unsigned int irq_lcm_sof_clr   :1;     //[2] Write '1' to clear the CAP_DONE interrupt bit, and itself is cleared by HW.
1050         volatile unsigned int irq_lcm_eof_clr   :1;     //[1] Write '1' to clear the FRAME_END interrupt bit, and itself is cleared by HW.
1051         volatile unsigned int irq_lcdc_done_clr :1;     //[0] Write '1' to clear the DISP_DONE interrupt bit, and itself is cleared by HW.
1052     } mBits;
1053     volatile unsigned int dwValue;
1054 } LCDC_IRQ_CLR_U;
1055
1056
1057 typedef union _lcdc_irq_status_tag
1058 {
1059     struct _lcdc_irq_status_map
1060     {
1061         volatile unsigned int reserved              :28;    //[31:3] Reserved
1062         volatile unsigned int irq_fmark_status      :1;     //[3] FMARK interrupt status
1063         volatile unsigned int irq_lcm_sof_status    :1;     //[2] CAP DONE interrupt status
1064         volatile unsigned int irq_lcm_eof_status    :1;     //[1] FRAME_END interrupt status
1065         volatile unsigned int irq_lcdc_done_status  :1;     //[0] DISP_DONE interrupt status
1066     } mBits;
1067     volatile unsigned int dwValue;
1068 } LCDC_IRQ_STATUS_U;
1069
1070 typedef union _lcdc_irq_raw_tag
1071 {
1072     struct _lcdc_irq_raw_map
1073     {
1074         volatile unsigned int reserved          :28;    //[31:3] Reserved
1075         volatile unsigned int irq_fmark_raw     :1;     //[3] FMARK raw interrupt
1076         volatile unsigned int irq_lcm_sof_raw   :1;     //[2] CAP DONE raw interrupt
1077         volatile unsigned int irq_lcm_eof_raw   :1;     //[1] FRAME_END raw interrupt
1078         volatile unsigned int irq_lcdc_done_raw :1;     //[0] DISP_DONE raw interrupt
1079     } mBits;
1080     volatile unsigned int dwValue;
1081 } LCDC_IRQ_RAW_U;
1082 #endif
1083 /**----------------------------------------------------------------------------*
1084 **                         Compiler Flag                                      **
1085 **----------------------------------------------------------------------------*/
1086 #ifdef   __cplusplus
1087 }
1088 #endif
1089 /**---------------------------------------------------------------------------*/
1090 #endif
1091 // End
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104