1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * File: drivers/video/omap/lcd-htcherald.c
4 *
5 * LCD panel support for the HTC Herald
6 *
7 * Copyright (C) 2009 Cory Maccarrone <darkstar6262@gmail.com>
8 * Copyright (C) 2009 Wing Linux
9 *
10 * Based on the lcd_htcwizard.c file from the linwizard project:
11 * Copyright (C) linwizard.sourceforge.net
12 * Author: Angelo Arrifano <miknix@gmail.com>
13 * Based on lcd_h4 by Imre Deak <imre.deak@nokia.com>
14 */
15
16#include <linux/module.h>
17#include <linux/platform_device.h>
18
19#include "omapfb.h"
20
21/* Found on WIZ200 (miknix) and some HERA110 models (darkstar62) */
22static struct lcd_panel htcherald_panel_1 = {
23	.name		= "lcd_herald",
24	.config		= OMAP_LCDC_PANEL_TFT |
25			  OMAP_LCDC_INV_HSYNC |
26			  OMAP_LCDC_INV_VSYNC |
27			  OMAP_LCDC_INV_PIX_CLOCK,
28	.bpp		= 16,
29	.data_lines	= 16,
30	.x_res		= 240,
31	.y_res		= 320,
32	.pixel_clock	= 6093,
33	.pcd		= 0, /* 15 */
34	.hsw		= 10,
35	.hfp		= 10,
36	.hbp		= 20,
37	.vsw		= 3,
38	.vfp		= 2,
39	.vbp		= 2,
40};
41
42static int htcherald_panel_probe(struct platform_device *pdev)
43{
44	omapfb_register_panel(&htcherald_panel_1);
45	return 0;
46}
47
48static struct platform_driver htcherald_panel_driver = {
49	.probe		= htcherald_panel_probe,
50	.driver		= {
51		.name	= "lcd_htcherald",
52	},
53};
54
55module_platform_driver(htcherald_panel_driver);
56
57MODULE_AUTHOR("Cory Maccarrone");
58MODULE_LICENSE("GPL");
59MODULE_DESCRIPTION("LCD panel support for the HTC Herald");
60