1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * LCD panel support for the TI OMAP1510 Innovator board
4 *
5 * Copyright (C) 2004 Nokia Corporation
6 * Author: Imre Deak <imre.deak@nokia.com>
7 */
8
9 #include <linux/module.h>
10 #include <linux/platform_device.h>
11 #include <linux/io.h>
12
13 #include <mach/hardware.h>
14
15 #include "omapfb.h"
16
innovator1510_panel_enable(struct lcd_panel * panel)17 static int innovator1510_panel_enable(struct lcd_panel *panel)
18 {
19 __raw_writeb(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
20 return 0;
21 }
22
innovator1510_panel_disable(struct lcd_panel * panel)23 static void innovator1510_panel_disable(struct lcd_panel *panel)
24 {
25 __raw_writeb(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
26 }
27
28 static struct lcd_panel innovator1510_panel = {
29 .name = "inn1510",
30 .config = OMAP_LCDC_PANEL_TFT,
31
32 .bpp = 16,
33 .data_lines = 16,
34 .x_res = 240,
35 .y_res = 320,
36 .pixel_clock = 12500,
37 .hsw = 40,
38 .hfp = 40,
39 .hbp = 72,
40 .vsw = 1,
41 .vfp = 1,
42 .vbp = 0,
43 .pcd = 12,
44
45 .enable = innovator1510_panel_enable,
46 .disable = innovator1510_panel_disable,
47 };
48
innovator1510_panel_probe(struct platform_device * pdev)49 static int innovator1510_panel_probe(struct platform_device *pdev)
50 {
51 omapfb_register_panel(&innovator1510_panel);
52 return 0;
53 }
54
55 static struct platform_driver innovator1510_panel_driver = {
56 .probe = innovator1510_panel_probe,
57 .driver = {
58 .name = "lcd_inn1510",
59 },
60 };
61
62 module_platform_driver(innovator1510_panel_driver);
63
64 MODULE_AUTHOR("Imre Deak");
65 MODULE_DESCRIPTION("LCD panel support for the TI OMAP1510 Innovator board");
66 MODULE_LICENSE("GPL");
67