ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620a_linksys_e1700.dts
1 /*
2 * Device Tree file for the Linksys E1700
3 *
4 * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
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 = "linksys,e1700", "ralink,mt7620a-soc";
20 model = "Linksys E1700";
21
22 aliases {
23 led-boot = &led_power;
24 led-failsafe = &led_power;
25 led-running = &led_power;
26 led-upgrade = &led_power;
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
35 linux,code = <KEY_RESTART>;
36 };
37
38 wps {
39 label = "wps";
40 gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
41 linux,code = <KEY_WPS_BUTTON>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_power: power {
49 label = "e1700:green:power";
50 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
51 };
52
53 wan {
54 label = "e1700:green:wps";
55 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
56 };
57 };
58 };
59
60 &spi0 {
61 status = "okay";
62
63 m25p80@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <10000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "config";
81 reg = <0x30000 0x10000>;
82 read-only;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 compatible = "denx,uimage";
93 label = "firmware";
94 reg = <0x50000 0x7b0000>;
95 };
96 };
97 };
98 };
99
100 &pinctrl {
101 state_default: pinctrl0 {
102 gpio {
103 ralink,group = "i2c", "uartf";
104 ralink,function = "gpio";
105 };
106 };
107 };
108
109 &ethernet {
110 status = "okay";
111 mtd-mac-address = <&factory 0x28>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
114
115 port@5 {
116 status = "okay";
117 mediatek,fixed-link = <1000 1 1 1>;
118 phy-mode = "rgmii";
119 };
120
121 mdio-bus {
122 status = "okay";
123
124 phy0: ethernet-phy@0 {
125 reg = <0>;
126 phy-mode = "rgmii";
127 };
128
129 phy1: ethernet-phy@1 {
130 reg = <1>;
131 phy-mode = "rgmii";
132 };
133
134 phy2: ethernet-phy@2 {
135 reg = <2>;
136 phy-mode = "rgmii";
137 };
138
139 phy3: ethernet-phy@3 {
140 reg = <3>;
141 phy-mode = "rgmii";
142 };
143
144 phy4: ethernet-phy@4 {
145 reg = <4>;
146 phy-mode = "rgmii";
147 };
148
149 phy1f: ethernet-phy@1f {
150 reg = <0x1f>;
151 phy-mode = "rgmii";
152 };
153 };
154 };
155
156 &gsw {
157 mediatek,port4 = "gmac";
158 };
159
160 &wmac {
161 ralink,mtd-eeprom = <&factory 0>;
162 };