Loading...
1/*
2 * Header file for TI DA8XX LCD controller platform data.
3 *
4 * Copyright (C) 2008-2009 MontaVista Software Inc.
5 * Copyright (C) 2008-2009 Texas Instruments Inc
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12#ifndef DA8XX_FB_H
13#define DA8XX_FB_H
14
15enum panel_type {
16 QVGA = 0
17};
18
19enum panel_shade {
20 MONOCHROME = 0,
21 COLOR_ACTIVE,
22 COLOR_PASSIVE,
23};
24
25enum raster_load_mode {
26 LOAD_DATA = 1,
27 LOAD_PALETTE,
28};
29
30struct display_panel {
31 enum panel_type panel_type; /* QVGA */
32 int max_bpp;
33 int min_bpp;
34 enum panel_shade panel_shade;
35};
36
37struct da8xx_lcdc_platform_data {
38 const char manu_name[10];
39 void *controller_data;
40 const char type[25];
41 void (*panel_power_ctrl)(int);
42};
43
44struct lcd_ctrl_config {
45 const struct display_panel *p_disp_panel;
46
47 /* AC Bias Pin Frequency */
48 int ac_bias;
49
50 /* AC Bias Pin Transitions per Interrupt */
51 int ac_bias_intrpt;
52
53 /* DMA burst size */
54 int dma_burst_sz;
55
56 /* Bits per pixel */
57 int bpp;
58
59 /* FIFO DMA Request Delay */
60 int fdd;
61
62 /* TFT Alternative Signal Mapping (Only for active) */
63 unsigned char tft_alt_mode;
64
65 /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
66 unsigned char stn_565_mode;
67
68 /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
69 unsigned char mono_8bit_mode;
70
71 /* Invert line clock */
72 unsigned char invert_line_clock;
73
74 /* Invert frame clock */
75 unsigned char invert_frm_clock;
76
77 /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
78 unsigned char sync_edge;
79
80 /* Horizontal and Vertical Sync: Control: 0=ignore */
81 unsigned char sync_ctrl;
82
83 /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
84 unsigned char raster_order;
85};
86
87struct lcd_sync_arg {
88 int back_porch;
89 int front_porch;
90 int pulse_width;
91};
92
93/* ioctls */
94#define FBIOGET_CONTRAST _IOR('F', 1, int)
95#define FBIOPUT_CONTRAST _IOW('F', 2, int)
96#define FBIGET_BRIGHTNESS _IOR('F', 3, int)
97#define FBIPUT_BRIGHTNESS _IOW('F', 3, int)
98#define FBIGET_COLOR _IOR('F', 5, int)
99#define FBIPUT_COLOR _IOW('F', 6, int)
100#define FBIPUT_HSYNC _IOW('F', 9, int)
101#define FBIPUT_VSYNC _IOW('F', 10, int)
102
103#endif /* ifndef DA8XX_FB_H */
104
1/*
2 * Header file for TI DA8XX LCD controller platform data.
3 *
4 * Copyright (C) 2008-2009 MontaVista Software Inc.
5 * Copyright (C) 2008-2009 Texas Instruments Inc
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12#ifndef DA8XX_FB_H
13#define DA8XX_FB_H
14
15enum panel_shade {
16 MONOCHROME = 0,
17 COLOR_ACTIVE,
18 COLOR_PASSIVE,
19};
20
21enum raster_load_mode {
22 LOAD_DATA = 1,
23 LOAD_PALETTE,
24};
25
26enum da8xx_frame_complete {
27 DA8XX_FRAME_WAIT,
28 DA8XX_FRAME_NOWAIT,
29};
30
31struct da8xx_lcdc_platform_data {
32 const char manu_name[10];
33 void *controller_data;
34 const char type[25];
35 void (*panel_power_ctrl)(int);
36};
37
38struct lcd_ctrl_config {
39 enum panel_shade panel_shade;
40
41 /* AC Bias Pin Frequency */
42 int ac_bias;
43
44 /* AC Bias Pin Transitions per Interrupt */
45 int ac_bias_intrpt;
46
47 /* DMA burst size */
48 int dma_burst_sz;
49
50 /* Bits per pixel */
51 int bpp;
52
53 /* FIFO DMA Request Delay */
54 int fdd;
55
56 /* TFT Alternative Signal Mapping (Only for active) */
57 unsigned char tft_alt_mode;
58
59 /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
60 unsigned char stn_565_mode;
61
62 /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
63 unsigned char mono_8bit_mode;
64
65 /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
66 unsigned char sync_edge;
67
68 /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
69 unsigned char raster_order;
70
71 /* DMA FIFO threshold */
72 int fifo_th;
73};
74
75struct lcd_sync_arg {
76 int back_porch;
77 int front_porch;
78 int pulse_width;
79};
80
81/* ioctls */
82#define FBIOGET_CONTRAST _IOR('F', 1, int)
83#define FBIOPUT_CONTRAST _IOW('F', 2, int)
84#define FBIGET_BRIGHTNESS _IOR('F', 3, int)
85#define FBIPUT_BRIGHTNESS _IOW('F', 3, int)
86#define FBIGET_COLOR _IOR('F', 5, int)
87#define FBIPUT_COLOR _IOW('F', 6, int)
88#define FBIPUT_HSYNC _IOW('F', 9, int)
89#define FBIPUT_VSYNC _IOW('F', 10, int)
90
91/* Proprietary FB_SYNC_ flags */
92#define FB_SYNC_CLK_INVERT 0x40000000
93
94#endif /* ifndef DA8XX_FB_H */
95