ramips: mt7621-dts: mux phy0/4 to gmac1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-xx60-a1.dtsi
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 aliases {
10 label-mac-device = &gmac0;
11 led-boot = &led_power_orange;
12 led-failsafe = &led_power_white;
13 led-running = &led_power_white;
14 led-upgrade = &led_net_orange;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31 };
32
33 leds: leds {
34 compatible = "gpio-leds";
35
36 led_power_orange: power_orange {
37 label = "orange:power";
38 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
39 };
40
41 led_power_white: power_white {
42 label = "white:power";
43 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
44 };
45
46 led_net_orange: net_orange {
47 label = "orange:net";
48 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
49 };
50
51 net_white {
52 label = "white:net";
53 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
54 };
55 };
56 };
57
58 &nand {
59 status = "okay";
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "Bootloader";
68 reg = <0x0 0x80000>;
69 read-only;
70 };
71
72 partition@80000 {
73 label = "config";
74 reg = <0x80000 0x80000>;
75 read-only;
76 };
77
78 factory: partition@100000 {
79 label = "factory";
80 reg = <0x100000 0x40000>;
81 read-only;
82 };
83
84 partition@140000 {
85 label = "config2";
86 reg = <0x140000 0x40000>;
87 read-only;
88 };
89
90 partition@180000 {
91 label = "firmware";
92 compatible = "openwrt,uimage", "denx,uimage";
93 openwrt,padding = <96>;
94 reg = <0x180000 0x2800000>;
95 };
96
97 partition@2980000 {
98 label = "private";
99 reg = <0x2980000 0x2000000>;
100 read-only;
101 };
102
103 partition@4980000 {
104 label = "firmware2";
105 reg = <0x4980000 0x2800000>;
106 };
107
108 partition@7180000 {
109 label = "mydlink";
110 reg = <0x7180000 0x600000>;
111 read-only;
112 };
113
114 partition@7780000 {
115 label = "reserved";
116 reg = <0x7780000 0x880000>;
117 read-only;
118 };
119 };
120 };
121
122 &pcie {
123 status = "okay";
124 };
125
126 &pcie0 {
127 wifi0: wifi@0,0 {
128 compatible = "mediatek,mt76";
129 reg = <0x0000 0 0 0 0>;
130 mediatek,mtd-eeprom = <&factory 0x0000>;
131 ieee80211-freq-limit = <2400000 2500000>;
132
133 led {
134 led-active-low;
135 };
136 };
137 };
138
139 &pcie1 {
140 wifi1: wifi@0,0 {
141 compatible = "mediatek,mt76";
142 reg = <0x0000 0 0 0 0>;
143 mediatek,mtd-eeprom = <&factory 0x8000>;
144 ieee80211-freq-limit = <5000000 6000000>;
145
146 led {
147 led-active-low;
148 };
149 };
150 };
151
152 &gmac0 {
153 nvmem-cells = <&macaddr_factory_e000>;
154 nvmem-cell-names = "mac-address";
155 };
156
157 &gmac1 {
158 status = "okay";
159 label = "wan";
160 phy-handle = <&ethphy4>;
161
162 nvmem-cells = <&macaddr_factory_e006>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &mdio {
167 ethphy4: ethernet-phy@4 {
168 reg = <4>;
169 };
170 };
171
172 &switch0 {
173 ports {
174 port@0 {
175 status = "okay";
176 label = "lan4";
177 };
178
179 port@1 {
180 status = "okay";
181 label = "lan3";
182 };
183
184 port@2 {
185 status = "okay";
186 label = "lan2";
187 };
188
189 port@3 {
190 status = "okay";
191 label = "lan1";
192 };
193 };
194 };
195
196 &state_default {
197 gpio {
198 groups = "i2c", "uart3", "jtag", "wdt";
199 function = "gpio";
200 };
201 };
202
203 &factory {
204 compatible = "nvmem-cells";
205 #address-cells = <1>;
206 #size-cells = <1>;
207
208 macaddr_factory_e000: macaddr@e000 {
209 reg = <0xe000 0x6>;
210 };
211
212 macaddr_factory_e006: macaddr@e006 {
213 reg = <0xe006 0x6>;
214 };
215 };