ramips: mt7621-dts: mux phy0/4 to gmac1
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_linksys_e5600.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "linksys,e5600", "mediatek,mt7621-soc";
10 model = "Linksys E5600";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31
32 wps {
33 label = "wps";
34 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_WPS_BUTTON>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 wps {
43 label = "amber:wps";
44 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
45 };
46
47 led_power: power {
48 label = "blue:power";
49 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
50 default-state = "on";
51 };
52
53 wan_amber {
54 label = "amber:wan";
55 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
56 };
57
58 wan_blue {
59 label = "blue:wan";
60 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
61 };
62 };
63 };
64
65 &nand {
66 status = "okay";
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "boot";
75 reg = <0x0 0x80000>;
76 read-only;
77 };
78
79 partition@80000 {
80 label = "u_env";
81 reg = <0x80000 0x40000>;
82 read-only;
83 };
84
85 factory: partition@c0000 {
86 label = "factory";
87 reg = <0xc0000 0x40000>;
88 read-only;
89 };
90
91 partition@100000 {
92 label = "s_env";
93 reg = <0x100000 0x40000>;
94 };
95
96 partition@140000 {
97 label = "devinfo";
98 reg = <0x140000 0x40000>;
99 read-only;
100 };
101
102 partition@180000 {
103 label = "kernel";
104 reg = <0x180000 0x400000>;
105 };
106
107 partition@580000 {
108 label = "ubi";
109 reg = <0x580000 0x1a00000>;
110 };
111
112 partition@1f80000 {
113 label = "alt_firmware";
114 reg = <0x1f80000 0x1e00000>;
115 };
116
117 partition@3d80000 {
118 label = "gdata";
119 reg = <0x3d80000 0x4200000>;
120 };
121 };
122 };
123
124 &state_default {
125 gpio {
126 groups = "uart2", "uart3", "jtag";
127 function = "gpio";
128 };
129 };
130
131 &pcie {
132 status = "okay";
133 };
134
135 &pcie0 {
136 mt76@0,0 {
137 compatible = "mediatek,mt76";
138 reg = <0x0000 0 0 0 0>;
139 mediatek,mtd-eeprom = <&factory 0x0000>;
140 };
141 };
142
143 &pcie1 {
144 mt76@0,0 {
145 compatible = "mediatek,mt76";
146 reg = <0x0000 0 0 0 0>;
147 mediatek,mtd-eeprom = <&factory 0x8000>;
148 };
149 };
150
151 &gmac1 {
152 status = "okay";
153 label = "wan";
154 phy-handle = <&ethphy4>;
155 };
156
157 &mdio {
158 ethphy4: ethernet-phy@4 {
159 reg = <4>;
160 };
161 };
162
163 &switch0 {
164 ports {
165 port@0 {
166 status = "okay";
167 label = "lan1";
168 };
169
170 port@1 {
171 status = "okay";
172 label = "lan2";
173 };
174
175 port@2 {
176 status = "okay";
177 label = "lan3";
178 };
179
180 port@3 {
181 status = "okay";
182 label = "lan4";
183 };
184 };
185 };
186
187 &xhci {
188 status = "disabled";
189 };