ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_alphanetworks_asl26555.dtsi
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "alphanetworks,asl26555", "ralink,rt3050-soc";
9
10 aliases {
11 led-boot = &led_power_green;
12 led-failsafe = &led_power_green;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_green;
15 };
16
17 keys {
18 compatible = "gpio-keys-polled";
19 poll-interval = <20>;
20
21 reset {
22 label = "reset";
23 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
24 linux,code = <KEY_RESTART>;
25 };
26
27 wps {
28 label = "wps";
29 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
30 linux,code = <KEY_WPS_BUTTON>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 eth {
38 label = "green:eth";
39 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
40 };
41
42 wan-red {
43 function = LED_FUNCTION_WAN;
44 color = <LED_COLOR_ID_RED>;
45 gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
46 };
47
48 wan-green {
49 function = LED_FUNCTION_WAN;
50 color = <LED_COLOR_ID_GREEN>;
51 gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
52 };
53
54 wlan {
55 function = LED_FUNCTION_WLAN;
56 color = <LED_COLOR_ID_GREEN>;
57 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
58 };
59
60 led_power_green: power-green {
61 function = LED_FUNCTION_POWER;
62 color = <LED_COLOR_ID_GREEN>;
63 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
64 };
65
66 power-red {
67 function = LED_FUNCTION_POWER;
68 color = <LED_COLOR_ID_RED>;
69 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
70 };
71
72 3g-green {
73 label = "green:3g";
74 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
75 trigger-sources = <&otg_port1>;
76 linux,default-trigger = "usbport";
77 };
78
79 3g-red {
80 label = "red:3g";
81 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
82 };
83 };
84 };
85
86 &state_default {
87 gpio {
88 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
89 function = "gpio";
90 };
91 };
92
93 &esw {
94 mediatek,portmap = <0x1e>;
95 };
96
97 &wmac {
98 nvmem-cells = <&eeprom_devdata_4000>;
99 nvmem-cell-names = "eeprom";
100 };
101
102 &otg {
103 status = "okay";
104 };