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