generic: ar8216: fix unknown packet flooding for ar8229/ar8236
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9341_pisen_wmb001n.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 "ar9341.dtsi"
8
9 / {
10         model = "PISEN WMB001N";
11         compatible = "pisen,wmb001n", "qca,ar9341";
12
13         aliases {
14                 serial0 = &uart;
15                 led-boot = &led_wifi;
16                 led-failsafe = &led_wifi;
17                 led-running = &led_wifi;
18                 led-upgrade = &led_wifi;
19         };
20
21         i2c {
22                 compatible = "i2c-gpio";
23                 pinctrl-names = "default";
24                 pinctrl-0 = <&pmx_i2c_gpio &pmx_i2s_spdif>;
25
26                 sda-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
27                 scl-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
28                 /*
29                  * Pull-up resistor for scl is missing on this board.
30                  * Following settings trick i2c-gpio to use output mode
31                  * instead of open-drain for scl.
32                  */
33                 i2c-gpio,scl-output-only;
34                 i2c-gpio,scl-open-drain;
35         };
36
37         keys {
38                 compatible = "gpio-keys";
39
40                 reset {
41                         label = "reset";
42                         linux,code = <KEY_RESTART>;
43                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
44                         debounce-interval = <60>;
45                 };
46
47                 vol_down {
48                         label = "volume down";
49                         linux,code = <KEY_VOLUMEDOWN>;
50                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
51                         debounce-interval = <60>;
52                 };
53
54                 vol_up {
55                         label = "volume up";
56                         linux,code = <KEY_VOLUMEUP>;
57                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
58                         debounce-interval = <60>;
59                 };
60         };
61
62         leds {
63                 compatible = "gpio-leds";
64                 pinctrl-names = "default";
65                 pinctrl-0 = <&jtag_disable_pins>;
66
67                 volume1 {
68                         label = "wmb001n:blue:volume1";
69                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
70                 };
71
72                 volume2 {
73                         label = "wmb001n:blue:volume2";
74                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
75                 };
76
77                 volume3 {
78                         label = "wmb001n:blue:volume3";
79                         gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
80                 };
81
82                 volume4 {
83                         label = "wmb001n:blue:volume4";
84                         gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
85                 };
86
87                 volume5 {
88                         label = "wmb001n:blue:volume5";
89                         gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
90                 };
91
92                 led_wifi: wifi {
93                         label = "wmb001n:blue:wifi";
94                         gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
95                 };
96         };
97
98         virtual_flash {
99                 compatible = "mtd-concat";
100                 devices = <&fwpart1 &fwpart2>;
101
102                 partitions {
103                         compatible = "fixed-partitions";
104                         #address-cells = <1>;
105                         #size-cells = <1>;
106
107                         partition@0 {
108                                 reg = <0x0 0x0>;
109                                 label = "firmware";
110                                 compatible = "openwrt,okli";
111                         };
112                 };
113         };
114 };
115
116 &pinmux {
117         pmx_i2c_gpio: pinmux_i2c_gpio {
118                 pinctrl-single,bits = <0x10 0x0 0xff>,
119                                       <0x14 0x0 0xff>;
120         };
121
122         pmx_i2s_spdif: pinmux_i2s_spdif {
123                 pinctrl-single,bits = <0x8 0x0e000000 0xff000000>,
124                                       <0xc 0x0f0c0d 0xffffff>,
125                                       <0x14 0x1900 0xff00>;
126         };
127 };
128
129 &ref {
130         clock-frequency = <25000000>;
131 };
132
133 &uart {
134         status = "okay";
135 };
136
137 &gpio {
138         status = "okay";
139 };
140
141 &spi {
142         num-cs = <1>;
143
144         status = "okay";
145
146         flash@0 {
147                 compatible = "jedec,spi-nor";
148                 reg = <0>;
149                 spi-max-frequency = <25000000>;
150
151                 partitions {
152                         compatible = "fixed-partitions";
153                         #address-cells = <1>;
154                         #size-cells = <1>;
155
156                         uboot: partition@0 {
157                                 label = "u-boot";
158                                 reg = <0x0 0x10000>;
159                                 read-only;
160                         };
161
162                         partition@10000 {
163                                 label = "u-boot-env";
164                                 reg = <0x10000 0x10000>;
165                                 read-only;
166                         };
167
168                         fwpart1: partition@20000 {
169                                 label = "fwpart1";
170                                 reg = <0x20000 0xdc0000>;
171                         };
172
173                         partition@de0000 {
174                                 label = "loader";
175                                 reg = <0xde0000 0x10000>;
176                         };
177
178                         fwpart2: partition@df0000 {
179                                 label = "fwpart2";
180                                 reg = <0xdf0000 0x1f0000>;
181                         };
182
183                         partition@fe0000 {
184                                 label = "mib0";
185                                 reg = <0xfe0000 0x10000>;
186                                 read-only;
187                         };
188
189                         art: partition@ff0000 {
190                                 label = "art";
191                                 reg = <0xff0000 0x10000>;
192                                 read-only;
193                         };
194                 };
195         };
196 };
197
198 &eth0 {
199         status = "okay";
200         phy-handle = <&swphy4>;
201         mtd-mac-address = <&art 0x0>;
202 };
203
204 &eth1 {
205         compatible = "syscon", "simple-mfd";
206         status = "okay";
207
208         gmac-config {
209                 device = <&gmac>;
210                 switch-phy-swap = <0>;
211         };
212 };
213
214 &usb {
215         status = "okay";
216 };
217
218 &usb_phy {
219         status = "okay";
220 };
221
222 &wmac {
223         status = "okay";
224         mtd-cal-data = <&art 0x1000>;
225 };