mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 14:05:19 +08:00
Display related clean-up from Tomi Valkeinen.
These were separated from the DSS driver changes to leave out a dependency between the driver and arch/arm related code. As agreed on the mailing lists, these are based on Tomi's platform_data header branch at: git://gitorious.org/linux-omap-dss2/linux.git 3.10/0-dss-headers Note that these patches have already been in Linux next via Tomi's tree. As Tomi's driver changes are getting merged via the drm tree because of another dependency, these should get merged via the ARM SoC tree. Apologies for the late pull request on this one, this dependency should have been cleared away earlier. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIbBAABAgAGBQJRb0N0AAoJEBvUPslcq6Vze44P922i9LlKapbDif/G29KDLS40 oa6T1SsA67G4rnQvJK4cDGEz3VvYa81L8618rwdT1Dyz6WAfmdloZZT+01ccvC2u SGbuHQ8Uzp6kZa/zMgLuEKQqUBJsme21rlf6Rh/AtN4JpMCNW5BIMaTXIxT3LNHv vuGt6QPPuidgN9TQoIj5XJTQZLsY6m+waycNsec86PFhN81t1U1a/M+FIamIpJ6l YNOTMT0o/1F5mmD5x3VlTdj931LTpGIUmOxIrnkFC9Od0ZmnOfkF0D4R7zmQRPTM +7wNugTuq6ZDVrYbxKWUDVZXQjpytGapbvhZmCivii7yhqkla1u/GdesOLv2Zy5k DujfX4Fs+K2HlembiOHaJAvbaMlLuBJlR2Y5G4SOHeypWBlyX47EcksV4G2XpaTh abiKQTpLbjgRgXqW5b1Bou1nclU+kdJFw0vmc83nlNyLd8UY9RKQKqd7nyy6198P Ma1xrOAh3MmNq9GNMrc5GzKCKjNTWTsAfAfLsKyHLlKDuCzROxJM6bFKz2yS4xpf VTTjzEexKAgkdOI/RqqGOn5B8STVzalIQrQkKBrIVuP1+u1ZyCNROomaYu9vQOO7 ld20UGLKYB89ECVL7o9Odh6aIySGXKA23SjWGOjfWwqhf64sBBxbdlprvlplXwPy /QCkNbfPtb5sD6zwU7c= =8KuO -----END PGP SIGNATURE----- Merge tag 'omap-for-v3.10/dss-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into late/cleanup From Tony Lindgren: Display related clean-up from Tomi Valkeinen. These were separated from the DSS driver changes to leave out a dependency between the driver and arch/arm related code. * tag 'omap-for-v3.10/dss-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: arm: dss-common: don't use reset_gpio from omap4_panda_dvi_device arm: omap boards: Remove unnecessary platform_enable/disable callbacks for VENC devices arm: omap: dss-common: use picodlp panel's gpio handling arm: omap: board-omap3pandora: use tpo panel's gpio handling arm: omap: board-zoom: use NEC panel's gpio handling arm: omap: board-rx-51: use acx565akm panel's gpio handling arm: omap: board-sdp3430: use sharp panel's gpio handling arm: omap: board-omap3evm: use sharp panel's gpio handling arm: omap: board-overo: use lb035q02 dpi panel's gpio handling arm: omap: board-ldp: use generic dpi panel's gpio handling arm: omap: board-am3517: use generic dpi panel's gpio handling arm: omap: board-cm-t35: use generic dpi panel's gpio handling arm: omap: board-devkit8000: use generic dpi panel's gpio handling arm: omap: board-2430: use generic dpi panel's gpio handling ARM: OMAP: zoom: Use pwm stack for lcd and keyboard backlight OMAPDSS: add fields to panels' platform data OMAPDSS: panels: keep platform data of all panels in a single header Conflicts: arch/arm/mach-omap2/board-2430sdp.c arch/arm/mach-omap2/board-zoom-display.c
This commit is contained in:
commit
cd4cb1a7df
@ -38,7 +38,7 @@
|
||||
#include "gpmc-smc91x.h"
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
@ -108,24 +108,13 @@ static struct platform_device *sdp2430_devices[] __initdata = {
|
||||
#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
|
||||
#define SDP2430_LCD_PANEL_ENABLE_GPIO 154
|
||||
|
||||
static int sdp2430_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_direction_output(SDP2430_LCD_PANEL_ENABLE_GPIO, 1);
|
||||
gpio_direction_output(SDP2430_LCD_PANEL_BACKLIGHT_GPIO, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sdp2430_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_direction_output(SDP2430_LCD_PANEL_ENABLE_GPIO, 0);
|
||||
gpio_direction_output(SDP2430_LCD_PANEL_BACKLIGHT_GPIO, 0);
|
||||
}
|
||||
|
||||
static struct panel_generic_dpi_data sdp2430_panel_data = {
|
||||
.name = "nec_nl2432dr22-11b",
|
||||
.platform_enable = sdp2430_panel_enable_lcd,
|
||||
.platform_disable = sdp2430_panel_disable_lcd,
|
||||
.num_gpios = 2,
|
||||
.gpios = {
|
||||
SDP2430_LCD_PANEL_ENABLE_GPIO,
|
||||
SDP2430_LCD_PANEL_BACKLIGHT_GPIO,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_dss_device sdp2430_lcd_device = {
|
||||
@ -146,26 +135,6 @@ static struct omap_dss_board_info sdp2430_dss_data = {
|
||||
.default_device = &sdp2430_lcd_device,
|
||||
};
|
||||
|
||||
static void __init sdp2430_display_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
static struct gpio gpios[] __initdata = {
|
||||
{ SDP2430_LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"LCD reset" },
|
||||
{ SDP2430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"LCD Backlight" },
|
||||
};
|
||||
|
||||
r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
|
||||
if (r) {
|
||||
pr_err("Cannot request LCD GPIOs, error %d\n", r);
|
||||
return;
|
||||
}
|
||||
|
||||
omap_display_init(&sdp2430_dss_data);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_SMC91X)
|
||||
|
||||
static struct omap_smc91x_platform_data board_smc91x_data = {
|
||||
@ -273,7 +242,7 @@ static void __init omap_2430sdp_init(void)
|
||||
gpio_request_one(SECONDARY_LCD_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"Secondary LCD backlight");
|
||||
|
||||
sdp2430_display_init();
|
||||
omap_display_init(&sdp2430_dss_data);
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "common.h"
|
||||
#include <linux/omap-dma.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "gpmc.h"
|
||||
#include "gpmc-smc91x.h"
|
||||
@ -108,53 +108,38 @@ static struct twl4030_keypad_data sdp3430_kp_data = {
|
||||
#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 8
|
||||
#define SDP3430_LCD_PANEL_ENABLE_GPIO 5
|
||||
|
||||
static struct gpio sdp3430_dss_gpios[] __initdata = {
|
||||
{SDP3430_LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "LCD reset" },
|
||||
{SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
|
||||
};
|
||||
|
||||
static void __init sdp3430_display_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = gpio_request_array(sdp3430_dss_gpios,
|
||||
ARRAY_SIZE(sdp3430_dss_gpios));
|
||||
/*
|
||||
* the backlight GPIO doesn't directly go to the panel, it enables
|
||||
* an internal circuit on 3430sdp to create the signal V_BKL_28V,
|
||||
* this is connected to LED+ pin of the sharp panel. This GPIO
|
||||
* is left enabled in the board file, and not passed to the panel
|
||||
* as platform_data.
|
||||
*/
|
||||
r = gpio_request_one(SDP3430_LCD_PANEL_BACKLIGHT_GPIO,
|
||||
GPIOF_OUT_INIT_HIGH, "LCD Backlight");
|
||||
if (r)
|
||||
printk(KERN_ERR "failed to get LCD control GPIOs\n");
|
||||
pr_err("failed to get LCD Backlight GPIO\n");
|
||||
|
||||
}
|
||||
|
||||
static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
|
||||
gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
|
||||
gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
|
||||
}
|
||||
|
||||
static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sdp3430_panel_disable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct panel_sharp_ls037v7dw01_data sdp3430_lcd_data = {
|
||||
.resb_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO,
|
||||
.ini_gpio = -1,
|
||||
.mo_gpio = -1,
|
||||
.lr_gpio = -1,
|
||||
.ud_gpio = -1,
|
||||
};
|
||||
|
||||
static struct omap_dss_device sdp3430_lcd_device = {
|
||||
.name = "lcd",
|
||||
.driver_name = "sharp_ls_panel",
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.phy.dpi.data_lines = 16,
|
||||
.platform_enable = sdp3430_panel_enable_lcd,
|
||||
.platform_disable = sdp3430_panel_disable_lcd,
|
||||
.data = &sdp3430_lcd_data,
|
||||
};
|
||||
|
||||
static struct tfp410_platform_data dvi_panel = {
|
||||
@ -175,8 +160,6 @@ static struct omap_dss_device sdp3430_tv_device = {
|
||||
.driver_name = "venc",
|
||||
.type = OMAP_DISPLAY_TYPE_VENC,
|
||||
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
.platform_enable = sdp3430_panel_enable_tv,
|
||||
.platform_disable = sdp3430_panel_disable_tv,
|
||||
};
|
||||
|
||||
|
||||
|
@ -35,8 +35,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "am35xx-emac.h"
|
||||
#include "mux.h"
|
||||
@ -121,63 +120,14 @@ static int __init am3517_evm_i2c_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lcd_enabled;
|
||||
static int dvi_enabled;
|
||||
|
||||
#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
|
||||
defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE)
|
||||
static struct gpio am3517_evm_dss_gpios[] __initdata = {
|
||||
/* GPIO 182 = LCD Backlight Power */
|
||||
{ LCD_PANEL_BKLIGHT_PWR, GPIOF_OUT_INIT_HIGH, "lcd_backlight_pwr" },
|
||||
/* GPIO 181 = LCD Panel PWM */
|
||||
{ LCD_PANEL_PWM, GPIOF_OUT_INIT_HIGH, "lcd bl enable" },
|
||||
/* GPIO 176 = LCD Panel Power enable pin */
|
||||
{ LCD_PANEL_PWR, GPIOF_OUT_INIT_HIGH, "dvi enable" },
|
||||
};
|
||||
|
||||
static void __init am3517_evm_display_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
omap_mux_init_gpio(LCD_PANEL_PWR, OMAP_PIN_INPUT_PULLUP);
|
||||
omap_mux_init_gpio(LCD_PANEL_BKLIGHT_PWR, OMAP_PIN_INPUT_PULLDOWN);
|
||||
omap_mux_init_gpio(LCD_PANEL_PWM, OMAP_PIN_INPUT_PULLDOWN);
|
||||
|
||||
r = gpio_request_array(am3517_evm_dss_gpios,
|
||||
ARRAY_SIZE(am3517_evm_dss_gpios));
|
||||
if (r) {
|
||||
printk(KERN_ERR "failed to get DSS panel control GPIOs\n");
|
||||
return;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "Display initialized successfully\n");
|
||||
}
|
||||
#else
|
||||
static void __init am3517_evm_display_init(void) {}
|
||||
#endif
|
||||
|
||||
static int am3517_evm_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (dvi_enabled) {
|
||||
printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
gpio_set_value(LCD_PANEL_PWR, 1);
|
||||
lcd_enabled = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(LCD_PANEL_PWR, 0);
|
||||
lcd_enabled = 0;
|
||||
}
|
||||
|
||||
static struct panel_generic_dpi_data lcd_panel = {
|
||||
.name = "sharp_lq",
|
||||
.platform_enable = am3517_evm_panel_enable_lcd,
|
||||
.platform_disable = am3517_evm_panel_disable_lcd,
|
||||
.num_gpios = 3,
|
||||
.gpios = {
|
||||
LCD_PANEL_PWR,
|
||||
LCD_PANEL_BKLIGHT_PWR,
|
||||
LCD_PANEL_PWM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_dss_device am3517_evm_lcd_device = {
|
||||
@ -188,22 +138,11 @@ static struct omap_dss_device am3517_evm_lcd_device = {
|
||||
.phy.dpi.data_lines = 16,
|
||||
};
|
||||
|
||||
static int am3517_evm_panel_enable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void am3517_evm_panel_disable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct omap_dss_device am3517_evm_tv_device = {
|
||||
.type = OMAP_DISPLAY_TYPE_VENC,
|
||||
.name = "tv",
|
||||
.driver_name = "venc",
|
||||
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
.platform_enable = am3517_evm_panel_enable_tv,
|
||||
.platform_disable = am3517_evm_panel_disable_tv,
|
||||
};
|
||||
|
||||
static struct tfp410_platform_data dvi_panel = {
|
||||
@ -363,8 +302,6 @@ static void __init am3517_evm_init(void)
|
||||
omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
|
||||
usbhs_init(&usbhs_bdata);
|
||||
am3517_evm_hecc_init(&am3517_evm_hecc_pdata);
|
||||
/* DSS */
|
||||
am3517_evm_display_init();
|
||||
|
||||
/* RTC - S35390A */
|
||||
am3517_evm_rtc_init();
|
||||
|
@ -41,8 +41,7 @@
|
||||
|
||||
#include <linux/platform_data/mtd-nand-omap2.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||
|
||||
#include "common.h"
|
||||
@ -191,45 +190,12 @@ static inline void cm_t35_init_nand(void) {}
|
||||
#define CM_T35_LCD_BL_GPIO 58
|
||||
#define CM_T35_DVI_EN_GPIO 54
|
||||
|
||||
static int lcd_enabled;
|
||||
static int dvi_enabled;
|
||||
|
||||
static int cm_t35_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (dvi_enabled) {
|
||||
printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
|
||||
gpio_set_value(CM_T35_LCD_BL_GPIO, 1);
|
||||
|
||||
lcd_enabled = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
lcd_enabled = 0;
|
||||
|
||||
gpio_set_value(CM_T35_LCD_BL_GPIO, 0);
|
||||
gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
|
||||
}
|
||||
|
||||
static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cm_t35_panel_disable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct panel_generic_dpi_data lcd_panel = {
|
||||
.name = "toppoly_tdo35s",
|
||||
.platform_enable = cm_t35_panel_enable_lcd,
|
||||
.platform_disable = cm_t35_panel_disable_lcd,
|
||||
.num_gpios = 1,
|
||||
.gpios = {
|
||||
CM_T35_LCD_BL_GPIO,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_dss_device cm_t35_lcd_device = {
|
||||
@ -258,8 +224,6 @@ static struct omap_dss_device cm_t35_tv_device = {
|
||||
.driver_name = "venc",
|
||||
.type = OMAP_DISPLAY_TYPE_VENC,
|
||||
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
.platform_enable = cm_t35_panel_enable_tv,
|
||||
.platform_disable = cm_t35_panel_disable_tv,
|
||||
};
|
||||
|
||||
static struct omap_dss_device *cm_t35_dss_devices[] = {
|
||||
@ -293,11 +257,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio cm_t35_dss_gpios[] __initdata = {
|
||||
{ CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" },
|
||||
{ CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" },
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_display(void)
|
||||
{
|
||||
int err;
|
||||
@ -305,23 +264,21 @@ static void __init cm_t35_init_display(void)
|
||||
spi_register_board_info(cm_t35_lcd_spi_board_info,
|
||||
ARRAY_SIZE(cm_t35_lcd_spi_board_info));
|
||||
|
||||
err = gpio_request_array(cm_t35_dss_gpios,
|
||||
ARRAY_SIZE(cm_t35_dss_gpios));
|
||||
|
||||
err = gpio_request_one(CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"lcd bl enable");
|
||||
if (err) {
|
||||
pr_err("CM-T35: failed to request DSS control GPIOs\n");
|
||||
pr_err("CM-T35: failed to request LCD EN GPIO\n");
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_export(CM_T35_LCD_EN_GPIO, 0);
|
||||
gpio_export(CM_T35_LCD_BL_GPIO, 0);
|
||||
|
||||
msleep(50);
|
||||
gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
|
||||
|
||||
err = omap_display_init(&cm_t35_dss_data);
|
||||
if (err) {
|
||||
pr_err("CM-T35: failed to register DSS device\n");
|
||||
gpio_free_array(cm_t35_dss_gpios, ARRAY_SIZE(cm_t35_dss_gpios));
|
||||
gpio_free(CM_T35_LCD_EN_GPIO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,8 +43,7 @@
|
||||
#include "gpmc.h"
|
||||
#include <linux/platform_data/mtd-nand-omap2.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
@ -104,19 +103,6 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (gpio_is_valid(dssdev->reset_gpio))
|
||||
gpio_set_value_cansleep(dssdev->reset_gpio, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (gpio_is_valid(dssdev->reset_gpio))
|
||||
gpio_set_value_cansleep(dssdev->reset_gpio, 0);
|
||||
}
|
||||
|
||||
static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
};
|
||||
@ -128,8 +114,7 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = {
|
||||
|
||||
static struct panel_generic_dpi_data lcd_panel = {
|
||||
.name = "innolux_at070tn83",
|
||||
.platform_enable = devkit8000_panel_enable_lcd,
|
||||
.platform_disable = devkit8000_panel_disable_lcd,
|
||||
/* gpios filled in code */
|
||||
};
|
||||
|
||||
static struct omap_dss_device devkit8000_lcd_device = {
|
||||
@ -211,8 +196,6 @@ static struct gpio_led gpio_leds[];
|
||||
static int devkit8000_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap_hsmmc_late_init(mmc);
|
||||
@ -221,13 +204,8 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
|
||||
/* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
|
||||
devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0;
|
||||
ret = gpio_request_one(devkit8000_lcd_device.reset_gpio,
|
||||
GPIOF_OUT_INIT_LOW, "LCD_PWREN");
|
||||
if (ret < 0) {
|
||||
devkit8000_lcd_device.reset_gpio = -EINVAL;
|
||||
printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n");
|
||||
}
|
||||
lcd_panel.num_gpios = 1;
|
||||
lcd_panel.gpios[0] = gpio + TWL4030_GPIO_MAX + 0;
|
||||
|
||||
/* gpio + 7 is "DVI_PD" (out, active low) */
|
||||
dvi_panel.power_down_gpio = gpio + 7;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "mux.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <linux/platform_data/mtd-onenand-omap2.h>
|
||||
|
||||
#include "common.h"
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "gpmc-smsc911x.h"
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "board-flash.h"
|
||||
#include "mux.h"
|
||||
@ -181,34 +181,13 @@ static inline void __init ldp_init_smsc911x(void)
|
||||
|
||||
/* LCD */
|
||||
|
||||
static int ldp_backlight_gpio;
|
||||
static int ldp_lcd_enable_gpio;
|
||||
|
||||
#define LCD_PANEL_RESET_GPIO 55
|
||||
#define LCD_PANEL_QVGA_GPIO 56
|
||||
|
||||
static int ldp_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (gpio_is_valid(ldp_lcd_enable_gpio))
|
||||
gpio_direction_output(ldp_lcd_enable_gpio, 1);
|
||||
if (gpio_is_valid(ldp_backlight_gpio))
|
||||
gpio_direction_output(ldp_backlight_gpio, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ldp_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (gpio_is_valid(ldp_lcd_enable_gpio))
|
||||
gpio_direction_output(ldp_lcd_enable_gpio, 0);
|
||||
if (gpio_is_valid(ldp_backlight_gpio))
|
||||
gpio_direction_output(ldp_backlight_gpio, 0);
|
||||
}
|
||||
|
||||
static struct panel_generic_dpi_data ldp_panel_data = {
|
||||
.name = "nec_nl2432dr22-11b",
|
||||
.platform_enable = ldp_panel_enable_lcd,
|
||||
.platform_disable = ldp_panel_disable_lcd,
|
||||
.num_gpios = 4,
|
||||
/* gpios filled in code */
|
||||
};
|
||||
|
||||
static struct omap_dss_device ldp_lcd_device = {
|
||||
@ -231,41 +210,19 @@ static struct omap_dss_board_info ldp_dss_data = {
|
||||
|
||||
static void __init ldp_display_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
static struct gpio gpios[] __initdata = {
|
||||
{LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"},
|
||||
{LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"},
|
||||
};
|
||||
|
||||
r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
|
||||
if (r) {
|
||||
pr_err("Cannot request LCD GPIOs, error %d\n", r);
|
||||
return;
|
||||
}
|
||||
ldp_panel_data.gpios[2] = LCD_PANEL_RESET_GPIO;
|
||||
ldp_panel_data.gpios[3] = LCD_PANEL_QVGA_GPIO;
|
||||
|
||||
omap_display_init(&ldp_dss_data);
|
||||
}
|
||||
|
||||
static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
int r;
|
||||
ldp_panel_data.gpios[0] = gpio + 7;
|
||||
ldp_panel_data.gpio_invert[0] = true;
|
||||
|
||||
struct gpio gpios[] = {
|
||||
{gpio + 7 , GPIOF_OUT_INIT_LOW, "LCD ENABLE"},
|
||||
{gpio + 15, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT"},
|
||||
};
|
||||
|
||||
r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
|
||||
if (r) {
|
||||
pr_err("Cannot request LCD GPIOs, error %d\n", r);
|
||||
ldp_backlight_gpio = -EINVAL;
|
||||
ldp_lcd_enable_gpio = -EINVAL;
|
||||
return r;
|
||||
}
|
||||
|
||||
ldp_backlight_gpio = gpio + 15;
|
||||
ldp_lcd_enable_gpio = gpio + 7;
|
||||
ldp_panel_data.gpios[1] = gpio + 15;
|
||||
ldp_panel_data.gpio_invert[1] = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <asm/mach/flash.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <linux/platform_data/mtd-nand-omap2.h>
|
||||
|
||||
#include "common.h"
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include "common.h"
|
||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "mux.h"
|
||||
@ -155,61 +155,43 @@ static inline void __init omap3evm_init_smsc911x(void) { return; }
|
||||
#define OMAP3EVM_LCD_PANEL_LR 2
|
||||
#define OMAP3EVM_LCD_PANEL_UD 3
|
||||
#define OMAP3EVM_LCD_PANEL_INI 152
|
||||
#define OMAP3EVM_LCD_PANEL_ENVDD 153
|
||||
#define OMAP3EVM_LCD_PANEL_QVGA 154
|
||||
#define OMAP3EVM_LCD_PANEL_RESB 155
|
||||
|
||||
#define OMAP3EVM_LCD_PANEL_ENVDD 153
|
||||
#define OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO 210
|
||||
|
||||
/*
|
||||
* OMAP3EVM DVI control signals
|
||||
*/
|
||||
#define OMAP3EVM_DVI_PANEL_EN_GPIO 199
|
||||
|
||||
static struct gpio omap3_evm_dss_gpios[] __initdata = {
|
||||
{ OMAP3EVM_LCD_PANEL_RESB, GPIOF_OUT_INIT_HIGH, "lcd_panel_resb" },
|
||||
{ OMAP3EVM_LCD_PANEL_INI, GPIOF_OUT_INIT_HIGH, "lcd_panel_ini" },
|
||||
{ OMAP3EVM_LCD_PANEL_QVGA, GPIOF_OUT_INIT_LOW, "lcd_panel_qvga" },
|
||||
{ OMAP3EVM_LCD_PANEL_LR, GPIOF_OUT_INIT_HIGH, "lcd_panel_lr" },
|
||||
{ OMAP3EVM_LCD_PANEL_UD, GPIOF_OUT_INIT_HIGH, "lcd_panel_ud" },
|
||||
{ OMAP3EVM_LCD_PANEL_ENVDD, GPIOF_OUT_INIT_LOW, "lcd_panel_envdd" },
|
||||
static struct panel_sharp_ls037v7dw01_data omap3_evm_lcd_data = {
|
||||
.resb_gpio = OMAP3EVM_LCD_PANEL_RESB,
|
||||
.ini_gpio = OMAP3EVM_LCD_PANEL_INI,
|
||||
.mo_gpio = OMAP3EVM_LCD_PANEL_QVGA,
|
||||
.lr_gpio = OMAP3EVM_LCD_PANEL_LR,
|
||||
.ud_gpio = OMAP3EVM_LCD_PANEL_UD,
|
||||
};
|
||||
|
||||
static int lcd_enabled;
|
||||
static int dvi_enabled;
|
||||
|
||||
static void __init omap3_evm_display_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = gpio_request_array(omap3_evm_dss_gpios,
|
||||
ARRAY_SIZE(omap3_evm_dss_gpios));
|
||||
r = gpio_request_one(OMAP3EVM_LCD_PANEL_ENVDD, GPIOF_OUT_INIT_LOW,
|
||||
"lcd_panel_envdd");
|
||||
if (r)
|
||||
printk(KERN_ERR "failed to get lcd_panel_* gpios\n");
|
||||
}
|
||||
pr_err("failed to get lcd_panel_envdd GPIO\n");
|
||||
|
||||
static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (dvi_enabled) {
|
||||
printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0);
|
||||
r = gpio_request_one(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO,
|
||||
GPIOF_OUT_INIT_LOW, "lcd_panel_bklight");
|
||||
if (r)
|
||||
pr_err("failed to get lcd_panel_bklight GPIO\n");
|
||||
|
||||
if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
|
||||
gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
|
||||
else
|
||||
gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
|
||||
|
||||
lcd_enabled = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1);
|
||||
|
||||
if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
|
||||
gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
|
||||
else
|
||||
gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
|
||||
|
||||
lcd_enabled = 0;
|
||||
}
|
||||
|
||||
static struct omap_dss_device omap3_evm_lcd_device = {
|
||||
@ -217,26 +199,14 @@ static struct omap_dss_device omap3_evm_lcd_device = {
|
||||
.driver_name = "sharp_ls_panel",
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.phy.dpi.data_lines = 18,
|
||||
.platform_enable = omap3_evm_enable_lcd,
|
||||
.platform_disable = omap3_evm_disable_lcd,
|
||||
.data = &omap3_evm_lcd_data,
|
||||
};
|
||||
|
||||
static int omap3_evm_enable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void omap3_evm_disable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct omap_dss_device omap3_evm_tv_device = {
|
||||
.name = "tv",
|
||||
.driver_name = "venc",
|
||||
.type = OMAP_DISPLAY_TYPE_VENC,
|
||||
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
.platform_enable = omap3_evm_enable_tv,
|
||||
.platform_disable = omap3_evm_disable_tv,
|
||||
};
|
||||
|
||||
static struct tfp410_platform_data dvi_panel = {
|
||||
|
@ -44,6 +44,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <linux/platform_data/mtd-nand-omap2.h>
|
||||
|
||||
#include "mux.h"
|
||||
@ -230,12 +231,16 @@ static struct twl4030_keypad_data pandora_kp_data = {
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
static struct panel_tpo_td043_data lcd_data = {
|
||||
.nreset_gpio = 157,
|
||||
};
|
||||
|
||||
static struct omap_dss_device pandora_lcd_device = {
|
||||
.name = "lcd",
|
||||
.driver_name = "tpo_td043mtea1_panel",
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.phy.dpi.data_lines = 24,
|
||||
.reset_gpio = 157,
|
||||
.data = &lcd_data,
|
||||
};
|
||||
|
||||
static struct omap_dss_device pandora_tv_device = {
|
||||
|
@ -44,8 +44,7 @@
|
||||
#include "gpmc.h"
|
||||
#include <linux/platform_data/mtd-nand-omap2.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||
|
||||
@ -95,15 +94,6 @@ static void __init omap3_stalker_display_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void omap3_stalker_disable_tv(struct omap_dss_device *dssdev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct omap_dss_device omap3_stalker_tv_device = {
|
||||
.name = "tv",
|
||||
.driver_name = "venc",
|
||||
@ -113,8 +103,6 @@ static struct omap_dss_device omap3_stalker_tv_device = {
|
||||
#elif defined(CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE)
|
||||
.u.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
|
||||
#endif
|
||||
.platform_enable = omap3_stalker_enable_tv,
|
||||
.platform_disable = omap3_stalker_disable_tv,
|
||||
};
|
||||
|
||||
static struct tfp410_platform_data dvi_panel = {
|
||||
|
@ -47,8 +47,7 @@
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "mux.h"
|
||||
@ -146,28 +145,9 @@ static inline void __init overo_init_smsc911x(void) { return; }
|
||||
#endif
|
||||
|
||||
/* DSS */
|
||||
static int lcd_enabled;
|
||||
static int dvi_enabled;
|
||||
|
||||
#define OVERO_GPIO_LCD_EN 144
|
||||
#define OVERO_GPIO_LCD_BL 145
|
||||
|
||||
static struct gpio overo_dss_gpios[] __initdata = {
|
||||
{ OVERO_GPIO_LCD_EN, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_EN" },
|
||||
{ OVERO_GPIO_LCD_BL, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_LCD_BL" },
|
||||
};
|
||||
|
||||
static void __init overo_display_init(void)
|
||||
{
|
||||
if (gpio_request_array(overo_dss_gpios, ARRAY_SIZE(overo_dss_gpios))) {
|
||||
printk(KERN_ERR "could not obtain DSS control GPIOs\n");
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_export(OVERO_GPIO_LCD_EN, 0);
|
||||
gpio_export(OVERO_GPIO_LCD_BL, 0);
|
||||
}
|
||||
|
||||
static struct tfp410_platform_data dvi_panel = {
|
||||
.i2c_bus_num = 3,
|
||||
.power_down_gpio = -1,
|
||||
@ -188,30 +168,13 @@ static struct omap_dss_device overo_tv_device = {
|
||||
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
|
||||
};
|
||||
|
||||
static int overo_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
if (dvi_enabled) {
|
||||
printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
gpio_set_value(OVERO_GPIO_LCD_EN, 1);
|
||||
gpio_set_value(OVERO_GPIO_LCD_BL, 1);
|
||||
lcd_enabled = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(OVERO_GPIO_LCD_EN, 0);
|
||||
gpio_set_value(OVERO_GPIO_LCD_BL, 0);
|
||||
lcd_enabled = 0;
|
||||
}
|
||||
|
||||
static struct panel_generic_dpi_data lcd43_panel = {
|
||||
.name = "samsung_lte430wq_f0c",
|
||||
.platform_enable = overo_panel_enable_lcd,
|
||||
.platform_disable = overo_panel_disable_lcd,
|
||||
.num_gpios = 2,
|
||||
.gpios = {
|
||||
OVERO_GPIO_LCD_EN,
|
||||
OVERO_GPIO_LCD_BL
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_dss_device overo_lcd43_device = {
|
||||
@ -224,13 +187,20 @@ static struct omap_dss_device overo_lcd43_device = {
|
||||
|
||||
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
|
||||
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
|
||||
static struct panel_generic_dpi_data lcd35_panel = {
|
||||
.num_gpios = 2,
|
||||
.gpios = {
|
||||
OVERO_GPIO_LCD_EN,
|
||||
OVERO_GPIO_LCD_BL
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_dss_device overo_lcd35_device = {
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.name = "lcd35",
|
||||
.driver_name = "lgphilips_lb035q02_panel",
|
||||
.phy.dpi.data_lines = 24,
|
||||
.platform_enable = overo_panel_enable_lcd,
|
||||
.platform_disable = overo_panel_disable_lcd,
|
||||
.data = &lcd35_panel,
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -505,7 +475,6 @@ static void __init overo_init(void)
|
||||
usbhs_init(&usbhs_bdata);
|
||||
overo_spi_init();
|
||||
overo_init_smsc911x();
|
||||
overo_display_init();
|
||||
overo_init_led();
|
||||
overo_init_keys();
|
||||
omap_twl4030_audio_init("overo", NULL);
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include <linux/mm.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||
|
||||
#include "soc.h"
|
||||
@ -27,25 +29,16 @@
|
||||
|
||||
#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
|
||||
|
||||
static int rx51_lcd_enable(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(dssdev->reset_gpio, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rx51_lcd_disable(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(dssdev->reset_gpio, 0);
|
||||
}
|
||||
static struct panel_acx565akm_data lcd_data = {
|
||||
.reset_gpio = RX51_LCD_RESET_GPIO,
|
||||
};
|
||||
|
||||
static struct omap_dss_device rx51_lcd_device = {
|
||||
.name = "lcd",
|
||||
.driver_name = "panel-acx565akm",
|
||||
.type = OMAP_DISPLAY_TYPE_SDI,
|
||||
.phy.sdi.datapairs = 2,
|
||||
.reset_gpio = RX51_LCD_RESET_GPIO,
|
||||
.platform_enable = rx51_lcd_enable,
|
||||
.platform_disable = rx51_lcd_disable,
|
||||
.data = &lcd_data,
|
||||
};
|
||||
|
||||
static struct omap_dss_device rx51_tv_device = {
|
||||
@ -76,13 +69,8 @@ static int __init rx51_video_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (gpio_request_one(RX51_LCD_RESET_GPIO, GPIOF_OUT_INIT_HIGH,
|
||||
"LCD ACX565AKM reset")) {
|
||||
pr_err("%s failed to get LCD Reset GPIO\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
omap_display_init(&rx51_dss_board_info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,9 @@
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||
#include <video/omapdss.h>
|
||||
#include "board-zoom.h"
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "board-zoom.h"
|
||||
#include "soc.h"
|
||||
#include "common.h"
|
||||
|
||||
@ -24,37 +25,17 @@
|
||||
#define LCD_PANEL_RESET_GPIO_PILOT 55
|
||||
#define LCD_PANEL_QVGA_GPIO 56
|
||||
|
||||
static struct gpio zoom_lcd_gpios[] __initdata = {
|
||||
{ -EINVAL, GPIOF_OUT_INIT_HIGH, "lcd reset" },
|
||||
{ LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" },
|
||||
static struct panel_nec_nl8048_data zoom_lcd_data = {
|
||||
/* res_gpio filled in code */
|
||||
.qvga_gpio = LCD_PANEL_QVGA_GPIO,
|
||||
};
|
||||
|
||||
static void __init zoom_lcd_panel_init(void)
|
||||
{
|
||||
zoom_lcd_gpios[0].gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
|
||||
LCD_PANEL_RESET_GPIO_PROD :
|
||||
LCD_PANEL_RESET_GPIO_PILOT;
|
||||
|
||||
if (gpio_request_array(zoom_lcd_gpios, ARRAY_SIZE(zoom_lcd_gpios)))
|
||||
pr_err("%s: Failed to get LCD GPIOs.\n", __func__);
|
||||
}
|
||||
|
||||
static int zoom_panel_enable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev)
|
||||
{
|
||||
}
|
||||
|
||||
static struct omap_dss_device zoom_lcd_device = {
|
||||
.name = "lcd",
|
||||
.driver_name = "NEC_8048_panel",
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.phy.dpi.data_lines = 24,
|
||||
.platform_enable = zoom_panel_enable_lcd,
|
||||
.platform_disable = zoom_panel_disable_lcd,
|
||||
.data = &zoom_lcd_data,
|
||||
};
|
||||
|
||||
static struct omap_dss_device *zoom_dss_devices[] = {
|
||||
@ -67,6 +48,13 @@ static struct omap_dss_board_info zoom_dss_data = {
|
||||
.default_device = &zoom_lcd_device,
|
||||
};
|
||||
|
||||
static void __init zoom_lcd_panel_init(void)
|
||||
{
|
||||
zoom_lcd_data.res_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
|
||||
LCD_PANEL_RESET_GPIO_PROD :
|
||||
LCD_PANEL_RESET_GPIO_PILOT;
|
||||
}
|
||||
|
||||
static struct omap2_mcspi_device_config dss_lcd_mcspi_config = {
|
||||
.turbo_mode = 1,
|
||||
};
|
||||
|
@ -27,9 +27,7 @@
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-nokia-dsi.h>
|
||||
#include <video/omap-panel-picodlp.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "soc.h"
|
||||
#include "dss-common.h"
|
||||
@ -54,7 +52,6 @@ static struct omap_dss_device omap4_panda_dvi_device = {
|
||||
.driver_name = "tfp410",
|
||||
.data = &omap4_dvi_panel,
|
||||
.phy.dpi.data_lines = 24,
|
||||
.reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
|
||||
.channel = OMAP_DSS_CHANNEL_LCD2,
|
||||
};
|
||||
|
||||
@ -179,45 +176,12 @@ static struct picodlp_panel_data sdp4430_picodlp_pdata = {
|
||||
.pwrgood_gpio = 45,
|
||||
};
|
||||
|
||||
static void sdp4430_picodlp_init(void)
|
||||
{
|
||||
int r;
|
||||
const struct gpio picodlp_gpios[] = {
|
||||
{DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"DLP POWER ON"},
|
||||
{sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN,
|
||||
"DLP EMU DONE"},
|
||||
{sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW,
|
||||
"DLP PWRGOOD"},
|
||||
};
|
||||
|
||||
r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
|
||||
if (r)
|
||||
pr_err("Cannot request PicoDLP GPIOs, error %d\n", r);
|
||||
}
|
||||
|
||||
static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(DISPLAY_SEL_GPIO, 0);
|
||||
gpio_set_value(DLP_POWER_ON_GPIO, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_set_value(DLP_POWER_ON_GPIO, 0);
|
||||
gpio_set_value(DISPLAY_SEL_GPIO, 1);
|
||||
}
|
||||
|
||||
static struct omap_dss_device sdp4430_picodlp_device = {
|
||||
.name = "picodlp",
|
||||
.driver_name = "picodlp_panel",
|
||||
.type = OMAP_DISPLAY_TYPE_DPI,
|
||||
.phy.dpi.data_lines = 24,
|
||||
.channel = OMAP_DSS_CHANNEL_LCD2,
|
||||
.platform_enable = sdp4430_panel_enable_picodlp,
|
||||
.platform_disable = sdp4430_panel_disable_picodlp,
|
||||
.data = &sdp4430_picodlp_pdata,
|
||||
};
|
||||
|
||||
@ -234,17 +198,26 @@ static struct omap_dss_board_info sdp4430_dss_data = {
|
||||
.default_device = &sdp4430_lcd_device,
|
||||
};
|
||||
|
||||
/*
|
||||
* we select LCD2 by default (instead of Pico DLP) by setting DISPLAY_SEL_GPIO.
|
||||
* Setting DLP_POWER_ON gpio enables the VDLP_2V5 VDLP_1V8 and VDLP_1V0 rails
|
||||
* used by picodlp on the 4430sdp platform. Keep this gpio disabled as LCD2 is
|
||||
* selected by default
|
||||
*/
|
||||
void __init omap_4430sdp_display_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
/* Enable LCD2 by default (instead of Pico DLP) */
|
||||
r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
|
||||
"display_sel");
|
||||
if (r)
|
||||
pr_err("%s: Could not get display_sel GPIO\n", __func__);
|
||||
|
||||
sdp4430_picodlp_init();
|
||||
r = gpio_request_one(DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"DLP POWER ON");
|
||||
if (r)
|
||||
pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
|
||||
|
||||
omap_display_init(&sdp4430_dss_data);
|
||||
/*
|
||||
* OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
|
||||
@ -264,12 +237,15 @@ void __init omap_4430sdp_display_init_of(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
/* Enable LCD2 by default (instead of Pico DLP) */
|
||||
r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
|
||||
"display_sel");
|
||||
if (r)
|
||||
pr_err("%s: Could not get display_sel GPIO\n", __func__);
|
||||
|
||||
sdp4430_picodlp_init();
|
||||
r = gpio_request_one(DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"DLP POWER ON");
|
||||
if (r)
|
||||
pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
|
||||
|
||||
omap_display_init(&sdp4430_dss_data);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <video/omapdss.h>
|
||||
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
struct panel_config {
|
||||
struct omap_video_timings timings;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <linux/fb.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-n8x0.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#define BLIZZARD_REV_CODE 0x00
|
||||
#define BLIZZARD_CONFIG 0x02
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-picodlp.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#include "panel-picodlp.h"
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-nokia-dsi.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
/* DSI Virtual channel. Hardcoded for now. */
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include <video/omap-panel-tfp410.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
static const struct omap_video_timings tfp410_default_timings = {
|
||||
.x_res = 640,
|
||||
|
152
include/video/omap-panel-data.h
Normal file
152
include/video/omap-panel-data.h
Normal file
@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Header containing platform_data structs for omap panels
|
||||
*
|
||||
* Copyright (C) 2013 Texas Instruments
|
||||
* Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
||||
* Archit Taneja <archit@ti.com>
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments
|
||||
* Author: Mayuresh Janorkar <mayur@ti.com>
|
||||
*
|
||||
* Copyright (C) 2010 Canonical Ltd.
|
||||
* Author: Bryan Wu <bryan.wu@canonical.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __OMAP_PANEL_DATA_H
|
||||
#define __OMAP_PANEL_DATA_H
|
||||
|
||||
struct omap_dss_device;
|
||||
|
||||
/**
|
||||
* struct panel_generic_dpi_data - panel driver configuration data
|
||||
* @name: panel name
|
||||
* @platform_enable: platform specific panel enable function
|
||||
* @platform_disable: platform specific panel disable function
|
||||
* @num_gpios: number of gpios connected to panel
|
||||
* @gpios: gpio numbers on the platform
|
||||
* @gpio_invert: configure gpio as active high or low
|
||||
*/
|
||||
struct panel_generic_dpi_data {
|
||||
const char *name;
|
||||
int (*platform_enable)(struct omap_dss_device *dssdev);
|
||||
void (*platform_disable)(struct omap_dss_device *dssdev);
|
||||
|
||||
int num_gpios;
|
||||
int gpios[10];
|
||||
bool gpio_invert[10];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct panel_n8x0_data - N800 panel driver configuration data
|
||||
*/
|
||||
struct panel_n8x0_data {
|
||||
int (*platform_enable)(struct omap_dss_device *dssdev);
|
||||
void (*platform_disable)(struct omap_dss_device *dssdev);
|
||||
int panel_reset;
|
||||
int ctrl_pwrdown;
|
||||
|
||||
int (*set_backlight)(struct omap_dss_device *dssdev, int level);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct nokia_dsi_panel_data - Nokia DSI panel driver configuration data
|
||||
* @name: panel name
|
||||
* @use_ext_te: use external TE
|
||||
* @ext_te_gpio: external TE GPIO
|
||||
* @esd_interval: interval of ESD checks, 0 = disabled (ms)
|
||||
* @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
|
||||
* @use_dsi_backlight: true if panel uses DSI command to control backlight
|
||||
* @pin_config: DSI pin configuration
|
||||
*/
|
||||
|
||||
struct nokia_dsi_panel_data {
|
||||
const char *name;
|
||||
|
||||
int reset_gpio;
|
||||
|
||||
bool use_ext_te;
|
||||
int ext_te_gpio;
|
||||
|
||||
unsigned esd_interval;
|
||||
unsigned ulps_timeout;
|
||||
|
||||
bool use_dsi_backlight;
|
||||
|
||||
struct omap_dsi_pin_config pin_config;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct picodlp_panel_data - picodlp panel driver configuration data
|
||||
* @picodlp_adapter_id: i2c_adapter number for picodlp
|
||||
*/
|
||||
struct picodlp_panel_data {
|
||||
int picodlp_adapter_id;
|
||||
int emu_done_gpio;
|
||||
int pwrgood_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tfp410_platform_data - tfp410 panel driver configuration data
|
||||
* @i2c_bus_num: i2c bus id for the panel
|
||||
* @power_down_gpio: gpio number for PD pin (or -1 if not available)
|
||||
*/
|
||||
struct tfp410_platform_data {
|
||||
int i2c_bus_num;
|
||||
int power_down_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* sharp ls panel driver configuration data
|
||||
* @resb_gpio: reset signal
|
||||
* @ini_gpio: power on control
|
||||
* @mo_gpio: selection for resolution(VGA/QVGA)
|
||||
* @lr_gpio: selection for horizontal scanning direction
|
||||
* @ud_gpio: selection for vertical scanning direction
|
||||
*/
|
||||
struct panel_sharp_ls037v7dw01_data {
|
||||
int resb_gpio;
|
||||
int ini_gpio;
|
||||
int mo_gpio;
|
||||
int lr_gpio;
|
||||
int ud_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* acx565akm panel driver configuration data
|
||||
* @reset_gpio: reset signal
|
||||
*/
|
||||
struct panel_acx565akm_data {
|
||||
int reset_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* nec nl8048 panel driver configuration data
|
||||
* @res_gpio: reset signal
|
||||
* @qvga_gpio: selection for resolution(QVGA/WVGA)
|
||||
*/
|
||||
struct panel_nec_nl8048_data {
|
||||
int res_gpio;
|
||||
int qvga_gpio;
|
||||
};
|
||||
|
||||
/**
|
||||
* tpo td043 panel driver configuration data
|
||||
* @nreset_gpio: reset signal
|
||||
*/
|
||||
struct panel_tpo_td043_data {
|
||||
int nreset_gpio;
|
||||
};
|
||||
|
||||
#endif /* __OMAP_PANEL_DATA_H */
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Header for generic DPI panel driver
|
||||
*
|
||||
* Copyright (C) 2010 Canonical Ltd.
|
||||
* Author: Bryan Wu <bryan.wu@canonical.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __OMAP_PANEL_GENERIC_DPI_H
|
||||
#define __OMAP_PANEL_GENERIC_DPI_H
|
||||
|
||||
struct omap_dss_device;
|
||||
|
||||
/**
|
||||
* struct panel_generic_dpi_data - panel driver configuration data
|
||||
* @name: panel name
|
||||
* @platform_enable: platform specific panel enable function
|
||||
* @platform_disable: platform specific panel disable function
|
||||
*/
|
||||
struct panel_generic_dpi_data {
|
||||
const char *name;
|
||||
int (*platform_enable)(struct omap_dss_device *dssdev);
|
||||
void (*platform_disable)(struct omap_dss_device *dssdev);
|
||||
};
|
||||
|
||||
#endif /* __OMAP_PANEL_GENERIC_DPI_H */
|
@ -1,15 +0,0 @@
|
||||
#ifndef __OMAP_PANEL_N8X0_H
|
||||
#define __OMAP_PANEL_N8X0_H
|
||||
|
||||
struct omap_dss_device;
|
||||
|
||||
struct panel_n8x0_data {
|
||||
int (*platform_enable)(struct omap_dss_device *dssdev);
|
||||
void (*platform_disable)(struct omap_dss_device *dssdev);
|
||||
int panel_reset;
|
||||
int ctrl_pwrdown;
|
||||
|
||||
int (*set_backlight)(struct omap_dss_device *dssdev, int level);
|
||||
};
|
||||
|
||||
#endif
|
@ -1,32 +0,0 @@
|
||||
#ifndef __OMAP_NOKIA_DSI_PANEL_H
|
||||
#define __OMAP_NOKIA_DSI_PANEL_H
|
||||
|
||||
struct omap_dss_device;
|
||||
|
||||
/**
|
||||
* struct nokia_dsi_panel_data - Nokia DSI panel driver configuration
|
||||
* @name: panel name
|
||||
* @use_ext_te: use external TE
|
||||
* @ext_te_gpio: external TE GPIO
|
||||
* @esd_interval: interval of ESD checks, 0 = disabled (ms)
|
||||
* @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms)
|
||||
* @use_dsi_backlight: true if panel uses DSI command to control backlight
|
||||
* @pin_config: DSI pin configuration
|
||||
*/
|
||||
struct nokia_dsi_panel_data {
|
||||
const char *name;
|
||||
|
||||
int reset_gpio;
|
||||
|
||||
bool use_ext_te;
|
||||
int ext_te_gpio;
|
||||
|
||||
unsigned esd_interval;
|
||||
unsigned ulps_timeout;
|
||||
|
||||
bool use_dsi_backlight;
|
||||
|
||||
struct omap_dsi_pin_config pin_config;
|
||||
};
|
||||
|
||||
#endif /* __OMAP_NOKIA_DSI_PANEL_H */
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* panel data for picodlp panel
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments
|
||||
*
|
||||
* Author: Mayuresh Janorkar <mayur@ti.com>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef __PANEL_PICODLP_H
|
||||
#define __PANEL_PICODLP_H
|
||||
/**
|
||||
* struct : picodlp panel data
|
||||
* picodlp_adapter_id: i2c_adapter number for picodlp
|
||||
*/
|
||||
struct picodlp_panel_data {
|
||||
int picodlp_adapter_id;
|
||||
int emu_done_gpio;
|
||||
int pwrgood_gpio;
|
||||
};
|
||||
#endif /* __PANEL_PICODLP_H */
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Header for TFP410 chip driver
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments Inc
|
||||
* Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __OMAP_PANEL_TFP410_H
|
||||
#define __OMAP_PANEL_TFP410_H
|
||||
|
||||
struct omap_dss_device;
|
||||
|
||||
/**
|
||||
* struct tfp410_platform_data - panel driver configuration data
|
||||
* @i2c_bus_num: i2c bus id for the panel
|
||||
* @power_down_gpio: gpio number for PD pin (or -1 if not available)
|
||||
*/
|
||||
struct tfp410_platform_data {
|
||||
int i2c_bus_num;
|
||||
int power_down_gpio;
|
||||
};
|
||||
|
||||
#endif /* __OMAP_PANEL_TFP410_H */
|
Loading…
Reference in New Issue
Block a user