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