ath79: add support for ZyXEL NBG6716
[openwrt/staging/jow.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 = &power;
19 led-failsafe = &power;
20 led-running = &power;
21 led-upgrade = &power;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 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_button {
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 gpio_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 num-cs = <1>;
123
124 flash@0 {
125 compatible = "jedec,spi-nor";
126 reg = <0>;
127 spi-max-frequency = <25000000>;
128
129 partitions {
130 compatible = "fixed-partitions";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 uboot: partition@0 {
135 label = "u-boot";
136 reg = <0x000000 0x040000>;
137 read-only;
138 };
139
140 uboot_env: partition@40000 {
141 label = "u-boot-env";
142 reg = <0x040000 0x010000>;
143 };
144
145 art: partition@50000 {
146 label = "art";
147 reg = <0x050000 0x010000>;
148 read-only;
149 };
150
151 partition@60000 {
152 label = "nbu";
153 reg = <0x060000 0xfa0000>;
154 };
155 };
156 };
157 };
158
159 &nand {
160 status = "okay";
161
162 partitions {
163 compatible = "fixed-partitions";
164 #address-cells = <1>;
165 #size-cells = <1>;
166
167 partition@0 {
168 label = "zyxel_rfsd";
169 reg = <0x0 0x200000>;
170 };
171
172 partition@200000 {
173 label = "romd";
174 reg = <0x200000 0x200000>;
175 };
176
177 partition@400000 {
178 label = "header";
179 reg = <0x400000 0x100000>;
180 };
181
182 firmware@500000 {
183 label = "firmware";
184 reg = <0x500000 0x7b00000>;
185 };
186
187 partition@500000 {
188 label = "kernel";
189 reg = <0x500000 0x400000>;
190 };
191
192 partition@900000 {
193 label = "ubi";
194 reg = <0x900000 0x7700000>;
195 };
196 };
197 };
198
199 &mdio0 {
200 status = "okay";
201
202 phy0: ethernet-phy@0 {
203 reg = <17>;
204 phy-mode = "rgmii-id";
205 };
206
207 switch0@1f {
208 compatible = "qca,ar8327";
209 reg = <0x1f>;
210 qca,ar8327-initvals = <
211 0x04 0x87600000 /* PORT0 PAD MODE CTRL */
212 0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
213 0x10 0x81000080 /* POWER_ON_STRIP */
214 0x50 0xffb7ffb7 /* LED_CTRL0 */
215 0x54 0xffb7ffb7 /* LED_CTRL1 */
216 0x58 0xffb7ffb7 /* LED_CTRL2 */
217 0x5c 0x03ffff00 /* LED_CTRL3 */
218 0x7c 0x0000007e /* PORT0_STATUS */
219 0x94 0x0000007e /* PORT6 STATUS */
220 >;
221 };
222 };
223
224 &mdio1 {
225 status = "okay";
226
227 phy1: ethernet-phy@1 {
228 reg = <1>;
229 phy-mode = "sgmii";
230 };
231 };
232
233
234 &eth0 {
235 status = "okay";
236
237 pll-data = <0xa6000000 0x00000101 0x00001616>;
238 phy-handle = <&phy0>;
239 fixed-link {
240 speed = <1000>;
241 full-duplex;
242 };
243 };
244
245 &eth1 {
246 status = "okay";
247
248 pll-data = <0x03000101 0x00000101 0x00001616>;
249 phy-handle = <&phy1>;
250 fixed-link {
251 speed = <1000>;
252 full-duplex;
253 };
254 };
255
256 &gpio {
257 status = "okay";
258 };
259
260 &wmac {
261 status = "okay";
262 };
263
264 &pcie1 {
265 status = "okay";
266
267 wifi@0,0 {
268 compatible = "qcom,ath10k";
269 reg = <0 0 0 0 0>;
270 qcom,ath10k-calibration-variant = "ZyXEL-NBG6716";
271 };
272 };
273
274 &usb_phy0 {
275 status = "okay";
276 };
277
278 &usb_phy1 {
279 status = "okay";
280 };
281
282 &usb0 {
283 status = "okay";
284
285 hub_port0: port@1 {
286 reg = <1>;
287 #trigger-source-cells = <0>;
288 };
289
290 };
291
292 &usb1 {
293 status = "okay";
294
295 hub_port1: port@1 {
296 reg = <1>;
297 #trigger-source-cells = <0>;
298 };
299 };