1 /******************************************************************************
2 ** File Name: lcdc_v3_reg.h *
5 ** Copyright: 2009 Spreatrum, Incoporated. All Rights Reserved. *
7 ******************************************************************************/
8 /******************************************************************************
10 **---------------------------------------------------------------------------*
11 ** DATE NAME DESCRIPTION *
13 ******************************************************************************/
14 #ifndef _LCDC_V3_REG_H_
15 #define _LCDC_V3_REG_H_
16 /*----------------------------------------------------------------------------*
18 **---------------------------------------------------------------------------*/
19 #include "lcm_reg_v3.h"
20 /**---------------------------------------------------------------------------*
22 **---------------------------------------------------------------------------*/
27 /**---------------------------------------------------------------------------*
29 **----------------------------------------------------------------------------*/
31 #define REG_LCDC_BASE LCDC_CTL_BEGIN
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)
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)
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)
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)
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)
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)
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)
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)
103 /**---------------------------------------------------------------------------*
105 **----------------------------------------------------------------------------*/
106 #ifdef CHIP_ENDIAN_LITTLE
107 typedef union _lcdc_ctrl_tag
109 struct _lcdc_ctrl_map
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 ;
120 volatile unsigned int dwValue ;
124 typedef union _lcdc_disp_size_tag
126 struct _lcdc_disp_size_map
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
133 volatile unsigned int dwValue;
136 typedef union _lcdc_lcm_start_tag
138 struct _lcdc_lcm_start_map
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
145 volatile unsigned int dValue;
148 typedef union _lcdc_lcm_size_tag
150 struct _lcdc_lcm_size_map
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
157 volatile unsigned int dValue;
160 typedef union _lcdc_bg_color_tag
162 struct _lcdc_bg_color_map
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
169 volatile unsigned int dwValue;
172 typedef union _lcdc_fifo_status_tag
174 struct _lcdc_fifo_status_map
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
197 volatile unsigned int dwValue;
198 } LCDC_FIFO_STATUS_U;
200 typedef union _img_ctrl_tag
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:
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]
217 volatile unsigned int dwValue;
220 typedef union _img_y_base_addr_tag
222 struct _img_y_base_addr_map
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]
227 volatile unsigned int dwValue;
230 typedef union _img_uv_base_addr_tag
232 struct _img_uv_base_addr_map
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]
237 volatile unsigned int dwValue;
238 } IMG_UV_BASE_ADDR_U;
240 typedef union _img_size_xy_tag
242 struct _img_size_xy_map
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
249 volatile unsigned int dwValue;
252 typedef union _img_pitch_tag
254 struct _img_pitch_map
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
259 volatile unsigned int dwValue;
262 typedef union _img_disp_xy_tag
264 struct _img_disp_xy_map
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
271 volatile unsigned int dwValue;
274 typedef union _osd1_ctrl_tag
276 struct _osd1_ctrl_map
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
286 volatile unsigned int dwValue;
289 typedef union _osd2_ctrl_tag
291 struct _osd2_ctrl_map
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
300 volatile unsigned int dwValue;
303 typedef union _osd3_ctrl_tag
305 struct _osd3_ctrl_map
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
314 volatile unsigned int dwValue;
317 typedef union _osd4_ctrl_tag
319 struct _osd4_ctrl_map
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
328 volatile unsigned int dwValue;
331 typedef union _osd5_ctrl_tag
333 struct _osd5_ctrl_map
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
342 volatile unsigned int dwValue;
345 typedef union _osd_ctrl_tag
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
356 volatile unsigned int dwValue;
359 typedef union _osd_colorkey_rgb_tag
361 struct _osd_colorkey_map
363 volatile unsigned int osd_ck :24; //[23:0] Color-key value in OSD layer
364 volatile unsigned int reserved :8; //[31:24] Reserved
366 volatile unsigned int dwValue;
370 typedef union _osd_base_addr_ctrl_tag
372 struct _osd_base_addr_map
374 volatile unsigned int blk_base_addr :30; //[29:0] block base address
375 volatile unsigned int reserved :2; //[31:30] Reserved
377 volatile unsigned int dwValue;
380 typedef union _osd_alpha_base_addr_ctrl_tag
382 struct _osd_alpha_base_addr_map
384 volatile unsigned int blk_alpha_base_addr :30; //[29:0] block base address
385 volatile unsigned int reserved :2; //[31:30] Reserved
387 volatile unsigned int dwValue;
388 } OSD_ALPHA_BASE_ADDR_U;
390 typedef union _osd_size_xy_tag
392 struct _osd_size_xy_map
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
399 volatile unsigned int dwValue;
402 typedef union _osd_pitch_tag
404 struct _osd_pitch_map
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
409 volatile unsigned int dwValue;
412 typedef union _osd_disp_xy_tag
414 struct _osd_disp_xy_map
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
421 volatile unsigned int dwValue;
424 typedef union _osd_alpha_tag
426 struct _osd_alpha_map
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
431 volatile unsigned int dwValue;
434 typedef union _osd_grey_rgb_tag
436 struct _osd_grey_rgb_map
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
441 volatile unsigned int dwValue;
444 typedef union _lcdc_cap_ctrl_tag
446 struct _lcdc_cap_ctrl_map
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
453 volatile unsigned int dwValue;
456 typedef union _cap_base_addr_tag
458 struct _cap_base_addr_map
460 volatile unsigned int base_addr :30; //[29:0] Capture base address
461 volatile unsigned int reserved :2; //[31:30] Reserved
463 volatile unsigned int dwValue;
466 typedef union _cap_size_xy_tag
468 struct _cap_size_xy_map
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
475 volatile unsigned int dwValue;
478 typedef union _cap_pitch_tag
480 struct _cap_pitch_map
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
485 volatile unsigned int dwValue;
488 typedef union _cap_start_xy_tag
490 struct _cap_start_xy_map
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
497 volatile unsigned int dwValue;
500 typedef union _y2r_ctrl_tag
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
507 volatile unsigned int dwValue;
510 typedef union _y2r_contrast_tag
512 struct _y2r_contrast_map
514 volatile unsigned int contrast :8; //[7:0] Contrast config, 0~255
515 volatile unsigned int reserved :24; //[31:8] Reserved
517 volatile unsigned int dwValue;
520 typedef union _y2r_saturation_tag
522 struct _y2r_saturation_map
524 volatile unsigned int saturation :8; //[7:0] Saturation config, 0~255
525 volatile unsigned int reserved :24; //[31:8] Reserved
527 volatile unsigned int dwValue;
530 typedef union _y2r_brightness_tag
532 struct _y2r_brightness_map
534 volatile unsigned int brightness :9; //[8:0] Brightness config (S1.8), -256~255
535 volatile unsigned int reserved :23; //[31:9] Reserved
537 volatile unsigned int dwValue;
541 typedef union _lcdc_irq_en_tag
543 struct _lcdc_irq_en_map
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
551 volatile unsigned int dwValue;
554 typedef union _lcdc_irq_clr_tag
556 struct _lcdc_irq_clr_map
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
564 volatile unsigned int dwValue;
568 typedef union _lcdc_irq_status_tag
570 struct _lcdc_irq_status_map
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
578 volatile unsigned int dwValue;
581 typedef union _lcdc_irq_raw_tag
583 struct _lcdc_irq_raw_map
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
591 volatile unsigned int dwValue;
594 typedef union _lcdc_ctrl_tag
596 struct _lcdc_ctrl_map
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
607 volatile unsigned int dwValue ;
611 typedef union _lcdc_disp_size_tag
613 struct _lcdc_disp_size_map
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
620 volatile unsigned int dwValue;
623 typedef union _lcdc_lcm_start_tag
625 struct _lcdc_lcm_start_map
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.
632 volatile unsigned int dValue;
635 typedef union _lcdc_lcm_size_tag
637 struct _lcdc_lcm_size_map
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.
644 volatile unsigned int dValue;
647 typedef union _lcdc_bg_color_tag
649 struct _lcdc_bg_color_map
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
656 volatile unsigned int dwValue;
659 typedef union _lcdc_fifo_status_tag
661 struct _lcdc_fifo_status_map
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.
684 volatile unsigned int dwValue;
685 } LCDC_FIFO_STATUS_U;
687 typedef union _img_ctrl_tag
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:
703 volatile unsigned int img_en :1; //[0] Image layer enable; 0: disable; 1: enable
706 volatile unsigned int dwValue;
709 typedef union _img_y_base_addr_tag
711 struct _img_y_base_addr_map
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;
716 volatile unsigned int dwValue;
719 typedef union _img_uv_base_addr_tag
721 struct _img_uv_base_addr_map
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;
726 volatile unsigned int dwValue;
727 } IMG_UV_BASE_ADDR_U;
729 typedef union _img_size_xy_tag
731 struct _img_size_xy_map
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
738 volatile unsigned int dwValue;
741 typedef union _img_pitch_tag
743 struct _img_pitch_map
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.
748 volatile unsigned int dwValue;
751 typedef union _img_disp_xy_tag
753 struct _img_disp_xy_map
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
760 volatile unsigned int dwValue;
763 typedef union _osd1_ctrl_tag
765 struct _osd1_ctrl_map
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
775 volatile unsigned int dwValue;
778 typedef union _osd2_ctrl_tag
780 struct _osd2_ctrl_map
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
789 volatile unsigned int dwValue;
792 typedef union _osd3_ctrl_tag
794 struct _osd3_ctrl_map
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
803 volatile unsigned int dwValue;
806 typedef union _osd4_ctrl_tag
808 struct _osd4_ctrl_map
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
817 volatile unsigned int dwValue;
820 typedef union _osd5_ctrl_tag
822 struct _osd5_ctrl_map
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
831 volatile unsigned int dwValue;
834 typedef union _osd_ctrl_tag
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
845 volatile unsigned int dwValue;
848 typedef union _osd_colorkey_rgb_tag
850 struct _osd_colorkey_map
852 volatile unsigned int reserved :8; //[31:24] Reserved
853 volatile unsigned int osd_ck :24; //[23:0] Color-key value in OSD layer
855 volatile unsigned int dwValue;
859 typedef union _osd_base_addr_ctrl_tag
861 struct _osd_base_addr_map
863 volatile unsigned int reserved :2; //[31:30] Reserved
864 volatile unsigned int blk_base_addr :30; //[29:0] block base address
866 volatile unsigned int dwValue;
869 typedef union _osd_alpha_base_addr_ctrl_tag
871 struct _osd_alpha_base_addr_map
873 volatile unsigned int reserved :2; //[31:30] Reserved
874 volatile unsigned int blk_alpha_base_addr :30; //[29:0] block base address
876 volatile unsigned int dwValue;
877 } OSD_ALPHA_BASE_ADDR_U;
879 typedef union _osd_size_xy_tag
881 struct _osd_size_xy_map
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
888 volatile unsigned int dwValue;
891 typedef union _osd_pitch_tag
893 struct _osd_pitch_map
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.
898 volatile unsigned int dwValue;
901 typedef union _osd_disp_xy_tag
903 struct _osd_disp_xy_map
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
910 volatile unsigned int dwValue;
913 typedef union _osd_alpha_tag
915 struct _osd_alpha_map
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
920 volatile unsigned int dwValue;
923 typedef union _osd_grey_rgb_tag
925 struct _osd_grey_rgb_map
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.
930 volatile unsigned int dwValue;
933 typedef union _lcdc_cap_ctrl_tag
935 struct _lcdc_cap_ctrl_map
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
942 volatile unsigned int dwValue;
945 typedef union _cap_base_addr_tag
947 struct _cap_base_addr_map
949 volatile unsigned int reserved :2; //[31:30] Reserved
950 volatile unsigned int base_addr :30; //[29:0] Capture base address
952 volatile unsigned int dwValue;
955 typedef union _cap_size_xy_tag
957 struct _cap_size_xy_map
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
964 volatile unsigned int dwValue;
967 typedef union _cap_pitch_tag
969 struct _cap_pitch_map
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.
974 volatile unsigned int dwValue;
977 typedef union _cap_start_xy_tag
979 struct _cap_start_xy_map
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
986 volatile unsigned int dwValue;
989 typedef union _y2r_ctrl_tag
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
996 volatile unsigned int dwValue;
999 typedef union _y2r_contrast_tag
1001 struct _y2r_contrast_map
1003 volatile unsigned int reserved :24; //[31:8] Reserved
1004 volatile unsigned int contrast :8; //[7:0] Contrast config, 0~255
1006 volatile unsigned int dwValue;
1009 typedef union _y2r_saturation_tag
1011 struct _y2r_saturation_map
1013 volatile unsigned int reserved :24; //[31:8] Reserved
1014 volatile unsigned int saturation :8; //[7:0] Saturation config, 0~255
1016 volatile unsigned int dwValue;
1019 typedef union _y2r_brightness_tag
1021 struct _y2r_brightness_map
1023 volatile unsigned int reserved :23; //[31:9] Reserved
1024 volatile unsigned int brightness :9; //[8:0] Brightness config (S1.8), -256~255
1026 volatile unsigned int dwValue;
1030 typedef union _lcdc_irq_en_tag
1032 struct _lcdc_irq_en_map
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
1040 volatile unsigned int dwValue;
1043 typedef union _lcdc_irq_clr_tag
1045 struct _lcdc_irq_clr_map
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.
1053 volatile unsigned int dwValue;
1057 typedef union _lcdc_irq_status_tag
1059 struct _lcdc_irq_status_map
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
1067 volatile unsigned int dwValue;
1068 } LCDC_IRQ_STATUS_U;
1070 typedef union _lcdc_irq_raw_tag
1072 struct _lcdc_irq_raw_map
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
1080 volatile unsigned int dwValue;
1083 /**----------------------------------------------------------------------------*
1085 **----------------------------------------------------------------------------*/
1089 /**---------------------------------------------------------------------------*/