18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * LCD panel support for Palm Tungsten|T 48c2ecf20Sopenharmony_ci * Current version : Marek Vasut <marek.vasut@gmail.com> 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Modified from lcd_inn1510.c 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci/* 108c2ecf20Sopenharmony_ciGPIO11 - backlight 118c2ecf20Sopenharmony_ciGPIO12 - screen blanking 128c2ecf20Sopenharmony_ciGPIO13 - screen blanking 138c2ecf20Sopenharmony_ci*/ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 168c2ecf20Sopenharmony_ci#include <linux/module.h> 178c2ecf20Sopenharmony_ci#include <linux/io.h> 188c2ecf20Sopenharmony_ci#include <linux/gpio.h> 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#include "omapfb.h" 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cistatic unsigned long palmtt_panel_get_caps(struct lcd_panel *panel) 238c2ecf20Sopenharmony_ci{ 248c2ecf20Sopenharmony_ci return OMAPFB_CAPS_SET_BACKLIGHT; 258c2ecf20Sopenharmony_ci} 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cistatic struct lcd_panel palmtt_panel = { 288c2ecf20Sopenharmony_ci .name = "palmtt", 298c2ecf20Sopenharmony_ci .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | 308c2ecf20Sopenharmony_ci OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE | 318c2ecf20Sopenharmony_ci OMAP_LCDC_HSVS_OPPOSITE, 328c2ecf20Sopenharmony_ci .bpp = 16, 338c2ecf20Sopenharmony_ci .data_lines = 16, 348c2ecf20Sopenharmony_ci .x_res = 320, 358c2ecf20Sopenharmony_ci .y_res = 320, 368c2ecf20Sopenharmony_ci .pixel_clock = 10000, 378c2ecf20Sopenharmony_ci .hsw = 4, 388c2ecf20Sopenharmony_ci .hfp = 8, 398c2ecf20Sopenharmony_ci .hbp = 28, 408c2ecf20Sopenharmony_ci .vsw = 1, 418c2ecf20Sopenharmony_ci .vfp = 8, 428c2ecf20Sopenharmony_ci .vbp = 7, 438c2ecf20Sopenharmony_ci .pcd = 0, 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci .get_caps = palmtt_panel_get_caps, 468c2ecf20Sopenharmony_ci}; 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_cistatic int palmtt_panel_probe(struct platform_device *pdev) 498c2ecf20Sopenharmony_ci{ 508c2ecf20Sopenharmony_ci omapfb_register_panel(&palmtt_panel); 518c2ecf20Sopenharmony_ci return 0; 528c2ecf20Sopenharmony_ci} 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_cistatic struct platform_driver palmtt_panel_driver = { 558c2ecf20Sopenharmony_ci .probe = palmtt_panel_probe, 568c2ecf20Sopenharmony_ci .driver = { 578c2ecf20Sopenharmony_ci .name = "lcd_palmtt", 588c2ecf20Sopenharmony_ci }, 598c2ecf20Sopenharmony_ci}; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_cimodule_platform_driver(palmtt_panel_driver); 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ciMODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); 648c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("LCD panel support for Palm Tungsten|T"); 658c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL"); 66