ramips: mt7621-dts: mux phy0/4 to gmac1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_bzv.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "mediatek,mt7621-soc";
10
11 aliases {
12 label-mac-device = &gmac0;
13 led-boot = &led_power_white;
14 led-failsafe = &led_power_orange;
15 led-running = &led_power_white;
16 led-upgrade = &led_power_orange;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 wps {
23 label = "wps";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27
28 rfkill {
29 label = "rfkill";
30 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RFKILL>;
32 };
33
34 reset {
35 label = "reset";
36 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39 };
40
41 leds: leds {
42 compatible = "gpio-leds";
43
44 led_power_orange: power_orange {
45 gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>;
46 label = "orange:power";
47 };
48
49 led_power_white: power_white {
50 gpios = <&gpio_expander 1 GPIO_ACTIVE_LOW>;
51 label = "white:power";
52 };
53
54 wan_orange {
55 gpios = <&gpio_expander 2 GPIO_ACTIVE_LOW>;
56 label = "orange:wan";
57 };
58
59 wan_white {
60 gpios = <&gpio_expander 3 GPIO_ACTIVE_LOW>;
61 label = "white:wan";
62 };
63
64 wlan2g {
65 gpios = <&gpio_expander 4 GPIO_ACTIVE_LOW>;
66 label = "white:wlan2g";
67 linux,default-trigger = "phy0radio";
68 };
69
70 wlan5g {
71 gpios = <&gpio_expander 5 GPIO_ACTIVE_LOW>;
72 label = "white:wlan5g";
73 linux,default-trigger = "phy1radio";
74 };
75
76 usb3 {
77 gpios = <&gpio_expander 7 GPIO_ACTIVE_LOW>;
78 label = "white:usb3";
79 linux,default-trigger = "usbport";
80 trigger-sources = <&xhci_ehci_port1>;
81 };
82
83 lan1_orange {
84 gpios = <&gpio_expander 8 GPIO_ACTIVE_LOW>;
85 label = "orange:lan1";
86 };
87
88 lan1_white {
89 gpios = <&gpio_expander 9 GPIO_ACTIVE_LOW>;
90 label = "white:lan1";
91 };
92
93 lan2_orange {
94 gpios = <&gpio_expander 10 GPIO_ACTIVE_LOW>;
95 label = "orange:lan2";
96 };
97
98 lan2_white {
99 gpios = <&gpio_expander 11 GPIO_ACTIVE_LOW>;
100 label = "white:lan2";
101 };
102
103 lan3_orange {
104 gpios = <&gpio_expander 12 GPIO_ACTIVE_LOW>;
105 label = "orange:lan3";
106 };
107
108 lan3_white {
109 gpios = <&gpio_expander 13 GPIO_ACTIVE_LOW>;
110 label = "white:lan3";
111 };
112
113 lan4_orange {
114 gpios = <&gpio_expander 14 GPIO_ACTIVE_LOW>;
115 label = "orange:lan4";
116 };
117
118 lan4_white {
119 gpios = <&gpio_expander 15 GPIO_ACTIVE_LOW>;
120 label = "white:lan4";
121 };
122
123 wps {
124 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
125 label = "white:wps";
126 };
127
128 wlan {
129 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
130 label = "white:wlan";
131 };
132 };
133 };
134
135 &state_default {
136 gpio {
137 groups = "uart3", "uart2", "jtag", "wdt";
138 function = "gpio";
139 };
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &pcie0 {
147 wifi@0,0 {
148 compatible = "mediatek,mt76";
149 reg = <0x0 0 0 0 0>;
150 mediatek,mtd-eeprom = <&factory 0x0>;
151 ieee80211-freq-limit = <2400000 2500000>;
152 };
153 };
154
155 &pcie1 {
156 wifi@0,0 {
157 compatible = "mediatek,mt76";
158 reg = <0x0 0 0 0 0>;
159 mediatek,mtd-eeprom = <&factory 0x8000>;
160 ieee80211-freq-limit = <5000000 6000000>;
161 };
162 };
163
164 &gmac0 {
165 nvmem-cells = <&macaddr_factory_4>;
166 nvmem-cell-names = "mac-address";
167 };
168
169 &gmac1 {
170 status = "okay";
171 label = "wan";
172 phy-handle = <&ethphy4>;
173
174 nvmem-cells = <&macaddr_factory_4>;
175 nvmem-cell-names = "mac-address";
176 mac-address-increment = <2>;
177 };
178
179 &mdio {
180 ethphy4: ethernet-phy@4 {
181 reg = <4>;
182 };
183 };
184
185 &switch0 {
186 ports {
187 port@0 {
188 status = "okay";
189 label = "lan4";
190 };
191
192 port@1 {
193 status = "okay";
194 label = "lan3";
195 };
196
197 port@2 {
198 status = "okay";
199 label = "lan2";
200 };
201
202 port@3 {
203 status = "okay";
204 label = "lan1";
205 };
206 };
207 };
208
209 &i2c {
210 status = "okay";
211
212 gpio_expander: i2c0gpio-expander@20{
213 #gpio-cells = <2>;
214 #interrupt-cells = <2>;
215 compatible = "semtech,sx1503q";
216 reg = <0x20>;
217
218 gpio-controller;
219 };
220 };
221
222 &nand {
223 status = "okay";
224
225 partitions {
226 compatible = "fixed-partitions";
227 #address-cells = <1>;
228 #size-cells = <1>;
229
230 partition@0 {
231 label = "u-boot";
232 reg = <0x0 0x100000>;
233 read-only;
234 };
235
236 partition@100000 {
237 label = "SC PART_MAP";
238 reg = <0x100000 0x100000>;
239 read-only;
240 };
241
242 partition@200000 {
243 label = "kernel";
244 reg = <0x200000 0x400000>;
245 };
246
247 partition@600000 {
248 label = "ubi";
249 reg = <0x600000 0x2800000>;
250 };
251
252 partition@2e00000 {
253 label = "reserved0";
254 reg = <0x2e00000 0x1800000>;
255 read-only;
256 };
257
258 factory: partition@4600000 {
259 label = "factory";
260 reg = <0x4600000 0x200000>;
261 read-only;
262 };
263
264 partition@4800000 {
265 label = "reserved1";
266 reg = <0x4800000 0x3800000>;
267 read-only;
268 };
269 };
270 };
271
272 &factory {
273 compatible = "nvmem-cells";
274 #address-cells = <1>;
275 #size-cells = <1>;
276
277 macaddr_factory_4: macaddr@4 {
278 reg = <0x4 0x6>;
279 };
280 };