b07346bacb46ddd300dd6b082bda3c1550e0a822
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_beeline_smartbox-turbo-plus.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-plus", "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-0 {
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-1 {
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
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "ubi";
74 reg = <0x0 0x4f80000>;
75 };
76 };
77 };
78 };
79
80 &nand {
81 status = "okay";
82
83 partitions {
84 compatible = "sercomm,sc-partitions", "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x0 0x100000>;
91 sercomm,scpart-id = <0>;
92 read-only;
93 };
94
95 partition@100000 {
96 label = "dynamic partition map";
97 reg = <0x100000 0x100000>;
98 sercomm,scpart-id = <1>;
99 read-only;
100 };
101
102 factory: partition@200000 {
103 compatible = "nvmem-cells";
104 label = "Factory";
105 reg = <0x200000 0x100000>;
106 #address-cells = <1>;
107 #size-cells = <1>;
108 sercomm,scpart-id = <2>;
109 read-only;
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 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 = "application tmp buffer (Ftool)";
164 reg = <0x6400000 0x1b80000>;
165 sercomm,scpart-id = <9>;
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 ieee80211-freq-limit = <5000000 6000000>;
179
180 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000>;
181 nvmem-cell-names = "eeprom", "mac-address";
182 mac-address-increment = <(5)>;
183 };
184 };
185
186 &pcie1 {
187 wifi@0,0 {
188 compatible = "mediatek,mt76";
189 reg = <0x0000 0 0 0 0>;
190 ieee80211-freq-limit = <2400000 2500000>;
191
192 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000>;
193 nvmem-cell-names = "eeprom", "mac-address";
194 mac-address-increment = <(4)>;
195 };
196 };
197
198 &gmac0 {
199 nvmem-cells = <&macaddr_factory_21000>;
200 nvmem-cell-names = "mac-address";
201 };
202
203 &gmac1 {
204 status = "okay";
205 label = "wan";
206 phy-handle = <&ethphy0>;
207
208 nvmem-cells = <&macaddr_factory_21000>;
209 nvmem-cell-names = "mac-address";
210 mac-address-increment = <(1)>;
211 };
212
213 &mdio {
214 ethphy0: ethernet-phy@0 {
215 reg = <0>;
216 };
217 };
218
219 &switch0 {
220 ports {
221 port@1 {
222 status = "okay";
223 label = "lan1";
224 };
225
226 port@2 {
227 status = "okay";
228 label = "lan2";
229 };
230
231 port@3 {
232 status = "okay";
233 label = "lan3";
234 };
235
236 port@4 {
237 status = "okay";
238 label = "lan4";
239 };
240 };
241 };
242
243 &uartlite3 {
244 status = "okay";
245 current-speed = <57600>;
246 };
247
248 &state_default {
249 gpio {
250 groups = "i2c", "jtag";
251 function = "gpio";
252 };
253 };