treewide: dts: use keycode defines from input dt-binding
[openwrt/openwrt.git] / target / linux / lantiq / dts / WBMR300.dts
index 824efb7cc086625b3e1c0f4a582cc1dac63b0839..54bb98e81a4c012981e4abae38a91fe7e534e519 100644 (file)
@@ -1,22 +1,24 @@
 /dts-v1/;
 
-/include/ "vr9.dtsi"
+#include "vr9.dtsi"
+
+#include <dt-bindings/input/input.h>
 
 / {
        model = "WBMR300 - Buffalo WBMR-300HPD";
 
        chosen {
                bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
+       };
 
-               leds {
-                       boot = &power_g;
-                       failsafe = &diag_r;
-                       running = &power_g;
+       aliases {
+               led-boot = &power_g;
+               led-failsafe = &diag_r;
+               led-running = &power_g;
 
-                       dsl = &dsl;
-                       internet = &router_g;
-                       wifi = &wifi_g;
-               };
+               led-dsl = &dsl;
+               led-internet = &router_g;
+               led-wifi = &wifi_g;
        };
 
        memory@0 {
 
                ifxhcd@E101000 {
                        status = "okay";
-                       gpios = <&gpio 33 0>;
+                       gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
                        lantiq,portmask = <0x3>;
                };
 
                ifxhcd@E106000 {
                        status = "okay";
-                       gpios = <&gpio 33 0>;
+                       gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
                };
        };
 
@@ -79,7 +81,7 @@
 
        gpio_poweroff {
                compatible = "gpio-poweroff";
-               gpios = <&gpio 6 1>;
+               gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
        };
 
        gpio-keys-polled {
 
                power {
                        label = "power";
-                       gpios = <&gpio 5 1>;
-                       linux,code = <0x74>;
+                       gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
                };
 
                reset {
                        label = "reset";
-                       gpios = <&gpio 7 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&gpio 31 1>;
-                       linux,code = <0x211>;
+                       gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_WPS_BUTTON>;
                };
 
                auto {
                        label = "auto";
-                       gpios = <&gpio 48 0>;
-                       linux,code = <0x100>;
-                       linux,input-type = <5>; /* EV_SW */
+                       gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
+                       linux,code = <BTN_0>;
+                       linux,input-type = <EV_SW>;
                };
 
                router {
                        label = "router";
-                       gpios = <&gpio 2 0>;
-                       linux,code = <0x100>;
-                       linux,input-type = <5>; /* EV_SW */
+                       gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+                       linux,code = <BTN_0>;
+                       linux,input-type = <EV_SW>;
                };
        };
 
 
                diag_r: diag_r {
                        label = "wbmr300:red:diag";
-                       gpios = <&gpio 0 0>;
+                       gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
                        default_state = "off";
                };
 
                wifi_g: wifi_g {
                        label = "wbmr300:green:wifi";
-                       gpios = <&gpio 1 0>;
+                       gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
                };
 
                dsl: dsl {
                        label = "dsl";
-                       gpios = <&gpio 4 0>;
+                       gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
                };
 
                router_y: router_y {
                        label = "wbmr300:yellow:router";
-                       gpios = <&gpio 8 0>;
+                       gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
                };
 
                wifi_y: wifi_y {
                        label = "wbmr300:yellow:wifi";
-                       gpios = <&gpio 9 0>;
+                       gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
                };
 
                lan1: lan1 {
                        label = "wbmr300:green:lan1";
-                       gpios = <&gpio 11 0>;
+                       gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                };
 
                wan: wan {
                        label = "wbmr300:green:wan";
-                       gpios = <&gpio 12 0>;
+                       gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
                };
 
                lan3: lan3 {
                        label = "wbmr300:green:lan3";
-                       gpios = <&gpio 15 0>;
+                       gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
 
                lan2: lan2 {
                        label = "wbmr300:green:lan2";
-                       gpios = <&gpio 33 0>;
+                       gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
                };
 
                internet_g: internet_g {
                        label = "wbmr300:green:internet";
-                       gpios = <&gpio 34 0>;
+                       gpios = <&gpio 34 GPIO_ACTIVE_HIGH>;
                };
 
                internet_y: internet_y {
                        label = "wbmr300:yellow:internet";
-                       gpios = <&gpio 35 0>;
+                       gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
                };
 
                router_g: router_g {
                        label = "wbmr300:green:router";
-                       gpios = <&gpio 36 0>;
+                       gpios = <&gpio 36 GPIO_ACTIVE_HIGH>;
                };
 
                power_g: power_g {
                        label = "wbmr300:green:power";
-                       gpios = <&gpio 49 0>;
+                       gpios = <&gpio 49 GPIO_ACTIVE_HIGH>;
                };
        };
 };