PWR_BUT function with power capes

Hello list;

As promised, I am getting back with the results of my power cape design testing.

  1. It appears that external 5V power (VDD_5V) does NOT power up the console FTDI chip. It is powered ONLY by the PC.

  2. This means that although the Bone is powered, the PC will never see it !

  3. This is important because it means that you have to switch both the external 5V and the USB red wire at the same time *.

  4. This requires a DPDT switch with one side switching the external 5V and the other side switching the USB 5V.

*Note: It may be necessary to turn on the external 5V before the USB 5V. More testing is needed.

Also there may be noise issues to deal with regards to breaking into the USB cable to cut the red wire.

As for what the PWR_BUT signal does:

  1. It acts like the smart switch on your PC or laptop (sort of).

  2. Once the DPDT power switch is on, and both rails are supplying the Bone:

  3. Pressing and holding the signal to ground for about 10sec will power down the Bone.

  4. Pressing it again, briefly, will turn the Bone back on.

Bottom line, it wasn’t as easy as “just cutting the red wire” if only !


Pressing the PWR_BUT switch momentarily will trigger the TPS65217 to
pull the nNMI interrupt line on the am335x and log the interrupt source
(the power button) in the TPS registers. If you read the status
register in the TPS right away, you'll even see that the button is
currently down. Upon reading the interrupt register the interrupt
register will be cleared and the status read will show why the interrupt
line was pulled by the TPS.

In this way, you can have power button functionality like your desktop
PC where pressing the power button causes a clean shutdown. A good way
to do this is to have the PWR_BUT issue KEY_POWER key press.

Holding the PWR_BUT for 8 seconds will turn off all power rails on the
TPS65217 which will result in an unclean shutdown of Linux (aka: like
you pulled the plug out of the wall on your desktop PC).

The TPS65217 will pull the interrupt line for PWR_BUT pressed down,
being released, AC going away, AC coming present, USB power going
away, and USB power coming present. Depending on what you want to do
when each of these things happen, you can have a kernel module react to
them. See [1] for my hack.


For the gory details of the TPS65217, see [2].



Thanks Andrew, I'll look into it.