ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / DWR-921-C1.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dwr-921-c1", "ralink,mt7620n-soc";
10 model = "D-Link DWR-921 C1";
11
12 aliases {
13 led-boot = &led_sstrenghg;
14 led-failsafe = &led_sstrenghg;
15 led-running = &led_sstrenghg;
16 led-upgrade = &led_sstrenghg;
17 };
18
19 gpio-keys-polled {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 gpio-leds {
37 compatible = "gpio-leds";
38
39 sms {
40 label = "dwr-921-c1:green:sms";
41 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
42 };
43
44 lan {
45 label = "dwr-921-c1:green:lan";
46 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
47 };
48
49 led_sstrenghg: sstrengthg {
50 label = "dwr-921-c1:green:sigstrength";
51 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
52 };
53
54 sstrengthr {
55 label = "dwr-921-c1:red:sigstrength";
56 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
57 };
58
59 4g {
60 label = "dwr-921-c1:green:4g";
61 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
62 };
63
64 3g {
65 label = "dwr-921-c1:green:3g";
66 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
67 };
68
69 wifi {
70 label = "dwr-921-c1:green:wifi";
71 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
72 };
73 };
74
75 gpio_export {
76 compatible = "gpio-export";
77 #size-cells = <0>;
78
79 lte_modem_enable {
80 gpio-export,name = "lte_modem_enable";
81 gpio-export,output = <1>;
82 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
83 };
84 };
85 };
86
87 &gpio1 {
88 status = "okay";
89 };
90
91 &gpio2 {
92 status = "okay";
93 };
94
95 &gpio3 {
96 status = "okay";
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
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "jboot";
114 reg = <0x0 0x10000>;
115 read-only;
116 };
117
118 partition@10000 {
119 label = "firmware";
120 reg = <0x10000 0xfe0000>;
121 };
122
123 config: partition@ff0000 {
124 label = "config";
125 reg = <0xff0000 0x10000>;
126 read-only;
127 };
128 };
129 };
130 };
131
132 &ehci {
133 status = "okay";
134 };
135
136 &ohci {
137 status = "okay";
138 };
139
140 &ethernet {
141 port@4 {
142 status = "okay";
143 };
144 };
145
146 &pinctrl {
147 state_default: pinctrl0 {
148 default {
149 ralink,group = "spi refclk", "i2c", "ephy", "wled";
150 ralink,function = "gpio";
151 };
152 };
153 };