Initial commit
[kernel/linux-3.0.git] / arch / arm / mach-exynos / include / mach / mipi_ddi.h
1 /* linux/arm/arch/mach-exynos/include/mach/mipi_ddi.h
2  *
3  * definitions for DDI based MIPI-DSI.
4  *
5  * Copyright (c) 2009 Samsung Electronics
6  * InKi Dae <inki.dae@samsung.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11 */
12
13 #ifndef _MIPI_DDI_H
14 #define _MIPI_DDI_H
15
16 enum mipi_ddi_interface {
17         RGB_IF = 0x4000,
18         I80_IF = 0x8000,
19         YUV_601 = 0x10000,
20         YUV_656 = 0x20000,
21         MIPI_VIDEO = 0x1000,
22         MIPI_COMMAND = 0x2000,
23 };
24
25 enum mipi_ddi_panel_select {
26         DDI_MAIN_LCD = 0,
27         DDI_SUB_LCD = 1,
28 };
29
30 enum mipi_ddi_model {
31         S6DR117 = 0,
32 };
33
34 enum mipi_ddi_parameter {
35         /* DSIM video interface parameter */
36         DSI_VIRTUAL_CH_ID = 0,
37         DSI_FORMAT = 1,
38         DSI_VIDEO_MODE_SEL = 2,
39 };
40
41 struct mipi_ddi_spec {
42         unsigned int parameter[3];
43 };
44
45 struct mipi_ddi_platform_data {
46         unsigned int dsim_base;
47         unsigned int te_irq;
48         unsigned int resume_complete;
49
50         int (*lcd_reset) (void);
51         int (*lcd_power_on) (void *pdev, int enable);
52         int (*backlight_on) (int enable);
53
54         unsigned char (*cmd_write) (unsigned int dsim_base, unsigned int data0,
55                 unsigned int data1, unsigned int data2);
56         int (*cmd_read) (unsigned int reg_base, u8 addr, u16 count, u8 *buf);
57
58         unsigned int reset_delay;
59         unsigned int power_on_delay;
60         unsigned int power_off_delay;
61 #if defined(CONFIG_S5P_DSIM_SWITCHABLE_DUAL_LCD)
62         unsigned int lcd_sel_pin;
63 #endif  /* CONFIG_S5P_DSIM_SWITCHABLE_DUAL_LCD */
64 };
65
66 #endif /* _MIPI_DDI_H */