mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ODROID-N2: overlay: add shutdown via GPIO
This commit is contained in:
@@ -13,7 +13,8 @@ dtbo-y += \
|
||||
uart0.dtbo \
|
||||
uart1.dtbo \
|
||||
w1-gpio_p15.dtbo \
|
||||
w1-gpio_p22.dtbo
|
||||
w1-gpio_p22.dtbo \
|
||||
gpio-poweroff.dtbo
|
||||
|
||||
targets += $(dtbo-y)
|
||||
always-y := $(dtbo-y)
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&periphs_pinctrl>;
|
||||
|
||||
__overlay__ {
|
||||
shutdown_gpio_pins: shutdown-gpio-state {
|
||||
mux {
|
||||
groups = "GPIOX_3";
|
||||
function = "shutdown";
|
||||
output-disable;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <4000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target-path = "/soc";
|
||||
|
||||
__overlay__ {
|
||||
shutdown_gpio: shutdown_gpio@3 {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <10>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&shutdown_gpio_pins>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
shutdown {
|
||||
label = "shutdown";
|
||||
linux,code = <116>;
|
||||
gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <100>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user