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