ath79: replace generic button node names
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9558_zyxel_nbg6716.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 = "zyxel,nbg6716", "qca,qca9558";
11         model = "ZyXEL NBG6716";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &led_power;
19                 led-failsafe = &led_power;
20                 led-running = &led_power;
21                 led-upgrade = &led_power;
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "nbg6716:white:power";
29                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
30                 };
31
32                 wan {
33                         label = "nbg6716:white:internet";
34                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
35                 };
36
37                 usb1 {
38                         label = "nbg6716:white:usb1";
39                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
40                         linux,default-trigger = "usbport";
41                         trigger-sources = <&hub_port0>;
42                 };
43
44                 usb2 {
45                         label = "nbg6716:white:usb2";
46                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
47                         linux,default-trigger = "usbport";
48                         trigger-sources = <&hub_port1>;
49                 };
50
51                 wifi2 {
52                         label = "nbg6716:white:wifi2";
53                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
54                         linux,default-trigger = "phy1tpt";
55                 };
56
57                 wifi5 {
58                         label = "nbg6716:white:wifi5";
59                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
60                         linux,default-trigger = "phy0tpt";
61                 };
62
63                 wps {
64                         label = "nbg6716:white:wps";
65                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
66                 };
67         };
68
69         keys {
70                 compatible = "gpio-keys";
71
72                 reset {
73                         label = "reset";
74                         linux,code = <KEY_RESTART>;
75                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
76                         debounce-interval = <60>;
77                 };
78
79                 wifi {
80                         label = "WiFi button";
81                         linux,code = <KEY_RFKILL>;
82                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
83                         debounce-interval = <60>;
84                 };
85
86                 usb1 {
87                         label = "USB1 eject button";
88                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
89                         debounce-interval = <60>;
90                 };
91
92                 usb2 {
93                         label = "USB2 eject button";
94                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
95                         debounce-interval = <60>;
96                 };
97
98                 wps {
99                         label = "WPS button";
100                         linux,code = <KEY_WPS_BUTTON>;
101                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
102                         debounce-interval = <60>;
103                 };
104         };
105 };
106
107 &gpio {
108         usb_power {
109                 gpio-hog;
110                 gpios = <16 0>;
111                 output-high;
112                 line-name = "nbg6716:power:usb";
113         };
114 };
115
116 &uart {
117         status = "okay";
118 };
119
120 &spi {
121         status = "okay";
122
123         num-cs = <1>;
124
125         flash@0 {
126                 compatible = "jedec,spi-nor";
127                 reg = <0>;
128                 spi-max-frequency = <25000000>;
129
130                 partitions {
131                         compatible = "fixed-partitions";
132                         #address-cells = <1>;
133                         #size-cells = <1>;
134
135                         uboot: partition@0 {
136                                 label = "u-boot";
137                                 reg = <0x000000 0x040000>;
138                                 read-only;
139                         };
140
141                         uboot_env: partition@40000 {
142                                 label = "u-boot-env";
143                                 reg = <0x040000 0x010000>;
144                         };
145
146                         art: partition@50000 {
147                                 label = "art";
148                                 reg = <0x050000 0x010000>;
149                                 read-only;
150                         };
151
152                         partition@60000 {
153                                 label = "nbu";
154                                 reg = <0x060000 0xfa0000>;
155                         };
156                 };
157         };
158 };
159
160 &nand {
161         status = "okay";
162
163         partitions {
164                 compatible = "fixed-partitions";
165                 #address-cells = <1>;
166                 #size-cells = <1>;
167
168                 partition@0 {
169                         label = "zyxel_rfsd";
170                         reg = <0x0 0x200000>;
171                 };
172
173                 partition@200000 {
174                         label = "romd";
175                         reg = <0x200000 0x200000>;
176                 };
177
178                 partition@400000 {
179                         label = "header";
180                         reg = <0x400000 0x100000>;
181                 };
182
183                 firmware@500000 {
184                         label = "firmware";
185                         reg = <0x500000 0x7b00000>;
186                 };
187
188                 partition@500000 {
189                         label = "kernel";
190                         reg = <0x500000 0x400000>;
191                 };
192
193                 partition@900000 {
194                         label = "ubi";
195                         reg = <0x900000 0x7700000>;
196                 };
197         };
198 };
199
200 &mdio0 {
201         status = "okay";
202
203         phy0: ethernet-phy@0 {
204                 reg = <17>;
205                 phy-mode = "rgmii-id";
206         };
207
208         switch0@1f {
209                 compatible = "qca,ar8327";
210                 reg = <0x1f>;
211                 qca,ar8327-initvals = <
212                         0x04 0x87600000 /* PORT0 PAD MODE CTRL */
213                         0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
214                         0x10 0x81000080 /* POWER_ON_STRIP */
215                         0x50 0xffb7ffb7 /* LED_CTRL0 */
216                         0x54 0xffb7ffb7 /* LED_CTRL1 */
217                         0x58 0xffb7ffb7 /* LED_CTRL2 */
218                         0x5c 0x03ffff00 /* LED_CTRL3 */
219                         0x7c 0x0000007e /* PORT0_STATUS */
220                         0x94 0x0000007e /* PORT6 STATUS */
221                         >;
222         };
223 };
224
225 &mdio1 {
226         status = "okay";
227
228         phy1: ethernet-phy@1 {
229                 reg = <1>;
230                 phy-mode = "sgmii";
231         };
232 };
233
234
235 &eth0 {
236         status = "okay";
237
238         pll-data = <0xa6000000 0x00000101 0x00001616>;
239         phy-handle = <&phy0>;
240         fixed-link {
241                 speed = <1000>;
242                 full-duplex;
243         };
244 };
245
246 &eth1 {
247         status = "okay";
248
249         pll-data = <0x03000101 0x00000101 0x00001616>;
250         phy-handle = <&phy1>;
251         fixed-link {
252                 speed = <1000>;
253                 full-duplex;
254         };
255 };
256
257 &gpio {
258         status = "okay";
259 };
260
261 &wmac {
262         status = "okay";
263 };
264
265 &pcie1 {
266         status = "okay";
267
268         wifi@0,0 {
269                 compatible = "qcom,ath10k";
270                 reg = <0 0 0 0 0>;
271                 qcom,ath10k-calibration-variant = "ZyXEL-NBG6716";
272         };
273 };
274
275 &usb_phy0 {
276         status = "okay";
277 };
278
279 &usb_phy1 {
280         status = "okay";
281 };
282
283 &usb0 {
284         status = "okay";
285
286         hub_port0: port@1 {
287                 reg = <1>;
288                 #trigger-source-cells = <0>;
289         };
290
291 };
292
293 &usb1 {
294         status = "okay";
295
296         hub_port1: port@1 {
297                 reg = <1>;
298                 #trigger-source-cells = <0>;
299         };
300 };