3f19e4fee9997e0f546e2a11325dea027c944bcf
[openwrt/staging/jow.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8070-cax1800.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2021, Dirk Buchwalder <buchwalder@posteo.de> */
3
4 /dts-v1/;
5
6 #include "ipq8074-512m.dtsi"
7 #include "ipq8074-ac-cpu.dtsi"
8 #include "ipq8074-ess.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13 model = "Edimax CAX1800";
14 compatible = "edimax,cax1800", "qcom,ipq8074";
15
16 aliases {
17 serial0 = &blsp1_uart5;
18 led-boot = &led_system_red;
19 led-failsafe = &led_system_red;
20 led-running = &led_system_green;
21 led-upgrade = &led_system_red;
22 /* Aliases as required by u-boot to patch MAC addresses */
23 ethernet0 = &dp5;
24 label-mac-device = &dp5;
25 };
26
27 chosen {
28 stdout-path = "serial0:115200n8";
29 bootargs-append = " root=/dev/ubiblock0_1";
30 };
31
32 keys {
33 compatible = "gpio-keys";
34
35 reset {
36 label = "reset";
37 gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 };
41
42 leds {
43 compatible = "gpio-leds";
44
45 led_system_red: system-red {
46 label = "red:system";
47 gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
48 };
49
50 led_system_green: system-green {
51 label = "green:system";
52 gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
53 };
54
55 led_system_blue: system-blue {
56 label = "blue:system";
57 gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
58 };
59 };
60 };
61
62 &tlmm {
63 mdio_pins: mdio-pins {
64 mdc {
65 pins = "gpio68";
66 function = "mdc";
67 drive-strength = <8>;
68 bias-pull-up;
69 };
70
71 mdio {
72 pins = "gpio69";
73 function = "mdio";
74 drive-strength = <8>;
75 bias-pull-up;
76 };
77 };
78 };
79
80 &blsp1_uart5 {
81 status = "okay";
82 };
83
84 &prng {
85 status = "okay";
86 };
87
88 &cryptobam {
89 status = "okay";
90 };
91
92 &crypto {
93 status = "okay";
94 };
95
96 &qpic_bam {
97 status = "okay";
98 };
99
100 &qpic_nand {
101 status = "okay";
102
103 nand@0 {
104 reg = <0>;
105 nand-ecc-strength = <4>;
106 nand-ecc-step-size = <512>;
107 nand-bus-width = <8>;
108
109 partitions {
110 compatible = "fixed-partitions";
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 partition@0 {
115 label = "rootfs";
116 reg = <0x0000000 0x3400000>;
117 };
118 };
119 };
120 };
121
122 &blsp1_spi1 {
123 pinctrl-0 = <&spi_0_pins>;
124 pinctrl-names = "default";
125 cs-select = <0>;
126 status = "ok";
127
128 m25p80@0 {
129 #address-cells = <1>;
130 #size-cells = <1>;
131 reg = <0>;
132 compatible = "jedec,spi-nor";
133 spi-max-frequency = <50000000>;
134 use-default-sizes;
135
136 partitions {
137 compatible = "fixed-partitions";
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 partition@0 {
142 label = "0:sbl1";
143 reg = <0x0 0x50000>;
144 read-only;
145 };
146
147 partition@50000 {
148 label = "0:mibib";
149 reg = <0x50000 0x10000>;
150 read-only;
151 };
152
153 partition@60000 {
154 label = "0:bootconfig";
155 reg = <0x60000 0x20000>;
156 read-only;
157 };
158
159 partition@80000 {
160 label = "0:bootconfig1";
161 reg = <0x80000 0x20000>;
162 read-only;
163 };
164
165 partition@a0000 {
166 label = "0:qsee";
167 reg = <0xa0000 0x180000>;
168 read-only;
169 };
170
171 partition@220000 {
172 label = "0:qsee_1";
173 reg = <0x220000 0x180000>;
174 read-only;
175 };
176
177 partition@3a0000 {
178 label = "0:devcfg";
179 reg = <0x3a0000 0x10000>;
180 read-only;
181 };
182
183 partition@3b0000 {
184 label = "0:devcfg_1";
185 reg = <0x3b0000 0x10000>;
186 read-only;
187 };
188
189 partition@3c0000 {
190 label = "0:apdp";
191 reg = <0x3c0000 0x10000>;
192 read-only;
193 };
194
195 partition@3d0000 {
196 label = "0:apdp_1";
197 reg = <0x3d0000 0x10000>;
198 read-only;
199 };
200
201 partition@3e0000 {
202 label = "0:rpm";
203 reg = <0x3e0000 0x40000>;
204 read-only;
205 };
206
207 partition@420000 {
208 label = "0:rpm_1";
209 reg = <0x420000 0x40000>;
210 read-only;
211 };
212
213 partition@460000 {
214 label = "0:cdt";
215 reg = <0x460000 0x10000>;
216 read-only;
217 };
218
219 partition@470000 {
220 label = "0:cdt_1";
221 reg = <0x470000 0x10000>;
222 read-only;
223 };
224
225 partition@480000 {
226 label = "0:appsblenv";
227 reg = <0x480000 0x10000>;
228 };
229
230 partition@490000 {
231 label = "0:appsbl";
232 reg = <0x490000 0xa0000>;
233 read-only;
234 };
235
236 partition@530000 {
237 label = "0:appsbl_1";
238 reg = <0x530000 0xa0000>;
239 read-only;
240 };
241
242 partition@5d0000 {
243 label = "0:art";
244 reg = <0x5d0000 0x40000>;
245 read-only;
246 };
247
248 partition@610000 {
249 label = "0:ethphyfw";
250 reg = <0x610000 0x80000>;
251 read-only;
252 };
253 };
254 };
255 };
256
257 &mdio {
258 status = "okay";
259
260 pinctrl-0 = <&mdio_pins>;
261 pinctrl-names = "default";
262
263 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
264
265 qca8075: ethernet-phy@4 {
266 compatible = "ethernet-phy-ieee802.3-c22";
267 reg = <4>;
268 };
269 };
270
271 &switch {
272 status = "okay";
273
274 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
275 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
276 switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
277 switch_mac_mode1 = <0xff>; /* mac mode for uniphy instance1*/
278 switch_mac_mode2 = <0xff>; /* mac mode for uniphy instance2*/
279 bm_tick_mode = <0>; /* bm tick mode */
280 tm_tick_mode = <0>; /* tm tick mode */
281
282 qcom,port_phyinfo {
283 port@0 {
284 port_id = <1>;
285 phy_address = <0>;
286 };
287 port@1 {
288 port_id = <2>;
289 phy_address = <1>;
290 };
291 port@2 {
292 port_id = <3>;
293 phy_address = <2>;
294 };
295 port@3 {
296 port_id = <4>;
297 phy_address = <3>;
298 };
299 port@4 {
300 port_id = <5>;
301 phy_address = <4>;
302 };
303 };
304 };
305
306 &edma {
307 status = "okay";
308 };
309
310 &dp5 {
311 status = "okay";
312 phy-handle = <&qca8075>;
313 label = "lan";
314 };
315
316 &wifi {
317 status = "okay";
318
319 qcom,ath11k-calibration-variant = "Edimax-CAX1800";
320 qcom,ath11k-fw-memory-mode = <1>;
321 };