ramips: mt7621-dts: mux phy0/4 to gmac1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_unielec_u7621-01.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 compatible = "unielec,u7621-01", "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_status;
13 led-failsafe = &led_status;
14 led-running = &led_status;
15 led-upgrade = &led_status;
16 };
17
18 gpio-export {
19 compatible = "gpio-export";
20 #size-cells = <0>;
21
22 modem_reset {
23 gpio-export,name = "modem_reset";
24 gpio-export,output = <1>;
25 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
26 };
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_status: status {
43 label = "green:status";
44 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
45 };
46 };
47 };
48
49 &pcie {
50 status = "okay";
51 };
52
53 &pcie0 {
54 wifi@0,0 {
55 compatible = "mediatek,mt76";
56 reg = <0x0000 0 0 0 0>;
57 mediatek,mtd-eeprom = <&factory 0x0000>;
58 ieee80211-freq-limit = <2400000 2500000>;
59 };
60 };
61
62 &pcie1 {
63 wifi@0,0 {
64 compatible = "mediatek,mt76";
65 reg = <0x0000 0 0 0 0>;
66 mediatek,mtd-eeprom = <&factory 0x8000>;
67 ieee80211-freq-limit = <5000000 6000000>;
68
69 led {
70 led-sources = <2>;
71 };
72 };
73 };
74
75 &gmac1 {
76 status = "okay";
77 label = "wan";
78 phy-handle = <&ethphy0>;
79 };
80
81 &mdio {
82 ethphy0: ethernet-phy@0 {
83 reg = <0>;
84 };
85 };
86
87 &switch0 {
88 ports {
89 port@1 {
90 status = "okay";
91 label = "lan1";
92 };
93
94 port@2 {
95 status = "okay";
96 label = "lan2";
97 };
98
99 port@3 {
100 status = "okay";
101 label = "lan3";
102 };
103
104 port@4 {
105 status = "okay";
106 label = "lan4";
107 };
108 };
109 };
110
111 &state_default {
112 gpio {
113 groups = "jtag", "uart2", "wdt";
114 function = "gpio";
115 };
116 };