Update LED and key nodes with newer DeviceTree bindings for WSR-2533DHP2.
- LED
- use led-[0-9] for node name of LEDs
- add "color" and "function" properties
- drop default-state = "on" from green:power LED
- this LED will be turned on by led-running alias
- key
- drop unnecessary poll-interval property
- use key-[0-9] for node name of keys
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
#include "mt7622.dtsi"
#include "mt6380.dtsi"
#include "mt7622.dtsi"
#include "mt6380.dtsi"
leds {
compatible = "gpio-leds";
leds {
compatible = "gpio-leds";
label = "amber:wireless";
gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
label = "amber:wireless";
gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_WLAN;
- power_amber: power_amber {
label = "amber:power";
gpios = <&pio 3 GPIO_ACTIVE_LOW>;
label = "amber:power";
gpios = <&pio 3 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_POWER;
- power_green: power_green {
label = "green:power";
gpios = <&pio 4 GPIO_ACTIVE_LOW>;
label = "green:power";
gpios = <&pio 4 GPIO_ACTIVE_LOW>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_POWER;
label = "green:wireless";
gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
label = "green:wireless";
gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN;
label = "green:internet";
gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
label = "green:internet";
gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WAN;
label = "green:router";
gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
label = "green:router";
gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_INDICATOR;
};
};
keys {
compatible = "gpio-keys";
};
};
keys {
compatible = "gpio-keys";
label = "reset";
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
label = "reset";
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
/* GPIO 1 and 16 are a tri-state switch button with
* ROUTER / AP / WB.
*/
/* GPIO 1 and 16 are a tri-state switch button with
* ROUTER / AP / WB.
*/
label = "router";
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
label = "router";
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
label = "wb";
gpios = <&pio 16 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
label = "wb";
gpios = <&pio 16 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
/* GPIO 18 is a switch button with AUTO / MANUAL. */
};
/* GPIO 18 is a switch button with AUTO / MANUAL. */
label = "manual";
gpios = <&pio 18 GPIO_ACTIVE_LOW>;
linux,code = <BTN_2>;
linux,input-type = <EV_SW>;
};
label = "manual";
gpios = <&pio 18 GPIO_ACTIVE_LOW>;
linux,code = <BTN_2>;
linux,input-type = <EV_SW>;
};
label = "wps";
gpios = <&pio 102 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
label = "wps";
gpios = <&pio 102 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;