ath79: further fixes 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 = &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 internet {
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_port1>;
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_port0>;
49 };
50
51 wifi2g {
52 label = "nbg6716:white:wifi2g";
53 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
54 linux,default-trigger = "phy1tpt";
55 };
56
57 wifi5g {
58 label = "nbg6716:white:wifi5g";
59 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
60 linux,default-trigger = "phy0tpt";
61 };
62
63 wps {
64 label = "nbg6716:white:wps";
65 gpios = <&gpio 21 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 linux,input-type = <EV_SW>;
83 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
84 debounce-interval = <60>;
85 };
86
87 usb1 {
88 label = "USB1 eject button";
89 linux,code = <BTN_1>;
90 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
91 debounce-interval = <60>;
92 };
93
94 usb2 {
95 label = "USB2 eject button";
96 linux,code = <BTN_2>;
97 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
98 debounce-interval = <60>;
99 };
100
101 wps {
102 label = "WPS button";
103 linux,code = <KEY_WPS_BUTTON>;
104 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
105 debounce-interval = <60>;
106 };
107 };
108 };
109
110 &gpio {
111 usb_power {
112 gpio-hog;
113 gpios = <16 0>;
114 output-high;
115 line-name = "nbg6716:power:usb";
116 };
117 };
118
119 &uart {
120 status = "okay";
121 };
122
123 &spi {
124 status = "okay";
125
126 num-cs = <1>;
127
128 flash@0 {
129 compatible = "jedec,spi-nor";
130 reg = <0>;
131 spi-max-frequency = <25000000>;
132
133 partitions {
134 compatible = "fixed-partitions";
135 #address-cells = <1>;
136 #size-cells = <1>;
137
138 uboot: partition@0 {
139 label = "u-boot";
140 reg = <0x000000 0x040000>;
141 read-only;
142 };
143
144 uboot_env: partition@40000 {
145 label = "u-boot-env";
146 reg = <0x040000 0x010000>;
147 };
148
149 art: partition@50000 {
150 label = "art";
151 reg = <0x050000 0x010000>;
152 read-only;
153 };
154
155 partition@60000 {
156 label = "nbu";
157 reg = <0x060000 0xfa0000>;
158 };
159 };
160 };
161 };
162
163 &nand {
164 status = "okay";
165
166 partitions {
167 compatible = "fixed-partitions";
168 #address-cells = <1>;
169 #size-cells = <1>;
170
171 partition@0 {
172 label = "zyxel_rfsd";
173 reg = <0x0 0x200000>;
174 };
175
176 partition@200000 {
177 label = "romd";
178 reg = <0x200000 0x200000>;
179 };
180
181 partition@400000 {
182 label = "header";
183 reg = <0x400000 0x100000>;
184 };
185
186 firmware@500000 {
187 label = "firmware";
188 reg = <0x500000 0x7b00000>;
189 };
190
191 partition@500000 {
192 label = "kernel";
193 reg = <0x500000 0x400000>;
194 };
195
196 partition@900000 {
197 label = "ubi";
198 reg = <0x900000 0x7700000>;
199 };
200 };
201 };
202
203 &mdio0 {
204 status = "okay";
205
206 phy17: ethernet-phy@11 {
207 reg = <0x11>;
208 phy-mode = "rgmii-id";
209 };
210
211 switch0@1f {
212 compatible = "qca,ar8327";
213 reg = <0x1f>;
214 qca,ar8327-initvals = <
215 0x04 0x87600000 /* PORT0 PAD MODE CTRL */
216 0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
217 0x10 0x81000080 /* POWER_ON_STRIP */
218 0x50 0xffb7ffb7 /* LED_CTRL0 */
219 0x54 0xffb7ffb7 /* LED_CTRL1 */
220 0x58 0xffb7ffb7 /* LED_CTRL2 */
221 0x5c 0x03ffff00 /* LED_CTRL3 */
222 0x7c 0x0000007e /* PORT0_STATUS */
223 0x94 0x0000007e /* PORT6 STATUS */
224 >;
225 };
226 };
227
228 &mdio1 {
229 status = "okay";
230
231 phy1: ethernet-phy@1 {
232 reg = <1>;
233 phy-mode = "sgmii";
234 };
235 };
236
237
238 &eth0 {
239 status = "okay";
240
241 pll-data = <0xa6000000 0x00000101 0x00001616>;
242 phy-handle = <&phy17>;
243
244 fixed-link {
245 speed = <1000>;
246 full-duplex;
247 };
248 };
249
250 &eth1 {
251 status = "okay";
252
253 pll-data = <0x03000101 0x00000101 0x00001616>;
254 phy-handle = <&phy1>;
255
256 fixed-link {
257 speed = <1000>;
258 full-duplex;
259 };
260 };
261
262 &gpio {
263 status = "okay";
264 };
265
266 &wmac {
267 status = "okay";
268
269 mtd-cal-data = <&art 0x1000>;
270 };
271
272 &pcie1 {
273 status = "okay";
274
275 wifi@0,0 {
276 compatible = "qcom,ath10k";
277 reg = <0 0 0 0 0>;
278 qcom,ath10k-calibration-variant = "ZyXEL-NBG6716";
279 };
280 };
281
282 &usb_phy0 {
283 status = "okay";
284 };
285
286 &usb_phy1 {
287 status = "okay";
288 };
289
290 &usb0 {
291 status = "okay";
292
293 hub_port0: port@1 {
294 reg = <1>;
295 #trigger-source-cells = <0>;
296 };
297
298 };
299
300 &usb1 {
301 status = "okay";
302
303 hub_port1: port@1 {
304 reg = <1>;
305 #trigger-source-cells = <0>;
306 };
307 };