ramips: mt7621: convert to nvmem-layout
[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 label = "Factory";
102 reg = <0x200000 0x100000>;
103 sercomm,scpart-id = <2>;
104 read-only;
105
106 nvmem-layout {
107 compatible = "fixed-layout";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 eeprom_factory_0: eeprom@0 {
112 reg = <0x0 0x400>;
113 };
114
115 eeprom_factory_8000: eeprom@8000 {
116 reg = <0x8000 0x4da8>;
117 };
118
119 macaddr_factory_21000: macaddr@21000 {
120 reg = <0x21000 0x6>;
121 };
122 };
123 };
124
125 partition@300000 {
126 label = "Boot Flag";
127 reg = <0x300000 0x100000>;
128 sercomm,scpart-id = <3>;
129 };
130
131 partition@400000 {
132 label = "kernel";
133 reg = <0x400000 0x600000>;
134 sercomm,scpart-id = <4>;
135 };
136
137 partition@a00000 {
138 label = "Kernel 2";
139 reg = <0xa00000 0x600000>;
140 sercomm,scpart-id = <5>;
141 read-only;
142 };
143
144 ubiconcat0: partition@1000000 {
145 label = "File System 1";
146 reg = <0x1000000 0x2000000>;
147 sercomm,scpart-id = <6>;
148 };
149
150 partition@3000000 {
151 label = "File System 2";
152 reg = <0x3000000 0x2000000>;
153 sercomm,scpart-id = <7>;
154 read-only;
155 };
156
157 ubiconcat1: partition@5000000 {
158 label = "Configuration/log";
159 reg = <0x5000000 0x1400000>;
160 sercomm,scpart-id = <8>;
161 };
162
163 ubiconcat2: partition@6400000 {
164 label = "Debug (Ftool)";
165 reg = <0x6400000 0x1a00000>;
166 sercomm,scpart-id = <9>;
167 };
168
169 ubiconcat3: partition@8000000 {
170 label = "Container";
171 reg = <0x8000000 0x7c00000>;
172 sercomm,scpart-id = <10>;
173 };
174 };
175 };
176
177 &pcie {
178 status = "okay";
179 };
180
181 &pcie0 {
182 wifi@0,0 {
183 compatible = "mediatek,mt76";
184 reg = <0x0000 0 0 0 0>;
185 nvmem-cells = <&eeprom_factory_8000>;
186 nvmem-cell-names = "eeprom";
187 ieee80211-freq-limit = <5000000 6000000>;
188 };
189 };
190
191 &pcie1 {
192 wifi@0,0 {
193 compatible = "mediatek,mt76";
194 reg = <0x0000 0 0 0 0>;
195 nvmem-cells = <&eeprom_factory_0>;
196 nvmem-cell-names = "eeprom";
197 ieee80211-freq-limit = <2400000 2500000>;
198 };
199 };
200
201 &gmac0 {
202 nvmem-cells = <&macaddr_factory_21000>;
203 nvmem-cell-names = "mac-address";
204 };
205
206 &gmac1 {
207 status = "okay";
208 label = "wan";
209 phy-handle = <&ethphy0>;
210 };
211
212 &mdio {
213 ethphy0: ethernet-phy@0 {
214 reg = <0>;
215 };
216 };
217
218 &switch0 {
219 ports {
220 port@1 {
221 status = "okay";
222 label = "lan1";
223 };
224
225 port@2 {
226 status = "okay";
227 label = "lan2";
228 };
229
230 port@3 {
231 status = "okay";
232 label = "lan3";
233 };
234
235 port@4 {
236 status = "okay";
237 label = "lan4";
238 };
239 };
240 };
241
242 &uartlite3 {
243 status = "okay";
244 };
245
246 &state_default {
247 gpio {
248 groups = "jtag", "uart2";
249 function = "gpio";
250 };
251 };