ath79: add support for indicating the boot state using multiple leds
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9557_iodata_wn-ac1600dgr2.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 "qca9557.dtsi"
8
9 / {
10         compatible = "iodata,wn-ac1600dgr2", "qca,qca9557";
11         model = "I-O DATA WN-AC1600DGR2";
12
13         aliases {
14                 led-boot = &power;
15                 led-failsafe = &power;
16                 led-running = &power;
17                 led-upgrade = &power;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200n8";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 power: power {
28                         label = "wn-ac1600dgr2:green:power";
29                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30                         default-state = "on";
31                 };
32
33                 copy {
34                         label = "wn-ac1600dgr2:green:copy";
35                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
36                         default-state = "off";
37                 };
38
39                 eco {
40                         label = "wn-ac1600dgr2:green:eco";
41                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
42                         default-state = "off";
43                 };
44
45                 wlan5g {
46                         label = "wn-ac1600dgr2:green:wlan5g";
47                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
48                         default-state = "off";
49                         linux,default-trigger = "phy0tpt";
50                 };
51
52                 wlan2g {
53                         label = "wn-ac1600dgr2:green:wlan2g";
54                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
55                         default-state = "off";
56                         linux,default-trigger = "phy1tpt";
57                 };
58
59                 notification {
60                         label = "wn-ac1600dgr2:amber:notification";
61                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
62                         default-state = "off";
63                 };
64         };
65
66         keys {
67                 compatible = "gpio-keys-polled";
68                 poll-interval = <20>;
69
70                 button_eco {
71                         label = "eco";
72                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
73                         linux,code = <BTN_1>;
74                         debounce-interval = <60>;
75                 };
76
77                 auto {
78                         label = "auto";
79                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
80                         linux,code = <BTN_0>;
81                         linux,input-type = <EV_SW>;
82                         debounce-interval = <60>;
83                 };
84
85                 button_copy {
86                         label = "copy";
87                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
88                         linux,code = <BTN_1>;
89                         debounce-interval = <60>;
90                 };
91
92                 wps {
93                         label = "wps";
94                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
95                         linux,code = <KEY_WPS_BUTTON>;
96                         debounce-interval = <60>;
97                 };
98
99                 reset {
100                         label = "reset";
101                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
102                         linux,code = <KEY_RESTART>;
103                         debounce-interval = <60>;
104                 };
105
106                 router {
107                         label = "router";
108                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
109                         linux,code = <BTN_0>;
110                         linux,input-type = <EV_SW>;
111                         debounce-interval = <60>;
112                 };
113         };
114 };
115
116 &spi {
117         status = "okay";
118         num-cs = <1>;
119
120         flash@0 {
121                 compatible = "jedec,spi-nor";
122                 reg = <0>;
123                 spi-max-frequency = <25000000>;
124
125                 partitions {
126                         compatible = "fixed-partitions";
127                         #address-cells = <1>;
128                         #size-cells = <1>;
129
130                         partition@0 {
131                                 label = "u-boot";
132                                 reg = <0x000000 0x030000>;
133                                 read-only;
134                         };
135
136                         partition@30000 {
137                                 label = "u-boot-env";
138                                 reg = <0x030000 0x010000>;
139                                 read-only;
140                         };
141
142                         partition@40000 {
143                                 label = "firmware";
144                                 reg = <0x040000 0xe50000>;
145                         };
146
147                         partition@e90000 {
148                                 label = "manufacture";
149                                 reg = <0xe90000 0x100000>;
150                                 read-only;
151                         };
152
153                         partition@f90000 {
154                                 label = "backup";
155                                 reg = <0xf90000 0x010000>;
156                                 read-only;
157                         };
158
159                         partition@fa0000 {
160                                 label = "storage";
161                                 reg = <0xfa0000 0x050000>;
162                                 read-only;
163                         };
164
165                         art: partition@ff0000 {
166                                 label = "art";
167                                 reg = <0xff0000 0x010000>;
168                                 read-only;
169                         };
170                 };
171         };
172 };
173
174 &mdio0 {
175         status = "okay";
176
177         phy0: ethernet-phy@0 {
178                 reg = <0>;
179
180                 qca,ar8327-initvals = <
181                         0x04 0x87600000 /* PORT0 PAD MODE CTRL */
182                         0x7c 0x0000007e /* PORT0_STATUS */
183                 >;
184         };
185 };
186
187 &eth0 {
188         status = "okay";
189
190         pll-data = <0x56000000 0x00000101 0x00001616>;
191         phy-handle = <&phy0>;
192 };
193
194 &pcie1 {
195         status = "okay";
196
197         wifi@0,0 {
198                 compatible = "pci168c,003c";
199                 reg = <0x0000 0 0 0 0>;
200                 qca,no-eeprom;
201         };
202 };
203
204 &uart {
205         status = "okay";
206 };
207
208 &usb_phy0 {
209         status = "okay";
210 };
211
212 &usb0 {
213         status = "okay";
214 };
215
216 &wmac {
217         status = "okay";
218         qca,no-eeprom;
219 };