ath79: convert devices to interrupt-driven gpio-keys
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9531_engenius_ews511ap.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca953x.dtsi"
8
9 / {
10         compatible = "engenius,ews511ap", "qca,qca9531";
11         model = "EnGenius EWS511AP";
12
13         keys {
14                 compatible = "gpio-keys";
15
16                 pinctrl-names = "default";
17                 pinctrl-0 = <&jtag_disable_pins>;
18
19                 reset {
20                         label = "reset";
21                         linux,code = <KEY_RESTART>;
22                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
23                 };
24         };
25
26         aliases {
27                 led-boot = &power_led;
28                 led-failsafe = &power_led;
29                 led-running = &power_led;
30                 led-upgrade = &power_led;
31         };
32
33         leds {
34                 compatible = "gpio-leds";
35
36                 power_led: power {
37                         label = "ews511ap:amber:power";
38                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
39                         default-state = "on";
40                 };
41
42                 lan1 {
43                         label = "ews511ap:blue:lan1";
44                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
45                 };
46
47                 lan2 {
48                         label = "ews511ap:blue:lan2";
49                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
50                 };
51
52                 wlan2g {
53                         label = "ews511ap:green:wlan2g";
54                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
55                         linux,default-trigger = "phy0tpt";
56                 };
57
58                 wlan5g {
59                         label = "ews511ap:green:wlan5g";
60                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
61                         linux,default-trigger = "phy1tpt";
62                 };
63         };
64
65         watchdog {
66                 compatible = "linux,wdt-gpio";
67
68                 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
69                 hw_algo = "toggle";
70                 /* hw_margin_ms is actually 300s but driver limits it to 60s */
71                 hw_margin_ms = <60000>;
72                 always-running;
73         };
74 };
75
76 &wdt {
77         status = "okay";
78 };
79
80 &rst {
81         status = "okay";
82 };
83
84 &pcie0 {
85         status = "okay";
86 };
87
88 &uart {
89         status = "okay";
90 };
91
92 &spi {
93         status = "okay";
94         num-cs = <0>;
95
96         flash@0 {
97                 compatible = "jedec,spi-nor";
98                 reg = <0>;
99                 spi-max-frequency = <25000000>;
100
101                 partitions {
102                         compatible = "fixed-partitions";
103                         #address-cells = <1>;
104                         #size-cells = <1>;
105
106                         partition@0 {
107                                 label = "u-boot";
108                                 reg = <0x000000 0x040000>;
109                                 read-only;
110                         };
111
112                         ubootenv: partition@40000 {
113                                 label = "u-boot-env";
114                                 reg = <0x040000 0x010000>;
115                         };
116
117                         art: partition@50000 {
118                                 label = "art";
119                                 reg = <0x050000 0x010000>;
120                                 read-only;
121                         };
122
123                         partition@60000 {
124                                 compatible = "denx,uimage";
125                                 label = "firmware";
126                                 reg = <0x060000 0xfa0000>;
127                         };
128                 };
129         };
130 };
131
132 &eth0 {
133         status = "okay";
134         phy-handle = <&swphy4>;
135 };
136
137 &eth1 {
138         status = "okay";
139 };
140
141 &wmac {
142         status = "okay";
143         mtd-cal-data = <&art 0x1000>;
144 };