]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_apollon.c
Merge with /home/tmlind/src/kernel/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_apollon.c
1 /*
2  * File: drivers/video/omap/lcd_apollon.c
3  *
4  * LCD panel support for the Samsung OMAP2 Apollon board
5  *
6  * Copyright (C) 2005,2006 Samsung Electronics
7  * Author: Kyungmin Park <kyungmin.park@samsung.com>
8  *
9  * Derived from drivers/video/omap/lcd-h4.c
10  *
11  * This program is free software; you can redistribute it and/or modify it
12  * under the terms of the GNU General Public License as published by the
13  * Free Software Foundation; either version 2 of the License, or (at your
14  * option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #include <linux/module.h>
27
28 #include <asm/arch/gpio.h>
29 #include <asm/arch/mux.h>
30 #include <asm/arch/omapfb.h>
31
32 /* #define OMAPFB_DBG 1 */
33
34 /* #define USE_35INCH_LCD 1 */
35
36 #include "debug.h"
37
38 static int apollon_panel_init(struct omapfb_device *fbdev)
39 {
40         DBGENTER(1);
41         DBGLEAVE(1);
42         return 0;
43 }
44
45 static void apollon_panel_cleanup(void)
46 {
47         DBGENTER(1);
48         DBGLEAVE(1);
49 }
50
51 static int apollon_panel_enable(void)
52 {
53
54         DBGENTER(1);
55
56         /* configure LCD PWR_EN */
57         omap_cfg_reg(M21_242X_GPIO11);
58
59         DBGLEAVE(1);
60         return 0;
61 }
62
63 static void apollon_panel_disable(void)
64 {
65         DBGENTER(1);
66         DBGLEAVE(1);
67 }
68
69 static unsigned long apollon_panel_get_caps(void)
70 {
71         return 0;
72 }
73
74 struct lcd_panel apollon_panel = {
75         .name           = "apollon",
76         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
77                           OMAP_LCDC_INV_HSYNC,
78
79         .bpp            = 16,
80         .data_lines     = 18,
81 #ifdef USE_35INCH_LCD
82         .x_res          = 240,
83         .y_res          = 320,
84         .hsw            = 2,
85         .hfp            = 3,
86         .hbp            = 9,
87         .vsw            = 4,
88         .vfp            = 3,
89         .vbp            = 5,
90 #else
91         .x_res          = 480,
92         .y_res          = 272,
93         .hsw            = 41,
94         .hfp            = 2,
95         .hbp            = 2,
96         .vsw            = 10,
97         .vfp            = 2,
98         .vbp            = 2,
99 #endif
100         .pixel_clock    = 6250,
101
102         .init           = apollon_panel_init,
103         .cleanup        = apollon_panel_cleanup,
104         .enable         = apollon_panel_enable,
105         .disable        = apollon_panel_disable,
106         .get_caps       = apollon_panel_get_caps,
107 };