generic: ar8216: fix unknown packet flooding for ar8229/ar8236
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7242_buffalo_wzr-hp-g302h-a1a0.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar7242.dtsi"
8
9 / {
10         compatible = "buffalo,wzr-hp-g302h-a1a0", "qca,ar7242";
11         model = "Buffalo WZR-HP-G302H A1A0";
12
13         aliases {
14                 led-boot = &led_diag;
15                 led-failsafe = &led_diag;
16                 led-upgrade = &led_diag;
17         };
18
19         extosc: ref {
20                 compatible = "fixed-clock";
21                 #clock-cells = <0>;
22                 clock-frequency = <40000000>;
23         };
24
25         keys {
26                 compatible = "gpio-keys";
27
28                 reset {
29                         label = "reset";
30                         linux,code = <KEY_RESTART>;
31                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
32                         debounce-interval = <60>;
33                 };
34
35                 usb {
36                         label = "usb";
37                         linux,code = <BTN_2>;
38                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
39                         debounce-interval = <60>;
40                 };
41
42                 router_on {
43                         label = "router_on";
44                         linux,code = <BTN_5>;
45                         linux,input-type = <EV_SW>;
46                         gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
47                         debounce-interval = <60>;
48                 };
49
50                 movie_engine {
51                         label = "movie_engine";
52                         linux,code = <BTN_3>;
53                         linux,input-type = <EV_SW>;
54                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
55                         debounce-interval = <60>;
56                 };
57
58                 wps {
59                         label = "wps";
60                         linux,code = <KEY_WPS_BUTTON>;
61                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
62                         debounce-interval = <60>;
63                 };
64         };
65
66         leds {
67                 compatible = "gpio-leds";
68
69                 led_diag: diag {
70                         label = "buffalo:red:diag";
71                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
72                 };
73         };
74
75         ath9k-leds {
76                 compatible = "gpio-leds";
77
78                 usb {
79                         label = "buffalo:blue:usb";
80                         gpios = <&ath9k 4 GPIO_ACTIVE_LOW>;
81                         trigger-sources = <&hub_port>;
82                         linux,default-trigger = "usbport";
83                 };
84
85                 wireless {
86                         label = "buffalo:green:wireless";
87                         gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
88                         linux,default-trigger = "phy0tpt";
89                 };
90
91                 security {
92                         label = "buffalo:orange:security";
93                         gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
94                 };
95
96                 router {
97                         label = "buffalo:green:router";
98                         gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
99                 };
100
101                 movie_engine_on {
102                         label = "buffalo:blue:movie_engine_on";
103                         gpios = <&ath9k 8 GPIO_ACTIVE_LOW>;
104                 };
105
106                 movie_engine_off {
107                         label = "buffalo:blue:movie_engine_off";
108                         gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
109                 };
110         };
111
112         gpio-export {
113                 compatible = "gpio-export";
114                 #size-cells = <0>;
115
116                 gpio_usb_power {
117                         gpio-export,name = "buffalo:usb-power";
118                         gpio-export,output = <1>;
119                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
120                 };
121         };
122
123         virtual_flash {
124                 compatible = "mtd-concat";
125                 devices = <&flash0 &flash1>;
126
127                 partitions {
128                         compatible = "fixed-partitions";
129                         #address-cells = <1>;
130                         #size-cells = <1>;
131
132                         partition@0 {
133                                 reg = <0x0 0x40000>;
134                                 label = "u-boot";
135                                 read-only;
136                         };
137
138                         partition@40000 {
139                                 reg = <0x40000 0x10000>;
140                                 label = "u-boot-env";
141                         };
142
143                         art: partition@50000 {
144                                 reg = <0x50000 0x10000>;
145                                 label = "art";
146                                 read-only;
147                         };
148
149                         partition@60000 {
150                                 compatible = "denx,uimage";
151                                 reg = <0x60000 0x1f60000>;
152                                 label = "firmware";
153                         };
154
155                         partition@1fc0000 {
156                                 reg = <0x1fc0000 0x40000>;
157                                 label = "user_property";
158                                 read-only;
159                         };
160                 };
161         };
162 };
163
164 &spi {
165         status = "okay";
166
167         cs-gpios = <0>, <0>;
168         num-cs = <2>;
169
170         flash0: flash@0 {
171                 compatible = "jedec,spi-nor";
172                 reg = <0>;
173                 spi-max-frequency = <25000000>;
174         };
175
176         flash1: flash@1 {
177                 compatible = "jedec,spi-nor";
178                 reg = <1>;
179                 spi-max-frequency = <25000000>;
180         };
181 };
182
183 &mdio0 {
184         status = "okay";
185
186         phy-mask = <0x1>;
187
188         phy0: ethernet-phy@0 {
189                 reg = <0>;
190                 phy-mode = "rgmii";
191         };
192 };
193
194 &eth0 {
195         status = "okay";
196
197         pll-data = <0x1c000000 0x00000101 0x00001616>;
198
199         mtd-mac-address = <&art 0x120c>;
200
201         phy-mode = "rgmii";
202         phy-handle = <&phy0>;
203 };
204
205 &pcie {
206         status = "okay";
207
208         ath9k: wifi@0,0 {
209                 compatible = "pci168c,002a";
210                 reg = <0x0000 0 0 0 0>;
211                 mtd-mac-address = <&art 0x120c>;
212                 qca,no-eeprom;
213                 #gpio-cells = <2>;
214                 gpio-controller;
215         };
216 };
217
218 &pll {
219         clocks = <&extosc>;
220 };
221
222 &uart {
223         status = "okay";
224 };
225
226 &usb_phy {
227         status = "okay";
228 };
229
230 &usb {
231         #address-cells = <1>;
232         #size-cells = <0>;
233         status = "okay";
234
235         hub_port: port@1 {
236                 reg = <1>;
237                 #trigger-source-cells = <0>;
238         };
239 };