7.1 Host Wake-up
When
the host is in Suspend mode, the controller wakes up the host on certain events using
the wake-up GPIO available on the host board. The wake-up GPIO can be identified using
the following:
- If the host is using SDIO bus with in-band interrupt, WILC will use a separate interrupt line through the IRQ to wake-up the host.
- If the host is using SDIO bus with out of band interrupt, or SPI bus, IRQ line will be used by both the buses to indicate new event to the host, and to wake up the host if it is in Suspend mode. For more information on how to configure the host's GPIO number connected to ATWILC's IRQ pin, refer 4.5 General Purpose IOs.
The example below shows how to configure the GPIO on PC27 as the wake-up
GPIO for the SAMA5D4 by modifying the at91-sama5d4_xplained.dts
file
(dts file) as follows:
Modify the pinctrl@fc06a000
block, the underlined
text, to define PC27 as a GPIO:
pinctrl@fc06a000 {
board {
pinctrl_key_gpio1: key_gpio_1 {
atmel,pins =
<AT91_PIOC 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
}; }; };
Where, pinctrl@fc06a000
is a part of “apb” block which
itself is a part of “ahb” block.
Then, modify the gpio_keys
block, underlined text to
define PC27 as an active-high wake-up GPIO:
gpio_keys { compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_key_gpio>;
pinctrl-1 = <&pinctrl_key_gpio1>;
pb_user1 {
label = "pb_user1";
gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
linux,code = <0x100>;
gpio-key,wakeup; };
pb_suspend_resume_wakeup {
label = "pb_suspend_resume_wakeup";
gpios = <&pioC 27 GPIO_ACTIVE_HIGH>;
linux,code = <0x100>;
gpio-key,wakeup;}; };