ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620a_netgear_ex3700.dts
1 /* This file is released into the public domain */
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 #include "mt7620a.dtsi"
9
10 / {
11 compatible = "netgear,ex3700", "ralink,mt7620a-soc";
12 model = "Netgear EX3700/EX3800";
13
14 aliases {
15 led-boot = &led_power_green;
16 led-failsafe = &led_power_green;
17 led-running = &led_power_green;
18 led-upgrade = &led_power_green;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_power_green: power_g {
29 label = "ex3700:green:power";
30 gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 power_a {
35 label = "ex3700:amber:power";
36 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
37 };
38
39 router_g {
40 label = "ex3700:green:router";
41 gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
42 };
43
44 router_r {
45 label = "ex3700:red:router";
46 gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
47 };
48
49 device_g {
50 label = "ex3700:green:device";
51 gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
52 };
53
54 device_r {
55 label = "ex3700:red:device";
56 gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
57 };
58
59 wps {
60 label = "ex3700:green:wps";
61 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
62 };
63 };
64
65 keys {
66 compatible = "gpio-keys";
67
68 reset {
69 label = "reset";
70 gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_RESTART>;
72 };
73
74 wps {
75 label = "wps";
76 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_WPS_BUTTON>;
78 };
79 };
80 };
81
82 &gpio0 {
83 status = "okay";
84 };
85
86 &gpio2 {
87 status = "okay";
88 };
89
90 &spi0 {
91 status = "okay";
92
93 m25p80@0 {
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 spi-max-frequency = <10000000>;
97
98 partitions {
99 compatible = "fixed-partitions";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 partition@0 {
104 label = "u-boot";
105 reg = <0x0 0x30000>;
106 read-only;
107 };
108
109 partition@30000 {
110 label = "config";
111 reg = <0x30000 0x10000>;
112 read-only;
113 };
114
115 factory: partition@40000 {
116 label = "factory";
117 reg = <0x40000 0x10000>;
118 read-only;
119 };
120
121 partition@50000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x50000 0x790000>;
125 };
126
127 partition@7e0000 {
128 label = "board_data";
129 reg = <0x7e0000 0x10000>;
130 read-only;
131 };
132
133 partition@7f0000 {
134 label = "nvram";
135 reg = <0x7f0000 0x10000>;
136 read-only;
137 };
138 };
139 };
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &pcie0 {
147 mt76@0,0 {
148 reg = <0x0000 0 0 0 0 >;
149 mediatek,mtd-eeprom = <&factory 0x8000>;
150 ieee80211-freq-limit = <5000000 6000000>;
151 };
152 };
153
154 &ethernet {
155 mtd-mac-address = <&factory 0x28>;
156 };
157
158 &wmac {
159 ralink,mtd-eeprom = <&factory 0x0>;
160 };
161
162 &pinctrl {
163 state_default: pinctrl0 {
164 default {
165 ralink,group = "i2c", "rgmii2", "spi refclk";
166 ralink,function = "gpio";
167 };
168 };
169 };