2010-05-10 02:35:17 -06:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-omap2/board-rx51-video.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Nokia
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/gpio.h>
|
|
|
|
#include <linux/spi/spi.h>
|
|
|
|
#include <linux/mm.h>
|
|
|
|
#include <asm/mach-types.h>
|
2011-05-11 05:05:07 -06:00
|
|
|
#include <video/omapdss.h>
|
2013-02-12 01:35:37 -07:00
|
|
|
#include <video/omap-panel-data.h>
|
|
|
|
|
2012-08-24 07:21:06 -06:00
|
|
|
#include <linux/platform_data/spi-omap2-mcspi.h>
|
2010-05-10 02:35:17 -06:00
|
|
|
|
2013-01-11 12:24:18 -07:00
|
|
|
#include "soc.h"
|
2012-09-20 12:40:56 -06:00
|
|
|
#include "board-rx51.h"
|
2010-10-08 10:58:35 -06:00
|
|
|
|
2010-05-10 02:35:17 -06:00
|
|
|
#include "mux.h"
|
|
|
|
|
|
|
|
#define RX51_LCD_RESET_GPIO 90
|
|
|
|
|
|
|
|
#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
|
|
|
|
|
2013-05-17 03:37:27 -06:00
|
|
|
static struct connector_atv_platform_data rx51_tv_pdata = {
|
|
|
|
.name = "tv",
|
|
|
|
.source = "venc.0",
|
|
|
|
.connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
|
|
|
|
.invert_polarity = false,
|
2013-02-12 01:35:37 -07:00
|
|
|
};
|
2010-05-10 02:35:17 -06:00
|
|
|
|
2013-05-17 03:37:27 -06:00
|
|
|
static struct platform_device rx51_tv_connector_device = {
|
|
|
|
.name = "connector-analog-tv",
|
|
|
|
.id = 0,
|
|
|
|
.dev.platform_data = &rx51_tv_pdata,
|
2010-05-10 02:35:17 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct omap_dss_board_info rx51_dss_board_info = {
|
2013-05-17 03:37:27 -06:00
|
|
|
.default_display_name = "lcd",
|
2010-05-10 02:35:17 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
static int __init rx51_video_init(void)
|
|
|
|
{
|
2013-07-01 15:15:04 -06:00
|
|
|
if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900"))
|
2010-05-10 02:35:17 -06:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
|
|
|
|
pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-02-22 02:24:50 -07:00
|
|
|
omap_display_init(&rx51_dss_board_info);
|
2013-02-12 01:35:37 -07:00
|
|
|
|
2013-05-17 03:37:27 -06:00
|
|
|
platform_device_register(&rx51_tv_connector_device);
|
|
|
|
|
2010-05-10 02:35:17 -06:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-01-11 12:24:18 -07:00
|
|
|
omap_subsys_initcall(rx51_video_init);
|
2010-05-10 02:35:17 -06:00
|
|
|
#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
|