mediatek: drop redundant label with new LED color/function format
[openwrt/openwrt.git] / target / linux / mediatek / dts / mt7981b-confiabits-mt7981.dts
1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
2 /dts-v1/;
3
4 #include "mt7981.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "Confiabits MT7981";
11 compatible = "confiabits,mt7981", "mediatek,mt7981";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 serial0 = &uart0;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24
25 gpio-keys {
26 compatible = "gpio-keys";
27
28 button-mesh {
29 label = "mesh";
30 linux,input-type = <EV_SW>;
31 linux,code = <BTN_0>;
32 gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
33 debounce-interval = <60>;
34 };
35
36 button-reset {
37 label = "reset";
38 linux,code = <KEY_RESTART>;
39 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 led-wlan5g {
47 color = <LED_COLOR_ID_RED>;
48 function = LED_FUNCTION_WLAN;
49 function-enumerator = <5>;
50 gpios = <&pio 5 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy1tpt";
52 };
53
54 led-wan-red {
55 color = <LED_COLOR_ID_RED>;
56 function = LED_FUNCTION_WAN;
57 gpios = <&pio 6 GPIO_ACTIVE_LOW>;
58 };
59
60 led_power: led-power {
61 color = <LED_COLOR_ID_BLUE>;
62 function = LED_FUNCTION_POWER;
63 gpios = <&pio 7 GPIO_ACTIVE_LOW>;
64 };
65
66 led-lan1 {
67 color = <LED_COLOR_ID_BLUE>;
68 function = LED_FUNCTION_LAN;
69 function-enumerator = <1>;
70 gpios = <&pio 9 GPIO_ACTIVE_LOW>;
71 };
72
73 led-lan2 {
74 color = <LED_COLOR_ID_BLUE>;
75 function = LED_FUNCTION_LAN;
76 function-enumerator = <2>;
77 gpios = <&pio 10 GPIO_ACTIVE_LOW>;
78 };
79
80 led-lan3 {
81 color = <LED_COLOR_ID_BLUE>;
82 function = LED_FUNCTION_LAN;
83 function-enumerator = <3>;
84 gpios = <&pio 11 GPIO_ACTIVE_LOW>;
85 };
86
87 led-wan-blue {
88 color = <LED_COLOR_ID_BLUE>;
89 function = LED_FUNCTION_WAN;
90 gpios = <&pio 12 GPIO_ACTIVE_LOW>;
91 };
92
93 led-wlan2g {
94 color = <LED_COLOR_ID_RED>;
95 function = LED_FUNCTION_WLAN;
96 function-enumerator = <2>;
97 gpios = <&pio 34 GPIO_ACTIVE_LOW>;
98 linux,default-trigger = "phy0tpt";
99 };
100
101 led-mesh {
102 color = <LED_COLOR_ID_BLUE>;
103 function = "mesh"; // no LED_FUNCTION_MESH yet
104 gpios = <&pio 35 GPIO_ACTIVE_LOW>;
105 };
106 };
107 };
108
109 &uart0 {
110 status = "okay";
111 };
112
113 &watchdog {
114 status = "okay";
115 };
116
117 &eth {
118 pinctrl-names = "default";
119 pinctrl-0 = <&mdio_pins>;
120
121 status = "okay";
122
123 gmac0: mac@0 {
124 compatible = "mediatek,eth-mac";
125 reg = <0>;
126 phy-mode = "2500base-x";
127
128 nvmem-cell-names = "mac-address";
129 nvmem-cells = <&macaddr_factory_4 0>;
130
131 fixed-link {
132 speed = <2500>;
133 full-duplex;
134 pause;
135 };
136 };
137 };
138
139
140 &mdio_bus {
141 #address-cells = <1>;
142 #size-cells = <0>;
143
144 switch: switch@1f {
145 compatible = "mediatek,mt7531";
146 reg = <31>;
147 reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
148 };
149 };
150
151 &switch {
152 ports {
153 #address-cells = <1>;
154 #size-cells = <0>;
155
156 port@0 {
157 reg = <0>;
158 label = "lan1";
159 };
160
161 port@2 {
162 reg = <2>;
163 label = "lan2";
164 };
165
166 port@3 {
167 reg = <3>;
168 label = "lan3";
169 };
170
171 port@4 {
172 reg = <4>;
173 label = "wan";
174
175 nvmem-cell-names = "mac-address";
176 nvmem-cells = <&macaddr_factory_4 1>;
177 };
178
179 port@6 {
180 reg = <6>;
181 label = "cpu";
182 ethernet = <&gmac0>;
183 phy-mode = "2500base-x";
184
185 fixed-link {
186 speed = <2500>;
187 full-duplex;
188 pause;
189 };
190 };
191 };
192 };
193
194 &spi0 {
195 pinctrl-names = "default";
196 pinctrl-0 = <&spi0_flash_pins>;
197 status = "okay";
198
199 spi_nand: flash@0 {
200 #address-cells = <1>;
201 #size-cells = <1>;
202 compatible = "spi-nand";
203 reg = <0>;
204 spi-max-frequency = <52000000>;
205
206 spi-cal-enable;
207 spi-cal-mode = "read-data";
208 spi-cal-datalen = <7>;
209 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
210 spi-cal-addrlen = <5>;
211 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
212
213 spi-tx-bus-width = <4>;
214 spi-rx-bus-width = <4>;
215 mediatek,nmbm;
216 mediatek,bmt-max-ratio = <1>;
217 mediatek,bmt-max-reserved-blocks = <64>;
218
219 partitions {
220 compatible = "fixed-partitions";
221 #address-cells = <1>;
222 #size-cells = <1>;
223
224 partition@0 {
225 label = "BL2";
226 reg = <0x00000 0x0100000>;
227 read-only;
228 };
229
230 partition@100000 {
231 label = "u-boot-env";
232 reg = <0x0100000 0x0080000>;
233 read-only;
234 };
235
236 factory: partition@180000 {
237 label = "Factory";
238 reg = <0x180000 0x0200000>;
239 read-only;
240
241 nvmem-layout {
242 compatible = "fixed-layout";
243 #address-cells = <1>;
244 #size-cells = <1>;
245
246 eeprom_factory_0: eeprom@0 {
247 reg = <0x0 0x1000>;
248 };
249
250 macaddr_factory_4: macaddr@4 {
251 compatible = "mac-base";
252 reg = <0x4 0x6>;
253 #nvmem-cell-cells = <1>;
254 };
255 };
256 };
257
258 partition@380000 {
259 label = "FIP";
260 reg = <0x380000 0x0200000>;
261 read-only;
262 };
263
264 partition@580000 {
265 label = "ubi";
266 reg = <0x580000 0x4000000>;
267 compatible = "linux,ubi";
268 };
269 };
270 };
271 };
272
273 &pio {
274 spi0_flash_pins: spi0-pins {
275 mux {
276 function = "spi";
277 groups = "spi0", "spi0_wp_hold";
278 };
279 };
280
281 };
282
283 &usb_phy {
284 status = "okay";
285 };
286
287 &xhci {
288 status = "okay";
289 mediatek,u3p-dis-msk = <0x1>;
290 };
291
292 &wifi {
293 status = "okay";
294 nvmem-cells = <&eeprom_factory_0>;
295 nvmem-cell-names = "eeprom";
296 };