db5acd47d7499b2efe310b4c5b4996c7aba40d79
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-nbg6817.dts
1 #include "qcom-ipq8065-smb208.dtsi"
2
3 #include <dt-bindings/input/input.h>
4
5 / {
6 model = "ZyXEL NBG6817";
7 compatible = "zyxel,nbg6817", "qcom,ipq8065", "qcom,ipq8064";
8
9 memory@0 {
10 reg = <0x42000000 0x1e000000>;
11 device_type = "memory";
12 };
13
14 aliases {
15 mdio-gpio0 = &mdio0;
16 sdcc1 = &sdcc1;
17
18 led-boot = &power;
19 led-failsafe = &power;
20 led-running = &power;
21 led-upgrade = &power;
22 };
23
24 chosen {
25 bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1";
26 append-rootblock = "root=/dev/mmcblk0p";
27 };
28
29 keys {
30 compatible = "gpio-keys";
31 pinctrl-0 = <&button_pins>;
32 pinctrl-names = "default";
33
34 wifi {
35 label = "wifi";
36 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RFKILL>;
38 linux,input-type = <EV_SW>;
39 debounce-interval = <60>;
40 wakeup-source;
41 };
42
43 reset {
44 label = "reset";
45 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 debounce-interval = <60>;
48 wakeup-source;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 debounce-interval = <60>;
56 wakeup-source;
57 };
58 };
59
60 leds {
61 compatible = "gpio-leds";
62 pinctrl-0 = <&led_pins>;
63 pinctrl-names = "default";
64
65 internet {
66 label = "white:internet";
67 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
68 };
69
70 power: power {
71 label = "white:power";
72 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
73 default-state = "keep";
74 };
75
76 wifi2g {
77 label = "amber:wifi2g";
78 gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
79 };
80
81 /* wifi2g amber from the manual is missing */
82
83 wifi5g {
84 label = "amber:wifi5g";
85 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
86 };
87
88 /* wifi5g amber from the manual is missing */
89 };
90 };
91
92 &qcom_pinmux {
93 button_pins: button_pins {
94 mux {
95 pins = "gpio53", "gpio54", "gpio65";
96 function = "gpio";
97 drive-strength = <2>;
98 bias-pull-up;
99 };
100 };
101
102 led_pins: led_pins {
103 mux {
104 pins = "gpio9", "gpio26", "gpio33", "gpio64";
105 function = "gpio";
106 drive-strength = <2>;
107 bias-pull-down;
108 };
109 };
110
111 mdio0_pins: mdio0-pins {
112 clk {
113 pins = "gpio1";
114 input-disable;
115 };
116 };
117
118 rgmii2_pins: rgmii2-pins {
119 tx {
120 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
121 input-disable;
122 };
123 };
124
125 spi_pins: spi_pins {
126 cs {
127 pins = "gpio20";
128 drive-strength = <12>;
129 };
130 };
131
132 usb0_pwr_en_pins: usb0_pwr_en_pins {
133 mux {
134 pins = "gpio16", "gpio17";
135 function = "gpio";
136 drive-strength = <12>;
137 };
138
139 pwr {
140 pins = "gpio17";
141 bias-pull-down;
142 output-high;
143 };
144
145 ovc {
146 pins = "gpio16";
147 bias-pull-up;
148 };
149 };
150
151 usb1_pwr_en_pins: usb1_pwr_en_pins {
152 mux {
153 pins = "gpio14", "gpio15";
154 function = "gpio";
155 drive-strength = <12>;
156 };
157
158 pwr {
159 pins = "gpio14";
160 bias-pull-down;
161 output-high;
162 };
163
164 ovc {
165 pins = "gpio15";
166 bias-pull-up;
167 };
168 };
169 };
170
171 &gsbi5 {
172 qcom,mode = <GSBI_PROT_SPI>;
173 status = "okay";
174
175 spi4: spi@1a280000 {
176 status = "okay";
177
178 pinctrl-0 = <&spi_pins>;
179 pinctrl-names = "default";
180
181 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
182
183 m25p80@0 {
184 compatible = "jedec,spi-nor";
185 #address-cells = <1>;
186 #size-cells = <1>;
187 spi-max-frequency = <51200000>;
188 reg = <0>;
189
190 partitions {
191 compatible = "qcom,smem-part";
192 };
193 };
194 };
195 };
196
197 &hs_phy_0 {
198 status = "okay";
199 };
200
201 &ss_phy_0 {
202 status = "okay";
203 };
204
205 &usb3_0 {
206 status = "okay";
207
208 pinctrl-0 = <&usb0_pwr_en_pins>;
209 pinctrl-names = "default";
210 };
211
212 &hs_phy_1 {
213 status = "okay";
214 };
215
216 &ss_phy_1 {
217 status = "okay";
218 };
219
220 &usb3_1 {
221 status = "okay";
222
223 pinctrl-0 = <&usb1_pwr_en_pins>;
224 pinctrl-names = "default";
225 };
226
227 &pcie0 {
228 status = "okay";
229 reset-gpios = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
230 pinctrl-0 = <&pcie0_pins>;
231 pinctrl-names = "default";
232 };
233
234 &pcie1 {
235 status = "okay";
236 reset-gpios = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
237 pinctrl-0 = <&pcie1_pins>;
238 pinctrl-names = "default";
239 max-link-speed = <1>;
240 };
241
242 &mdio0 {
243 status = "okay";
244
245 pinctrl-0 = <&mdio0_pins>;
246 pinctrl-names = "default";
247
248 switch@10 {
249 compatible = "qca,qca8337";
250 #address-cells = <1>;
251 #size-cells = <0>;
252 reg = <0x10>;
253
254 ports {
255 #address-cells = <1>;
256 #size-cells = <0>;
257
258 port@0 {
259 reg = <0>;
260 label = "cpu";
261 ethernet = <&gmac1>;
262 phy-mode = "rgmii";
263 tx-internal-delay-ps = <1000>;
264 rx-internal-delay-ps = <1000>;
265
266 fixed-link {
267 speed = <1000>;
268 full-duplex;
269 };
270 };
271
272 port@1 {
273 reg = <1>;
274 label = "lan1";
275 phy-mode = "internal";
276 phy-handle = <&phy_port1>;
277 };
278
279 port@2 {
280 reg = <2>;
281 label = "lan2";
282 phy-mode = "internal";
283 phy-handle = <&phy_port2>;
284 };
285
286 port@3 {
287 reg = <3>;
288 label = "lan3";
289 phy-mode = "internal";
290 phy-handle = <&phy_port3>;
291 };
292
293 port@4 {
294 reg = <4>;
295 label = "lan4";
296 phy-mode = "internal";
297 phy-handle = <&phy_port4>;
298 };
299
300 port@5 {
301 reg = <5>;
302 label = "wan";
303 phy-mode = "internal";
304 phy-handle = <&phy_port5>;
305 };
306
307 port@6 {
308 reg = <6>;
309 label = "cpu";
310 ethernet = <&gmac2>;
311 phy-mode = "sgmii";
312 qca,sgmii-enable-pll;
313
314 fixed-link {
315 speed = <1000>;
316 full-duplex;
317 };
318 };
319 };
320
321 mdio {
322 #address-cells = <1>;
323 #size-cells = <0>;
324
325 phy_port1: phy@0 {
326 reg = <0>;
327 };
328
329 phy_port2: phy@1 {
330 reg = <1>;
331 };
332
333 phy_port3: phy@2 {
334 reg = <2>;
335 };
336
337 phy_port4: phy@3 {
338 reg = <3>;
339 };
340
341 phy_port5: phy@4 {
342 reg = <4>;
343 };
344 };
345 };
346 };
347
348 &gmac1 {
349 status = "okay";
350 phy-mode = "rgmii";
351 qcom,id = <1>;
352 qcom,phy_mdio_addr = <4>;
353 qcom,poll_required = <0>;
354 qcom,rgmii_delay = <1>;
355 qcom,phy_mii_type = <0>;
356 qcom,emulation = <0>;
357 qcom,irq = <255>;
358 mdiobus = <&mdio0>;
359
360 pinctrl-0 = <&rgmii2_pins>;
361 pinctrl-names = "default";
362
363 fixed-link {
364 speed = <1000>;
365 full-duplex;
366 };
367 };
368
369 &gmac2 {
370 status = "okay";
371 phy-mode = "sgmii";
372 qcom,id = <2>;
373 qcom,phy_mdio_addr = <0>; /* none */
374 qcom,poll_required = <0>; /* no polling */
375 qcom,rgmii_delay = <0>;
376 qcom,phy_mii_type = <1>;
377 qcom,emulation = <0>;
378 qcom,irq = <258>;
379 mdiobus = <&mdio0>;
380
381 fixed-link {
382 speed = <1000>;
383 full-duplex;
384 };
385 };
386
387 &sdcc1 {
388 status = "okay";
389 };
390
391 &adm_dma {
392 status = "okay";
393 };