ramips: mt7621-dts: mux phy0/4 to gmac1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wnpr2600g.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 = "iodata,wnpr2600g", "mediatek,mt7621-soc";
10 model = "I-O DATA WNPR2600G";
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 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
25 default-state = "on";
26 };
27
28 notification {
29 label = "green:notification";
30 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
31 };
32
33 wlan2g {
34 label = "green:wlan2g";
35 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
36 linux,default-trigger = "phy0radio";
37 };
38
39 wlan5g {
40 label = "green:wlan5g";
41 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
42 linux,default-trigger = "phy1radio";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 auto {
50 label = "auto";
51 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
52 linux,code = <BTN_0>;
53 linux,input-type = <EV_SW>;
54 };
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 wps {
63 label = "wps";
64 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <40000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x000000 0x030000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x030000 0x010000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x040000 0x010000>;
98 read-only;
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x050000 0xda0000>;
105 };
106
107 partition@df0000 {
108 label = "manufacture";
109 reg = <0xdf0000 0x190000>;
110 read-only;
111 };
112
113 partition@f80000 {
114 label = "storage";
115 reg = <0xf80000 0x080000>;
116 read-only;
117 };
118 };
119 };
120 };
121
122 &gmac0 {
123 nvmem-cells = <&macaddr_factory_4>;
124 nvmem-cell-names = "mac-address";
125 };
126
127 &gmac1 {
128 status = "okay";
129 label = "wan";
130 phy-handle = <&ethphy0>;
131
132 nvmem-cells = <&macaddr_factory_4>;
133 nvmem-cell-names = "mac-address";
134 };
135
136 &mdio {
137 ethphy0: ethernet-phy@0 {
138 reg = <0>;
139 };
140 };
141
142 &switch0 {
143 ports {
144 port@1 {
145 status = "okay";
146 label = "lan4";
147 };
148
149 port@2 {
150 status = "okay";
151 label = "lan3";
152 };
153
154 port@3 {
155 status = "okay";
156 label = "lan2";
157 };
158
159 port@4 {
160 status = "okay";
161 label = "lan1";
162 };
163 };
164 };
165
166 &state_default {
167 gpio {
168 groups = "uart2", "uart3", "jtag", "wdt";
169 function = "gpio";
170 };
171 };
172
173 &pcie {
174 status = "okay";
175 };
176
177 &pcie0 {
178 wifi@0,0 {
179 compatible = "mediatek,mt76";
180 reg = <0x0000 0 0 0 0>;
181 mediatek,mtd-eeprom = <&factory 0x0>;
182 ieee80211-freq-limit = <2400000 2500000>;
183 };
184 };
185
186 &pcie1 {
187 wifi@0,0 {
188 compatible = "mediatek,mt76";
189 reg = <0x0000 0 0 0 0>;
190 mediatek,mtd-eeprom = <&factory 0x8000>;
191 ieee80211-freq-limit = <5000000 6000000>;
192 };
193 };
194
195 &xhci {
196 status = "disabled";
197 };
198
199 &factory {
200 compatible = "nvmem-cells";
201 #address-cells = <1>;
202 #size-cells = <1>;
203
204 macaddr_factory_4: macaddr@4 {
205 reg = <0x4 0x6>;
206 };
207 };