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