generic: ar8216: fix unknown packet flooding for ar8229/ar8236
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9344_teltonika_rut9xx.dtsi
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 "ar9344.dtsi"
8
9 / {
10         compatible = "teltonika,rut9xx", "qca,ar9344";
11
12         aliases {
13                 serial0 = &uart;
14                 serial1 = &hs_uart;
15                 label-mac-device = &eth1;
16         };
17
18         i2c0: i2c {
19                 compatible = "i2c-gpio";
20                 scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
21                 sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
22                 #address-cells = <1>;
23                 #size-cells = <0>;
24
25                 hwmon@4d {
26                         compatible = "microchip,mcp3221";
27                         reg = <0x4d>;
28                 };
29         };
30
31         keys {
32                 compatible = "gpio-keys";
33
34                 reset {
35                         label = "reset";
36                         linux,code = <KEY_RESTART>;
37                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
38                         debounce-interval = <60>;
39                 };
40         };
41 };
42
43 &ref {
44         clock-frequency = <40000000>;
45 };
46
47 &uart {
48         status = "okay";
49 };
50
51 &hs_uart {
52         status = "okay";
53
54         pinctrl-names = "default";
55         pinctrl-0 = <&pmx_uart2>;
56
57         rts-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
58         rs485-rts-active-low;
59         linux,rs485-enabled-at-boot-time;
60 };
61
62 &spi {
63         status = "okay";
64         num-cs = <2>;
65         pinctrl-names = "default";
66         pinctrl-0 = <&pmx_spi>;
67
68         flash@0 {
69                 compatible = "jedec,spi-nor";
70                 reg = <0>;
71                 spi-max-frequency = <25000000>;
72
73                 partitions {
74                         compatible = "fixed-partitions";
75                         #address-cells = <1>;
76                         #size-cells = <1>;
77
78                         partition@0 {
79                                 label = "u-boot";
80                                 reg = <0x0 0x20000>;
81                                 read-only;
82                         };
83
84                         config: partition@20000 {
85                                 label = "config";
86                                 reg = <0x20000 0x10000>;
87                                 read-only;
88                         };
89
90                         art: partition@30000 {
91                                 label = "art";
92                                 reg = <0x30000 0x10000>;
93                                 read-only;
94                         };
95
96                         partition@40000 {
97                                 label = "firmware";
98                                 reg = <0x40000 0xf30000>;
99                                 compatible = "tplink,firmware";
100                         };
101
102                         partition@f70000 {
103                                 label = "event-log";
104                                 reg = <0xf70000 0x90000>;
105                                 read-only;
106                         };
107                 };
108         };
109
110         microsd@1 {
111                 status = "disabled";
112
113                 compatible = "mmc-spi-slot";
114                 spi-max-frequency = <25000000>;
115                 reg = <1>;
116                 voltage-ranges = <3200 3400>;
117                 broken-cd;
118         };
119 };
120
121 &usb {
122         #address-cells = <1>;
123         #size-cells = <0>;
124         status = "okay";
125
126         port@1 {
127                 #address-cells = <1>;
128                 #size-cells = <0>;
129                 reg = <1>;
130
131                 port@1 {
132                         compatible = "usb-a-connector";
133                         reg = <1>;
134                 };
135
136                 port@3 {
137                         label = "RS-232 serial adapter";
138                         reg = <3>;
139                 };
140
141                 port@4 {
142                         label = "internal wwan modem";
143                         reg = <4>;
144                 };
145         };
146 };
147
148 &usb_phy {
149         status = "okay";
150 };
151
152 &wmac {
153         status = "okay";
154
155         mtd-cal-data = <&art 0x1000>;
156         mtd-mac-address = <&config 0x0>;
157         mtd-mac-address-increment = <2>;
158 };
159
160 &pinmux {
161         pmx_spi: spi {
162                 // SPI_CS1 on GPIO 3
163                 pinctrl-single,bits = <0x0 0x07000000 0xff000000>;
164         };
165
166         pmx_leds_switch: leds_switch {
167                 // switch port LEDs on GPIO 1, GPIO 13, GPIO 14 and GPIO 22
168                 pinctrl-single,bits =  <0x0 0x00002d00 0x0000ff00>,
169                                         <0xc 0x002c2b00 0x00ffff00>,
170                                         <0x14 0x002a0000 0x00ff0000>;
171         };
172
173         pmx_uart2: uart2 {
174                 // UART1_DTR on GPIO 0, UART1_RD on GPIO 11, UART1_TD on GPIO 18
175                 pinctrl-single,bits = <0x0 0x0 0xff>,
176                                 <0x10 0x4f000000 0xff000000>,
177                                 <0x3c 0x000b0000 0x00ff0000>;
178         };
179 };