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