d03409b556efca1bbaf6e5813262f20baedc9623
[openwrt/staging/chunkeey.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-hap-ac2.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 hAP ac2";
11 compatible = "mikrotik,hap-ac2";
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 tcsr@194b000 {
46 /* select hostmode */
47 compatible = "qcom,tcsr";
48 reg = <0x194b000 0x100>;
49 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
50 status = "okay";
51 };
52
53 ess_tcsr@1953000 {
54 compatible = "qcom,tcsr";
55 reg = <0x1953000 0x1000>;
56 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
57 };
58
59 tcsr@1957000 {
60 compatible = "qcom,tcsr";
61 reg = <0x1957000 0x100>;
62 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
63 };
64
65 usb3@8af8800 {
66 status = "okay";
67
68 dwc3@8a00000 {
69 phys = <&usb3_hs_phy>;
70 phy-names = "usb2-phy";
71 };
72 };
73
74 crypto@8e3a000 {
75 status = "okay";
76 };
77
78 watchdog@b017000 {
79 status = "okay";
80 };
81
82 ess-switch@c000000 {
83 status = "okay";
84 };
85
86 edma@c080000 {
87 status = "okay";
88 };
89 };
90
91 keys {
92 compatible = "gpio-keys";
93
94 reset {
95 label = "reset";
96 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
97 linux,code = <KEY_RESTART>;
98 };
99
100 mode {
101 label = "mode";
102 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
103 linux,code = <KEY_RFKILL>;
104 };
105 };
106
107 leds {
108 compatible = "gpio-leds";
109
110 power {
111 label = "green:power";
112 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
113 default-state = "keep";
114 panic-indicator;
115 };
116
117 led_user: user {
118 label = "green:user";
119 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
120 };
121 };
122 };
123
124 &tlmm {
125 serial_pins: serial_pinmux {
126 mux {
127 pins = "gpio60", "gpio61";
128 function = "blsp_uart0";
129 bias-disable;
130 };
131 };
132
133 spi_0_pins: spi_0_pinmux {
134 pin {
135 function = "blsp_spi0";
136 pins = "gpio55", "gpio56", "gpio57";
137 drive-strength = <2>;
138 bias-disable;
139 };
140 pin_cs {
141 function = "gpio";
142 pins = "gpio54";
143 drive-strength = <2>;
144 bias-disable;
145 output-high;
146 };
147 };
148
149 enable-usb-power {
150 gpio-hog;
151 gpios = <2 GPIO_ACTIVE_HIGH>;
152 output-high;
153 line-name = "enable USB power";
154 };
155 };
156
157 &blsp_dma {
158 status = "okay";
159 };
160
161 &blsp1_spi1 {
162 status = "okay";
163
164 pinctrl-0 = <&spi_0_pins>;
165 pinctrl-names = "default";
166 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
167
168 flash@0 {
169 reg = <0>;
170 compatible = "jedec,spi-nor";
171 spi-max-frequency = <40000000>;
172
173 partitions {
174 compatible = "fixed-partitions";
175 #address-cells = <1>;
176 #size-cells = <1>;
177
178 partition@0 {
179 label = "Qualcomm";
180 reg = <0x0 0x80000>;
181 read-only;
182 };
183
184 partition@80000 {
185 compatible = "mikrotik,routerboot-partitions";
186 #address-cells = <1>;
187 #size-cells = <1>;
188 label = "RouterBoot";
189 reg = <0x80000 0x80000>;
190 read-only;
191
192 hard_config {
193 read-only;
194 size = <0x2000>;
195 };
196
197 dtb_config {
198 read-only;
199 };
200
201 soft_config {
202 };
203 };
204
205 partition@100000 {
206 compatible = "mikrotik,minor";
207 label = "firmware";
208 reg = <0x100000 0xf00000>;
209 };
210 };
211 };
212 };
213
214 &blsp1_uart1 {
215 status = "okay";
216
217 pinctrl-0 = <&serial_pins>;
218 pinctrl-names = "default";
219 };
220
221 &cryptobam {
222 status = "okay";
223 };
224
225 &usb3_hs_phy {
226 status = "okay";
227 };
228
229 &mdio {
230 status = "okay";
231 };
232
233 &ethphy0 {
234 qcom,single-led-1000;
235 qcom,single-led-100;
236 qcom,single-led-10;
237 };
238
239 &ethphy1 {
240 qcom,single-led-1000;
241 qcom,single-led-100;
242 qcom,single-led-10;
243 };
244
245 &ethphy2 {
246 qcom,single-led-1000;
247 qcom,single-led-100;
248 qcom,single-led-10;
249 };
250
251 &ethphy3 {
252 qcom,single-led-1000;
253 qcom,single-led-100;
254 qcom,single-led-10;
255 };
256
257 &ethphy4 {
258 qcom,single-led-1000;
259 qcom,single-led-100;
260 qcom,single-led-10;
261 };
262
263 &wifi0 {
264 status = "okay";
265
266 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac2";
267 };
268
269 &wifi1 {
270 status = "okay";
271
272 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac2";
273 };