ipq40xx: convert some boards to DSA
[openwrt/openwrt.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-cap-ac.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2020, Robert Marko <robimarko@gmail.com> */
3
4 #include "qcom-ipq4019.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/soc/qcom,tcsr.h>
8
9 / {
10 model = "MikroTik cAP ac";
11 compatible = "mikrotik,cap-ac";
12
13 memory {
14 device_type = "memory";
15 reg = <0x80000000 0x08000000>;
16 };
17
18 chosen {
19 stdout-path = "serial0:115200n8";
20 };
21
22 aliases {
23 led-boot = &led_user;
24 led-failsafe = &led_user;
25 led-running = &led_user;
26 led-upgrade = &led_user;
27 };
28
29 soc {
30 rng@22000 {
31 status = "okay";
32 };
33
34 counter@4a1000 {
35 compatible = "qcom,qca-gcnt";
36 reg = <0x4a1000 0x4>;
37 };
38
39 tcsr@1949000 {
40 compatible = "qcom,tcsr";
41 reg = <0x1949000 0x100>;
42 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
43 };
44
45 ess_tcsr@1953000 {
46 compatible = "qcom,tcsr";
47 reg = <0x1953000 0x1000>;
48 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
49 };
50
51 tcsr@1957000 {
52 compatible = "qcom,tcsr";
53 reg = <0x1957000 0x100>;
54 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
55 };
56
57 crypto@8e3a000 {
58 status = "okay";
59 };
60
61 watchdog@b017000 {
62 status = "okay";
63 };
64 };
65
66 keys {
67 compatible = "gpio-keys";
68
69 reset {
70 label = "reset";
71 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
72 linux,code = <KEY_RESTART>;
73 };
74
75 mode {
76 label = "mode";
77 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_LIGHTS_TOGGLE>;
79 };
80 };
81
82 leds {
83 compatible = "gpio-leds";
84
85 power {
86 label = "blue:power";
87 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
88 default-state = "keep";
89 };
90
91 led_user: user {
92 label = "green:user";
93 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
94 panic-indicator;
95 };
96
97 wlan2g {
98 label = "green:wlan2g";
99 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
100 };
101
102 wlan5g {
103 label = "green:wlan5g";
104 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
105 };
106
107 eth1 {
108 label = "green:eth1";
109 gpios = <&ethphy4 1 GPIO_ACTIVE_HIGH>;
110 };
111
112 eth2 {
113 label = "green:eth2";
114 gpios = <&ethphy3 1 GPIO_ACTIVE_HIGH>;
115 };
116 };
117 };
118
119 &tlmm {
120 serial_pins: serial_pinmux {
121 mux {
122 pins = "gpio60", "gpio61";
123 function = "blsp_uart0";
124 bias-disable;
125 };
126 };
127
128 spi_0_pins: spi_0_pinmux {
129 pin {
130 function = "blsp_spi0";
131 pins = "gpio55", "gpio56", "gpio57";
132 drive-strength = <2>;
133 bias-disable;
134 };
135 pin_cs {
136 function = "gpio";
137 pins = "gpio54";
138 drive-strength = <2>;
139 bias-disable;
140 output-high;
141 };
142 };
143 };
144
145 &blsp_dma {
146 status = "okay";
147 };
148
149 &blsp1_spi1 {
150 status = "okay";
151
152 pinctrl-0 = <&spi_0_pins>;
153 pinctrl-names = "default";
154 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
155
156 flash@0 {
157 reg = <0>;
158 compatible = "jedec,spi-nor";
159 spi-max-frequency = <40000000>;
160
161 partitions {
162 compatible = "fixed-partitions";
163 #address-cells = <1>;
164 #size-cells = <1>;
165
166 partition@0 {
167 label = "Qualcomm";
168 reg = <0x0 0x80000>;
169 read-only;
170 };
171
172 partition@80000 {
173 compatible = "mikrotik,routerboot-partitions";
174 #address-cells = <1>;
175 #size-cells = <1>;
176 label = "RouterBoot";
177 reg = <0x80000 0x80000>;
178
179 hard_config {
180 read-only;
181 };
182
183 dtb_config {
184 read-only;
185 };
186
187 soft_config {
188 };
189 };
190
191 partition@100000 {
192 compatible = "mikrotik,minor";
193 label = "firmware";
194 reg = <0x100000 0xf00000>;
195 };
196 };
197 };
198 };
199
200 &blsp1_uart1 {
201 status = "okay";
202
203 pinctrl-0 = <&serial_pins>;
204 pinctrl-names = "default";
205 };
206
207 &cryptobam {
208 status = "okay";
209 };
210
211 &mdio {
212 status = "okay";
213 };
214
215 &ethphy3 {
216 gpio-controller;
217 #gpio-cells = <2>;
218 };
219
220 &ethphy4 {
221 gpio-controller;
222 #gpio-cells = <2>;
223 };
224
225 &gmac {
226 status = "okay";
227 };
228
229 &switch {
230 status = "okay";
231 };
232
233 &swport4 {
234 status = "okay";
235
236 label = "lan";
237 };
238
239 &swport5 {
240 status = "okay";
241 };
242
243 &wifi0 {
244 status = "okay";
245
246 qcom,ath10k-calibration-variant = "MikroTik-cAP-ac";
247 };
248
249 &wifi1 {
250 status = "okay";
251
252 qcom,ath10k-calibration-variant = "MikroTik-cAP-ac";
253 };