mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-17 09:41:09 +02:00
riscv: sophgo: dts: add power key for pioneer box
There is a power button on the front panel of the pioneer box. Short pressing the button will trigger the onboard MCU to notify SG2042 through GPIO22 to enter the power-off process. Signed-off-by: Chen Wang <unicorn_wang@outlook.com> Link: https://lore.kernel.org/r/12e65a99f1b52c52b7372e900a203063b30c74b5.1728350655.git.unicorn_wang@outlook.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
|
||||
#include "sg2042.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Milk-V Pioneer";
|
||||
compatible = "milkv,pioneer", "sophgo,sg2042";
|
||||
@@ -12,6 +15,18 @@
|
||||
chosen {
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
gpio-power {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
key-power {
|
||||
label = "Power Key";
|
||||
linux,code = <KEY_POWER>;
|
||||
gpios = <&port0a 22 GPIO_ACTIVE_HIGH>;
|
||||
linux,input-type = <EV_KEY>;
|
||||
debounce-interval = <100>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cgi_main {
|
||||
|
||||
Reference in New Issue
Block a user