blob: 9cfebc5c7455b36b1123ae100efa513bd8fdbcdf [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
Tomi Valkeinen2320dc62013-05-17 12:37:27 +030032static struct connector_atv_platform_data rx51_tv_pdata = {
33 .name = "tv",
34 .source = "venc.0",
35 .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
36 .invert_polarity = false,
Archit Taneja3c803f42013-02-12 14:05:37 +053037};
Roger Quadros03e11102010-05-10 10:35:17 +020038
Tomi Valkeinen2320dc62013-05-17 12:37:27 +030039static struct platform_device rx51_tv_connector_device = {
40 .name = "connector-analog-tv",
41 .id = 0,
42 .dev.platform_data = &rx51_tv_pdata,
Roger Quadros03e11102010-05-10 10:35:17 +020043};
44
45static struct omap_dss_board_info rx51_dss_board_info = {
Tomi Valkeinen2320dc62013-05-17 12:37:27 +030046 .default_display_name = "lcd",
Roger Quadros03e11102010-05-10 10:35:17 +020047};
48
Roger Quadros03e11102010-05-10 10:35:17 +020049static int __init rx51_video_init(void)
50{
Sebastian Reichel3348e282014-04-08 22:51:18 +020051 if (!machine_is_nokia_rx51())
Roger Quadros03e11102010-05-10 10:35:17 +020052 return 0;
53
54 if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
55 pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
56 return 0;
57 }
58
Senthilvadivu Guruswamyd5e13222011-02-22 11:24:50 +020059 omap_display_init(&rx51_dss_board_info);
Archit Taneja3c803f42013-02-12 14:05:37 +053060
Tomi Valkeinen2320dc62013-05-17 12:37:27 +030061 platform_device_register(&rx51_tv_connector_device);
62
Roger Quadros03e11102010-05-10 10:35:17 +020063 return 0;
64}
65
Tony Lindgrenb76c8b12013-01-11 11:24:18 -080066omap_subsys_initcall(rx51_video_init);
Roger Quadros03e11102010-05-10 10:35:17 +020067#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */