ramips: fix MikroTik 750Gr3 ports MAC addresses
[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";
38
39 reset_wps {
40 label = "reset_wps";
41 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 led_power: power {
50 label = "br-6478ac-v2:white:power";
51 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
52 };
53
54 internet {
55 label = "br-6478ac-v2:blue:internet";
56 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
57 };
58
59 wlan {
60 label = "br-6478ac-v2:blue:wlan";
61 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
62 };
63
64 usb {
65 label = "br-6478ac-v2:blue:usb";
66 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
67 trigger-sources = <&ohci_port1>, <&ehci_port1>;
68 linux,default-trigger = "usbport";
69 };
70 };
71
72 gpio_export {
73 compatible = "gpio-export";
74 #size-cells = <0>;
75 usb-power {
76 gpio-export,name="usb-power";
77 gpio-export,output=<1>;
78 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
79 };
80 };
81 };
82
83 &gpio2 {
84 status = "okay";
85 };
86
87 &spi0 {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0 0>;
93 spi-max-frequency = <10000000>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "u-boot";
102 reg = <0x0 0x30000>;
103 read-only;
104 };
105
106 partition@30000 {
107 label = "u-boot-env";
108 reg = <0x30000 0x10000>;
109 read-only;
110 };
111
112 factory: partition@40000 {
113 label = "factory";
114 reg = <0x40000 0x10000>;
115 read-only;
116 };
117
118 partition@50000 {
119 label = "cimage";
120 reg = <0x50000 0x20000>;
121 read-only;
122 };
123
124 partition@70000 {
125 compatible = "edimax,uimage";
126 label = "firmware";
127 reg = <0x00070000 0x00790000>;
128 };
129 };
130 };
131 };
132
133 &state_default {
134 gpio {
135 groups = "i2c", "uartf", "nd_sd";
136 function = "gpio";
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 };