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