2010-05-10 16:35:17 +08: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 19:05:07 +08:00
|
|
|
#include <video/omapdss.h>
|
2013-02-12 16:35:37 +08:00
|
|
|
#include <video/omap-panel-data.h>
|
|
|
|
|
2012-08-24 21:21:06 +08:00
|
|
|
#include <linux/platform_data/spi-omap2-mcspi.h>
|
2010-05-10 16:35:17 +08:00
|
|
|
|
2013-01-12 03:24:18 +08:00
|
|
|
#include "soc.h"
|
2012-09-21 02:40:56 +08:00
|
|
|
#include "board-rx51.h"
|
2010-10-09 00:58:35 +08:00
|
|
|
|
2010-05-10 16:35:17 +08:00
|
|
|
#include "mux.h"
|
|
|
|
|
|
|
|
#define RX51_LCD_RESET_GPIO 90
|
|
|
|
|
|
|
|
#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
|
|
|
|
|
2013-02-12 16:35:37 +08:00
|
|
|
static struct panel_acx565akm_data lcd_data = {
|
|
|
|
.reset_gpio = RX51_LCD_RESET_GPIO,
|
|
|
|
};
|
2010-05-10 16:35:17 +08:00
|
|
|
|
|
|
|
static struct omap_dss_device rx51_lcd_device = {
|
|
|
|
.name = "lcd",
|
|
|
|
.driver_name = "panel-acx565akm",
|
|
|
|
.type = OMAP_DISPLAY_TYPE_SDI,
|
|
|
|
.phy.sdi.datapairs = 2,
|
2013-02-12 16:35:37 +08:00
|
|
|
.data = &lcd_data,
|
2010-05-10 16:35:17 +08:00
|
|
|
};
|
|
|
|
|
2010-12-21 10:48:16 +08:00
|
|
|
static struct omap_dss_device rx51_tv_device = {
|
|
|
|
.name = "tv",
|
|
|
|
.type = OMAP_DISPLAY_TYPE_VENC,
|
|
|
|
.driver_name = "venc",
|
|
|
|
.phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
|
|
|
|
};
|
|
|
|
|
2010-05-10 16:35:17 +08:00
|
|
|
static struct omap_dss_device *rx51_dss_devices[] = {
|
|
|
|
&rx51_lcd_device,
|
2010-12-21 10:48:16 +08:00
|
|
|
&rx51_tv_device,
|
2010-05-10 16:35:17 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct omap_dss_board_info rx51_dss_board_info = {
|
|
|
|
.num_devices = ARRAY_SIZE(rx51_dss_devices),
|
|
|
|
.devices = rx51_dss_devices,
|
|
|
|
.default_device = &rx51_lcd_device,
|
|
|
|
};
|
|
|
|
|
|
|
|
static int __init rx51_video_init(void)
|
|
|
|
{
|
|
|
|
if (!machine_is_nokia_rx51())
|
|
|
|
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 17:24:50 +08:00
|
|
|
omap_display_init(&rx51_dss_board_info);
|
2013-02-12 16:35:37 +08:00
|
|
|
|
2010-05-10 16:35:17 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-01-12 03:24:18 +08:00
|
|
|
omap_subsys_initcall(rx51_video_init);
|
2010-05-10 16:35:17 +08:00
|
|
|
#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
|