ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620a_netgear_ex2700.dts
1 /*
2 * Device Tree file for the Netgear EX2700
3 *
4 * Copyright (C) 2016 Joseph C. Lehner <joseph.c.lehner@gmail.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11 /dts-v1/;
12
13 #include "mt7620a.dtsi"
14
15 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/input/input.h>
17
18 / {
19 compatible = "netgear,ex2700", "ralink,mt7620a-soc";
20 model = "Netgear EX2700";
21
22 aliases {
23 led-boot = &led_power_green;
24 led-failsafe = &led_power_green;
25 led-running = &led_power_green;
26 led-upgrade = &led_power_green;
27 };
28
29 chosen {
30 bootargs = "console=ttyS0,57600";
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_power_green: power_g {
37 label = "ex2700:green:power";
38 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
39 default-state = "on";
40 };
41
42 power_r {
43 label = "ex2700:red:power";
44 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
45 };
46
47 device_g {
48 label = "ex2700:green:device";
49 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
50 };
51
52 device_r {
53 label = "ex2700:red:device";
54 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
55 };
56
57 router_g {
58 label = "ex2700:green:router";
59 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
60 };
61
62 router_r {
63 label = "ex2700:red:router";
64 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
65 };
66
67 wps {
68 label = "ex2700:green:wps";
69 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
70 };
71 };
72
73 keys {
74 compatible = "gpio-keys";
75
76 reset {
77 label = "reset";
78 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_RESTART>;
80 };
81
82 wps {
83 label = "wps";
84 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
85 linux,code = <KEY_WPS_BUTTON>;
86 };
87 };
88 };
89
90 &gpio0 {
91 status = "okay";
92 };
93
94 &gpio1 {
95 status = "okay";
96 };
97
98 &spi0 {
99 status = "okay";
100
101 m25p80@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 = "u-boot";
113 reg = <0x0 0x30000>;
114 read-only;
115 };
116
117 partition@30000 {
118 label = "u-boot-env";
119 reg = <0x30000 0x10000>;
120 read-only;
121 };
122
123 partition@40000 {
124 compatible = "denx,uimage";
125 label = "firmware";
126 reg = <0x40000 0x3b0000>;
127 };
128
129 art: partition@3f0000 {
130 label = "art";
131 reg = <0x3f0000 0x10000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &ethernet {
139 mtd-mac-address = <&art 0x0>;
140 };
141
142 &wmac {
143 mtd-mac-address = <&art 0x6>;
144 ralink,mtd-eeprom = <&art 0x1000>;
145 };
146
147 &pinctrl {
148 state_default: pinctrl0 {
149 default {
150 ralink,group = "i2c", "uartf", "spi refclk";
151 ralink,function = "gpio";
152 };
153 };
154 };