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