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