perf: fix build on PowerPC
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_iodata_wn-deax1800gr.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "iodata,wn-deax1800gr", "mediatek,mt7621-soc";
11 model = "I-O DATA WN-DEAX1800GR";
12
13 aliases {
14 led-boot = &led_status_green;
15 led-failsafe = &led_status_red;
16 led-upgrade = &led_status_green;
17 label-mac-device = &gmac1;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_green: led-0 {
28 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
29 color = <LED_COLOR_ID_GREEN>;
30 function = LED_FUNCTION_STATUS;
31 };
32
33 led_status_red: led-1 {
34 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
35 color = <LED_COLOR_ID_RED>;
36 function = LED_FUNCTION_STATUS;
37 };
38
39 led-2 {
40 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
41 color = <LED_COLOR_ID_GREEN>;
42 function = LED_FUNCTION_WPS;
43 };
44
45 led-3 {
46 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
47 color = <LED_COLOR_ID_GREEN>;
48 function = LED_FUNCTION_POWER;
49 default-state = "on";
50 };
51
52 led-4 {
53 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
54 color = <LED_COLOR_ID_GREEN>;
55 function = LED_FUNCTION_INDICATOR;
56 };
57
58 led-5 {
59 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
60 color = <LED_COLOR_ID_GREEN>;
61 function = LED_FUNCTION_WAN;
62 };
63 };
64
65 keys {
66 compatible = "gpio-keys";
67
68 wps {
69 label = "wps";
70 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_WPS_BUTTON>;
72 };
73
74 reset {
75 label = "reset";
76 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_RESTART>;
78 };
79
80 led_on {
81 label = "led_on";
82 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
83 linux,code = <BTN_0>;
84 linux,input-type = <EV_SW>;
85 };
86 };
87 };
88
89 &nand {
90 status = "okay";
91
92 mediatek,nmbm;
93 mediatek,bmt-remap-range =
94 <0x0000000 0x780000>, /* u-boot - kernel1(6 MiB) */
95 <0x2f80000 0x600000>, /* kernel2 - kernel2(6 MiB) */
96 <0x5d80000 0x780000>; /* storage - working */
97
98 partitions {
99 compatible = "fixed-partitions";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 partition@0 {
104 label = "u-boot";
105 reg = <0x0 0x80000>;
106 read-only;
107 };
108
109 partition@80000 {
110 label = "u-boot-env";
111 reg = <0x80000 0x80000>;
112 read-only;
113 };
114
115 partition@100000 {
116 label = "factory";
117 reg = <0x100000 0x80000>;
118 read-only;
119
120 nvmem-layout {
121 compatible = "fixed-layout";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 eeprom: eeprom@0 {
126 reg = <0x0 0xe00>;
127 };
128
129 macaddr_factory_4: macaddr@4 {
130 compatible = "mac-base";
131 reg = <0x4 0x6>;
132 #nvmem-cell-cells = <1>;
133 };
134
135 precal: precal@e10 {
136 reg = <0xe10 0x19c10>;
137 };
138 };
139 };
140
141 partition@180000 {
142 label = "kernel";
143 reg = <0x180000 0x600000>;
144 };
145
146 partition@580000 {
147 label = "ubi";
148 reg = <0x780000 0x2800000>;
149 };
150
151 partition@2f80000 {
152 label = "firmware2";
153 reg = <0x2f80000 0x2e00000>;
154 };
155
156 partition@5d80000 {
157 label = "storage";
158 reg = <0x5d80000 0x600000>;
159 read-only;
160 };
161
162 partition@6380000 {
163 label = "idmkey";
164 reg = <0x6380000 0x100000>;
165 read-only;
166 };
167
168 partition@6480000 {
169 label = "working";
170 reg = <0x6480000 0x80000>;
171 };
172 };
173 };
174
175 &gmac0 {
176 nvmem-cells = <&macaddr_factory_4 0>;
177 nvmem-cell-names = "mac-address";
178 };
179
180 &gmac1 {
181 status = "okay";
182 label = "wan";
183 phy-handle = <&ethphy0>;
184
185 nvmem-cells = <&macaddr_factory_4 2>;
186 nvmem-cell-names = "mac-address";
187 };
188
189 &mdio {
190 ethphy0: ethernet-phy@0 {
191 reg = <0>;
192 };
193 };
194
195 &switch0 {
196 ports {
197 port@1 {
198 status = "okay";
199 label = "lan2";
200 };
201
202 port@2 {
203 status = "okay";
204 label = "lan1";
205 };
206 };
207 };
208
209 &pcie {
210 status = "okay";
211 };
212
213 /*
214 * pcie0: MT7915 HIF (14c3,7916)
215 * pcie1: MT7915 (14c3,7915)
216 */
217 &pcie1 {
218 wifi@0,0 {
219 compatible = "mediatek,mt76";
220 reg = <0x0000 0 0 0 0>;
221
222 nvmem-cells = <&eeprom>, <&precal>;
223 nvmem-cell-names = "eeprom", "precal";
224 };
225 };
226
227 &state_default {
228 gpio {
229 groups = "i2c", "jtag", "uart2", "uart3";
230 function = "gpio";
231 };
232 };
233
234 &xhci {
235 status = "disabled";
236 };