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.

AM625: SDK 08.06: Wake up from deep sleep using GPIO

Part Number: AM625

Has TI gotten gpio wake up working yet?

I setup MCU_GPIO0_0 as a wake up pin and re-enabled the cbass_mcu node in the lpmdemo device tree.  However when I try to sleep, gpio-keys fails to setup the gpio as a wakeup source...

	gpio-keys {
		compatible = "gpio-keys";

		power {
			label = "Wake";
			gpios = <&mcu_gpio0 0 GPIO_ACTIVE_HIGH>;
			linux,code = <KEY_WAKEUP>;
			debounce-interval = <20>;
			wakeup-source;
		};
	};
	
	
&cbass_mcu {
	status = "okay";
};

root@mitysom-am62x:~# rtcwake -s 5 -m mem
rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Apr 14 20:26:38 2023
[  127.498656] PM: suspend entry (s2idle)
[  127.503207] Filesystems sync: 0.000 seconds
[  127.514880] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  127.523927] OOM killer disabled.
[  127.527192] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  127.682709] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[  127.699793] gpio-keys gpio-keys: failed to configure IRQ 264 as wakeup source: -6
[  127.707432] PM: dpm_run_callback(): platform_pm_suspend+0x0/0x80 returns -6
[  127.714471] PM: Device gpio-keys failed to suspend: error -6
[  127.720207] PM: Some devices failed to suspend, or early wake event detected
[  127.728909] PM: dpm_run_callback(): platform_pm_resume+0x0/0x80 returns -19
[  127.736082] PM: Device 4210000.interrupt-controller failed to resume: error -19
[  127.743629] PM: dpm_run_callback(): platform_pm_resume+0x0/0x80 returns -19
[  127.750715] PM: Device bus@f0000:interrupt-controller@a00000 failed to resume: error -19
[  127.768054] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
[  127.790575] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:03] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[  127.801693] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
[  127.821518] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:04] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[  127.832600] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
[  127.859470] usb-conn-gpio usb_microb_connector: repeated role: 2
[  127.991723] OOM killer enabled.
[  127.994902] Restarting tasks ... done.
[  128.000717] PM: suspend exit

Also is it possible to use the EXTINTn pin to wake up the SOC?

  • Hi Jonathan,

    I didn't look into why setting gpio-keys failed with your dts change, not sure if it is due to missing the gpio pinmux.

    However, GPIO wakeup is not supported in the current SDK (8.6) yet. The software dev team is still working on implementing this feature.

    I think EXTINTn pin can be used to wake up, using daisychain configuration. Again, daisychain wakeup is not supported in current SDk either.

  • Thanks Bin.

    Any estimate on when GPIO wakeup will be supported?  This is required to have a working Android power button which can sleep/wakeup the device.

    I think EXTINTn pin can be used to wake up, using daisychain configuration. Again, daisychain wakeup is not supported in current SDk either.

    Could you point me to some reference on what daisychain configuration is related to sleep mode?  I'm not familiar with this terminology.

  • Also is UART wakeup supported yet?

  • Hi Jonathan,

    Sorry for my late response.

    GPIO wakeup will be supported in the next Processor SDK (v9.0), which is planned to be release in July this year.

    The usage of I/O daisychain wakeup and GPIO wakeup won't be much different, driving the pin high or low would trigger a wakeup event and wake up the system. Just the wakeup event paths underneath are different. There will be documentation or reference code in the SDK showing how to use both wakeup methods.

    UART wakeup is not supported in SDK8.6 yet. It will be supported in SDK9.0 too. I believe only WKUP_UART0 is capable to wake up, not any of the MAIN domain uart.

  • Alright thank you for the response.

    Sorry to hear that the 9.0 kirkstone release is so many months away though.

  • Hi Jonathan,

    Yes the development cycle for every first SDK of a major version jump (X.0) is longer than other SDK dot releases, since it has to cover the component migration (U-Boot to 2023.1, kernel to 6.1, yocto to kirkstone, etc), plus new feature development and bug fixes, etc.

  • Yeah makes sense.  Was hoping to update most of our documentation to the new kirkstone build flow before most of our customers would start getting hardware. But probably doesn't matter anyways since 9.0 isn't going to support the GP parts and we will have hundreds of them...

    Also have reported several documentation and kernel bugs over the past few months and been told they wouldn't be released until the next SDK, never guessed that would be months away.

  • Hi Jonathan,

    I believe the SDK9.0 will still support AM62x GP, but the GP device support will be dropped in SDK9.1.