Skip to contentSkip to conversation

ARM: OMAP: Power on EHCI, serial, camera and DVI on beagleboard-xM

PATCH Superseded Koen Kooi 7 participants 14 messages Dec 7, 2010 – Jan 6, 2011

Subsystems (3)
lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

PATCH 1/1 ARM: OMAP: Power on EHCI, serial, camera and DVI on beagleboard-xM

From: Koen Kooi <[email protected]>

---
 arch/arm/mach-omap2/board-omap3beagle.c |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +23 -4
index f1a8ede..9c9bd96 100644
@@ -297,12 +297,31 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	gpio_request(gpio + 1, "EHCI_nOC");
 	gpio_direction_input(gpio + 1);
 
-	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+	 * high / others active low) */
 	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+	else
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* DVI reset GPIO is different between revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = 129;
+	else
+		beagle_dvi_device.reset_gpio = 170;
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}
 
-	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
-	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}
 
 	return 0;
 }
Signature · 1 line
1.6.6.1
#1 lore raw

Op 7 dec 2010, om 13:40 heeft Koen Kooi het volgende geschreven:

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 324

Quoted 6 lines
arch/arm/mach-omap2/board-omap3beagle.c +5 -0
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}

For people testing this patch, you won't get DVI working properly till you apply this patch:

http://sakoman.com/cgi-bin/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=9fd4ea134e6282be6ceb06a8d79a3b07af2297ae

regards,

Koen

#2 lore raw
In reply to Koen Kooi

Any comments on this?

Op 7 dec 2010, om 13:40 heeft Koen Kooi het volgende geschreven:

Quoted 55 lines

From: Koen Kooi <[email protected]>

---
arch/arm/mach-omap2/board-omap3beagle.c | 27 +++++++++++++++++++++++----

1 files changed, 23 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +23 -4
index f1a8ede..9c9bd96 100644
@@ -297,12 +297,31 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	gpio_request(gpio + 1, "EHCI_nOC");
 	gpio_direction_input(gpio + 1);
 
-	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+	 * high / others active low) */
 	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+	else
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* DVI reset GPIO is different between revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = 129;
+	else
+		beagle_dvi_device.reset_gpio = 170;
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}
 
-	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
-	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}
 
 	return 0;
 }
Signature · 6 lines
1.6.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 6 lines · Koen Kooi

Any comments on this?

Op 7 dec 2010, om 13:40 heeft Koen Kooi het volgende geschreven:

Quoted 2 lines

From: Koen Kooi <[email protected]>

You may want to add a description here. For instance you're making the PMU STAT led disappear - and I'm not sure it's deliberate.

Quoted 13 lines
Quoted 13 lines

---
arch/arm/mach-omap2/board-omap3beagle.c | 27 +++++++++++++++++++++++----

1 files changed, 23 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +0 -0
index f1a8ede..9c9bd96 100644
@@ -297,12 +297,31 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	gpio_request(gpio + 1, "EHCI_nOC");
 	gpio_direction_input(gpio + 1);
 
Quoted 3 lines

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 301

Quoted 3 lines
arch/arm/mach-omap2/board-omap3beagle.c +2 -1
-	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+	 * high / others active low) */

Just nitpicking. The multi-line comments are not as per Documentation/CodingStyle.

Quoted 19 lines
Quoted 19 lines
arch/arm/mach-omap2/board-omap3beagle.c +16 -1
 	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+	else
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* DVI reset GPIO is different between revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = 129;
+	else
+		beagle_dvi_device.reset_gpio = 170;
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}
 
Quoted 2 lines

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 305

Quoted 2 lines
arch/arm/mach-omap2/board-omap3beagle.c +0 -2
-	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
-	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;

This disappeared. So no more PMU STAT led?

Quoted 8 lines
Quoted 8 lines
arch/arm/mach-omap2/board-omap3beagle.c +5 -0
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}
 
 	return 0;
 }
maintainer
#4 lore raw
Quoted 2 lines · Anand Gadiyar
Quoted 1 line · Koen Kooi

Any comments on this?

...

Quoted 5 lines
Quoted 3 lines

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 305

Quoted 3 lines
arch/arm/mach-omap2/board-omap3beagle.c +0 -2
-	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
-	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;

This disappeared. So no more PMU STAT led?

Koen, any update on this?

Tony

#5 lore raw

Op 18 dec 2010, om 03:07 heeft Tony Lindgren het volgende geschreven:

Quoted 6 lines · Anand Gadiyar
Quoted 2 lines · Koen Kooi
Quoted 1 line

Any comments on this?

...

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 305

Quoted 2 lines
arch/arm/mach-omap2/board-omap3beagle.c +0 -2
-	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
-	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;

This disappeared. So no more PMU STAT led?

Koen, any update on this?

I'll send and updated patch after the weekend.

regards,

Koen

author
#6 lore raw

PATCH v2 1/1 ARM: OMAP: Power on EHCI, serial, camera and DVI on beagleboard-xM

