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.

PROCESSOR-SDK-AM335X: GPIO(0-3) Bank as Wakeup Source from Standby Mode

Part Number: PROCESSOR-SDK-AM335X

Hello All,

I am trying to test the standby mode feature in TI SDK 07.03.00.005 , linux version 5.4.106

To enter standby mode I have executed the following command

echo standby > /sys/power/state

I am able to successfully enter standby mode,

I am able to wake up from standby mode using GPIO0, UART

I am facing issue in waking up from standby mode using GPIO2 bank

I have attached the device tree configuration done for GPIO buttons below

Any device tree configurations need to be added? Please help

Thanks & Regards,

Anjana

	gpio_buttons: gpio_buttons0 {
                compatible = "gpio-keys";
                 #address-cells = <1>;
                #size-cells = <0>;
				pinctrl-names = "default";
				pinctrl-0 =  <&gpio_keys_s0>;

                switch1 {
                         label = "button0";
                         linux,code = <0x100>;
                         gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
						 interrupt-parent = <&gpio2>;
						 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
						 debounce-interval = <10>;
			             wakeup-source;
                        };

                 switch2 {
                        label = "button1";
                        linux,code = <0x101>;
                         gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
						interrupt-parent = <&gpio2>;
						interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
						debounce-interval = <10>;
						wakeup-source;
					   };

                 switch3 {
                         label = "button2";
                        linux,code = <0x102>;
                        gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
						interrupt-parent = <&gpio0>;
						interrupts = <30 IRQ_TYPE_LEVEL_HIGH>;
						debounce-interval = <10>;
                        wakeup-source;
                        };

              	   switch4 {
                        label = "button3";
                        linux,code = <0x103>;
                        gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
						interrupt-parent = <&gpio2>;
						interrupts = <5 IRQ_TYPE_LEVEL_HIGH >;
						debounce-interval = <10>;
						wakeup-source;
                        };

                 switch5 {
                         label = "button4";
                         linux,code = <0x104>;
                         gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
					     interrupt-parent = <&gpio1>;
			             interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
			             debounce-interval = <10>;
			             wakeup-source;
                         };
         };
		 
		 
gpio_keys_s0: gpio_keys_s0 {
                 pinctrl-single,pins = <
                        AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_INPUT_PULLDOWN, MUX_MODE7)  /* gpmc_oen_ren.    gpio2_3 */
                        AM33XX_PADCONF(AM335X_PIN_GPMC_ADVN_ALE, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_advn_ale    .gpio2_2 */
                        AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLDOWN, MUX_MODE7)    /* gpmc_wait0.gp    io0_30 */
                        AM33XX_PADCONF(AM335X_PIN_GPMC_BEN0_CLE, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ben0_cle    .gpio2_5 */
						AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a0    .gpio1_16 */
                >;
         };

  • Hi Anjana,

    Please check if the following thread is helpful.

    e2e.ti.com/.../linux-am3358-gpio-wake-up-from-standby

  • Hi Bin Liu,

    As per the thread, I have also added the device node property "ti,no-idle", in am33xx-l4.dtsi, but still I am unable to wake up from GPIO2 bank

    Regards,

    Anjana

  • Hi Anjana,

    I just got feedback from our Linux dev team, waking up standby mode using non-0 GPIO banks is never supported in Linux. The "ti,no-idle" as in the mentioned e2e thread is a hack, it breaks other kernel power management functions, not recommended at all.

  • Hi Bin Liu,

    Thank you for your inputs on the issue observed

    But the TRM manual mentions the following related to wake up from standby mode in section 8.1.4.3.2

    "Wakeup in Standby mode is achieved using any GPIO. GPIO
    wakeup is possible by switching the pad to GPIO mode and configuring the corresponding GPIO bank for
    generating an interrupt to the MPUSS. Note that pads that do not have a GPIO muxmode (for example,
    ADC or USB), cannot cause these wakeups. If additional or other wakeup sources are required, the
    associated peripheral module clock and interconnect clock domain should remain enabled (this may
    require the associated PLL to remain locked) and the module must be configured appropriately for wakeup
    by configuring it to generate an interrupt to the MPUSS."

    As per the TRM it mentions that wakeup is possible through any GPIO.Is my understanding correct?

    Please confirm

    Regards,

    Anjana

  • Hi Anjana,

    Yes, the SoC is capable, just the software (Linux kernel) doesn't support it.