8f87212902e1ac45d629a4c1db2fcff785b5dd00
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7620a_edimax_br-6478ac-v2.dts
1 /*
2 * Device Tree file for the Edimax BR-6478AC V2
3 * based on Linksys E1700
4 *
5 * Copyright (C) 2016 Rohan Murch <rohan.murch@gmail.com>
6 * Copyright (C) 2016 Hans Ulli Kroll <ulli.kroll@googlemail.com>
7 * Copyright (C) 2017 James McKenzie <openwrt@madingley.org>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14 /dts-v1/;
15
16 #include "mt7620a.dtsi"
17
18 #include <dt-bindings/gpio/gpio.h>
19 #include <dt-bindings/input/input.h>
20
21 / {
22 compatible = "edimax,br-6478ac-v2", "ralink,mt7620a-soc";
23 model = "Edimax BR-6478AC v2";
24
25 aliases {
26 led-boot = &led_power;
27 led-failsafe = &led_power;
28 led-running = &led_power;
29 led-upgrade = &led_power;
30 };
31
32 chosen {
33 bootargs = "console=ttyS0,57600";
34 };
35
36 keys {
37 compatible = "gpio-keys-polled";
38 poll-interval = <20>;
39
40 reset_wps {
41 label = "reset_wps";
42 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46
47 leds {
48 compatible = "gpio-leds";
49
50 led_power: power {
51 label = "br-6478ac-v2:white:power";
52 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
53 };
54 internet {
55 label = "br-6478ac-v2:blue:internet";
56 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
57 };
58 wlan {
59 label = "br-6478ac-v2:blue:wlan";
60 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
61 };
62 usb {
63 label = "br-6478ac-v2:blue:usb";
64 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
65 trigger-sources = <&ohci_port1>, <&ehci_port1>;
66 linux,default-trigger = "usbport";
67 };
68 };
69
70 gpio_export {
71 compatible = "gpio-export";
72 #size-cells = <0>;
73 usb-power {
74 gpio-export,name="usb-power";
75 gpio-export,output=<1>;
76 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
77 };
78 };
79 };
80
81 &gpio2 {
82 status = "okay";
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0 0>;
91 spi-max-frequency = <10000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x0 0x30000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "u-boot-env";
106 reg = <0x30000 0x10000>;
107 read-only;
108 };
109
110 factory: partition@40000 {
111 label = "factory";
112 reg = <0x40000 0x10000>;
113 read-only;
114 };
115
116 partition@50000 {
117 label = "cimage";
118 reg = <0x50000 0x20000>;
119 read-only;
120 };
121
122 partition@70000 {
123 compatible = "edimax,uimage";
124 label = "firmware";
125 reg = <0x00070000 0x00790000>;
126 };
127 };
128 };
129 };
130
131 &pinctrl {
132 state_default: pinctrl0 {
133 gpio {
134 ralink,group = "i2c", "uartf", "nd_sd";
135 ralink,function = "gpio";
136 };
137 };
138 };
139
140 &ethernet {
141 status = "okay";
142 mtd-mac-address = <&factory 0x4>;
143 pinctrl-names = "default";
144 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
145 mediatek,portmap = "wllll";
146
147 port@5 {
148 status = "okay";
149 mediatek,fixed-link = <1000 1 1 1>;
150 phy-mode = "rgmii";
151 };
152
153 mdio-bus {
154 status = "okay";
155
156 phy0: ethernet-phy@0 {
157 reg = <0>;
158 phy-mode = "rgmii";
159 };
160
161 phy1: ethernet-phy@1 {
162 reg = <1>;
163 phy-mode = "rgmii";
164 };
165
166 phy2: ethernet-phy@2 {
167 reg = <2>;
168 phy-mode = "rgmii";
169 };
170
171 phy3: ethernet-phy@3 {
172 reg = <3>;
173 phy-mode = "rgmii";
174 };
175
176 phy4: ethernet-phy@4 {
177 reg = <4>;
178 phy-mode = "rgmii";
179 };
180
181 phy1f: ethernet-phy@1f {
182 reg = <0x1f>;
183 phy-mode = "rgmii";
184 };
185 };
186 };
187
188 &gsw {
189 mediatek,port4 = "gmac";
190 };
191
192 &wmac {
193 ralink,mtd-eeprom = <&factory 0>;
194 };
195
196 &pcie {
197 status = "okay";
198 };
199
200 &pcie0 {
201 wifi@0,0 {
202 reg = <0x0000 0 0 0 0>;
203 mediatek,mtd-eeprom = <&factory 0x8000>;
204 mediatek,2ghz = <0>;
205 };
206 };
207
208 &ehci {
209 status = "okay";
210 };
211
212 &ohci {
213 status = "okay";
214 };