ipq40xx: Convert mikrotik,wap-ac to DSA
[openwrt/openwrt.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-wap-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 wAP ac";
11 compatible = "mikrotik,wap-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 counter@4a1000 {
31 compatible = "qcom,qca-gcnt";
32 reg = <0x4a1000 0x4>;
33 };
34
35 tcsr@1949000 {
36 compatible = "qcom,tcsr";
37 reg = <0x1949000 0x100>;
38 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
39 };
40
41 ess_tcsr@1953000 {
42 compatible = "qcom,tcsr";
43 reg = <0x1953000 0x1000>;
44 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
45 };
46
47 tcsr@1957000 {
48 compatible = "qcom,tcsr";
49 reg = <0x1957000 0x100>;
50 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
51 };
52 };
53
54 keys {
55 compatible = "gpio-keys";
56
57 reset {
58 label = "reset";
59 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_RESTART>;
61 };
62 };
63
64 leds {
65 compatible = "gpio-leds";
66
67 power {
68 label = "blue:power";
69 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
70 default-state = "keep";
71 };
72
73 led_user: user {
74 label = "green:user";
75 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
76 panic-indicator;
77 };
78 };
79 };
80
81 &prng {
82 status = "okay";
83 };
84
85 &tlmm {
86 serial_pins: serial_pinmux {
87 mux {
88 pins = "gpio60", "gpio61";
89 function = "blsp_uart0";
90 bias-disable;
91 };
92 };
93
94 spi_0_pins: spi_0_pinmux {
95 pin {
96 function = "blsp_spi0";
97 pins = "gpio55", "gpio56", "gpio57";
98 drive-strength = <2>;
99 bias-disable;
100 };
101 pin_cs {
102 function = "gpio";
103 pins = "gpio54";
104 drive-strength = <2>;
105 bias-disable;
106 output-high;
107 };
108 };
109 };
110
111 &blsp_dma {
112 status = "okay";
113 };
114
115 &blsp1_spi1 {
116 status = "okay";
117
118 pinctrl-0 = <&spi_0_pins>;
119 pinctrl-names = "default";
120 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
121
122 flash@0 {
123 reg = <0>;
124 compatible = "jedec,spi-nor";
125 spi-max-frequency = <40000000>;
126
127 partitions {
128 compatible = "fixed-partitions";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 partition@0 {
133 label = "Qualcomm";
134 reg = <0x0 0x80000>;
135 read-only;
136 };
137
138 partition@80000 {
139 compatible = "mikrotik,routerboot-partitions";
140 #address-cells = <1>;
141 #size-cells = <1>;
142 label = "RouterBoot";
143 reg = <0x80000 0x80000>;
144
145 hard_config {
146 read-only;
147 size = <0x2000>;
148 };
149
150 dtb_config {
151 read-only;
152 };
153
154 soft_config {
155 };
156 };
157
158 partition@100000 {
159 compatible = "mikrotik,minor";
160 label = "firmware";
161 reg = <0x100000 0xf00000>;
162 };
163 };
164 };
165 };
166
167 &blsp1_uart1 {
168 status = "okay";
169
170 pinctrl-0 = <&serial_pins>;
171 pinctrl-names = "default";
172 };
173
174 &cryptobam {
175 status = "okay";
176 };
177
178 &crypto {
179 status = "okay";
180 };
181
182 &watchdog {
183 status = "okay";
184 };
185
186 &mdio {
187 status = "okay";
188 };
189
190 &gmac {
191 status = "okay";
192 };
193
194 &switch {
195 status = "okay";
196 };
197
198 &swport4 {
199 status = "okay";
200 label = "sw-eth2";
201 };
202
203 &swport5 {
204 status = "okay";
205 label = "sw-eth1";
206 };
207
208 &wifi0 {
209 status = "okay";
210
211 qcom,ath10k-calibration-variant = "MikroTik-wAP-ac";
212 };
213
214 &wifi1 {
215 status = "okay";
216
217 qcom,ath10k-calibration-variant = "MikroTik-wAP-ac";
218 };