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