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.

AM335x Linux SDK : "GPIO0" wake from suspend

Other Parts Discussed in Thread: TMDXEVM3358

In both these web pages:

http://processors.wiki.ti.com/index.php/AM335x_Power_Management_User_guide

http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Power_Management

it is mentioned that wakeup from suspend using "GPIO0" (and UART0 and Touchscreen) is supported, but there are no specifics that I can find.

In the latter of the two links, it even lists example lab steps for UART0 and Touchscreen, but not for GPIO0.

"GPIO0" is an entire bank of GPIO pins, many of which are already configured for functions other than GPIO.  So, clearly, it would seem that it isn't any GPIO0 pin that can wake from suspend.

Moreover, one would presumably need to specifically configure particular GPIO0 pins to be GPIO inputs and enable those to act as a wake source.

Is there a specific example of using a GPIO0 pin to wake from suspend?

Thanks.

  • Peter,

    On the AM335x EVM, a couple of push buttons come under GPIO0 bank and wakeup has been tested using these. You are right in saying that the pins will need to be appropriately configured. Have a look at the matrix-keyboard related code in the kernel or the Starterware DeepSleep examples to check the configuration needed for getting GPIO wake to work.

    Regards,

    Vaibhav

  • Thanks, Vaibhav.  It doesn't tell me what TI's plans are for its Linux kernel code or where such code would need to be added to TI's Linux code, but it definitely helps point me in the right direction if I have to resort to writing it all myself.

    Just an FYI for someone looking for the same information as myself, the following might save you a few hours of work:

    The "couple of push buttons" that Vaibhav refers to appear to be SW9 "AUD_VOLUMEUP" (and SW10) on the AM335X EVM daughterboard.  These are signals buffered by some Altera PLDs.  (I haven't yet found the HDL to confirm pin mappings, but TIs testing seems to have been done with GPIO0_2 per the Wiki links below.)

    The schematics for the "Daughter Board" and "Baseboard" are here:

    http://www.ti.com/tool/tmdxevm3358#Technical%20Documents

    Various TI Wiki pages make reference to the SW9 pushbutton in regards StarterWare code to wake from GPIO0:

    "gpio0_2-SW9"
    http://processors.wiki.ti.com/index.php/AM335x_StarterWare_Power_management
    "GPIO0_2 (Push Button SW9 on the AM335x EVM)"
    http://processors.wiki.ti.com/index.php/StarterWare_02.00.00.06_User_Guide

    The StarterWare package can be downloaded here:

    http://processors.wiki.ti.com/index.php/StarterWare

    There is some documentation on the power management handshaking (as manifested by the StarterWare example code) between the main A9 core and the Cortex-M3 here:

    http://processors.wiki.ti.com/index.php/AM335x_StarterWare_Power_management

    The corresponding code appears to be in this path inside the StarterWare install:

    ~/ AM335X_StarterWare_02_00_00_06 /examples/evmAM335x/demos/demoPwrMgmnt.c

    Part of the Linux equivalent *may* be in:

    ~/ti-sdk-am335x-evm-05.04.01.00/board-support/linux-3.2-psp04.06.00.07.sdk/arch/arm/mach-omap2/pm33xx.c

    and the "matrix-keyboard related code" Vaibhav refers to is probably what is found in:

    ~/ti-sdk-am335x-evm-05.04.01.00/board-support/linux-3.2-psp04.06.00.07.sdk/arch/arm/mach-omap2/board-am335xevm.c