ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_unielec_u7621-01.dtsi
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 = "unielec,u7621-01", "mediatek,mt7621-soc";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 gpio-export {
20 compatible = "gpio-export";
21 #size-cells = <0>;
22
23 modem_reset {
24 gpio-export,name = "modem_reset";
25 gpio-export,output = <1>;
26 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_status: status {
44 function = LED_FUNCTION_STATUS;
45 color = <LED_COLOR_ID_GREEN>;
46 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
47 };
48 };
49 };
50
51 &pcie {
52 status = "okay";
53 };
54
55 &pcie1 { // MT7603EN
56 wifi@0,0 {
57 compatible = "mediatek,mt76";
58 reg = <0x0000 0 0 0 0>;
59 nvmem-cells = <&eeprom_factory_0>;
60 nvmem-cell-names = "eeprom";
61
62 led {
63 led-active-low;
64 };
65 };
66 };
67
68 &pcie2 { // MT7612E
69 wifi@0,0 {
70 compatible = "mediatek,mt76";
71 reg = <0x0000 0 0 0 0>;
72 nvmem-cells = <&eeprom_factory_8000>;
73 nvmem-cell-names = "eeprom";
74 ieee80211-freq-limit = <5000000 6000000>;
75 };
76 };
77
78 &gmac1 {
79 status = "okay";
80 label = "wan";
81 phy-handle = <&ethphy0>;
82 };
83
84 &mdio {
85 ethphy0: ethernet-phy@0 {
86 reg = <0>;
87 };
88 };
89
90 &switch0 {
91 ports {
92 port@1 {
93 status = "okay";
94 label = "lan1";
95 };
96
97 port@2 {
98 status = "okay";
99 label = "lan2";
100 };
101
102 port@3 {
103 status = "okay";
104 label = "lan3";
105 };
106
107 port@4 {
108 status = "okay";
109 label = "lan4";
110 };
111 };
112 };
113
114 &state_default {
115 gpio {
116 groups = "jtag", "uart2", "wdt";
117 function = "gpio";
118 };
119 };