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.

GPIO context during "suspend" (deepsleep0)



Hi,
I find this patch-description for the evm-module a bit confusing:
• WLAN_EN moved from GPIO1_16 to GPIO3_16 as GPIO1_16 is losing context during suspend
http://processors.wiki.ti.com/index.php/WL18xx_Adding_WoWLAN

In the AM335x datasheet, "8.1.11 Device Modules and Power Management Attributes List",
Only GPIO_0 is part of the PD_PER power domain while using the deepsleep0 mode.

I would assume moving the wilink enable-pin from gpio1_* to gpio0_* ?
andby the way, when the wiki refers to "suspend", which sleep-mode is the text refering to!?


Related:
I assume pinmux/padconf can keep it's pu or pd regardless of gpio bank. So this will only fail to work if we would have external pull-up/down's that would need to be overridden or control via mosfet's (say for level translators).


  • Hi Biser,

    The question is more AM335x specific than WL1x as I'm seeing this as an "active high" pin for controlling an external IC's ENable pi or gate on a transistor during deepsleep0.

    The patch I'm refering to has only to do with an errata for the AM335x eval-board during suspend loosing it's context. 

    I think it would be great if we could see an answer here.

    best David

  • Hi David,

      I too faced similar problem, i solved this problem by re-configuring GPIOs which are losing context 

    when system goes to deep sleep mode. 

      exporting the gpio and setting the direction in /sys/class/gpio/  folder  when system is coming out  from deep sleep mode

    Rajeev battu

  • Hi Rajeev,

    Thanks for reply. I wonder if someone can guide me to how you are "supposed" to do this under linux.

    Normally you have your pinmux config setup during early boot, but I assume there are places to put this so it can also survive a suspend (deepsleep0) to resume operation. 

    Any guidance much appreciated.

    /David

  • Hi David,

      In TI kernel itself there is built in functionality by which one can set the pins to retain pins context  after Suspend/Resume. You can get it in arch/arm/mach-omap2/mux33xx.c 

    By using am335x_save_padconf() & am335x_restore_padconf(). 

    Rajeev

  • Hi,

    Checking in on this old thread. I've been looking around to find some wiki / documentation around this subject in the 3.12 Kernel.

    I can see another mechanis in the .dts (am43xx_pinmux) for the new AM43xx dev-kits where wake/sleep (DS0) pin-states are defined, while under AM335x I can't find where this is done.

    Any guidance would be much appreciated

    Thanks David