ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_ayx.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
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 = "mediatek,mt7621-soc";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 wps {
23 label = "wps";
24 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27
28 wifi {
29 label = "wifi";
30 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RFKILL>;
32 };
33
34 reset {
35 label = "reset";
36 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 led_power: power {
45 function = LED_FUNCTION_POWER;
46 color = <LED_COLOR_ID_GREEN>;
47 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
48 };
49
50 usb {
51 function = LED_FUNCTION_USB;
52 color = <LED_COLOR_ID_GREEN>;
53 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
54 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
55 linux,default-trigger = "usbport";
56 };
57
58 internet {
59 function = LED_FUNCTION_WAN;
60 color = <LED_COLOR_ID_GREEN>;
61 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
62 };
63
64 wifi {
65 label = "green:wifi";
66 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
67 linux,default-trigger = "phy0tpt";
68 };
69
70 wps {
71 function = LED_FUNCTION_WPS;
72 color = <LED_COLOR_ID_GREEN>;
73 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
74 };
75 };
76
77 reg_usb_vbus: regulator {
78 compatible = "regulator-fixed";
79 regulator-name = "usb_vbus";
80 regulator-min-microvolt = <5000000>;
81 regulator-max-microvolt = <5000000>;
82 gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
83 enable-active-high;
84 };
85 };
86
87 &xhci {
88 vbus-supply = <&reg_usb_vbus>;
89 };
90
91 &pcie {
92 status = "okay";
93 };
94
95 &pcie0 {
96 wifi@0,0 {
97 compatible = "mediatek,mt76";
98 reg = <0x0 0 0 0 0>;
99 ieee80211-freq-limit = <5000000 6000000>;
100 nvmem-cells = <&eeprom1>;
101 nvmem-cell-names = "eeprom";
102 };
103 };
104
105 &pcie2 {
106 wifi@0,0 {
107 compatible = "mediatek,mt76";
108 reg = <0x0 0 0 0 0>;
109 ieee80211-freq-limit = <2400000 2500000>;
110 nvmem-cells = <&eeprom0>;
111 nvmem-cell-names = "eeprom";
112 };
113 };
114
115 &gmac1 {
116 status = "okay";
117 label = "wan";
118 phy-handle = <&ethphy4>;
119 };
120
121 &mdio {
122 ethphy4: ethernet-phy@4 {
123 reg = <4>;
124 };
125 };
126
127 &switch0 {
128 ports {
129 port@0 {
130 status = "okay";
131 label = "lan4";
132 };
133
134 port@1 {
135 status = "okay";
136 label = "lan3";
137 };
138
139 port@2 {
140 status = "okay";
141 label = "lan2";
142 };
143
144 port@3 {
145 status = "okay";
146 label = "lan1";
147 };
148 };
149 };
150
151 &state_default {
152 gpio {
153 groups = "uart3", "uart2", "jtag", "wdt";
154 function = "gpio";
155 };
156 };