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