ramips: fix wps leds/btn for TP-Link TL-WA801ND v5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_tl-wa801nd-v5.dts
1 /dts-v1/;
2
3 #include "mt7628an_tplink_8m.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "tplink,tl-wa801nd-v5", "mediatek,mt7628an-soc";
10         model = "TP-Link TL-WA801ND v5";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         keys {
20                 compatible = "gpio-keys";
21
22                 reset {
23                         label = "reset";
24                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
25                         linux,code = <KEY_RESTART>;
26                 };
27
28                 wps {
29                         label = "wps";
30                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
31                         linux,code = <KEY_WPS_BUTTON>;
32                 };
33         };
34
35         leds {
36                 compatible = "gpio-leds";
37
38                 led_power: power {
39                         label = "tl-wa801nd-v5:green:power";
40                         gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
41                 };
42
43                 lan {
44                         label = "tl-wa801nd-v5:green:lan";
45                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
46                 };
47
48                 wlan {
49                         label = "tl-wa801nd-v5:green:wlan";
50                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wps_red {
54                         label = "tl-wa801nd-v5:red:wps";
55                         gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
56                 };
57
58                 wps_green {
59                         label = "tl-wa801nd-v5:green:wps";
60                         gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
61                 };
62         };
63 };
64
65 &state_default {
66         gpio {
67                 ralink,group = "p0led_an", "p1led_an", "perst", "refclk",
68                                 "uart1", "wdt", "wled_an";
69                 ralink,function = "gpio";
70         };
71 };