ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.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 "qca955x.dtsi"
8
9 / {
10 compatible = "zyxel,nbg6716", "qca,qca9558";
11 model = "ZyXEL NBG6716";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power: power {
24 label = "nbg6716:white:power";
25 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
26 };
27
28 internet {
29 label = "nbg6716:white:internet";
30 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
31 };
32
33 usb1 {
34 label = "nbg6716:white:usb1";
35 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "usbport";
37 trigger-sources = <&hub_port1>;
38 };
39
40 usb2 {
41 label = "nbg6716:white:usb2";
42 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "usbport";
44 trigger-sources = <&hub_port0>;
45 };
46
47 wifi2g {
48 label = "nbg6716:white:wifi2g";
49 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "phy1tpt";
51 };
52
53 wifi5g {
54 label = "nbg6716:white:wifi5g";
55 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
56 linux,default-trigger = "phy0tpt";
57 };
58
59 wps {
60 label = "nbg6716:white:wps";
61 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
62 };
63 };
64
65 keys {
66 compatible = "gpio-keys";
67
68 reset {
69 label = "reset";
70 linux,code = <KEY_RESTART>;
71 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
72 debounce-interval = <60>;
73 };
74
75 wifi {
76 label = "WiFi button";
77 linux,code = <KEY_RFKILL>;
78 linux,input-type = <EV_SW>;
79 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
80 debounce-interval = <60>;
81 };
82
83 usb1 {
84 label = "USB1 eject button";
85 linux,code = <BTN_1>;
86 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
87 debounce-interval = <60>;
88 };
89
90 usb2 {
91 label = "USB2 eject button";
92 linux,code = <BTN_2>;
93 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
94 debounce-interval = <60>;
95 };
96
97 wps {
98 label = "WPS button";
99 linux,code = <KEY_WPS_BUTTON>;
100 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
101 debounce-interval = <60>;
102 };
103 };
104 };
105
106 &gpio {
107 usb_power {
108 gpio-hog;
109 gpios = <16 0>;
110 output-high;
111 line-name = "nbg6716:power:usb";
112 };
113 };
114
115 &uart {
116 status = "okay";
117 };
118
119 &spi {
120 status = "okay";
121
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 phy17: ethernet-phy@11 {
203 reg = <0x11>;
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 = <&phy17>;
239
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
252 fixed-link {
253 speed = <1000>;
254 full-duplex;
255 };
256 };
257
258 &gpio {
259 status = "okay";
260 };
261
262 &wmac {
263 status = "okay";
264
265 mtd-cal-data = <&art 0x1000>;
266 };
267
268 &pcie1 {
269 status = "okay";
270
271 wifi@0,0 {
272 compatible = "qcom,ath10k";
273 reg = <0 0 0 0 0>;
274 qcom,ath10k-calibration-variant = "ZyXEL-NBG6716";
275 };
276 };
277
278 &usb_phy0 {
279 status = "okay";
280 };
281
282 &usb_phy1 {
283 status = "okay";
284 };
285
286 &usb0 {
287 status = "okay";
288
289 hub_port0: port@1 {
290 reg = <1>;
291 #trigger-source-cells = <0>;
292 };
293
294 };
295
296 &usb1 {
297 status = "okay";
298
299 hub_port1: port@1 {
300 reg = <1>;
301 #trigger-source-cells = <0>;
302 };
303 };