blob: bdd1e3a179e1cb32fe3d5aba17a09d37d2704d91 [file] [log] [blame]
Roger Quadros03e11102010-05-10 10:35:17 +02001/*
2 * linux/arch/arm/mach-omap2/board-rx51-video.c
3 *
4 * Copyright (C) 2010 Nokia
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <linux/gpio.h>
15#include <linux/spi/spi.h>
16#include <linux/mm.h>
Roger Quadros03e11102010-05-10 10:35:17 +020017#include <asm/mach-types.h>
Tomi Valkeinena0b38cc2011-05-11 14:05:07 +030018#include <video/omapdss.h>
Archit Taneja3c803f42013-02-12 14:05:37 +053019#include <video/omap-panel-data.h>
20
Arnd Bergmann22037472012-08-24 15:21:06 +020021#include <linux/platform_data/spi-omap2-mcspi.h>
Roger Quadros03e11102010-05-10 10:35:17 +020022
Tony Lindgrenb76c8b12013-01-11 11:24:18 -080023#include "soc.h"
Tony Lindgren0a6f98c2012-09-20 11:40:56 -070024#include "board-rx51.h"
Manjunath Kondaiah G04aeae72010-10-08 09:58:35 -070025
Roger Quadros03e11102010-05-10 10:35:17 +020026#include "mux.h"
27
28#define RX51_LCD_RESET_GPIO 90
29
30#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
31
Archit Taneja3c803f42013-02-12 14:05:37 +053032static struct panel_acx565akm_data lcd_data = {
33 .reset_gpio = RX51_LCD_RESET_GPIO,
34};
Roger Quadros03e11102010-05-10 10:35:17 +020035
36static struct omap_dss_device rx51_lcd_device = {
37 .name = "lcd",
38 .driver_name = "panel-acx565akm",
39 .type = OMAP_DISPLAY_TYPE_SDI,
40 .phy.sdi.datapairs = 2,
Archit Taneja3c803f42013-02-12 14:05:37 +053041 .data = &lcd_data,
Roger Quadros03e11102010-05-10 10:35:17 +020042};
43
Srikar60d24ee2010-12-20 18:48:16 -080044static struct omap_dss_device rx51_tv_device = {
45 .name = "tv",
46 .type = OMAP_DISPLAY_TYPE_VENC,
47 .driver_name = "venc",
48 .phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
Srikar60d24ee2010-12-20 18:48:16 -080049};
50
Roger Quadros03e11102010-05-10 10:35:17 +020051static struct omap_dss_device *rx51_dss_devices[] = {
52 &rx51_lcd_device,
Srikar60d24ee2010-12-20 18:48:16 -080053 &rx51_tv_device,
Roger Quadros03e11102010-05-10 10:35:17 +020054};
55
56static struct omap_dss_board_info rx51_dss_board_info = {
57 .num_devices = ARRAY_SIZE(rx51_dss_devices),
58 .devices = rx51_dss_devices,
59 .default_device = &rx51_lcd_device,
60};
61
Roger Quadros03e11102010-05-10 10:35:17 +020062static int __init rx51_video_init(void)
63{
Pavel Machekea2409b2013-07-01 23:15:04 +020064 if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900"))
Roger Quadros03e11102010-05-10 10:35:17 +020065 return 0;
66
67 if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
68 pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
69 return 0;
70 }
71
Senthilvadivu Guruswamyd5e13222011-02-22 11:24:50 +020072 omap_display_init(&rx51_dss_board_info);
Archit Taneja3c803f42013-02-12 14:05:37 +053073
Roger Quadros03e11102010-05-10 10:35:17 +020074 return 0;
75}
76
Tony Lindgrenb76c8b12013-01-11 11:24:18 -080077omap_subsys_initcall(rx51_video_init);
Roger Quadros03e11102010-05-10 10:35:17 +020078#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */