ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / elecom_wrc-gst.dtsi
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_power_green;
11 led-failsafe = &led_power_green;
12 led-running = &led_power_green;
13 led-upgrade = &led_power_green;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x8000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 led_power_green: power_green {
29 label = "wrc-gst:green:power";
30 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
31 };
32
33 power_blue {
34 label = "wrc-gst:blue:power";
35 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
36 };
37
38 wps {
39 label = "wrc-gst:red:wps";
40 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
41 };
42
43 power_red {
44 label = "wrc-gst:red:power";
45 gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
46 };
47 };
48
49 gpio-keys-polled {
50 compatible = "gpio-keys-polled";
51 poll-interval = <20>;
52
53 reset {
54 label = "reset";
55 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58
59 wps {
60 label = "wps";
61 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_WPS_BUTTON>;
63 };
64
65 client {
66 label = "client";
67 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
68 linux,code = <BTN_0>;
69 linux,input-type = <EV_SW>;
70 };
71
72 ap {
73 label = "ap";
74 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
75 linux,code = <BTN_0>;
76 linux,input-type = <EV_SW>;
77 };
78
79 extender {
80 label = "extender";
81 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
82 linux,code = <BTN_0>;
83 linux,input-type = <EV_SW>;
84 };
85
86 router {
87 label = "router";
88 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
89 linux,code = <BTN_0>;
90 linux,input-type = <EV_SW>;
91 };
92 };
93 };
94
95 &ethernet {
96 mtd-mac-address = <&factory 0xe000>;
97 };
98
99 &spi0 {
100 status = "okay";
101
102 m25p80@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <10000000>;
106 m25p,chunked-io = <32>;
107
108 partitions {
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 partition@0 {
114 label = "u-boot";
115 reg = <0x0 0x30000>;
116 read-only;
117 };
118
119 partition@30000 {
120 label = "u-boot-env";
121 reg = <0x30000 0x10000>;
122 read-only;
123 };
124
125 factory: partition@40000 {
126 label = "factory";
127 reg = <0x40000 0x10000>;
128 read-only;
129 };
130
131 partition@50000 {
132 label = "firmware";
133 reg = <0x50000 0xb00000>;
134 };
135
136 partition@b50000 {
137 label = "tm_pattern";
138 reg = <0xb50000 0x380000>;
139 read-only;
140 };
141
142 partition@ed0000 {
143 label = "tm_key";
144 reg = <0xed0000 0x80000>;
145 read-only;
146 };
147
148 partition@f50000 {
149 label = "art_block";
150 reg = <0xf50000 0x30000>;
151 read-only;
152 };
153
154 partition@f80000 {
155 label = "user_data";
156 reg = <0xf80000 0x80000>;
157 read-only;
158 };
159 };
160 };
161 };
162
163 &pinctrl {
164 state_default: pinctrl0 {
165 gpio {
166 ralink,group = "uart3", "jtag", "wdt", "sdhci";
167 ralink,function = "gpio";
168 };
169 };
170 };
171
172 &pcie {
173 status = "okay";
174 /* WRC-xxxxGST has MT7615 for 2.4/5 GHz wifi, but it's not supported */
175 };
176
177 &xhci {
178 status = "disabled";
179 };