This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Kernel Halt + Am335x + Android + System power off

Other Parts Discussed in Thread: AM3359

Hello All,

I have a custom board with an am3359 running custom code based off the TI-Android-JB-4.2.2-DevKit-4.1.1 sdk.   When I 'adb shell' into the device and run command 'reboot -p'  the device/screen will freeze - but it will still be powered on.  I see that the kernel/kernel/sys.c kernel_halt() is executed, but this isnt enough to fully power down the device.

Similarly, if I let the mBatteryLevel run down far enough in the frameworks/base/services/java/com/android/server/BatteryService.java -  the
shutdownIfNoPowerLocked() method will execute the ACTION_REQUEST_SHUTDOWN intent, which ultimately does the same thing as the 'reboot -p' command ( executes the kernel_halt() function inside kernel/kernel/sys.c ).

How do I get the device to completely shutdown (on both an ACTION_REQUEST_SHUTDOWN and a 'reboot -p' )...?  In other words, how to I get the kernel_halt() function to completely turn off the device?

Thanks in advance!

PMIC I'm using is the TPS65910A3

-Jake

am335x, Android, BatteryService.java, mBatteryLevel, system power off

  • Hi Jake,

    can you reproduce this behavior on one of the reference platforms? Unfortunately we cannot support custom designs.
    Some indication you might want to check:

    - you need to do a poweroff rather than just a halt in order to have the power turrned off
    - poweroff will fallback to halt if the pm_power_off function is not declared by anybody (platform or driver)
    - try to check if the pm_power_off is declared for your platform
    - if it is declared, then does it rely on the PMIC you are using, or on another one.
    - if it is not declared, then try to see if your PMIC driver provides it
    - if it is not provided, try to implement it manually and register it
    - check also the hardware connection:
    - how is your PMIC is connected to your platform
    - is there a pin that tells the PMIC to shutdown and is it connected to the am335x correctly (active high? active low?)
  • Adeneo Embedded Support Team,


    Excellent advice - I basically had to implement my own pm_power_off - wherein I tell the device's PMIC to power the device down.

    Thanks!

    -Jake

  • Hi Jake,

    Could you share your pm_power_off implementation, please?

    Regards,
    - Sodkhuu