9680aadfbbf970af6b38f0e9c77073a3e580e774
[openwrt/staging/jow.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 mediatek,bbt;
62 mediatek,bmt-remap-range =
63 <0x0000000 0x0800000>,
64 <0x3600000 0x4980000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x100000>;
74 read-only;
75 };
76
77 partition@100000 {
78 label = "u-boot-env";
79 reg = <0x100000 0x100000>;
80 read-only;
81 };
82
83 factory: partition@200000 {
84 label = "factory";
85 reg = <0x200000 0x200000>;
86
87 nvmem-layout {
88 compatible = "fixed-layout";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 eeprom_factory_0: eeprom@0 {
93 reg = <0x0 0x400>;
94 };
95
96 eeprom_factory_8000: eeprom@8000 {
97 reg = <0x8000 0x4da8>;
98 };
99
100 macaddr_factory_1e000: macaddr@1e000 {
101 reg = <0x1e000 0x6>;
102 };
103
104 macaddr_factory_1e006: macaddr@1e006 {
105 reg = <0x1e006 0x6>;
106 };
107 };
108 };
109
110 partition@400000 {
111 label = "kernel";
112 reg = <0x400000 0x400000>;
113 };
114
115 partition@800000 {
116 label = "ubi";
117 reg = <0x800000 0x2e00000>;
118 };
119
120 partition@3600000 {
121 label = "Config";
122 reg = <0x3600000 0x100000>;
123 read-only;
124 };
125
126 partition@3700000 {
127 label = "firmware_2";
128 reg = <0x3700000 0x3200000>;
129 };
130
131 partition@6900000 {
132 label = "Config_2";
133 reg = <0x6900000 0x100000>;
134 read-only;
135 };
136
137 partition@6a00000 {
138 label = "persist";
139 reg = <0x6a00000 0x100000>;
140 };
141
142 partition@6b00000 {
143 label = "idmkey";
144 reg = <0x6b00000 0x100000>;
145 read-only;
146 };
147
148 partition@6c00000 {
149 label = "Backup";
150 reg = <0x6c00000 0x1380000>;
151 read-only;
152 };
153 };
154 };
155
156 &gmac0 {
157 nvmem-cells = <&macaddr_factory_1e000>;
158 nvmem-cell-names = "mac-address";
159 };
160
161 &gmac1 {
162 status = "okay";
163 label = "wan";
164 phy-handle = <&ethphy0>;
165
166 nvmem-cells = <&macaddr_factory_1e006>;
167 nvmem-cell-names = "mac-address";
168 };
169
170 &mdio {
171 ethphy0: ethernet-phy@0 {
172 reg = <0>;
173 };
174 };
175
176 &switch0 {
177 ports {
178 port@1 {
179 status = "okay";
180 label = "lan4";
181 };
182
183 port@2 {
184 status = "okay";
185 label = "lan3";
186 };
187
188 port@3 {
189 status = "okay";
190 label = "lan2";
191 };
192
193 port@4 {
194 status = "okay";
195 label = "lan1";
196 };
197 };
198 };
199
200 &pcie {
201 status = "okay";
202 };
203
204 &pcie0 {
205 wifi@0,0 {
206 compatible = "mediatek,mt76";
207 reg = <0x0000 0 0 0 0>;
208 ieee80211-freq-limit = <2400000 2500000>;
209
210 nvmem-cells = <&eeprom_factory_0>;
211 nvmem-cell-names = "eeprom";
212 };
213 };
214
215 &pcie1 {
216 wifi@0,0 {
217 compatible = "mediatek,mt76";
218 reg = <0x0000 0 0 0 0>;
219 ieee80211-freq-limit = <5000000 6000000>;
220
221 nvmem-cells = <&eeprom_factory_8000>;
222 nvmem-cell-names = "eeprom";
223 };
224 };
225
226 &state_default {
227 gpio {
228 groups = "uart2", "uart3", "wdt";
229 function = "gpio";
230 };
231 };
232
233 &xhci {
234 status = "disabled";
235 };