Unable to wake up from standby mode

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

JulienTourteau
Posts: 2
Joined: Wed Jan 08, 2020 5:36 pm

Unable to wake up from standby mode

Wed Jan 08, 2020 7:30 pm

Hi,

I'm currently trying to implement standby/wakeup functionnality for a custom board with an ATSAMA5D27.

The Linux OS is made using buildroot 2017.08 and is based on kernel 4.9.87 with linux4sam patches.

I'm able to put the OS into standby mode as follow :

Code: Select all

root@linux:~# echo standby > /sys/power/state 
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
Now I would like to wake up using the gpio PD20 at high level.

I've added the following blocks into the device-tree in order to define PD20 as wakeup-source

Code: Select all

[...]
	pinctrl_key_gpio_default: key_gpio_default {
		pinmux = <PIN_PD20__GPIO>;
		bias-pull-down;
	};
[...]
	gpio_keys {
		compatible = "gpio-keys";

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_key_gpio_default>;

		bp1 {
			label = "PB_USER";
			gpios = <&pioA PIN_PD20 GPIO_ACTIVE_HIGH>;
			linux,code = <0x104>;
			wakeup-source;
		};
	};
[...]
I can see the gpio value going from low level to high level from Linux sysfs, however Linux doesn't wake up on rising edge.

Does anybody have a clue about why Linux doesn't wake up on rising edge on PD20 ?

Thanks.

Regards,
Julien Tourteau
blue_z
Location: USA
Posts: 2117
Joined: Thu Apr 19, 2007 10:15 pm

Re: Unable to wake up from standby mode

Fri Jan 10, 2020 4:56 am

JulienTourteau wrote: I'm currently trying to implement standby/wakeup functionnality for a custom board with an ATSAMA5D27.
...
Now I would like to wake up using the gpio PD20 at high level.
...
Does anybody have a clue about why Linux doesn't wake up on rising edge on PD20 ?
Not me.
FWIW using Linux 4.14.73-linux4sam_6.0 on a SAMA5D2C-XULT and your DT properties, I can get pin PD20 (when shorted to a logic high) to wake up the board.

Regards
blue_z
Location: USA
Posts: 2117
Joined: Thu Apr 19, 2007 10:15 pm

Re: Unable to wake up from standby mode

Wed Jan 22, 2020 2:00 am

Perhaps these application notes have pertinent information:
AN_2896: SAMA5D2 Low-Power Modes Implementation and
AN_2836: Powering SAMA5D2 with ActivePMU PMICs

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest