Problems powering off Beagleboard xM with TPS65950.

Hi, we have a Beagleboard xM and we are trying to power it off using
the TPS65950.

For that purpose, we set the bit DEVOFF of register P1_SW_EVENTS to 1
with the following command:

i2cset -f 1 0x4b 0x46 0x01

However we are experiencing the following issue:

when we enter the previous command, sometimes the board will reset
instead of power off, and the behavior seems completely random.

Do you know what could be the problem here?

Thank you.

PD: I've been redirected here from TI forums. See the whole post here:
http://e2e.ti.com/support/power_management/pmu/f/43/p/105120/375495.aspx#375495

Before setting the bit, are you turning off the rest of the power on the board?

Gerald

What do you mean by "the rest of the power on the board"?
Do you mean that I should turn off all supply branches of TPS65950
except the ones which power the DM3730?

Thanks.

I mean the regulator that controls the 3.3V to the UART and the DVI. I mean the 3.3V regulator that controls the power to the USB hub. These are not controlled by turning of the TPS6950. If you want to power down the board, these two must be turned off first. Otherwise circuitry on the board would still be powered while trying to power down the processor.

Gerald

Hi,
I’ve applied the following patch to kernel 2.6.38 following your advice of powering off UART, DVI and USB before turning off the PMIC:

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index abf87d1…135f8e4 100644
— a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -610,6 +610,17 @@ static struct omap_musb_board_data musb_board_data = {
.power = 100,
};

+static void beagle_power_off(void)
+{

  • if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
  • gpio_direction_output(OMAP_MAX_GPIO_LINES + 2, 0); /* LDO (DVI, serial, led…) off */
  • gpio_direction_output(OMAP_MAX_GPIO_LINES + 1, 1); /* nDVI_PWR_EN off */
  • gpio_direction_output(OMAP_MAX_GPIO_LINES + TWL4030_GPIO_MAX, 0); /* nEN_USB_PWR off */
  • twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0x01, TWL4030_PM_MASTER_P1_SW_EVENTS);
  • while(1);
  • }
    +}

Do you think this is the same problem of watchdog?

see this:
http://groups.google.com/group/beagleboard/browse_thread/thread/abf4321ceae306d/d4307d87f3863e9b?hl=en&lnk=gst&q=watchdog#d4307d87f3863e9b

It doesn't seem so. In my case, the board is reset instead of powered
off.
Hasn't anybody try to power off the board this way?
Do you see something wrong this patch?

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
index abf87d1..135f8e4 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -610,6 +610,17 @@ static struct omap_musb_board_data
musb_board_data = {
        .power = 100,
};

+static void beagle_power_off(void)
+{
+ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+ gpio_direction_output(OMAP_MAX_GPIO_LINES + 2, 0); /*
LDO
(DVI, serial, led...) off */
+ gpio_direction_output(OMAP_MAX_GPIO_LINES + 1, 1); /*
nDVI_PWR_EN off */
+ gpio_direction_output(OMAP_MAX_GPIO_LINES +
TWL4030_GPIO_MAX, 0); /* nEN_USB_PWR off */
+ twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0x01,
TWL4030_PM_MASTER_P1_SW_EVENTS);
+ while(1);
+ }
+}