From: Igor Grinberg <grinberg@compulab.co.il>
To: Alex <alexg@meprolight.com>
Cc: Tony Lindgren <tony@atomide.com>,
tim.nordell@logicpd.com, baruch@tkos.co.il,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3] ARM: OMAP3LOGIC: Adding DSS support
Date: Wed, 14 Dec 2011 16:26:23 +0200 [thread overview]
Message-ID: <4EE8B20F.5070907@compulab.co.il> (raw)
In-Reply-To: <1323865510-6273-1-git-send-email-alexg@meprolight.com>
Hi Alex,
On 12/14/11 14:25, Alex wrote:
> This patch adds DSS2 support to the LogicPD OMAP 35x Torpedo boardfile. LCD and
> TV-out are supported.
>
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
> arch/arm/mach-omap2/board-omap3logic.c | 96 ++++++++++++++++++++++++++++++++
> 1 files changed, 96 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
> index 7c0f193..b44c485 100644
> --- a/arch/arm/mach-omap2/board-omap3logic.c
> +++ b/arch/arm/mach-omap2/board-omap3logic.c
> @@ -7,6 +7,9 @@
> * Copyright (C) 2010 Logic Product Development, Inc.
> * Peter Barada <peter.barada@logicpd.com>
> *
> + * Copyright (C) 2011 Meprolight, Ltd.
> + * Alex Gershgorin <alexg@meprolight.com>
> + *
> * Modified from Beagle, EVM, and RX51
> *
> * This program is free software; you can redistribute it and/or modify
> @@ -45,6 +48,9 @@
> #include <plat/gpmc.h>
> #include <plat/sdrc.h>
>
> +#include <video/omapdss.h>
> +#include <video/omap-panel-generic-dpi.h>
> +
> #define OMAP3LOGIC_SMSC911X_CS 1
>
> #define OMAP3530_LV_SOM_MMC_GPIO_CD 110
> @@ -95,6 +101,13 @@ static struct twl4030_platform_data omap3logic_twldata = {
>
> static int __init omap3logic_i2c_init(void)
> {
> + omap3_pmic_get_config(&omap3logic_twldata, TWL_COMMON_PDATA_USB,
> + TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
> +
> + omap3logic_twldata.vdac->constraints.apply_uV = true;
> + omap3logic_twldata.vpll2->constraints.apply_uV = true;
> + omap3logic_twldata.vpll2->constraints.name = "VDSI";
> +
> omap3_pmic_init("twl4030", &omap3logic_twldata);
> return 0;
> }
> @@ -182,6 +195,88 @@ static inline void __init board_smsc911x_init(void)
> gpmc_smsc911x_init(&board_smsc911x_data);
> }
>
> +#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
> +
> +#define OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO 154
> +#define OMAP3_TORPEDO_LCD_ENABLE_GPIO 155
> +#define OMAP3_TORPEDO_LCD_PWM_GPIO 56
> +
> +static struct gpio omap3logic_dss_gpios[] __initdata = {
> + {OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "lcd_bl_pwr"},
> + {OMAP3_TORPEDO_LCD_PWM_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable"},
> + {OMAP3_TORPEDO_LCD_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable"},
> +};
> +
> +static int omap3logic_enable_lcd(struct omap_dss_device *dssdev)
> +{
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_ENABLE_GPIO, 1);
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO, 1);
> + gpio_set_value(OMAP3_TORPEDO_LCD_PWM_GPIO, 1);
> +
> + return 0;
> +}
> +
> +static void omap3logic_disable_lcd(struct omap_dss_device *dssdev)
> +{
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_ENABLE_GPIO, 0);
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO, 0);
> + gpio_set_value(OMAP3_TORPEDO_LCD_PWM_GPIO, 0);
> +}
> +
> +static struct panel_generic_dpi_data lcd_panel = {
> + .name = "sharp_lq",
> + .platform_enable = omap3logic_enable_lcd,
> + .platform_disable = omap3logic_disable_lcd,
> +};
> +
> +static struct omap_dss_device omap3logic_lcd_device = {
> + .name = "lcd",
> + .driver_name = "generic_dpi_panel",
> + .type = OMAP_DISPLAY_TYPE_DPI,
> + .data = &lcd_panel,
> + .phy.dpi.data_lines = 16,
> +};
> +
> +static struct omap_dss_device omap3logic_tv_device = {
> + .name = "tv",
> + .driver_name = "venc",
> + .type = OMAP_DISPLAY_TYPE_VENC,
> + .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
> +};
> +
> +static struct omap_dss_device *omap3logic_dss_devices[] = {
> + &omap3logic_lcd_device,
> + &omap3logic_tv_device,
> +};
> +
> +static struct omap_dss_board_info omap3logic_dss_data = {
> + .num_devices = ARRAY_SIZE(omap3logic_dss_devices),
> + .devices = omap3logic_dss_devices,
> + .default_device = &omap3logic_lcd_device,
> +};
> +
> +static void __init omap3logic_display_init(void)
> +{
> + int r;
> +
> + r = gpio_request_array(omap3logic_dss_gpios,
> + ARRAY_SIZE(omap3logic_dss_gpios));
> + if (r) {
> + printk(KERN_ERR "failed to get lcd_panel_* gpios\n");
You use pr_err() below, why not here?
> + return;
> + }
> +
> + r = omap_display_init(&omap3logic_dss_data);
> + if (r) {
> + pr_err("OMAP3LOGIC: failed to register DSS device\n");
> + gpio_free_array(omap3logic_dss_gpios,
> + ARRAY_SIZE(omap3logic_dss_gpios));
> + }
> +}
> +#else
> +static void __init omap3logic_display_init(void) { }
> +#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
> +
> #ifdef CONFIG_OMAP_MUX
> static struct omap_board_mux board_mux[] __initdata = {
> { .reg_offset = OMAP_MUX_TERMINATOR },
> @@ -197,6 +292,7 @@ static void __init omap3logic_init(void)
> omap_sdrc_init(NULL, NULL);
> board_mmc_init();
> board_smsc911x_init();
> + omap3logic_display_init();
>
> /* Ensure SDRC pins are mux'd for self-refresh */
> omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
--
Regards,
Igor.
WARNING: multiple messages have this Message-ID (diff)
From: grinberg@compulab.co.il (Igor Grinberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] ARM: OMAP3LOGIC: Adding DSS support
Date: Wed, 14 Dec 2011 16:26:23 +0200 [thread overview]
Message-ID: <4EE8B20F.5070907@compulab.co.il> (raw)
In-Reply-To: <1323865510-6273-1-git-send-email-alexg@meprolight.com>
Hi Alex,
On 12/14/11 14:25, Alex wrote:
> This patch adds DSS2 support to the LogicPD OMAP 35x Torpedo boardfile. LCD and
> TV-out are supported.
>
> Signed-off-by: Alex Gershgorin <alexg@meprolight.com>
> ---
> arch/arm/mach-omap2/board-omap3logic.c | 96 ++++++++++++++++++++++++++++++++
> 1 files changed, 96 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
> index 7c0f193..b44c485 100644
> --- a/arch/arm/mach-omap2/board-omap3logic.c
> +++ b/arch/arm/mach-omap2/board-omap3logic.c
> @@ -7,6 +7,9 @@
> * Copyright (C) 2010 Logic Product Development, Inc.
> * Peter Barada <peter.barada@logicpd.com>
> *
> + * Copyright (C) 2011 Meprolight, Ltd.
> + * Alex Gershgorin <alexg@meprolight.com>
> + *
> * Modified from Beagle, EVM, and RX51
> *
> * This program is free software; you can redistribute it and/or modify
> @@ -45,6 +48,9 @@
> #include <plat/gpmc.h>
> #include <plat/sdrc.h>
>
> +#include <video/omapdss.h>
> +#include <video/omap-panel-generic-dpi.h>
> +
> #define OMAP3LOGIC_SMSC911X_CS 1
>
> #define OMAP3530_LV_SOM_MMC_GPIO_CD 110
> @@ -95,6 +101,13 @@ static struct twl4030_platform_data omap3logic_twldata = {
>
> static int __init omap3logic_i2c_init(void)
> {
> + omap3_pmic_get_config(&omap3logic_twldata, TWL_COMMON_PDATA_USB,
> + TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
> +
> + omap3logic_twldata.vdac->constraints.apply_uV = true;
> + omap3logic_twldata.vpll2->constraints.apply_uV = true;
> + omap3logic_twldata.vpll2->constraints.name = "VDSI";
> +
> omap3_pmic_init("twl4030", &omap3logic_twldata);
> return 0;
> }
> @@ -182,6 +195,88 @@ static inline void __init board_smsc911x_init(void)
> gpmc_smsc911x_init(&board_smsc911x_data);
> }
>
> +#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
> +
> +#define OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO 154
> +#define OMAP3_TORPEDO_LCD_ENABLE_GPIO 155
> +#define OMAP3_TORPEDO_LCD_PWM_GPIO 56
> +
> +static struct gpio omap3logic_dss_gpios[] __initdata = {
> + {OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "lcd_bl_pwr"},
> + {OMAP3_TORPEDO_LCD_PWM_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable"},
> + {OMAP3_TORPEDO_LCD_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable"},
> +};
> +
> +static int omap3logic_enable_lcd(struct omap_dss_device *dssdev)
> +{
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_ENABLE_GPIO, 1);
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO, 1);
> + gpio_set_value(OMAP3_TORPEDO_LCD_PWM_GPIO, 1);
> +
> + return 0;
> +}
> +
> +static void omap3logic_disable_lcd(struct omap_dss_device *dssdev)
> +{
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_ENABLE_GPIO, 0);
> + gpio_set_value_cansleep(OMAP3_TORPEDO_LCD_BACKLIGHT_GPIO, 0);
> + gpio_set_value(OMAP3_TORPEDO_LCD_PWM_GPIO, 0);
> +}
> +
> +static struct panel_generic_dpi_data lcd_panel = {
> + .name = "sharp_lq",
> + .platform_enable = omap3logic_enable_lcd,
> + .platform_disable = omap3logic_disable_lcd,
> +};
> +
> +static struct omap_dss_device omap3logic_lcd_device = {
> + .name = "lcd",
> + .driver_name = "generic_dpi_panel",
> + .type = OMAP_DISPLAY_TYPE_DPI,
> + .data = &lcd_panel,
> + .phy.dpi.data_lines = 16,
> +};
> +
> +static struct omap_dss_device omap3logic_tv_device = {
> + .name = "tv",
> + .driver_name = "venc",
> + .type = OMAP_DISPLAY_TYPE_VENC,
> + .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
> +};
> +
> +static struct omap_dss_device *omap3logic_dss_devices[] = {
> + &omap3logic_lcd_device,
> + &omap3logic_tv_device,
> +};
> +
> +static struct omap_dss_board_info omap3logic_dss_data = {
> + .num_devices = ARRAY_SIZE(omap3logic_dss_devices),
> + .devices = omap3logic_dss_devices,
> + .default_device = &omap3logic_lcd_device,
> +};
> +
> +static void __init omap3logic_display_init(void)
> +{
> + int r;
> +
> + r = gpio_request_array(omap3logic_dss_gpios,
> + ARRAY_SIZE(omap3logic_dss_gpios));
> + if (r) {
> + printk(KERN_ERR "failed to get lcd_panel_* gpios\n");
You use pr_err() below, why not here?
> + return;
> + }
> +
> + r = omap_display_init(&omap3logic_dss_data);
> + if (r) {
> + pr_err("OMAP3LOGIC: failed to register DSS device\n");
> + gpio_free_array(omap3logic_dss_gpios,
> + ARRAY_SIZE(omap3logic_dss_gpios));
> + }
> +}
> +#else
> +static void __init omap3logic_display_init(void) { }
> +#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
> +
> #ifdef CONFIG_OMAP_MUX
> static struct omap_board_mux board_mux[] __initdata = {
> { .reg_offset = OMAP_MUX_TERMINATOR },
> @@ -197,6 +292,7 @@ static void __init omap3logic_init(void)
> omap_sdrc_init(NULL, NULL);
> board_mmc_init();
> board_smsc911x_init();
> + omap3logic_display_init();
>
> /* Ensure SDRC pins are mux'd for self-refresh */
> omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
--
Regards,
Igor.
next prev parent reply other threads:[~2011-12-14 14:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 12:25 [PATCH v3] ARM: OMAP3LOGIC: Adding DSS support Alex
2011-12-14 12:25 ` Alex
2011-12-14 14:26 ` Igor Grinberg [this message]
2011-12-14 14:26 ` Igor Grinberg
2011-12-14 15:08 ` Alex Gershgorin
2011-12-14 15:08 ` Alex Gershgorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE8B20F.5070907@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=alexg@meprolight.com \
--cc=baruch@tkos.co.il \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tim.nordell@logicpd.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.