ramips: mt7621-dts: mux phy0/4 to gmac1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wn-dx1200gr.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,wn-dx1200gr", "mediatek,mt7621-soc";
10 model = "I-O DATA WN-DX1200GR";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac1;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wps {
24 label = "blue:wps";
25 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
26 };
27
28 led_power: power {
29 label = "green:power";
30 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42
43 repeater {
44 label = "repeater";
45 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
46 linux,code = <BTN_0>;
47 linux,input-type = <EV_SW>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
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 = "u-boot";
68 reg = <0x0 0x100000>;
69 read-only;
70 };
71
72 partition@100000 {
73 label = "u-boot-env";
74 reg = <0x100000 0x100000>;
75 read-only;
76 };
77
78 factory: partition@200000 {
79 label = "factory";
80 reg = <0x200000 0x200000>;
81 };
82
83 partition@400000 {
84 label = "kernel";
85 reg = <0x400000 0x400000>;
86 };
87
88 partition@800000 {
89 label = "ubi";
90 reg = <0x800000 0x2e00000>;
91 };
92
93 partition@3600000 {
94 label = "Config";
95 reg = <0x3600000 0x100000>;
96 read-only;
97 };
98
99 partition@3700000 {
100 label = "firmware_2";
101 reg = <0x3700000 0x3200000>;
102 };
103
104 partition@6900000 {
105 label = "Config_2";
106 reg = <0x6900000 0x100000>;
107 read-only;
108 };
109
110 partition@6a00000 {
111 label = "persist";
112 reg = <0x6a00000 0x100000>;
113 };
114
115 partition@6b00000 {
116 label = "idmkey";
117 reg = <0x6b00000 0x100000>;
118 read-only;
119 };
120
121 partition@6c00000 {
122 label = "Backup";
123 reg = <0x6c00000 0x1380000>;
124 read-only;
125 };
126 };
127 };
128
129 &gmac0 {
130 nvmem-cells = <&macaddr_factory_1e000>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &gmac1 {
135 status = "okay";
136 label = "wan";
137 phy-handle = <&ethphy0>;
138
139 nvmem-cells = <&macaddr_factory_1e006>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &mdio {
144 ethphy0: ethernet-phy@0 {
145 reg = <0>;
146 };
147 };
148
149 &switch0 {
150 ports {
151 port@1 {
152 status = "okay";
153 label = "lan4";
154 };
155
156 port@2 {
157 status = "okay";
158 label = "lan3";
159 };
160
161 port@3 {
162 status = "okay";
163 label = "lan2";
164 };
165
166 port@4 {
167 status = "okay";
168 label = "lan1";
169 };
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
182 mediatek,mtd-eeprom = <&factory 0x0>;
183 ieee80211-freq-limit = <2400000 2500000>;
184 };
185 };
186
187 &pcie1 {
188 wifi@0,0 {
189 compatible = "mediatek,mt76";
190 reg = <0x0000 0 0 0 0>;
191
192 mediatek,mtd-eeprom = <&factory 0x8000>;
193 ieee80211-freq-limit = <5000000 6000000>;
194 };
195 };
196
197 &state_default {
198 gpio {
199 groups = "uart2", "uart3", "wdt";
200 function = "gpio";
201 };
202 };
203
204 &xhci {
205 status = "disabled";
206 };
207
208 &factory {
209 compatible = "nvmem-cells";
210 #address-cells = <1>;
211 #size-cells = <1>;
212
213 macaddr_factory_1e000: macaddr@1e000 {
214 reg = <0x1e000 0x6>;
215 };
216
217 macaddr_factory_1e006: macaddr@1e006 {
218 reg = <0x1e006 0x6>;
219 };
220 };