ramips: fix power LED DTB for wt3020
[openwrt/staging/wigyori.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-status = &led_sstrenghg;
14 };
15
16 gpio-keys-polled {
17 compatible = "gpio-keys-polled";
18 poll-interval = <20>;
19
20 wps {
21 label = "wps";
22 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 };
25
26 reset {
27 label = "reset";
28 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31 };
32
33 gpio-leds {
34 compatible = "gpio-leds";
35
36 sms {
37 label = "dwr-921-c1:green:sms";
38 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
39 };
40
41 lan {
42 label = "dwr-921-c1:green:lan";
43 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
44 };
45
46 led_sstrenghg: sstrengthg {
47 label = "dwr-921-c1:green:sigstrength";
48 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
49 };
50
51 sstrengthr {
52 label = "dwr-921-c1:red:sigstrength";
53 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
54 };
55
56 4g {
57 label = "dwr-921-c1:green:4g";
58 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
59 };
60
61 3g {
62 label = "dwr-921-c1:green:3g";
63 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
64 };
65
66 wifi {
67 label = "dwr-921-c1:green:wifi";
68 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
69 };
70 };
71
72 gpio_export {
73 compatible = "gpio-export";
74 #size-cells = <0>;
75
76 lte_modem_enable {
77 gpio-export,name = "lte_modem_enable";
78 gpio-export,output = <1>;
79 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
80 };
81 };
82 };
83
84 &gpio1 {
85 status = "okay";
86 };
87
88 &gpio2 {
89 status = "okay";
90 };
91
92 &gpio3 {
93 status = "okay";
94 };
95
96 &spi0 {
97 status = "okay";
98
99 m25p80@0 {
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <10000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "jboot";
111 reg = <0x0 0x10000>;
112 read-only;
113 };
114
115 partition@10000 {
116 label = "firmware";
117 reg = <0x10000 0xfe0000>;
118 };
119
120 config: partition@ff0000 {
121 label = "config";
122 reg = <0xff0000 0x10000>;
123 read-only;
124 };
125 };
126 };
127 };
128
129 &ehci {
130 status = "okay";
131 };
132
133 &ohci {
134 status = "okay";
135 };
136
137 &ethernet {
138 port@4 {
139 status = "okay";
140 };
141 };
142
143 &pinctrl {
144 state_default: pinctrl0 {
145 default {
146 ralink,group = "spi refclk", "i2c", "ephy", "wled";
147 ralink,function = "gpio";
148 };
149 };
150 };