ipq40xx: dynamically build board-2.bin for Mikrotik
[openwrt/staging/chunkeey.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 ess-switch@c000000 {
66 status = "okay";
67 };
68
69 edma@c080000 {
70 status = "okay";
71 qcom,poll_required = <0>;
72 qcom,num_gmac = <1>;
73 };
74 };
75
76 keys {
77 compatible = "gpio-keys";
78
79 reset {
80 label = "reset";
81 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
82 linux,code = <KEY_RESTART>;
83 };
84
85 mode {
86 label = "mode";
87 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
88 linux,code = <KEY_LIGHTS_TOGGLE>;
89 };
90 };
91
92 leds {
93 compatible = "gpio-leds";
94
95 power {
96 label = "blue:power";
97 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
98 default-state = "keep";
99 };
100
101 led_user: user {
102 label = "green:user";
103 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
104 panic-indicator;
105 };
106
107 wlan2g {
108 label = "green:wlan2g";
109 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
110 };
111
112 wlan5g {
113 label = "green:wlan5g";
114 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
115 };
116
117 eth1 {
118 label = "green:eth1";
119 gpios = <&ethphy4 1 GPIO_ACTIVE_HIGH>;
120 };
121
122 eth2 {
123 label = "green:eth2";
124 gpios = <&ethphy3 1 GPIO_ACTIVE_HIGH>;
125 };
126 };
127 };
128
129 &tlmm {
130 serial_pins: serial_pinmux {
131 mux {
132 pins = "gpio60", "gpio61";
133 function = "blsp_uart0";
134 bias-disable;
135 };
136 };
137
138 spi_0_pins: spi_0_pinmux {
139 pin {
140 function = "blsp_spi0";
141 pins = "gpio55", "gpio56", "gpio57";
142 drive-strength = <2>;
143 bias-disable;
144 };
145 pin_cs {
146 function = "gpio";
147 pins = "gpio54";
148 drive-strength = <2>;
149 bias-disable;
150 output-high;
151 };
152 };
153 };
154
155 &blsp_dma {
156 status = "okay";
157 };
158
159 &blsp1_spi1 {
160 status = "okay";
161
162 pinctrl-0 = <&spi_0_pins>;
163 pinctrl-names = "default";
164 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
165
166 flash@0 {
167 reg = <0>;
168 compatible = "jedec,spi-nor";
169 spi-max-frequency = <40000000>;
170
171 partitions {
172 compatible = "fixed-partitions";
173 #address-cells = <1>;
174 #size-cells = <1>;
175
176 partition@0 {
177 label = "Qualcomm";
178 reg = <0x0 0x80000>;
179 read-only;
180 };
181
182 partition@80000 {
183 compatible = "mikrotik,routerboot-partitions";
184 #address-cells = <1>;
185 #size-cells = <1>;
186 label = "RouterBoot";
187 reg = <0x80000 0x80000>;
188 read-only;
189
190 hard_config {
191 read-only;
192 };
193
194 dtb_config {
195 read-only;
196 };
197
198 soft_config {
199 };
200 };
201
202 partition@100000 {
203 compatible = "mikrotik,minor";
204 label = "firmware";
205 reg = <0x100000 0xf00000>;
206 };
207 };
208 };
209 };
210
211 &blsp1_uart1 {
212 status = "okay";
213
214 pinctrl-0 = <&serial_pins>;
215 pinctrl-names = "default";
216 };
217
218 &cryptobam {
219 status = "okay";
220 };
221
222 &mdio {
223 status = "okay";
224 };
225
226 &gmac0 {
227 vlan_tag = <0 0x3f>;
228 };
229
230 &ethphy3 {
231 gpio-controller;
232 #gpio-cells = <2>;
233 };
234
235 &ethphy4 {
236 gpio-controller;
237 #gpio-cells = <2>;
238 };
239
240 &wifi0 {
241 status = "okay";
242 };
243
244 &wifi1 {
245 status = "okay";
246 };