Skip to contentSkip to conversation

beagleboard: enable HUB power on all variants of the BeagleBoard

PATCH New Joel A Fernandes 4 participants 9 messages Aug 24, 2011 – Aug 27, 2011 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

From: Christian Spielberger <[email protected]>

Cc "Eric B??nard" <[email protected]>
Cc "Christian Spielberger" <[email protected]>

---
Pushing this patch myself as no one else did.

Previous discussions:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105663/
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/101540/

 board/ti/beagle/beagle.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
board/ti/beagle/beagle.c +9 -1
index 13fe39b..9d65e9e 100644
@@ -332,7 +332,15 @@ int misc_init_r(void)
 		setenv(expansion_config.env_var, expansion_config.env_setting);
 
 	twl4030_power_init();
-	twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+	switch (get_board_revision()) {
+	case REVISION_XM_C:
+	case REVISION_C4:
+		twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+		break;
+	default:
+		twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);
+		break;
+	}
 
 	/* Set GPIO states before they are made outputs */
 	writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

Quoted 23 lines · Joel A Fernandes

From: Christian Spielberger <[email protected]>

Cc "Eric B??nard" <[email protected]>
Cc "Christian Spielberger" <[email protected]>

---
Pushing this patch myself as no one else did.

Previous discussions:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105663/
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/101540/

 board/ti/beagle/beagle.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
board/ti/beagle/beagle.c +0 -0
index 13fe39b..9d65e9e 100644
@@ -332,7 +332,15 @@ int misc_init_r(void)
 		setenv(expansion_config.env_var, expansion_config.env_setting);
 
 	twl4030_power_init();

board/ti/beagle/beagle.c int misc_init_r(void) · line 343

Quoted 10 lines
board/ti/beagle/beagle.c +9 -1
-	twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+	switch (get_board_revision()) {
+	case REVISION_XM_C:
+	case REVISION_C4:
+		twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+		break;
+	default:
+		twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);
+		break;
+	}

Am I just too sleepy or the Subject doesn't correlate with what the patch does
...

My understanding of Subject is that it enables power on HUB ... USB HUB ? But the patch enables some LEDs ?

I might be wrong.

CHeers

Quoted 3 lines
board/ti/beagle/beagle.c +0 -0
 	/* Set GPIO states before they are made outputs */
 	writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,
#2 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

Quoted 23 lines · Marek Vasut
Quoted 22 lines · Joel A Fernandes

From: Christian Spielberger <[email protected]>

Cc "Eric B??nard" <[email protected]>
Cc "Christian Spielberger" <[email protected]>

---
Pushing this patch myself as no one else did.

Previous discussions:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105663/
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/101540/

?board/ti/beagle/beagle.c | ? 10 +++++++++-
?1 files changed, 9 insertions(+), 1 deletions(-)

board/ti/beagle/beagle.c +0 -0
index 13fe39b..9d65e9e 100644
@@ -332,7 +332,15 @@ int misc_init_r(void)
 ? ? ? ? ? ? ? setenv(expansion_config.env_var, expansion_config.env_setting);
 
Quoted 11 lines

board/ti/beagle/beagle.c int misc_init_r(void) · line 343

Quoted 11 lines
board/ti/beagle/beagle.c +9 -1
 ? ? ? twl4030_power_init();
- ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+ ? ? switch (get_board_revision()) {
+ ? ? case REVISION_XM_C:
+ ? ? case REVISION_C4:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+ ? ? ? ? ? ? break;
+ ? ? default:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);
+ ? ? ? ? ? ? break;
+ ? ? }

Please excuse if this is a duplicate, but I'm configuring a new mail tool and I don't think my other message got sent.

It is XM_A and XM_B that are odd-balls, so the correct code should be something like:

+     switch (get_board_revision()) {
+     case REVISION_XM_A:
+     case REVISION_XM_B:

+ twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); /* LEDA
signal set low */
+ break;
+ default:
+ twl4030_led_init(TWL4030_LED_LEDEN_LEDAON |
TWL4030_LED_LEDEN_LEDBON);
+ break;

Quoted 8 lines

board/ti/beagle/beagle.c int misc_init_r(void) · line 343

Quoted 1 line
board/ti/beagle/beagle.c +1 -0
+     }

Am I just too sleepy or the Subject doesn't correlate with what the patch does
...

My understanding of Subject is that it enables power on HUB ... USB HUB ? But the patch enables some LEDs ?

The LED drivers on the power management device (TWL4030-compatible) are used to enable the hub power.

Quoted 12 lines

I might be wrong.

CHeers

Quoted 3 lines

? ? ? /* Set GPIO states before they are made outputs */ ? ? ? writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

Quoted 56 lines · Jason Kridner
Quoted 24 lines · Marek Vasut
Quoted 23 lines · Joel A Fernandes

From: Christian Spielberger <[email protected]>

Cc "Eric B??nard" <[email protected]>
Cc "Christian Spielberger" <[email protected]>

---
Pushing this patch myself as no one else did.

