ODROID-N2: overlay: add shutdown via GPIO

This commit is contained in:
Mauro (mdrjr) Ribeiro
2024-02-22 15:52:09 -03:00
parent 98edfc1e67
commit f3419660bb
2 changed files with 47 additions and 1 deletions

View File

@@ -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)

View File

@@ -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>;
};
};
};
};
};