d51ff8212af7f6e02ce234098ee2c4aeef8a7c8d
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_sercomm_dxx_nand_256m.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 label-mac-device = &gmac0;
12
13 led-boot = &led_status_green;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_green;
16 led-upgrade = &led_status_red;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led-1 {
23 label = "blue:wan";
24 color = <LED_COLOR_ID_BLUE>;
25 function = LED_FUNCTION_WAN;
26 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
27 };
28
29 led_status_green: led-0 {
30 label = "green:status";
31 color = <LED_COLOR_ID_GREEN>;
32 function = LED_FUNCTION_STATUS;
33 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
34 };
35
36 led_status_red: led-2 {
37 label = "red:status";
38 color = <LED_COLOR_ID_RED>;
39 function = LED_FUNCTION_STATUS;
40 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 wps {
48 label = "wps";
49 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52
53 reset {
54 label = "reset";
55 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58 };
59
60 ubi-concat {
61 compatible = "mtd-concat";
62 devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 \
63 &ubiconcat3>;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "ubi";
72 reg = <0x0 0xca00000>;
73 };
74 };
75 };
76 };
77
78 &nand {
79 status = "okay";
80
81 partitions {
82 compatible = "sercomm,sc-partitions", "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x100000>;
89 sercomm,scpart-id = <0>;
90 read-only;
91 };
92
93 partition@100000 {
94 label = "dynamic partition map";
95 reg = <0x100000 0x100000>;
96 sercomm,scpart-id = <1>;
97 read-only;
98 };
99
100 factory: partition@200000 {
101 compatible = "nvmem-cells";
102 label = "Factory";
103 reg = <0x200000 0x100000>;
104 sercomm,scpart-id = <2>;
105 #address-cells = <1>;
106 #size-cells = <1>;
107 read-only;
108
109 eeprom_factory_0: eeprom@0 {
110 reg = <0x0 0x400>;
111 };
112
113 macaddr_factory_21000: macaddr@21000 {
114 reg = <0x21000 0x6>;
115 };
116 };
117
118 partition@300000 {
119 label = "Boot Flag";
120 reg = <0x300000 0x100000>;
121 sercomm,scpart-id = <3>;
122 };
123
124 partition@400000 {
125 label = "kernel";
126 reg = <0x400000 0x600000>;
127 sercomm,scpart-id = <4>;
128 };
129
130 partition@a00000 {
131 label = "Kernel 2";
132 reg = <0xa00000 0x600000>;
133 sercomm,scpart-id = <5>;
134 read-only;
135 };
136
137 ubiconcat0: partition@1000000 {
138 label = "File System 1";
139 reg = <0x1000000 0x2000000>;
140 sercomm,scpart-id = <6>;
141 };
142
143 partition@3000000 {
144 label = "File System 2";
145 reg = <0x3000000 0x2000000>;
146 sercomm,scpart-id = <7>;
147 read-only;
148 };
149
150 ubiconcat1: partition@5000000 {
151 label = "Configuration/log";
152 reg = <0x5000000 0x1400000>;
153 sercomm,scpart-id = <8>;
154 };
155
156 ubiconcat2: partition@6400000 {
157 label = "Debug (Ftool)";
158 reg = <0x6400000 0x1a00000>;
159 sercomm,scpart-id = <9>;
160 };
161
162 ubiconcat3: partition@8000000 {
163 label = "Container";
164 reg = <0x8000000 0x7c00000>;
165 sercomm,scpart-id = <10>;
166 };
167 };
168 };
169
170 &pcie {
171 status = "okay";
172 };
173
174 &pcie0 {
175 wifi@0,0 {
176 compatible = "mediatek,mt76";
177 reg = <0x0000 0 0 0 0>;
178 mediatek,mtd-eeprom = <&factory 0x8000>;
179 ieee80211-freq-limit = <5000000 6000000>;
180 };
181 };
182
183 &pcie1 {
184 wifi@0,0 {
185 compatible = "mediatek,mt76";
186 reg = <0x0000 0 0 0 0>;
187 nvmem-cells = <&eeprom_factory_0>;
188 nvmem-cell-names = "eeprom";
189 ieee80211-freq-limit = <2400000 2500000>;
190 };
191 };
192
193 &gmac0 {
194 nvmem-cells = <&macaddr_factory_21000>;
195 nvmem-cell-names = "mac-address";
196 };
197
198 &gmac1 {
199 status = "okay";
200 label = "wan";
201 phy-handle = <&ethphy0>;
202 };
203
204 &mdio {
205 ethphy0: ethernet-phy@0 {
206 reg = <0>;
207 };
208 };
209
210 &switch0 {
211 ports {
212 port@1 {
213 status = "okay";
214 label = "lan1";
215 };
216
217 port@2 {
218 status = "okay";
219 label = "lan2";
220 };
221
222 port@3 {
223 status = "okay";
224 label = "lan3";
225 };
226
227 port@4 {
228 status = "okay";
229 label = "lan4";
230 };
231 };
232 };
233
234 &uartlite3 {
235 status = "okay";
236 };
237
238 &state_default {
239 gpio {
240 groups = "jtag", "uart2";
241 function = "gpio";
242 };
243 };