generic: ar8216: fix unknown packet flooding for ar8229/ar8236
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9344_netgear_wndr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar9344.dtsi"
7
8 / {
9         chosen {
10                 bootargs = "console=ttyS0,115200n8";
11         };
12
13         aliases {
14                 led-boot = &led_power_amber;
15                 led-failsafe = &led_power_amber;
16                 led-running = &led_power_green;
17                 led-upgrade = &led_power_amber;
18                 label-mac-device = &eth0;
19         };
20
21         keys {
22                 compatible = "gpio-keys";
23
24                 wps {
25                         label = "wps";
26                         linux,code = <KEY_WPS_BUTTON>;
27                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
28                 };
29
30                 reset {
31                         label = "reset";
32                         linux,code = <KEY_RESTART>;
33                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
34                 };
35
36                 rfkill {
37                         label = "rfkill";
38                         linux,code = <KEY_RFKILL>;
39                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
40                 };
41         };
42
43         leds {
44                 compatible = "gpio-leds";
45
46                 pinctrl-names = "default";
47                 pinctrl-0 = <&enable_gpio_11>;
48
49                 led_power_green: power_green {
50                         label = "netgear:green:power";
51                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
52                 };
53
54                 led_power_amber: power_amber {
55                         label = "netgear:amber:power";
56                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
57                         default-state = "keep";
58                 };
59
60                 wan_green {
61                         label = "netgear:green:wan";
62                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
63                 };
64
65                 wan_amber {
66                         label = "netgear:amber:wan";
67                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
68                 };
69
70                 wlan2g_green {
71                         label = "netgear:green:wlan2g";
72                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
73                         linux,default-trigger = "phy0tpt";
74                 };
75
76                 wlan5g_blue {
77                         label = "netgear:blue:wlan5g";
78                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
79                         linux,default-trigger = "phy1tpt";
80                 };
81
82                 wps_green {
83                         label = "netgear:green:wps";
84                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
85                 };
86
87                 wps_amber {
88                         label = "netgear:amber:wps";
89                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
90                 };
91
92                 usb_green {
93                         label = "netgear:green:usb";
94                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
95                         trigger-sources = <&hub_port>;
96                         linux,default-trigger = "usbport";
97                 };
98         };
99
100         ubi-concat {
101                 compatible = "mtd-concat";
102                 devices = <&ubipart0 &ubipart1>;
103
104                 partitions {
105                         compatible = "fixed-partitions";
106                         #address-cells = <1>;
107                         #size-cells = <1>;
108
109                         ubi@ac0000 {
110                                 label = "ubi";
111                                 reg = <0x0 0x7500000>;
112                         };
113                 };
114         };
115 };
116
117 &pinmux {
118         enable_gpio_11: pinmux_enable_gpio_11 {
119                 pinctrl-single,bits = <0x8 0x0 0xff000000>;
120         };
121 };
122
123 &nand {
124         status = "okay";
125
126         partitions {
127                 compatible = "fixed-partitions";
128                 #address-cells = <1>;
129                 #size-cells = <1>;
130
131                 partition@0 {
132                         label = "u-boot";
133                         reg = <0x0 0x40000>;
134                         read-only;
135                 };
136
137                 partition@40000 {
138                         label = "u-boot-env";
139                         reg = <0x40000 0x40000>;
140                 };
141
142                 caldata: partition@80000 {
143                         label = "caldata";
144                         reg = <0x80000 0x40000>;
145                         read-only;
146                 };
147
148                 partition@c0000 {
149                         label = "pot";
150                         reg = <0xc0000 0x80000>;
151                 };
152
153                 partition@140000 {
154                         label = "language";
155                         reg = <0x140000 0x200000>;
156                 };
157
158                 partition@340000 {
159                         label = "config";
160                         reg = <0x340000 0x80000>;
161                 };
162
163                 partition@3c0000 {
164                         label = "traffic_meter";
165                         reg = <0x3c0000 0x300000>;
166                 };
167
168                 kernel@6c0000 {
169                         label = "kernel";
170                         reg = <0x6c0000 0x400000>;
171                 };
172
173                 ubipart0: partition@ac0000 {
174                         label = "ubipart0";
175                         reg = <0xac0000 0x1500000>;
176                 };
177
178                 partition@6c0000 {
179                         label = "firmware";
180                         reg = <0x6c0000 0x1900000>;
181                         compatible = "netgear,uimage";
182                 };
183
184                 partition@1fc0000 {
185                         label = "caldata_backup";
186                         reg = <0x1fc0000 0x40000>;
187                         read-only;
188                 };
189
190                 ubipart1: partition@2000000 {
191                         label = "ubipart1";
192                         reg = <0x2000000 0x6000000>;
193                 };
194         };
195 };
196
197 &ref {
198         clock-frequency = <40000000>;
199 };
200
201 &builtin_switch {
202         resets = <&rst 8>, <&rst 12>;
203         reset-names = "switch", "switch-analog";
204 };
205
206 &mdio0 {
207         status = "okay";
208
209         phy-mask = <0>;
210
211         phy0: ethernet-phy@0 {
212                 reg = <0>;
213                 phy-mode = "rgmii";
214                 qca,mib-poll-interval = <500>;
215
216                 qca,ar8327-initvals = <
217                         0x04 0x07600000
218                         0x0c 0x01000000
219                         0x10 0xc1000000
220                         0x50 0xcc35cc35
221                         0x54 0xcb37cb37
222                         0x58 0x00000000
223                         0x5c 0x00f3cf00
224                         0x7c 0x0000007e
225                         0x94 0x0000007e
226                         >;
227         };
228 };
229
230 &eth0 {
231         status = "okay";
232
233         /* default for ar934x, except for 1000M */
234         pll-data = <0x06000000 0x00000101 0x00001616>;
235
236         mtd-mac-address = <&caldata 0x0>;
237
238         phy-mode = "rgmii";
239         phy-handle = <&phy0>;
240 };
241
242 &gpio {
243         status = "okay";
244
245         lna0 {
246                 gpio-hog;
247                 line-name = "netgear:ext:lna0";
248                 gpios = <18 GPIO_ACTIVE_HIGH>;
249                 output-high;
250         };
251
252         lna1 {
253                 gpio-hog;
254                 line-name = "netgear:ext:lna1";
255                 gpios = <19 GPIO_ACTIVE_HIGH>;
256                 output-high;
257         };
258 };
259
260 &wmac {
261         status = "okay";
262
263         mtd-mac-address = <&caldata 0x0>;
264         qca,no-eeprom;
265 };
266
267 &pcie {
268         status = "okay";
269
270         ath9k: wifi@0,0 {
271                 compatible = "pci168c,0033";
272                 reg = <0x0000 0 0 0 0>;
273                 mtd-mac-address = <&caldata 0xc>;
274                 qca,no-eeprom;
275                 #gpio-cells = <2>;
276                 gpio-controller;
277
278                 usb_power {
279                         gpio-hog;
280                         line-name = "netgear:power:usb";
281                         gpios = <0 GPIO_ACTIVE_HIGH>;
282                         output-high;
283                 };
284         };
285 };
286
287 &usb_phy {
288         status = "okay";
289 };
290
291 &usb {
292         status = "okay";
293         #address-cells = <1>;
294         #size-cells = <0>;
295
296         hub_port: port@1 {
297                 reg = <1>;
298                 #trigger-source-cells = <0>;
299         };
300 };
301
302 &uart {
303         status = "okay";
304 };