ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_dlink_dir-8xx.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 aliases {
11 led-boot = &led_power_orange;
12 led-failsafe = &led_power_green;
13 led-running = &led_power_green;
14 led-upgrade = &led_net_orange;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31
32 wifi {
33 label = "wifi";
34 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RFKILL>;
36 };
37 };
38
39 leds: leds {
40 compatible = "gpio-leds";
41
42 led_power_orange: power_orange {
43 function = LED_FUNCTION_POWER;
44 color = <LED_COLOR_ID_ORANGE>;
45 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
46 };
47
48 led_power_green: power_green {
49 function = LED_FUNCTION_POWER;
50 color = <LED_COLOR_ID_GREEN>;
51 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
52 };
53
54 led_net_orange: net_orange {
55 label = "orange:net";
56 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57 };
58
59 net_green {
60 label = "green:net";
61 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
62 };
63 };
64 };
65
66 &pcie {
67 status = "okay";
68 };
69
70 &pcie0 {
71 wifi@0,0 {
72 compatible = "mediatek,mt76";
73 reg = <0x0000 0 0 0 0>;
74 nvmem-cells = <&eeprom_factory_0>;
75 nvmem-cell-names = "eeprom";
76 ieee80211-freq-limit = <2400000 2500000>;
77
78 led {
79 led-active-low;
80 };
81 };
82 };
83
84 &pcie1 {
85 wifi@0,0 {
86 compatible = "mediatek,mt76";
87 reg = <0x0000 0 0 0 0>;
88 nvmem-cells = <&eeprom_factory_8000>;
89 nvmem-cell-names = "eeprom";
90 ieee80211-freq-limit = <5000000 6000000>;
91
92 led {
93 led-active-low;
94 };
95 };
96 };
97
98 &gmac1 {
99 status = "okay";
100 label = "wan";
101 phy-handle = <&ethphy4>;
102 };
103
104 &mdio {
105 ethphy4: ethernet-phy@4 {
106 reg = <4>;
107 };
108 };
109
110 &switch0 {
111 ports {
112 port@0 {
113 status = "okay";
114 label = "lan4";
115 };
116
117 port@1 {
118 status = "okay";
119 label = "lan3";
120 };
121
122 port@2 {
123 status = "okay";
124 label = "lan2";
125 };
126
127 port@3 {
128 status = "okay";
129 label = "lan1";
130 };
131 };
132 };
133
134 &state_default {
135 gpio {
136 groups = "i2c", "uart3", "jtag", "wdt";
137 function = "gpio";
138 };
139 };