ipq40xx: dynamically build board-2.bin for Mikrotik
[openwrt/staging/chunkeey.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-sxtsq-5-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 SXTsq 5 ac (RBSXTsqG-5acD)";
11 compatible = "mikrotik,sxtsq-5-ac";
12
13 memory {
14 device_type = "memory";
15 reg = <0x80000000 0x10000000>;
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 mdio@90000 {
35 status = "okay";
36 };
37
38 counter@4a1000 {
39 compatible = "qcom,qca-gcnt";
40 reg = <0x4a1000 0x4>;
41 };
42
43 tcsr@1949000 {
44 compatible = "qcom,tcsr";
45 reg = <0x1949000 0x100>;
46 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
47 };
48
49 ess_tcsr@1953000 {
50 compatible = "qcom,tcsr";
51 reg = <0x1953000 0x1000>;
52 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
53 };
54
55 tcsr@1957000 {
56 compatible = "qcom,tcsr";
57 reg = <0x1957000 0x100>;
58 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
59 };
60
61 crypto@8e3a000 {
62 status = "okay";
63 };
64
65 watchdog@b017000 {
66 status = "okay";
67 };
68
69 ess-psgmii@98000 {
70 status = "okay";
71 };
72
73 edma@c080000 {
74 status = "okay";
75 phy-mode = "rgmii";
76 qcom,num_gmac = <1>;
77 qcom,single-phy;
78 };
79 };
80
81 keys {
82 compatible = "gpio-keys";
83
84 reset {
85 label = "reset";
86 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_RESTART>;
88 };
89 };
90
91 leds {
92 compatible = "gpio-leds";
93
94 power {
95 label = "blue:power";
96 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
97 default-state = "keep";
98 panic-indicator;
99 };
100
101 led_user: user {
102 label = "green:user";
103 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
104 };
105
106 rssilow {
107 label = "green:rssilow";
108 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
109 };
110
111 rssimediumlow {
112 label = "green:rssimediumlow";
113 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
114 };
115
116 rssimedium {
117 label = "green:rssimedium";
118 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
119 };
120
121 rssimediumhigh {
122 label = "green:rssimediumhigh";
123 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
124 };
125
126 rssihigh {
127 label = "green:rssihigh";
128 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
129 };
130 };
131 };
132
133 &tlmm {
134 serial_pins: serial_pinmux {
135 mux {
136 pins = "gpio60", "gpio61";
137 function = "blsp_uart0";
138 bias-disable;
139 };
140 };
141
142 spi_0_pins: spi_0_pinmux {
143 pin {
144 function = "blsp_spi0";
145 pins = "gpio55", "gpio56", "gpio57";
146 drive-strength = <2>;
147 bias-disable;
148 };
149 pin_cs {
150 function = "gpio";
151 pins = "gpio54";
152 drive-strength = <2>;
153 bias-disable;
154 output-high;
155 };
156 };
157 };
158
159 &blsp_dma {
160 status = "okay";
161 };
162
163 &blsp1_spi1 {
164 status = "okay";
165
166 pinctrl-0 = <&spi_0_pins>;
167 pinctrl-names = "default";
168 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
169
170 flash@0 {
171 reg = <0>;
172 compatible = "jedec,spi-nor";
173 spi-max-frequency = <40000000>;
174
175 partitions {
176 compatible = "fixed-partitions";
177 #address-cells = <1>;
178 #size-cells = <1>;
179
180 partition@0 {
181 label = "Qualcomm";
182 reg = <0x0 0x80000>;
183 read-only;
184 };
185
186 partition@80000 {
187 compatible = "mikrotik,routerboot-partitions";
188 #address-cells = <1>;
189 #size-cells = <1>;
190 label = "RouterBoot";
191 reg = <0x80000 0x80000>;
192 read-only;
193
194 hard_config {
195 read-only;
196 };
197
198 dtb_config {
199 read-only;
200 };
201
202 soft_config {
203 };
204 };
205
206 partition@100000 {
207 compatible = "mikrotik,minor";
208 label = "firmware";
209 reg = <0x100000 0xf00000>;
210 };
211 };
212 };
213 };
214
215 &blsp1_uart1 {
216 status = "okay";
217
218 pinctrl-0 = <&serial_pins>;
219 pinctrl-names = "default";
220 };
221
222 &cryptobam {
223 status = "okay";
224 };
225
226 &wifi1 {
227 status = "okay";
228 };
229
230 &gmac0 {
231 qcom,phy_mdio_addr = <4>;
232 qcom,poll_required = <1>;
233 qcom,forced_speed = <1000>;
234 qcom,forced_duplex = <1>;
235 vlan_tag = <1 0x20>;
236 };
237
238 &mdio {
239 status = "okay";
240 };