ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_xiaomi_mi-router-4.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "mt7621_xiaomi_nand_128m.dtsi"
6
7 / {
8 compatible = "xiaomi,mi-router-4", "mediatek,mt7621-soc";
9 model = "Xiaomi Mi Router 4";
10
11 aliases {
12 led-boot = &led_status_yellow;
13 led-failsafe = &led_status_red;
14 led-running = &led_status_blue;
15 led-upgrade = &led_status_yellow;
16 label-mac-device = &gmac0;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_status_red: status_red {
23 function = LED_FUNCTION_STATUS;
24 color = <LED_COLOR_ID_RED>;
25 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
26 };
27
28 led_status_blue: status_blue {
29 function = LED_FUNCTION_STATUS;
30 color = <LED_COLOR_ID_BLUE>;
31 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
32 };
33
34 led_status_yellow: status_yellow {
35 function = LED_FUNCTION_STATUS;
36 color = <LED_COLOR_ID_YELLOW>;
37 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
38 };
39 };
40 };
41
42 &keys {
43 minet {
44 label = "minet";
45 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_WPS_BUTTON>;
47 };
48 };
49
50 &pcie {
51 status = "okay";
52 };
53
54 &pcie0 {
55 wifi@0,0 {
56 compatible = "pci14c3,7603";
57 reg = <0x0000 0 0 0 0>;
58 nvmem-cells = <&eeprom_factory_0>;
59 nvmem-cell-names = "eeprom";
60 ieee80211-freq-limit = <2400000 2500000>;
61 };
62 };
63
64 &pcie1 {
65 wifi@0,0 {
66 compatible = "pci14c3,7662";
67 reg = <0x0000 0 0 0 0>;
68 nvmem-cells = <&eeprom_factory_8000>;
69 nvmem-cell-names = "eeprom";
70 ieee80211-freq-limit = <5000000 6000000>;
71 };
72 };
73
74 &gmac0 {
75 nvmem-cells = <&macaddr_factory_e000>;
76 nvmem-cell-names = "mac-address";
77 };
78
79 &gmac1 {
80 status = "okay";
81 label = "wan";
82 phy-handle = <&ethphy4>;
83
84 nvmem-cells = <&macaddr_factory_e006>;
85 nvmem-cell-names = "mac-address";
86 };
87
88 &mdio {
89 ethphy4: ethernet-phy@4 {
90 reg = <4>;
91 };
92 };
93
94 &switch0 {
95 ports {
96 port@1 {
97 status = "okay";
98 label = "lan2";
99 };
100
101 port@2 {
102 status = "okay";
103 label = "lan1";
104 };
105 };
106 };
107
108 &state_default {
109 gpio {
110 groups = "jtag", "uart2", "uart3", "wdt";
111 function = "gpio";
112 };
113 };