ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_dlink_dwr-922-e2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620n.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "dlink,dwr-922-e2", "ralink,mt7620n-soc";
11 model = "D-Link DWR-922 E2";
12
13 aliases {
14 led-boot = &sstrengthg;
15 led-failsafe = &sstrengthg;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 wps {
22 label = "wps";
23 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_WPS_BUTTON>;
25 };
26
27 reset {
28 label = "reset";
29 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36 led-boot = &sstrengthg;
37
38 sms {
39 label = "dwr-922-e2:green:sms";
40 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
41 };
42
43 lan {
44 label = "dwr-922-e2:green:lan";
45 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
46 };
47
48 sstrengthg: sstrengthg {
49 label = "dwr-922-e2:green:sigstrength";
50 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
51 };
52
53 sstrengthr {
54 label = "dwr-922-e2:red:sigstrength";
55 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
56 };
57
58 4g {
59 label = "dwr-922-e2:green:4g";
60 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
61 };
62
63 3g {
64 label = "dwr-922-e2:green:3g";
65 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
66 };
67
68 wifi {
69 label = "dwr-922-e2: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 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <10000000>;
105
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "jboot";
113 reg = <0x0 0x10000>;
114 read-only;
115 };
116
117 partition@10000 {
118 compatible = "amit,jimage";
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 };