ramips: set usb led trigger via devicetree
[openwrt/openwrt.git] / target / linux / ramips / dts / RT-AC51U.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "asus,rt-ac51u", "ralink,mt7620a-soc";
10 model = "Asus RT-AC51U";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_power: power {
20 label = "rt-ac51u:blue:power";
21 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "rt-ac51u:blue:usb";
26 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
27 trigger-sources = <&ohci_port1>, <&ehci_port1>;
28 linux,default-trigger = "usbport";
29 };
30
31 wifi {
32 label = "rt-ac51u:blue:wifi";
33 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 gpio-keys-polled {
38 compatible = "gpio-keys-polled";
39 poll-interval = <20>;
40
41 reset {
42 label = "reset";
43 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 wps {
48 label = "wps";
49 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53
54 gpio_export {
55 compatible = "gpio-export";
56 #size-cells = <0>;
57
58 enable-leds {
59 gpio-export,name = "enable-leds";
60 gpio-export,output = <1>;
61 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 m25p80@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95 };
96
97 partition@50000 {
98 label = "firmware";
99 reg = <0x50000 0xfb0000>;
100 };
101 };
102 };
103 };
104
105 &ehci {
106 status = "okay";
107 };
108
109 &ohci {
110 status = "okay";
111 };
112
113 &gpio3 {
114 status = "okay";
115 };
116
117 &ethernet {
118 status = "okay";
119 mtd-mac-address = <&factory 0x4>;
120 mediatek,portmap = "wllll";
121 };
122
123 &wmac {
124 ralink,mtd-eeprom = <&factory 0>;
125 };
126
127 &pinctrl {
128 state_default: pinctrl0 {
129 gpio {
130 ralink,group = "i2c", "wled", "uartf";
131 ralink,function = "gpio";
132 };
133 };
134 };