Previous discussions:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105663/
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/101540/

 board/ti/beagle/beagle.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
board/ti/beagle/beagle.c +0 -0
index 13fe39b..9d65e9e 100644
@@ -332,7 +332,15 @@ int misc_init_r(void)
              setenv(expansion_config.env_var,
 expansion_config.env_setting);
 
Quoted 11 lines

board/ti/beagle/beagle.c int misc_init_r(void) · line 343

Quoted 11 lines
board/ti/beagle/beagle.c +7 -1
      twl4030_power_init();
-     twl4030_led_init(TWL4030_LED_LEDEN_LEDAON |
 TWL4030_LED_LEDEN_LEDBON); +     switch (get_board_revision()) {
+     case REVISION_XM_C:
+     case REVISION_C4:
+             twl4030_led_init(TWL4030_LED_LEDEN_LEDAON |
 TWL4030_LED_LEDEN_LEDBON); +             break;
+     default:
+             twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);
+             break;
+     }

Please excuse if this is a duplicate, but I'm configuring a new mail tool and I don't think my other message got sent.

It is XM_A and XM_B that are odd-balls, so the correct code should be something like:

(quoted diff) +4 -0
+     switch (get_board_revision()) {
+     case REVISION_XM_A:
+     case REVISION_XM_B:
+             twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); /* LEDA

signal set low */

board/ti/beagle/beagle.c +3 -0
+             break;
+     default:
+             twl4030_led_init(TWL4030_LED_LEDEN_LEDAON |

TWL4030_LED_LEDEN_LEDBON);
+ break;

Quoted 2 lines
Quoted 1 line
board/ti/beagle/beagle.c +1 -0
+     }
Quoted 8 lines
Quoted 5 lines

Am I just too sleepy or the Subject doesn't correlate with what the patch does ...

My understanding of Subject is that it enables power on HUB ... USB HUB ? But the patch enables some LEDs ?

The LED drivers on the power management device (TWL4030-compatible) are used to enable the hub power.

Oh uh ... ok, now I understand. Please add a comment explaining it.

Also, change the subject se it's clear you're operating with USB HUB here.

Thanks!

Quoted 12 lines
Quoted 12 lines

I might be wrong.

CHeers

Quoted 2 lines
      /* Set GPIO states before they are made outputs */
      writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

Quoted 42 lines · Jason Kridner
Quoted 23 lines · Marek Vasut
Quoted 22 lines · Joel A Fernandes

From: Christian Spielberger <[email protected]>

Cc "Eric B??nard" <[email protected]>
Cc "Christian Spielberger" <[email protected]>

---
Pushing this patch myself as no one else did.

Previous discussions:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105663/
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/101540/

?board/ti/beagle/beagle.c | ? 10 +++++++++-
?1 files changed, 9 insertions(+), 1 deletions(-)

board/ti/beagle/beagle.c +0 -0
index 13fe39b..9d65e9e 100644
@@ -332,7 +332,15 @@ int misc_init_r(void)
 ? ? ? ? ? ? ? setenv(expansion_config.env_var, expansion_config.env_setting);
 
Quoted 11 lines

board/ti/beagle/beagle.c int misc_init_r(void) · line 343

Quoted 11 lines
board/ti/beagle/beagle.c +9 -1
 ? ? ? twl4030_power_init();
- ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+ ? ? switch (get_board_revision()) {
+ ? ? case REVISION_XM_C:
+ ? ? case REVISION_C4:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+ ? ? ? ? ? ? break;
+ ? ? default:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);
+ ? ? ? ? ? ? break;
+ ? ? }

Please excuse if this is a duplicate, but I'm configuring a new mail tool and I don't think my other message got sent.

It is XM_A and XM_B that are odd-balls, so the correct code should be something like:

Quoted 10 lines

+ ? ? switch (get_board_revision()) {
+ ? ? case REVISION_XM_A:
+ ? ? case REVISION_XM_B:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDBON); /* LEDA signal set low */
+ ? ? ? ? ? ? break;
+ ? ? default:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+ ? ? ? ? ? ? break;

Hi Jason, I think it should be:

+ ? ? switch (get_board_revision()) {
+ ? ? case REVISION_XM_A:
+ ? ? case REVISION_XM_B:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON |
TWL4030_LED_LEDEN_LEDBON); /* LEDA
signal set low */
+ ? ? ? ? ? ? break;
+ ? ? default:
+ ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);
+ ? ? ? ? ? ? break;

Here's the equivalent in the linux kernel board file (default is GPIOF_OUT_INIT_LOW)

        printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
        omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
        beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;

Let me know your comments.

thanks,
Joel

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAD=GYpbtJ9Hmjy-XdAHK6XmZTbj3PWnes9ZZpOROuiuKPyiFaA@mail.gmail.com

#8 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

+U-boot list

---------- Forwarded message ----------
From: Joel A Fernandes <[email protected]>
Date: Fri, Aug 26, 2011 at 11:45 PM
Subject: Re: [PATCH] beagleboard: enable HUB power on all variants of the BeagleBoard
To: Jason Kridner <[email protected]>

