ramips: update leds & buttons dts description
[openwrt/openwrt.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 color = <LED_COLOR_ID_GREEN>;
27 function = LED_FUNCTION_STATUS;
28 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
29 };
30
31 led-1 {
32 color = <LED_COLOR_ID_BLUE>;
33 function = LED_FUNCTION_WAN;
34 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
35 };
36
37 led_status_red: led-2 {
38 color = <LED_COLOR_ID_RED>;
39 function = LED_FUNCTION_STATUS;
40 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 button-0 {
48 label = "reset";
49 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53
54 ubi-concat {
55 compatible = "mtd-concat";
56 devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 \
57 &ubiconcat3>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 partition@0 {
65 label = "ubi";
66 reg = <0x0 0x5400000>;
67 };
68 };
69 };
70 };
71
72 &nand {
73 status = "okay";
74
75 partitions {
76 compatible = "sercomm,sc-partitions", "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "u-boot";
82 reg = <0x0 0x100000>;
83 sercomm,scpart-id = <0>;
84 read-only;
85 };
86
87 partition@100000 {
88 label = "dynamic partition map";
89 reg = <0x100000 0x100000>;
90 sercomm,scpart-id = <1>;
91 };
92
93 factory: partition@200000 {
94 label = "Factory";
95 reg = <0x200000 0x100000>;
96 sercomm,scpart-id = <2>;
97 read-only;
98
99 nvmem-layout {
100 compatible = "fixed-layout";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 eeprom_factory_0: eeprom@0 {
105 reg = <0x0 0x400>;
106 };
107
108 eeprom_factory_8000: eeprom@8000 {
109 reg = <0x8000 0x4da8>;
110 };
111
112 macaddr_factory_21000: macaddr@21000 {
113 compatible = "mac-base";
114 reg = <0x21000 0x6>;
115 #nvmem-cell-cells = <1>;
116 };
117 };
118 };
119
120 partition@300000 {
121 label = "Boot Flag";
122 reg = <0x300000 0x100000>;
123 sercomm,scpart-id = <3>;
124 };
125
126 partition@400000 {
127 label = "kernel";
128 reg = <0x400000 0x600000>;
129 sercomm,scpart-id = <4>;
130 };
131
132 partition@a00000 {
133 label = "Kernel 2";
134 reg = <0xa00000 0x600000>;
135 sercomm,scpart-id = <5>;
136 read-only;
137 };
138
139 ubiconcat0: partition@1000000 {
140 label = "File System 1";
141 reg = <0x1000000 0x1800000>;
142 sercomm,scpart-id = <6>;
143 };
144
145 partition@2800000 {
146 label = "File System 2";
147 reg = <0x2800000 0x1800000>;
148 sercomm,scpart-id = <7>;
149 read-only;
150 };
151
152 ubiconcat1: partition@4000000 {
153 label = "Configuration/log";
154 reg = <0x4000000 0x800000>;
155 sercomm,scpart-id = <8>;
156 };
157
158 ubiconcat2: partition@4800000 {
159 label = "application tmp buffer (Ftool)";
160 reg = <0x4800000 0xc00000>;
161 sercomm,scpart-id = <9>;
162 };
163
164 ubiconcat3: partition@5400000 {
165 label = "container";
166 reg = <0x5400000 0x2800000>;
167 sercomm,scpart-id = <10>;
168 };
169
170 partition@7c00000 {
171 label = "bad block reserved";
172 reg = <0x7c00000 0x380000>;
173 sercomm,scpart-id = <11>;
174 read-only;
175 };
176 };
177 };
178
179 &pcie {
180 status = "okay";
181 };
182
183 &pcie0 {
184 wifi@0,0 {
185 compatible = "mediatek,mt76";
186 reg = <0x0000 0 0 0 0>;
187 ieee80211-freq-limit = <5000000 6000000>;
188
189 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_21000 5>;
190 nvmem-cell-names = "eeprom", "mac-address";
191 };
192 };
193
194 &pcie1 {
195 wifi@0,0 {
196 compatible = "mediatek,mt76";
197 reg = <0x0000 0 0 0 0>;
198 ieee80211-freq-limit = <2400000 2500000>;
199
200 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_21000 4>;
201 nvmem-cell-names = "eeprom", "mac-address";
202 };
203 };
204
205 &gmac0 {
206 nvmem-cells = <&macaddr_factory_21000 0>;
207 nvmem-cell-names = "mac-address";
208 };
209
210 &gmac1 {
211 status = "okay";
212 label = "wan";
213 phy-handle = <&ethphy0>;
214
215 nvmem-cells = <&macaddr_factory_21000 1>;
216 nvmem-cell-names = "mac-address";
217 };
218
219 &mdio {
220 ethphy0: ethernet-phy@0 {
221 reg = <0>;
222 };
223 };
224
225 &switch0 {
226 ports {
227 port@1 {
228 status = "okay";
229 label = "lan1";
230 };
231
232 port@2 {
233 status = "okay";
234 label = "lan2";
235 };
236 };
237 };
238
239 &uartlite3 {
240 status = "okay";
241 };
242
243 &state_default {
244 gpio {
245 groups = "i2c", "jtag";
246 function = "gpio";
247 };
248 };