In reply to Koen Kooi

---

Changes since v1:
* Reenable the PMU stat LED

 arch/arm/mach-omap2/board-omap3beagle.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +24 -2
index f1a8ede..4756ac7 100644
@@ -297,13 +297,35 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	gpio_request(gpio + 1, "EHCI_nOC");
 	gpio_direction_input(gpio + 1);
 
-	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+	 * high / others active low) */
 	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+	else
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* DVI reset GPIO is different between revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = 129;
+	else
+		beagle_dvi_device.reset_gpio = 170;
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}
 
 	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
 	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
 
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}
+
 	return 0;
 }
 
Signature · 1 line
1.6.6.1
#7 lore raw

Koen Kooi wrote, on 12/19/2010 08:42 AM:
$subject - should'nt you be doing this in separate patches? easier to track with git bisect at a later date than a whole sale change?

also could you reword it as:
omap3: beagleboard: power on ECHI

and so on?

btw, why are we enabling camera here? should'nt that be done in camera's probe function? no?

Quoted 52 lines

---

Changes since v1:
* Reenable the PMU stat LED

  arch/arm/mach-omap2/board-omap3beagle.c |   26 ++++++++++++++++++++++++--
  1 files changed, 24 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +24 -2
index f1a8ede..4756ac7 100644
@@ -297,13 +297,35 @@ static int beagle_twl_gpio_setup(struct device *dev,
  	gpio_request(gpio + 1, "EHCI_nOC");
  	gpio_direction_input(gpio + 1);
 
-	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+	 * high / others active low) */
  	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+	else
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* DVI reset GPIO is different between revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = 129;
+	else
+		beagle_dvi_device.reset_gpio = 170;
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}
 
  	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
  	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
 
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}
+
  	return 0;
  }
 
Signature · 2 lines
Regards,
Nishanth Menon
#8 lore raw

Op 19 dec 2010, om 15:47 heeft Nishanth Menon het volgende geschreven:

Quoted 2 lines

Koen Kooi wrote, on 12/19/2010 08:42 AM:
$subject - should'nt you be doing this in separate patches? easier to track with git bisect at a later date than a whole sale change?

Is that really needed?

Quoted 1 line

btw, why are we enabling camera here? should'nt that be done in camera's probe function? no?

On P7/P8 it's the camera, but on A2 and above it's the LDO that powers the TFP410, so if you want to have output on DVI you need to turn it on. I'm not sure if it should be part of the DVI init since it has different functions on different board revisions.

regards,

Koen

Quoted 57 lines
Quoted 52 lines

---

Changes since v1:
* Reenable the PMU stat LED

 arch/arm/mach-omap2/board-omap3beagle.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +24 -2
index f1a8ede..4756ac7 100644
@@ -297,13 +297,35 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	gpio_request(gpio + 1, "EHCI_nOC");
 	gpio_direction_input(gpio + 1);
 
-	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+	 * high / others active low) */
 	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+	else
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* DVI reset GPIO is different between revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = 129;
+	else
+		beagle_dvi_device.reset_gpio = 170;
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}
 
 	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
 	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
 
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}
+
 	return 0;
 }
 
Signature · 2 lines
Regards,
Nishanth Menon
#9 lore raw

Koen Kooi wrote, on 12/19/2010 08:56 AM:

Quoted 7 lines

Op 19 dec 2010, om 15:47 heeft Nishanth Menon het volgende geschreven:

Quoted 2 lines

Koen Kooi wrote, on 12/19/2010 08:42 AM:
$subject - should'nt you be doing this in separate patches? easier to track with git bisect at a later date than a whole sale change?

Is that really needed?

it is usually recommended to keep each separate functionality introduced/fixed independent of the other.

Quoted 5 lines
Quoted 2 lines

btw, why are we enabling camera here? should'nt that be done in camera's probe function? no?

On P7/P8 it's the camera, but on A2 and above it's the LDO that powers the TFP410, so if you want to have output on DVI you need to turn it on. I'm not sure if it should be part of the DVI init since it has different functions on different board revisions.

P7/P8 were not production Beagles if my memory serves me right.. DVI init makes more sense to me.

Signature · 2 lines
Regards,
Nishanth Menon
#10 lore raw
In reply to Koen Kooi
Quoted 1 line · Koen Kooi

-ENO_DESCRIPTIVE_CHANGELOG

Also, please Cc linux-arm-kernel for patches intended for upstream.

Thanks,

Kevin

Quoted 49 lines

---

Changes since v1:
* Reenable the PMU stat LED

 arch/arm/mach-omap2/board-omap3beagle.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +24 -2
index f1a8ede..4756ac7 100644
@@ -297,13 +297,35 @@ static int beagle_twl_gpio_setup(struct device *dev,
 	gpio_request(gpio + 1, "EHCI_nOC");
 	gpio_direction_input(gpio + 1);
 
-	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
+	 * high / others active low) */
 	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+	else
