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