realtek: Trap LLDP packets to the CPU
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-853-a3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "dlink,dir-853-a3", "mediatek,mt7621-soc";
11 model = "D-Link DIR-853 A3";
12
13 aliases {
14 label-mac-device = &gmac0;
15
16 led-boot = &led_power_orange;
17 led-failsafe = &led_power_blue;
18 led-running = &led_power_blue;
19 led-upgrade = &led_net_orange;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30
31 wps {
32 label = "wps";
33 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_WPS_BUTTON>;
35 };
36
37 wifi {
38 label = "wifi";
39 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RFKILL>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46
47 led_power_orange: power_orange {
48 function = LED_FUNCTION_POWER;
49 color = <LED_COLOR_ID_ORANGE>;
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 };
52
53 led_power_blue: power_blue {
54 function = LED_FUNCTION_POWER;
55 color = <LED_COLOR_ID_BLUE>;
56 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
57 };
58
59 led_net_orange: net_orange {
60 label = "orange:net";
61 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
62 };
63
64 net_blue {
65 label = "blue:net";
66 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
67 };
68
69 usb_blue {
70 function = LED_FUNCTION_USB;
71 color = <LED_COLOR_ID_BLUE>;
72 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
73 trigger-sources = <&xhci_ehci_port1>;
74 linux,default-trigger = "usbport";
75 };
76
77 wlan2g {
78 label = "blue:wlan2g";
79 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
80 linux,default-trigger = "phy0radio";
81 };
82
83 wlan5g {
84 label = "blue:wlan5g";
85 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
86 linux,default-trigger = "phy1radio";
87 };
88 };
89 };
90
91 &nand {
92 status = "okay";
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x80000>;
102 read-only;
103 };
104
105 partition@80000 {
106 label = "config";
107 reg = <0x80000 0x80000>;
108 read-only;
109 };
110
111 partition@100000 {
112 label = "factory";
113 reg = <0x100000 0x40000>;
114 read-only;
115
116 nvmem-layout {
117 compatible = "fixed-layout";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 eeprom_factory_0: eeprom@0 {
122 reg = <0x0 0x4da8>;
123 };
124
125 macaddr_factory_4: macaddr@4 {
126 reg = <0x4 0x6>;
127 };
128
129 macaddr_factory_e000: macaddr@e000 {
130 reg = <0xe000 0x6>;
131 };
132
133 macaddr_factory_e006: macaddr@e006 {
134 reg = <0xe006 0x6>;
135 };
136 };
137 };
138
139 partition@140000 {
140 label = "config2";
141 reg = <0x140000 0x40000>;
142 read-only;
143 };
144
145 partition@180000 {
146 label = "firmware";
147 compatible = "openwrt,uimage", "denx,uimage";
148 openwrt,padding = <96>;
149 reg = <0x180000 0x2800000>;
150 };
151
152 partition@2980000 {
153 label = "private";
154 reg = <0x2980000 0x2000000>;
155 read-only;
156 };
157
158 partition@4980000 {
159 label = "firmware2";
160 reg = <0x4980000 0x2800000>;
161 };
162
163 partition@7180000 {
164 label = "mydlink";
165 reg = <0x7180000 0x600000>;
166 read-only;
167 };
168
169 partition@7780000 {
170 label = "reserved";
171 reg = <0x7780000 0x880000>;
172 read-only;
173 };
174 };
175 };
176
177 &pcie {
178 status = "okay";
179 };
180
181 &pcie0 {
182 wifi@0,0 {
183 compatible = "mediatek,mt76";
184 reg = <0x0000 0 0 0 0>;
185 /* 5 GHz (phy1) does not take the address from calibration data,
186 but setting it manually here works */
187 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
188 nvmem-cell-names = "eeprom", "mac-address";
189 };
190 };
191
192 &gmac0 {
193 nvmem-cells = <&macaddr_factory_e000>;
194 nvmem-cell-names = "mac-address";
195 };
196
197 &gmac1 {
198 status = "okay";
199 label = "wan";
200 phy-handle = <&ethphy4>;
201
202 nvmem-cells = <&macaddr_factory_e006>;
203 nvmem-cell-names = "mac-address";
204 };
205
206 &mdio {
207 ethphy4: ethernet-phy@4 {
208 reg = <4>;
209 };
210 };
211
212 &switch0 {
213 ports {
214 port@0 {
215 status = "okay";
216 label = "lan4";
217 };
218
219 port@1 {
220 status = "okay";
221 label = "lan3";
222 };
223
224 port@2 {
225 status = "okay";
226 label = "lan2";
227 };
228
229 port@3 {
230 status = "okay";
231 label = "lan1";
232 };
233 };
234 };
235
236 &state_default {
237 gpio {
238 groups = "i2c", "uart2", "uart3", "jtag", "wdt";
239 function = "gpio";
240 };
241 };