+		gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
+	/* DVI reset GPIO is different between revisions */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
+		beagle_dvi_device.reset_gpio = 129;
+	else
+		beagle_dvi_device.reset_gpio = 170;
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}
 
 	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
 	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
 
+	/* Power on camera interface on P7/P8 or DVI on A2 and beyond */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 2, "CAM_EN");
+		gpio_direction_output(gpio + 2, 1);
+	}
+
 	return 0;
 }
#11 lore raw
In reply to Koen Kooi

Koen,
Apologies on a late response.

Koen Kooi had written, on 12/19/2010 08:42 AM, the following:
[...]

Quoted 5 lines
arch/arm/mach-omap2/board-omap3beagle.c +0 -0
index f1a8ede..4756ac7 100644
@@ -297,13 +297,35 @@ static int beagle_twl_gpio_setup(struct device *dev,

[..]

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 318

Quoted 6 lines
arch/arm/mach-omap2/board-omap3beagle.c +6 -0
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}

earlier in this function, we do:

	gpio_request(gpio + 1, "EHCI_nOC");

gpio_direction_input(gpio + 1);
here we do
gpio_request(gpio + 1, "nDVI_PWR_EN");
gpio_direction_output(gpio + 1, 0);

I am confused. is gpio+1 input or output line? and what level should it be on?

Signature · 2 lines
Regards,
Nishanth Menon
#12 lore raw

Op 6 jan 2011, om 19:29 heeft Nishanth Menon het volgende geschreven:

Quoted 18 lines

Koen,
Apologies on a late response.

Koen Kooi had written, on 12/19/2010 08:42 AM, the following:
[...]

Quoted 5 lines
arch/arm/mach-omap2/board-omap3beagle.c +0 -0
index f1a8ede..4756ac7 100644
@@ -297,13 +297,35 @@ static int beagle_twl_gpio_setup(struct device *dev,

[..]

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 318

Quoted 6 lines
arch/arm/mach-omap2/board-omap3beagle.c +6 -0
+
+	 /* Power on DVI, Serial and PWR led */
+	if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+		gpio_request(gpio + 1, "nDVI_PWR_EN");
+		gpio_direction_output(gpio + 1, 0);
+	}

earlier in this function, we do:

Quoted 7 lines
	gpio_request(gpio + 1, "EHCI_nOC");

gpio_direction_input(gpio + 1);
here we do
gpio_request(gpio + 1, "nDVI_PWR_EN");
gpio_direction_output(gpio + 1, 0);

I am confused. is gpio+1 input or output line? and what level should it be on?

On early revB prototypes it was used to sense USB overcurrent, I'm not sure what the current status is for that pin on revB and revC, but on xM it controls the DVI, serial and led block.

Adding Gerald to CC: to see if he has some pearls of wisdom on this :)

regards,

Koen

#13 lore raw

You are correct. On the -xM over current is from the USB HUB driver as there are four ports. So that gets detected by the USB hub device and reported back.

Gerald

-----Original Message-----
From: Koen Kooi [mailto:[email protected]]
Sent: Thursday, January 06, 2011 12:33 PM
To: Menon, Nishanth
Cc: Koen Kooi; l-o Mailing List; Coley, Gerald
Subject: Re: [PATCH v2] ARM: OMAP: Power on EHCI, serial, camera and DVI on beagleboard-xM

Op 6 jan 2011, om 19:29 heeft Nishanth Menon het volgende geschreven:

Quoted 17 lines

Koen,
Apologies on a late response.

Koen Kooi had written, on 12/19/2010 08:42 AM, the following:
[...]

Quoted 5 lines
arch/arm/mach-omap2/board-omap3beagle.c +0 -0
index f1a8ede..4756ac7 100644
@@ -297,13 +297,35 @@ static int beagle_twl_gpio_setup(struct device *dev,

[..]

arch/arm/mach-omap2/board-omap3beagle.c static int beagle_twl_gpio_setup(struct device *dev, · line 318

Quoted 6 lines
arch/arm/mach-omap2/board-omap3beagle.c +6 -0
+
+     /* Power on DVI, Serial and PWR led */
+    if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+            gpio_request(gpio + 1, "nDVI_PWR_EN");
+            gpio_direction_output(gpio + 1, 0);
+    }
Quoted 8 lines

earlier in this function, we do:

      gpio_request(gpio + 1, "EHCI_nOC");
      gpio_direction_input(gpio + 1);

here we do
gpio_request(gpio + 1, "nDVI_PWR_EN");
gpio_direction_output(gpio + 1, 0);

I am confused. is gpio+1 input or output line? and what level should it be on?

On early revB prototypes it was used to sense USB overcurrent, I'm not sure what the current status is for that pin on revB and revC, but on xM it controls the DVI, serial and led block.

Adding Gerald to CC: to see if he has some pearls of wisdom on this :)

regards,

Koen