kernel: mtdsplit_uimage: replace "edimax, uimage" parser
[openwrt/openwrt.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 #include "mt7620a.dtsi"
15
16 #include <dt-bindings/gpio/gpio.h>
17 #include <dt-bindings/input/input.h>
18 #include <dt-bindings/mtd/partitions/uimage.h>
19
20 / {
21 compatible = "edimax,br-6478ac-v2", "ralink,mt7620a-soc";
22 model = "Edimax BR-6478AC v2";
23
24 aliases {
25 led-boot = &led_power;
26 led-failsafe = &led_power;
27 led-running = &led_power;
28 led-upgrade = &led_power;
29 };
30
31 keys {
32 compatible = "gpio-keys";
33
34 reset_wps {
35 label = "reset_wps";
36 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 led_power: power {
45 label = "white:power";
46 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
47 };
48
49 internet {
50 label = "blue:internet";
51 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
52 };
53
54 wlan {
55 label = "blue:wlan";
56 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
57 };
58
59 usb {
60 label = "blue:usb";
61 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
62 trigger-sources = <&ohci_port1>, <&ehci_port1>;
63 linux,default-trigger = "usbport";
64 };
65 };
66
67 gpio_export {
68 compatible = "gpio-export";
69 #size-cells = <0>;
70 usb-power {
71 gpio-export,name="usb-power";
72 gpio-export,output=<1>;
73 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
74 };
75 };
76 };
77
78 &gpio2 {
79 status = "okay";
80 };
81
82 &spi0 {
83 status = "okay";
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <10000000>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x0 0x30000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "u-boot-env";
103 reg = <0x30000 0x10000>;
104 read-only;
105 };
106
107 factory: partition@40000 {
108 label = "factory";
109 reg = <0x40000 0x10000>;
110 read-only;
111 };
112
113 partition@50000 {
114 label = "cimage";
115 reg = <0x50000 0x20000>;
116 read-only;
117 };
118
119 partition@70000 {
120 compatible = "openwrt,uimage", "denx,uimage";
121 openwrt,offset = <FW_EDIMAX_OFFSET>;
122 openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
123 label = "firmware";
124 reg = <0x00070000 0x00790000>;
125 };
126 };
127 };
128 };
129
130 &state_default {
131 gpio {
132 groups = "i2c", "uartf", "nd_sd";
133 function = "gpio";
134 };
135 };
136
137 &ethernet {
138 pinctrl-names = "default";
139 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
140
141 mtd-mac-address = <&factory 0x4>;
142
143 mediatek,portmap = "wllll";
144
145 port@5 {
146 status = "okay";
147 mediatek,fixed-link = <1000 1 1 1>;
148 phy-mode = "rgmii";
149 };
150
151 mdio-bus {
152 status = "okay";
153
154 phy0: ethernet-phy@0 {
155 reg = <0>;
156 phy-mode = "rgmii";
157 };
158
159 phy1: ethernet-phy@1 {
160 reg = <1>;
161 phy-mode = "rgmii";
162 };
163
164 phy2: ethernet-phy@2 {
165 reg = <2>;
166 phy-mode = "rgmii";
167 };
168
169 phy3: ethernet-phy@3 {
170 reg = <3>;
171 phy-mode = "rgmii";
172 };
173
174 phy4: ethernet-phy@4 {
175 reg = <4>;
176 phy-mode = "rgmii";
177 };
178
179 phy1f: ethernet-phy@1f {
180 reg = <0x1f>;
181 phy-mode = "rgmii";
182 };
183 };
184 };
185
186 &gsw {
187 mediatek,port4 = "gmac";
188 };
189
190 &wmac {
191 ralink,mtd-eeprom = <&factory 0x0>;
192 };
193
194 &pcie {
195 status = "okay";
196 };
197
198 &pcie0 {
199 wifi@0,0 {
200 reg = <0x0000 0 0 0 0>;
201 mediatek,mtd-eeprom = <&factory 0x8000>;
202 mediatek,2ghz = <0>;
203 };
204 };
205
206 &ehci {
207 status = "okay";
208 };
209
210 &ohci {
211 status = "okay";
212 };