ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.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 flash@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 &state_default {
101 gpio {
102 groups = "i2c", "uartf";
103 function = "gpio";
104 };
105 };
106
107 &ethernet {
108 pinctrl-names = "default";
109 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
110
111 mtd-mac-address = <&factory 0x28>;
112
113 port@5 {
114 status = "okay";
115 mediatek,fixed-link = <1000 1 1 1>;
116 phy-mode = "rgmii";
117 };
118
119 mdio-bus {
120 status = "okay";
121
122 phy0: ethernet-phy@0 {
123 reg = <0>;
124 phy-mode = "rgmii";
125 };
126
127 phy1: ethernet-phy@1 {
128 reg = <1>;
129 phy-mode = "rgmii";
130 };
131
132 phy2: ethernet-phy@2 {
133 reg = <2>;
134 phy-mode = "rgmii";
135 };
136
137 phy3: ethernet-phy@3 {
138 reg = <3>;
139 phy-mode = "rgmii";
140 };
141
142 phy4: ethernet-phy@4 {
143 reg = <4>;
144 phy-mode = "rgmii";
145 };
146
147 phy1f: ethernet-phy@1f {
148 reg = <0x1f>;
149 phy-mode = "rgmii";
150 };
151 };
152 };
153
154 &gsw {
155 mediatek,port4 = "gmac";
156 };
157
158 &wmac {
159 ralink,mtd-eeprom = <&factory 0x0>;
160 };