AnsweredAssumed Answered

Gpio interrupt and Wifi wakeup with IMX7D

Question asked by Matti Sillanpää on Jun 26, 2018
Latest reply on Jun 26, 2018 by igorpadykov

Hi.

 

 

I've looked at tons of thread about this regarding IMX6 and I think I've got the device tree configured. Should the IMX7 be different somehow to IMX6? I cannot get the system to wake up from gpio interrupt.

 

I've added gpio_keys group in device tree and added gpio muxings to iomuxc in dts-file like this:

    gpio-keys {
    compatible = "gpio-keys";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_gpio_keys>;

    wakeup {
        label = "WakeUp";
        gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
        linux,code = <KEY_HOME>;
        gpio-key,wakeup;
    };
    volume-up {
        label = "Volume Up";
        gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
        gpio-key,wakeup;
        linux,code = <KEY_VOLUMEUP>;
    };

    volume-down {
        label = "Volume Down";
        gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
        gpio-key,wakeup;
        linux,code = <KEY_VOLUMEDOWN>;
    };
    };

....

&iomuxc {
    pinctrl-names = "default";

    imx7d-pico {
        pinctrl_gpio_keys: gpio_keysgrp {
            fsl,pins = <
                 MX7D_PAD_EPDC_DATA05__GPIO2_IO5    0x1b000
                 MX7D_PAD_EPDC_DATA03__GPIO2_IO3    0x1b000
                 MX7D_PAD_EPDC_DATA00__GPIO2_IO0    0x1b000
                >;
        };

****************

On device I've set the device to low power mode with:

echo standby > /sys/power/state
After this i've tried to toggle the affected gpio, but the device doesn't wake up.

I can see the added group in the filesystem (gpio_keys) with the gpio's listed underneath on the device once booted with new kernel.
And how about wifi network wakeup? I've heard that that's a thing too. We would like to use VoIP with this with either incoming call wakeup or waked by button.

Outcomes