All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] beagle: making DVI output work again
@ 2011-02-08 19:43 Ricardo Salveti de Araujo
  2011-02-08 19:43 ` [PATCH v2 1/2] omap3: beagle: adding regulator supply for vdds_sdi Ricardo Salveti de Araujo
  2011-02-08 19:43 ` [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization Ricardo Salveti de Araujo
  0 siblings, 2 replies; 7+ messages in thread
From: Ricardo Salveti de Araujo @ 2011-02-08 19:43 UTC (permalink / raw)
  To: linux-omap; +Cc: charu, Ricardo Salveti de Araujo

Hello,

These 2 patches are basically bugfixing to make DVI work again on beagle.

Tested with Beagle-xM and C4.

Changes in v2:
* Properly defining GPIO names and values for DVI reset
* Defining mux configuration for DVI reset pin

Mathieu J. Poirier (1):
  omap3: beagle: adding regulator supply for vdds_sdi.

Ricardo Salveti de Araujo (1):
  omap3: beaglexm: fix DVI initialization

 arch/arm/mach-omap2/board-omap3beagle.c |   33 ++++++++++++++++---------------
 1 files changed, 17 insertions(+), 16 deletions(-)

-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] omap3: beagle: adding regulator supply for vdds_sdi.
  2011-02-08 19:43 [PATCH v2 0/2] beagle: making DVI output work again Ricardo Salveti de Araujo
