Power down a battery backed up BeagleBone Black

I am looking to fully power down a battery backed beaglebone black running debian distro.

Looking through the TRM and TPS65217 document it appears that I can power device OFF (as opposed to SLEEP) by setting bit 7 in TPS65217 Status register and then causing PWE_EN pin to go low.

Only way (under software control) that I can see to do this is via setting ALARM2 in RTC registers and setting POWER_ENABLE_EN bit (also referred to in thread https://groups.google.com/forum/#!searchin/beagleboard/PMIC_POWER_EN/beagleboard/K7DuusrJ6G4/ln4so6f0Vj4J)

Makes sense, i2c control of TPS65217 is easy but I don’t see how to write to RTC registers from user space.

I’d appreciate any pointers - is it possible using device tree overlay, as I see promising looking end points in /sys/devices/ocp.3/44e3e000.rtc/power

Thanks
Colin

Any reason you just can't call "sudo halt"? As that will shutdown the
board completely including having the pmic shut things down.

Regards,

I haven’t tried halt command but have tried shutdown -h -P now, I assume these are the same.

I am able to shut the board down but the LCD4 Cape that I am using (from CircuitCo) stills lit which is besides the power drain is not desired as a device that is shutdown should be shut down as far the as end user is concerned - now it just looks broken.

I suspect that shutdown is not ‘OFF’ and am hoping that using settings described will work - I was actually hoping for a quick proof of concept to check as I am not sure that this will work - I suspect it will as this is what I understand pushing the power down button essentially does - sadly in my case, the power button is not exposed to end user.

I haven’t tried halt command but have tried shutdown -h -P now, I assume these are the same.

I am able to shut the board down but the LCD4 Cape that I am using (from CircuitCo) stills lit which is besides the power drain is not desired as a device that is shutdown should be shut down as far the as end user is concerned - now it just looks broken.

I suspect that shutdown is not ‘OFF’ and am hoping that using settings described will work - I was actually hoping for a quick proof of concept to check as I am not sure that this will work - I suspect it will as this is what I understand pushing the power down button essentially does - sadly in my case, the power button is not exposed to end user.

Power Button is also on P9 Pin 9. BTW, sudo halt powers off all power rails and is functionally equivalent to holding the power button for 10 seconds. If your LCD backlight is still on, then it is powered from the 5V rail because all other power rails are off.

Regards,
John

Several observations.

When pressing power button or executing halt instruction, processor does shutdown but the voltage rails SYS_5V and VLD02 don’t (I didn’t check VLDO01). VLDO2 does drop to less than 2V but appears to still be enough to trigger U4 TL5209’s enable pin thus switching SYS_5V to VDD_3V3B. This to me doesn’t look right, this level (VLD02) should either be asserted or negated and not in between levels.

Powering up with just battery and no 5V (not pressing any buttons) shows SYS-5V active high (5V) and VLD02 at expected 0V.

Looks to me like there is a power switching problem although fixing this still won’t fix the issue I am having as I want to totally switch off LCD4 which is using SYS_5V for backlight. I am not sure from the tech notes if it’s possible or not to switch off SYS_5V voltage (Pins 7.8 SYS1/SYS2 on TPS65217C).

If one can’t then my question to LCD module supplier/manufacturer is how did they intend us to shut device down with a battery connected.

~C

Several observations.

When pressing power button or executing halt instruction, processor does shutdown but the voltage rails SYS_5V and VLD02 don’t (I didn’t check VLDO01). VLDO2 does drop to less than 2V but appears to still be enough to trigger U4 TL5209’s enable pin thus switching SYS_5V to VDD_3V3B. This to me doesn’t look right, this level (VLD02) should either be asserted or negated and not in between levels.

Yep, you are right, the SYS_5V remains on after a sudo halt or pressing the PB for more than 8 seconds. Since the 3V3B is derived and enabled from the SYS_5V, it also remains powered. Looks like we need to also turn off the AC_EN and USB_EN bits in the PPATH register on the TPS65217C PMC. I’ve copied both Robert and Gerald to see if this is something they want to fix.

Regards,
John

From: Colin Bester <bester.colin@gmail.com>
Reply-To: “beagleboard@googlegroups.com” <beagleboard@googlegroups.com>
Date: Tuesday, June 24, 2014 at 8:14 AM
To: “beagleboard@googlegroups.com” <beagleboard@googlegroups.com>
Subject: Re: [beagleboard] Power down a battery backed up BeagleBone Black

Several observations.

When pressing power button or executing halt instruction, processor does shutdown but the voltage rails SYS_5V and VLD02 don’t (I didn’t check VLDO01). VLDO2 does drop to less than 2V but appears to still be enough to trigger U4 TL5209’s enable pin thus switching SYS_5V to VDD_3V3B. This to me doesn’t look right, this level (VLD02) should either be asserted or negated and not in between levels.

Yep, you are right, the SYS_5V remains on after a sudo halt or pressing the PB for more than 8 seconds. Since the 3V3B is derived and enabled from the SYS_5V, it also remains powered. Looks like we need to also turn off the AC_EN and USB_EN bits in the PPATH register on the TPS65217C PMC. I’ve copied both Robert and Gerald to see if this is something they want to fix.

Thinking about this some more, this isn’t going to work. Not sure how to fix the problem you have.

Regards,
John

Hi, I want to read TPS65217 Status register after an interrupt is issued on PMIC_INT pin in beaglebone black in order to find when BBB has lost dc power and powers from battery. How can I read registers via i2c?! Which file should I modify in debian files!?!