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