d987046a0f358763a988f663611aba3d9ce4f5d6
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_beeline_smartbox-turbo.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-turbo", "mediatek,mt7621-soc";
11 model = "Beeline SmartBox TURBO";
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-1 {
26 label = "blue:wan";
27 color = <LED_COLOR_ID_BLUE>;
28 function = LED_FUNCTION_WAN;
29 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
30 };
31
32 led_status_green: led-0 {
33 label = "green:status";
34 color = <LED_COLOR_ID_GREEN>;
35 function = LED_FUNCTION_STATUS;
36 gpios = <&gpio 15 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 16 GPIO_ACTIVE_HIGH>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61 };
62
63 ubi-concat {
64 compatible = "mtd-concat";
65 devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 \
66 &ubiconcat3>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "ubi";
75 reg = <0x0 0xca00000>;
76 };
77 };
78 };
79 };
80
81 &nand {
82 status = "okay";
83
84 partitions {
85 compatible = "sercomm,sc-partitions", "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x100000>;
92 sercomm,scpart-id = <0>;
93 read-only;
94 };
95
96 partition@100000 {
97 label = "dynamic partition map";
98 reg = <0x100000 0x100000>;
99 sercomm,scpart-id = <1>;
100 read-only;
101 };
102
103 factory: partition@200000 {
104 label = "Factory";
105 reg = <0x200000 0x100000>;
106 sercomm,scpart-id = <2>;
107 read-only;
108
109 compatible = "nvmem-cells";
110 #address-cells = <1>;
111 #size-cells = <1>;
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 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 port@3 {
227 status = "okay";
228 label = "lan3";
229 };
230
231 port@4 {
232 status = "okay";
233 label = "lan4";
234 };
235 };
236 };
237
238 &uartlite3 {
239 status = "okay";
240 };
241
242 &state_default {
243 gpio {
244 groups = "jtag", "uart2";
245 function = "gpio";
246 };
247 };