blob: f88825928dd16ac24502054d4796ae7121930e23 [file] [log] [blame]
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -07001/*
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
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070015enum 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
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070026struct da8xx_lcdc_platform_data {
27 const char manu_name[10];
28 void *controller_data;
29 const char type[25];
Chaithrika U S36113802009-12-15 16:46:38 -080030 void (*panel_power_ctrl)(int);
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070031};
32
33struct lcd_ctrl_config {
Manjunathappa, Prakash3b43ad22012-10-16 10:23:16 +053034 enum panel_shade panel_shade;
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070035
36 /* AC Bias Pin Frequency */
37 int ac_bias;
38
39 /* AC Bias Pin Transitions per Interrupt */
40 int ac_bias_intrpt;
41
42 /* DMA burst size */
43 int dma_burst_sz;
44
45 /* Bits per pixel */
46 int bpp;
47
48 /* FIFO DMA Request Delay */
49 int fdd;
50
51 /* TFT Alternative Signal Mapping (Only for active) */
52 unsigned char tft_alt_mode;
53
54 /* 12 Bit Per Pixel (5-6-5) Mode (Only for passive) */
55 unsigned char stn_565_mode;
56
57 /* Mono 8-bit Mode: 1=D0-D7 or 0=D0-D3 */
58 unsigned char mono_8bit_mode;
59
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070060 /* Horizontal and Vertical Sync Edge: 0=rising 1=falling */
61 unsigned char sync_edge;
62
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070063 /* Raster Data Order Select: 1=Most-to-least 0=Least-to-most */
64 unsigned char raster_order;
Manjunathappa, Prakashfb8fa942012-07-18 21:03:36 +053065
66 /* DMA FIFO threshold */
67 int fifo_th;
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070068};
69
70struct lcd_sync_arg {
71 int back_porch;
72 int front_porch;
73 int pulse_width;
74};
75
76/* ioctls */
77#define FBIOGET_CONTRAST _IOR('F', 1, int)
78#define FBIOPUT_CONTRAST _IOW('F', 2, int)
79#define FBIGET_BRIGHTNESS _IOR('F', 3, int)
80#define FBIPUT_BRIGHTNESS _IOW('F', 3, int)
81#define FBIGET_COLOR _IOR('F', 5, int)
82#define FBIPUT_COLOR _IOW('F', 6, int)
83#define FBIPUT_HSYNC _IOW('F', 9, int)
84#define FBIPUT_VSYNC _IOW('F', 10, int)
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070085
Manjunathappa, Prakashf772fab2012-10-16 10:23:15 +053086/* Proprietary FB_SYNC_ flags */
87#define FB_SYNC_CLK_INVERT 0x40000000
88
Sudhakar Rajashekhara4ed824d2009-09-22 16:47:06 -070089#endif /* ifndef DA8XX_FB_H */
90