Jump to content

Odroid C4 GPIO IRQ wakeup


Genna

Recommended Posts

So as we know, the Hardkernel kernel did support powering the device on and off via a GPIO pin. This does not seem to work on Armbian with the mainline kernel. What does work is powering the device on and off with the remote control. So I wonder, what has to be done to enable power on and off vie the GPIO? My approach till now makes it possible to shutdown the device via GPIO interrupt. But then it will not come up again except if I reconnect the power cord or use the remote. I use this user device three overlay btw:

 

/dts-v1/;
/plugin/;
/{
		fragment@0 {
                target = <&ao_pinctrl>;
                __overlay__ {
                        power_btn_port:power_btn_port {
                                mux {
                                        groups = "GPIOAO_10";
                                        function = "gpio_periphs";
                                        bias-pull-up;
                                        output-high;
                                };
                        };
                };
        };

        fragment@1 {
                target-path = "/";
                __overlay__ {
                        gpio_keys:gpio_keys {
                                compatible = "gpio-keys";
                                power_btn:power_btn {
                                        label = "POWER BUTTON";
                                        linux,code = <116>;
                                        gpios = <&gpio_ao 10 0>; //GPIOAO_10
                                        interrupt-parent = <&gpio_intc>;
                                        interrupts = <10 3>;
                                        wakeup-source;
                                };
                        };
                };
        };
};

 

I've tried with the default pin as well (GPIOX_4) but with the same result. The hope was that the AO domain would do some magic like with the remote but no dice. Also the 'wakeup-source' seems to be ignored by the system as 'cat /sys/kernel/irq/*/wakeup' prints 'disabled' for all IRQ's.

 

So, any ideas besides dissembling the remote and some solider works from the power button on the chassis to the IR IC to make it part of the final device? This would be very Frankenstein'ish just have a power button.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines