d63ae33311fb96f23d4c1d3fd7b5b72e649ae9c2
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_afoundry_ew1200.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
8 model = "EW1200";
9
10 aliases {
11 led-boot = &led_run;
12 led-failsafe = &led_run;
13 led-running = &led_run;
14 led-upgrade = &led_run;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 led_run: run {
31 label = "green:run";
32 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
33 };
34
35 usb {
36 label = "green:usb";
37 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
38 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
39 linux,default-trigger = "usbport";
40 };
41 };
42 };
43
44 &sdhci {
45 status = "okay";
46 };
47
48 &spi0 {
49 status = "okay";
50
51 flash@0 {
52 compatible = "jedec,spi-nor";
53 reg = <0>;
54 spi-max-frequency = <10000000>;
55
56 partitions {
57 compatible = "fixed-partitions";
58 #address-cells = <1>;
59 #size-cells = <1>;
60
61 partition@0 {
62 label = "u-boot";
63 reg = <0x0 0x30000>;
64 read-only;
65 };
66
67 partition@30000 {
68 label = "u-boot-env";
69 reg = <0x30000 0x10000>;
70 read-only;
71 };
72
73 factory: partition@40000 {
74 label = "factory";
75 reg = <0x40000 0x10000>;
76 read-only;
77
78 nvmem-layout {
79 compatible = "fixed-layout";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 eeprom_factory_0: eeprom@0 {
84 reg = <0x0 0x400>;
85 };
86
87 eeprom_factory_8000: eeprom@8000 {
88 reg = <0x8000 0x200>;
89 };
90
91 macaddr_factory_e000: macaddr@e000 {
92 compatible = "mac-base";
93 reg = <0xe000 0x6>;
94 #nvmem-cell-cells = <1>;
95 };
96 };
97 };
98
99 partition@50000 {
100 compatible = "denx,uimage";
101 label = "firmware";
102 reg = <0x50000 0xfb0000>;
103 };
104 };
105 };
106 };
107
108 &pcie {
109 status = "okay";
110 };
111
112 &pcie0 {
113 wifi@0,0 {
114 compatible = "mediatek,mt76";
115 reg = <0x0000 0 0 0 0>;
116 nvmem-cells = <&eeprom_factory_8000>;
117 nvmem-cell-names = "eeprom";
118 ieee80211-freq-limit = <5000000 6000000>;
119
120 led {
121 led-sources = <2>;
122 led-active-low;
123 };
124 };
125 };
126
127 &pcie1 {
128 wifi@0,0 {
129 compatible = "mediatek,mt76";
130 reg = <0x0000 0 0 0 0>;
131 nvmem-cells = <&eeprom_factory_0>;
132 nvmem-cell-names = "eeprom";
133 ieee80211-freq-limit = <2400000 2500000>;
134
135 led {
136 led-sources = <0>;
137 led-active-low;
138 };
139 };
140 };
141
142 &gmac0 {
143 nvmem-cells = <&macaddr_factory_e000 0>;
144 nvmem-cell-names = "mac-address";
145 };
146
147 &gmac1 {
148 status = "okay";
149 label = "wan";
150 phy-handle = <&ethphy4>;
151
152 nvmem-cells = <&macaddr_factory_e000 1>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 &mdio {
157 ethphy4: ethernet-phy@4 {
158 reg = <4>;
159 };
160 };
161
162 &switch0 {
163 ports {
164 port@0 {
165 status = "okay";
166 label = "lan1";
167 };
168
169 port@1 {
170 status = "okay";
171 label = "lan2";
172 };
173
174 port@2 {
175 status = "okay";
176 label = "lan3";
177 };
178
179 port@3 {
180 status = "okay";
181 label = "lan4";
182 };
183 };
184 };
185
186 &state_default {
187 gpio {
188 groups = "i2c", "uart3", "wdt";
189 function = "gpio";
190 };
191 };