]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - src/arm64/rockchip/rk3399-puma-haikou.dts
Squashed 'dts/upstream/' changes from aaba2d45dc2a..b35b9bd1d4ee
[thirdparty/u-boot.git] / src / arm64 / rockchip / rk3399-puma-haikou.dts
index 115c14c0a3c68c44be5c2ed1dc772c5d1496910b..18a98c4648eae78cf927a848f9ba8e4f0b4cfdc5 100644 (file)
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 #include "rk3399-puma.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
        model = "Theobroma Systems RK3399-Q7 SoM";
                stdout-path = "serial0:115200n8";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-0 = <&haikou_keys_pin>;
+               pinctrl-names = "default";
+
+               button-batlow-n {
+                       gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
+                       label = "BATLOW#";
+                       linux,code = <KEY_BATTERY>;
+               };
+
+               button-slp-btn-n {
+                       gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
+                       label = "SLP_BTN#";
+                       linux,code = <KEY_SLEEP>;
+               };
+
+               button-wake-n {
+                       gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>;
+                       label = "WAKE#";
+                       linux,code = <KEY_WAKEUP>;
+                       wakeup-source;
+               };
+
+               switch-lid-btn-n {
+                       gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+                       label = "LID_BTN#";
+                       linux,code = <SW_LID>;
+                       linux,input-type = <EV_SW>;
+               };
+       };
+
        leds {
                pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
 
 };
 
 &pinctrl {
-       pinctrl-names = "default";
-       pinctrl-0 = <&haikou_pin_hog>;
-
-       hog {
-               haikou_pin_hog: haikou-pin-hog {
+       buttons {
+               haikou_keys_pin: haikou-keys-pin {
                        rockchip,pins =
                          /* LID_BTN */
                          <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
                          <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
                          /* SLP_BTN# */
                          <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
-                         /* BIOS_DISABLE# */
+                         /* WAKE# */
                          <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };