ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_unielec_u7621-06.dtsi
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
4 * Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
5 * All rights reserved.
6 */
7
8 #include "mt7621.dtsi"
9
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/leds/common.h>
13
14 / {
15 compatible = "unielec,u7621-06", "mediatek,mt7621-soc";
16
17 aliases {
18 led-boot = &led_status;
19 led-failsafe = &led_status;
20 led-running = &led_status;
21 led-upgrade = &led_status;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,115200";
26 };
27
28 gpio-export {
29 compatible = "gpio-export";
30 #size-cells = <0>;
31
32 modem_reset {
33 gpio-export,name = "modem_reset";
34 gpio-export,output = <1>;
35 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 reset {
43 label = "reset";
44 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 led_status: status {
53 function = LED_FUNCTION_STATUS;
54 color = <LED_COLOR_ID_GREEN>;
55 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
56 };
57
58 led4 {
59 label = "green:led4";
60 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
61 };
62
63 led5 {
64 label = "green:led5";
65 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
66 };
67 };
68 };
69
70 &sdhci {
71 status = "okay";
72 };
73
74 &pcie {
75 status = "okay";
76 };
77
78 &gmac1 {
79 status = "okay";
80 label = "wan";
81 phy-handle = <&ethphy4>;
82 };
83
84 &ethphy4 {
85 /delete-property/ interrupts;
86 };
87
88 &switch0 {
89 ports {
90 port@0 {
91 status = "okay";
92 label = "lan1";
93 };
94
95 port@1 {
96 status = "okay";
97 label = "lan2";
98 };
99
100 port@2 {
101 status = "okay";
102 label = "lan3";
103 };
104
105 port@3 {
106 status = "okay";
107 label = "lan4";
108 };
109 };
110 };
111
112 &state_default {
113 gpio {
114 groups = "jtag", "uart2", "wdt";
115 function = "gpio";
116 };
117 };