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.

Am335x wakeup from GPIO0x



Hello,

i am wondering if it is possible to configure a normal gpio in dts to expose '"wakup"-Field in Sysfs (/sys/class/gpio/gpioX/power/wakeup).


i have tried as follow:

#include "am33xx.dtsi"

/ {
    run_suspend {
        gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
        pinctrl-0 = <&run_suspend_key>;
        pinctrl-names = "default";
    };
};


&am33xx_pinmux {
        pinctrl-names = "default";
        pinctrl-0 = <&clkout2_pin>;

    run_suspend_key: run_suspend_key {
            pinctrl-single,pins =
        <0x150 (PIN_INPUT_PULLDOWN | WAKEUP_EN | MUX_MODE7)>;
    };
};


but still the gpio (GPIO0_2) is not expossed, and if i export it manually the wakeup-flag is not there??

how can i enable Wakeup-flag through DTS???

thanks

  • In Processor SDK 2.00, I see the following:

    gpio_keys: volume_keys@0 {
    compatible = "gpio-keys";
    #address-cells = <1>;
    #size-cells = <0>;
    autorepeat;

    switch@9 {
    label = "volume-up";
    linux,code = <115>;
    gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
    gpio-key,wakeup;
    };

    switch@10 {
    label = "volume-down";
    linux,code = <114>;
    gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
    gpio-key,wakeup;
    };
    };

    The pin mux registers themselves do not have a "wakeup" bit. That's inside the GPIO peripheral itself.
  • till now i used always gpio-keys for such a thing BUT the only problem with gpio-Keys is the fact that they are processed in a Kernel-Worker, which is a bit problematic in RT-Linux when there are several RT-Tasks (SCHED_FIFO) with heigher Prio than the gpio-key-worker, which leads to the fact that gpio-keys will not be updated under heavy cpu-usage.

    I know that the AM335x supports wakup from GPIO0, so why should not be possible to have a normal gpio in dts ith wakup-bit enabled???