efea79e2e204748386685c239859b7a4d8e4e8c9
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_beeline_smartbox-giga.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 = "beeline,smartbox-giga", "mediatek,mt7621-soc";
11 model = "Beeline SmartBox GIGA";
12
13 aliases {
14 label-mac-device = &gmac0;
15
16 led-boot = &led_status_green;
17 led-failsafe = &led_status_red;
18 led-running = &led_status_green;
19 led-upgrade = &led_status_red;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_status_green: led-0 {
26 label = "green:status";
27 color = <LED_COLOR_ID_GREEN>;
28 function = LED_FUNCTION_STATUS;
29 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
30 };
31
32 led-1 {
33 label = "blue:wan";
34 color = <LED_COLOR_ID_BLUE>;
35 function = LED_FUNCTION_WAN;
36 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
37 };
38
39 led_status_red: led-2 {
40 label = "red:status";
41 color = <LED_COLOR_ID_RED>;
42 function = LED_FUNCTION_STATUS;
43 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 reset {
51 label = "reset";
52 gpios = <&gpio 4 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 0x5400000>;
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 };
95
96 factory: partition@200000 {
97 label = "Factory";
98 reg = <0x200000 0x100000>;
99 sercomm,scpart-id = <2>;
100 read-only;
101
102 compatible = "nvmem-cells";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 macaddr_factory_21000: macaddr@21000 {
107 reg = <0x21000 0x6>;
108 };
109 };
110
111 partition@300000 {
112 label = "Boot Flag";
113 reg = <0x300000 0x100000>;
114 sercomm,scpart-id = <3>;
115 };
116
117 partition@400000 {
118 label = "kernel";
119 reg = <0x400000 0x600000>;
120 sercomm,scpart-id = <4>;
121 };
122
123 partition@a00000 {
124 label = "Kernel 2";
125 reg = <0xa00000 0x600000>;
126 sercomm,scpart-id = <5>;
127 read-only;
128 };
129
130 ubiconcat0: partition@1000000 {
131 label = "File System 1";
132 reg = <0x1000000 0x1800000>;
133 sercomm,scpart-id = <6>;
134 };
135
136 partition@2800000 {
137 label = "File System 2";
138 reg = <0x2800000 0x1800000>;
139 sercomm,scpart-id = <7>;
140 read-only;
141 };
142
143 ubiconcat1: partition@4000000 {
144 label = "Configuration/log";
145 reg = <0x4000000 0x800000>;
146 sercomm,scpart-id = <8>;
147 };
148
149 ubiconcat2: partition@4800000 {
150 label = "application tmp buffer (Ftool)";
151 reg = <0x4800000 0xc00000>;
152 sercomm,scpart-id = <9>;
153 };
154
155 ubiconcat3: partition@5400000 {
156 label = "container";
157 reg = <0x5400000 0x2800000>;
158 sercomm,scpart-id = <10>;
159 };
160
161 partition@7c00000 {
162 label = "bad block reserved";
163 reg = <0x7c00000 0x380000>;
164 sercomm,scpart-id = <11>;
165 read-only;
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 nvmem-cells = <&macaddr_factory_21000>;
182 nvmem-cell-names = "mac-address";
183 mac-address-increment = <(5)>;
184 };
185 };
186
187 &pcie1 {
188 wifi@0,0 {
189 compatible = "mediatek,mt76";
190 reg = <0x0000 0 0 0 0>;
191 mediatek,mtd-eeprom = <&factory 0x0>;
192 ieee80211-freq-limit = <2400000 2500000>;
193
194 nvmem-cells = <&macaddr_factory_21000>;
195 nvmem-cell-names = "mac-address";
196 mac-address-increment = <(4)>;
197 };
198 };
199
200 &gmac0 {
201 nvmem-cells = <&macaddr_factory_21000>;
202 nvmem-cell-names = "mac-address";
203 };
204
205 &switch0 {
206 ports {
207 port@0 {
208 status = "okay";
209 label = "wan";
210
211 nvmem-cells = <&macaddr_factory_21000>;
212 nvmem-cell-names = "mac-address";
213 mac-address-increment = <(1)>;
214 };
215
216 port@1 {
217 status = "okay";
218 label = "lan1";
219 };
220
221 port@2 {
222 status = "okay";
223 label = "lan2";
224 };
225 };
226 };
227
228 &uartlite3 {
229 status = "okay";
230 };
231
232 &state_default {
233 gpio {
234 groups = "i2c", "jtag";
235 function = "gpio";
236 };
237 };