@ 2011-02-08 19:43 ` Ricardo Salveti de Araujo
  2011-02-08 19:43 ` [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization Ricardo Salveti de Araujo
  1 sibling, 0 replies; 7+ messages in thread
From: Ricardo Salveti de Araujo @ 2011-02-08 19:43 UTC (permalink / raw)
  To: linux-omap
  Cc: charu, Mathieu J. Poirier, Leann Ogasawara,
	Ricardo Salveti de Araujo

From: Mathieu J. Poirier <mathieu.poirier@canonical.com>

The omapfb driver couldn't locate its display sink because of
an initialisation error in the DSS subsystem.  This error was
caused by a missing 'sdi' entry in the board power regulator list.

BugLink: https://bugs.launchpad.net/bugs/597904

Signed-off-by: Mathieu Poirier <mathieu.poirier@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 46d814a..685ac06 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -239,8 +239,10 @@ static struct platform_device beagle_dss_device = {
 static struct regulator_consumer_supply beagle_vdac_supply =
 	REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
-static struct regulator_consumer_supply beagle_vdvi_supply =
-	REGULATOR_SUPPLY("vdds_dsi", "omapdss");
+static struct regulator_consumer_supply beagle_vdds_supplies[] = {
+	REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+	REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
+};
 
 static void __init beagle_display_init(void)
 {
@@ -419,7 +421,6 @@ static struct regulator_init_data beagle_vdac = {
 /* VPLL2 for digital video outputs */
 static struct regulator_init_data beagle_vpll2 = {
 	.constraints = {
-		.name			= "VDVI",
 		.min_uV			= 1800000,
 		.max_uV			= 1800000,
 		.valid_modes_mask	= REGULATOR_MODE_NORMAL
@@ -427,8 +428,8 @@ static struct regulator_init_data beagle_vpll2 = {
 		.valid_ops_mask		= REGULATOR_CHANGE_MODE
 					| REGULATOR_CHANGE_STATUS,
 	},
-	.num_consumer_supplies	= 1,
-	.consumer_supplies	= &beagle_vdvi_supply,
+	.num_consumer_supplies  = ARRAY_SIZE(beagle_vdds_supplies),
+	.consumer_supplies      = beagle_vdds_supplies,
 };
 
 static struct twl4030_usb_data beagle_usb_data = {
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization
  2011-02-08 19:43 [PATCH v2 0/2] beagle: making DVI output work again Ricardo Salveti de Araujo
  2011-02-08 19:43 ` [PATCH v2 1/2] omap3: beagle: adding regulator supply for vdds_sdi Ricardo Salveti de Araujo
@ 2011-02-08 19:43 ` Ricardo Salveti de Araujo
  2011-02-09  0:07   ` Varadarajan, Charulatha
  2011-02-09  6:53   ` G, Manjunath Kondaiah
  1 sibling, 2 replies; 7+ messages in thread
From: Ricardo Salveti de Araujo @ 2011-02-08 19:43 UTC (permalink / raw)
  To: linux-omap; +Cc: charu, Ricardo Salveti de Araujo

Function beagle_twl_gpio_setup is called after beagle_display_init, what
lets reset_gpio with an invalid value at the time it request the gpio.
As a side effect the DVI reset GPIO is not properly set.

Also removing old code that powers down DVI in a hardcoded way, as it's
not necessary anymore.

Tested with Beagle-xM and C4.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 685ac06..1a21002 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -52,6 +52,9 @@
 
 #define NAND_BLOCK_SIZE		SZ_128K
 
+#define BEAGLE_DVI_RESET_GPIO		170
+#define BEAGLE_XM_DVI_RESET_GPIO	129
+
 /*
  * OMAP3 Beagle revision
  * Run time detection of Beagle revision is done by reading GPIO.
@@ -248,6 +251,14 @@ static void __init beagle_display_init(void)
 {
 	int r;
 
+	/* DVI reset GPIO is different between beagle revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = BEAGLE_XM_DVI_RESET_GPIO;
+	else
+		beagle_dvi_device.reset_gpio = BEAGLE_DVI_RESET_GPIO;
+
+	omap_mux_init_gpio(beagle_dvi_device.reset_gpio, OMAP_PIN_OUTPUT);
+
 	r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
 	if (r < 0) {
 		printk(KERN_ERR "Unable to get DVI reset GPIO\n");
@@ -324,12 +335,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	else
 		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
-	/* DVI reset GPIO is different between beagle revisions */
-	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
-		beagle_dvi_device.reset_gpio = 129;
-	else
-		beagle_dvi_device.reset_gpio = 170;
-
 	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
 	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
 
@@ -620,11 +625,6 @@ static void __init omap3_beagle_init(void)
 			ARRAY_SIZE(omap3_beagle_devices));
 	omap_serial_init();
 
-	omap_mux_init_gpio(170, OMAP_PIN_INPUT);
-	gpio_request(170, "DVI_nPD");
-	/* REVISIT leave DVI powered down until it's needed ... */
-	gpio_direction_output(170, true);
-
 	usb_musb_init(&musb_board_data);
 	usb_ehci_init(&ehci_pdata);
 	omap3beagle_flash_init();
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization
  2011-02-08 19:43 ` [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization Ricardo Salveti de Araujo
@ 2011-02-09  0:07   ` Varadarajan, Charulatha
  2011-02-09  6:53   ` G, Manjunath Kondaiah
  1 sibling, 0 replies; 7+ messages in thread
From: Varadarajan, Charulatha @ 2011-02-09  0:07 UTC (permalink / raw)
  To: Ricardo Salveti de Araujo; +Cc: linux-omap

On Wed, Feb 9, 2011 at 00:13, Ricardo Salveti de Araujo
<ricardo.salveti@canonical.com> wrote:
> Function beagle_twl_gpio_setup is called after beagle_display_init, what
> lets reset_gpio with an invalid value at the time it request the gpio.
> As a side effect the DVI reset GPIO is not properly set.
>
> Also removing old code that powers down DVI in a hardcoded way, as it's
> not necessary anymore.
>
> Tested with Beagle-xM and C4.
>
> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>

Reviewed-by: Charulatha V <charu@ti.com>

> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization
  2011-02-08 19:43 ` [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization Ricardo Salveti de Araujo
  2011-02-09  0:07   ` Varadarajan, Charulatha
@ 2011-02-09  6:53   ` G, Manjunath Kondaiah
  2011-02-09 11:47     ` Ricardo Salveti de Araujo
  1 sibling, 1 reply; 7+ messages in thread
From: G, Manjunath Kondaiah @ 2011-02-09  6:53 UTC (permalink / raw)
  To: Ricardo Salveti de Araujo; +Cc: linux-omap, charu

On Wed, Feb 9, 2011 at 1:13 AM, Ricardo Salveti de Araujo
<ricardo.salveti@canonical.com> wrote:
> Function beagle_twl_gpio_setup is called after beagle_display_init, what
> lets reset_gpio with an invalid value at the time it request the gpio.
> As a side effect the DVI reset GPIO is not properly set.
>
> Also removing old code that powers down DVI in a hardcoded way, as it's
> not necessary anymore.
>
> Tested with Beagle-xM and C4.

Surprised to see if this code works on C4 since there is gpio_request
for gpio_170 in the beagle init code
(linux omap master branch) which is before beagle_display_init()

        omap_mux_init_gpio(170, OMAP_PIN_INPUT);
        gpio_request(170, "DVI_nPD");
        /* REVISIT leave DVI powered down until it's needed ... */
        gpio_direction_output(170, true);

The second gpio_request(for 170) should fail in beagle_display_init.
Pls check and confirm.

-Manjunath

>
> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 685ac06..1a21002 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -52,6 +52,9 @@
>
>  #define NAND_BLOCK_SIZE                SZ_128K
>
> +#define BEAGLE_DVI_RESET_GPIO          170
> +#define BEAGLE_XM_DVI_RESET_GPIO       129
> +
>  /*
>  * OMAP3 Beagle revision
>  * Run time detection of Beagle revision is done by reading GPIO.
> @@ -248,6 +251,14 @@ static void __init beagle_display_init(void)
>  {
>        int r;
>
> +       /* DVI reset GPIO is different between beagle revisions */
> +       if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
> +               beagle_dvi_device.reset_gpio = BEAGLE_XM_DVI_RESET_GPIO;
> +       else
> +               beagle_dvi_device.reset_gpio = BEAGLE_DVI_RESET_GPIO;
> +
> +       omap_mux_init_gpio(beagle_dvi_device.reset_gpio, OMAP_PIN_OUTPUT);
> +
>        r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
>        if (r < 0) {
>                printk(KERN_ERR "Unable to get DVI reset GPIO\n");
> @@ -324,12 +335,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
>        else
>                gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
>
> -       /* DVI reset GPIO is different between beagle revisions */
> -       if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
> -               beagle_dvi_device.reset_gpio = 129;
> -       else
> -               beagle_dvi_device.reset_gpio = 170;
> -
>        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
>        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
>
> @@ -620,11 +625,6 @@ static void __init omap3_beagle_init(void)
>                        ARRAY_SIZE(omap3_beagle_devices));
>        omap_serial_init();
>
> -       omap_mux_init_gpio(170, OMAP_PIN_INPUT);
> -       gpio_request(170, "DVI_nPD");
> -       /* REVISIT leave DVI powered down until it's needed ... */
> -       gpio_direction_output(170, true);
> -
>        usb_musb_init(&musb_board_data);
>        usb_ehci_init(&ehci_pdata);
>        omap3beagle_flash_init();
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization
  2011-02-09  6:53   ` G, Manjunath Kondaiah
@ 2011-02-09 11:47     ` Ricardo Salveti de Araujo
  2011-02-09 11:53       ` G, Manjunath Kondaiah
  0 siblings, 1 reply; 7+ messages in thread
From: Ricardo Salveti de Araujo @ 2011-02-09 11:47 UTC (permalink / raw)
  To: G, Manjunath Kondaiah; +Cc: linux-omap, charu

On Wed, 2011-02-09 at 12:23 +0530, G, Manjunath Kondaiah wrote:
> On Wed, Feb 9, 2011 at 1:13 AM, Ricardo Salveti de Araujo
> <ricardo.salveti@canonical.com> wrote:
> > Function beagle_twl_gpio_setup is called after beagle_display_init, what
> > lets reset_gpio with an invalid value at the time it request the gpio.
> > As a side effect the DVI reset GPIO is not properly set.
> >
> > Also removing old code that powers down DVI in a hardcoded way, as it's
> > not necessary anymore.
> >
> > Tested with Beagle-xM and C4.
> 
> Surprised to see if this code works on C4 since there is gpio_request
> for gpio_170 in the beagle init code
> (linux omap master branch) which is before beagle_display_init()
> 
>         omap_mux_init_gpio(170, OMAP_PIN_INPUT);
>         gpio_request(170, "DVI_nPD");
>         /* REVISIT leave DVI powered down until it's needed ... */
>         gpio_direction_output(170, true);
> 
> The second gpio_request(for 170) should fail in beagle_display_init.
> Pls check and confirm.

That's why this part is also removed at my patch.

Cheers,
--
Ricardo Salveti de Araujo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization
  2011-02-09 11:47     ` Ricardo Salveti de Araujo
@ 2011-02-09 11:53       ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 7+ messages in thread
From: G, Manjunath Kondaiah @ 2011-02-09 11:53 UTC (permalink / raw)
  To: Ricardo Salveti de Araujo; +Cc: linux-omap, charu

On Wed, Feb 9, 2011 at 5:17 PM, Ricardo Salveti de Araujo
<ricardo.salveti@canonical.com> wrote:
> On Wed, 2011-02-09 at 12:23 +0530, G, Manjunath Kondaiah wrote:
>> On Wed, Feb 9, 2011 at 1:13 AM, Ricardo Salveti de Araujo
>> <ricardo.salveti@canonical.com> wrote:
>> > Function beagle_twl_gpio_setup is called after beagle_display_init, what
>> > lets reset_gpio with an invalid value at the time it request the gpio.
>> > As a side effect the DVI reset GPIO is not properly set.
>> >
>> > Also removing old code that powers down DVI in a hardcoded way, as it's
>> > not necessary anymore.
>> >
>> > Tested with Beagle-xM and C4.
>>
>> Surprised to see if this code works on C4 since there is gpio_request
>> for gpio_170 in the beagle init code
>> (linux omap master branch) which is before beagle_display_init()
>>
>>         omap_mux_init_gpio(170, OMAP_PIN_INPUT);
>>         gpio_request(170, "DVI_nPD");
>>         /* REVISIT leave DVI powered down until it's needed ... */
>>         gpio_direction_output(170, true);
>>
>> The second gpio_request(for 170) should fail in beagle_display_init.
>> Pls check and confirm.
>
> That's why this part is also removed at my patch.

Thanks. Changes looks fine.

Reviewed-by: Manjunath G Kondaiah <manjugk@ti.com>

-Manjunath
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-09 11:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 19:43 [PATCH v2 0/2] beagle: making DVI output work again Ricardo Salveti de Araujo
2011-02-08 19:43 ` [PATCH v2 1/2] omap3: beagle: adding regulator supply for vdds_sdi Ricardo Salveti de Araujo
2011-02-08 19:43 ` [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization Ricardo Salveti de Araujo
2011-02-09  0:07   ` Varadarajan, Charulatha
2011-02-09  6:53   ` G, Manjunath Kondaiah
2011-02-09 11:47     ` Ricardo Salveti de Araujo
2011-02-09 11:53       ` G, Manjunath Kondaiah

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.