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