Quoted 3 lines

The logic is wrong here. ?I don't remember the polarity, but I do remember that it is xM-A and xM-B that are the oddballs. ?I believe this is the correct change:

Hi Jason,

LEDAON should be high for HUB power up on xMA and xMB, so in your code snip:

Quoted 5 lines

+ ? ? ? switch (get_board_revision()) {
+ ? ? ? case REVISION_XM_A:
+ ? ? ? case REVISION_XM_B:
+ ? ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);

So this should be TWL4030_LED_LEDEN_LEDBON | TWL4030_LED_LEDEN_LEDAON

Quoted 3 lines

+ ? ? ? ? ? ? ? break;
+ ? ? ? default:
+ ? ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);

and, this should be TWL4030_LED_LEDEN_LEDBON

Am I correct?

Thanks
Joel

#9 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

Hi Joel,

Le 27/08/2011 06:46, Joel A Fernandes a ?crit :

Quoted 15 lines
Quoted 2 lines

The logic is wrong here. I don't remember the polarity, but I do remember that it is xM-A and xM-B that are the oddballs. I believe this is the correct change:

Hi Jason,

LEDAON should be high for HUB power up on xMA and xMB, so in your code snip:

board/ti/beagle/beagle.c int misc_init_r(void) · line 341

Quoted 5 lines
board/ti/beagle/beagle.c +4 -0
+       switch (get_board_revision()) {
+       case REVISION_XM_A:
+       case REVISION_XM_B:
+               twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);

So this should be TWL4030_LED_LEDEN_LEDBON | TWL4030_LED_LEDEN_LEDAON

Quoted 8 lines

board/ti/beagle/beagle.c int misc_init_r(void)

Quoted 3 lines
board/ti/beagle/beagle.c +3 -0
+               break;
+       default:
+               twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);

and, this should be TWL4030_LED_LEDEN_LEDBON

Am I correct?

LEDA & LEDB are active low Open Drain outputs so enabling LEDAON bit in LEDEN means LEDA output is at low level.

Eric

#10 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

Quoted 22 lines · Eric B?nard

Hi Joel,

Le 27/08/2011 06:46, Joel A Fernandes a ?crit :

Quoted 19 lines
Quoted 2 lines

The logic is wrong here. ?I don't remember the polarity, but I do remember that it is xM-A and xM-B that are the oddballs. ?I believe this is the correct change:

Hi Jason,

LEDAON should be high for HUB power up on xMA and xMB, so in your code snip:

Quoted 5 lines

+ ? ? ? switch (get_board_revision()) {
+ ? ? ? case REVISION_XM_A:
+ ? ? ? case REVISION_XM_B:
+ ? ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);

So this should be TWL4030_LED_LEDEN_LEDBON | TWL4030_LED_LEDEN_LEDAON

Quoted 3 lines

+ ? ? ? ? ? ? ? break;
+ ? ? ? default:
+ ? ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);

Quoted 6 lines
Quoted 4 lines

and, this should be TWL4030_LED_LEDEN_LEDBON

Am I correct?

LEDA & LEDB are active low Open Drain outputs so enabling LEDAON bit in LEDEN means LEDA output is at low level.

Thanks for resolving that mystery. I just figured out what I thought it should be by looking at the previous default, which should be the new default as well with only XM_A and XM_B are different.

Quoted 7 lines

Eric
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#11 lore raw

PATCH 1/1 beagleboard: enable HUB power on all variants of the BeagleBoard

All,

I'm post a v2 now, please give ACKs, thanks :)

Quoted 43 lines · Jason Kridner
Quoted 22 lines · Eric B?nard

Hi Joel,

Le 27/08/2011 06:46, Joel A Fernandes a ?crit :

Quoted 19 lines
Quoted 2 lines

The logic is wrong here. ?I don't remember the polarity, but I do remember that it is xM-A and xM-B that are the oddballs. ?I believe this is the correct change:

Hi Jason,

LEDAON should be high for HUB power up on xMA and xMB, so in your code snip:

Quoted 5 lines

+ ? ? ? switch (get_board_revision()) {
+ ? ? ? case REVISION_XM_A:
+ ? ? ? case REVISION_XM_B:
+ ? ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);

So this should be TWL4030_LED_LEDEN_LEDBON | TWL4030_LED_LEDEN_LEDAON

Quoted 3 lines

+ ? ? ? ? ? ? ? break;
+ ? ? ? default:
+ ? ? ? ? ? ? ? twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);

Quoted 6 lines
Quoted 4 lines

and, this should be TWL4030_LED_LEDEN_LEDBON

Am I correct?

LEDA & LEDB are active low Open Drain outputs so enabling LEDAON bit in LEDEN means LEDA output is at low level.

Thanks for resolving that mystery. ?I just figured out what I thought it should be by looking at the previous default, which should be the new default as well with only XM_A and XM_B are different.

Quoted 7 lines

Eric
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot