ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_tplink_re210-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/leds/common.h>
4
5 #include "mt7620a_tplink_re2x0-v1.dtsi"
6
7 / {
8 compatible = "tplink,re210-v1", "ralink,mt7620a-soc";
9 model = "TP-Link RE210 v1";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_power: power {
22 function = LED_FUNCTION_POWER;
23 color = <LED_COLOR_ID_GREEN>;
24 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
25 };
26
27 rssi_high {
28 label = "green:rssi-high";
29 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
30 };
31
32 rssi_low {
33 label = "red:rssi-low";
34 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
35 };
36
37 wlan2g {
38 label = "green:wlan2g";
39 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
40 linux,default-trigger = "phy1tpt";
41 };
42
43 wlan5g {
44 label = "green:wlan5g";
45 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
46 linux,default-trigger = "phy0tpt";
47 };
48 };
49 };
50
51 &keys {
52 led_power {
53 label = "LED power";
54 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
55 linux,code = <BTN_0>;
56 };
57 };
58
59 &state_default {
60 gpio {
61 groups = "i2c", "uartf", "wled", "rgmii1";
62 function = "gpio";
63 };
64 };
65
66 &gsw {
67 mediatek,port4-gmac;
68 mediatek,ephy-base = /bits/ 8 <8>;
69 };
70
71 &ethernet {
72 pinctrl-names = "default";
73 pinctrl-0 = <&rgmii2_pins &mdio_pins>;
74
75 port@4 {
76 status = "okay";
77
78 phy-handle = <&phy4>;
79 phy-mode = "rgmii";
80 };
81
82 mdio-bus {
83 status = "okay";
84
85 phy4: ethernet-phy@4 {
86 reg = <4>;
87 phy-mode = "rgmii";
88 };
89 };
90 };
91
92 &gpio1 {
93 status = "okay";
94 };
95
96 &gpio3 {
97 status = "okay";
98 };