8ce530dbd51ea5acda7f3f7316322f13f4c3cf49
[openwrt/openwrt.git] / target / linux / ipq40xx / files-6.6 / arch / arm / boot / dts / qcom / qcom-ipq4018-a42.dts
1 // SPDX-License-Identifier: ISC
2 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
3 * Copyright (c) 2017, Sven Eckelmann <sven.eckelmann@openmesh.com>
4 */
5
6 #include "qcom-ipq4019.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/leds/common.h>
10 #include <dt-bindings/soc/qcom,tcsr.h>
11
12 / {
13 model = "OpenMesh A42";
14 compatible = "openmesh,a42";
15
16 soc {
17 rng@22000 {
18 status = "okay";
19 };
20
21 tcsr@194b000 {
22 /* select hostmode */
23 compatible = "qcom,tcsr";
24 reg = <0x194b000 0x100>;
25 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
26 status = "okay";
27 };
28
29 tcsr@1949000 {
30 compatible = "qcom,tcsr";
31 reg = <0x1949000 0x100>;
32 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
33 };
34
35 ess_tcsr@1953000 {
36 compatible = "qcom,tcsr";
37 reg = <0x1953000 0x1000>;
38 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
39 };
40
41 tcsr@1957000 {
42 compatible = "qcom,tcsr";
43 reg = <0x1957000 0x100>;
44 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
45 };
46
47 crypto@8e3a000 {
48 status = "okay";
49 };
50
51 watchdog@b017000 {
52 status = "okay";
53 };
54 };
55
56 keys {
57 compatible = "gpio-keys";
58
59 reset {
60 label = "reset";
61 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_RESTART>;
63 };
64 };
65
66 aliases {
67 led-boot = &led_status_green;
68 led-failsafe = &led_status_green;
69 led-running = &led_status_green;
70 led-upgrade = &led_status_green;
71 label-mac-device = &swport5;
72 };
73
74 leds {
75 compatible = "gpio-leds";
76
77 status_red {
78 function = LED_FUNCTION_STATUS;
79 color = <LED_COLOR_ID_RED>;
80 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
81 };
82
83 led_status_green: status_green {
84 function = LED_FUNCTION_STATUS;
85 color = <LED_COLOR_ID_GREEN>;
86 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
87 };
88
89 status_blue {
90 function = LED_FUNCTION_STATUS;
91 color = <LED_COLOR_ID_BLUE>;
92 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
93 };
94 };
95
96 watchdog {
97 compatible = "linux,wdt-gpio";
98 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
99 hw_algo = "toggle";
100 /* hw_margin_ms is actually 300s but driver limits it to 60s */
101 hw_margin_ms = <60000>;
102 always-running;
103 };
104 };
105
106 &tlmm {
107 serial_pins: serial_pinmux {
108 mux {
109 pins = "gpio60", "gpio61";
110 function = "blsp_uart0";
111 bias-disable;
112 };
113 };
114
115 spi_0_pins: spi_0_pinmux {
116 pin {
117 function = "blsp_spi0";
118 pins = "gpio55", "gpio56", "gpio57";
119 drive-strength = <12>;
120 bias-disable;
121 };
122 pin_cs {
123 function = "gpio";
124 pins = "gpio54";
125 drive-strength = <2>;
126 bias-disable;
127 output-high;
128 };
129 };
130 };
131
132 &blsp_dma {
133 status = "okay";
134 };
135
136 &blsp1_spi1 {
137 pinctrl-0 = <&spi_0_pins>;
138 pinctrl-names = "default";
139 status = "okay";
140 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
141
142 flash@0 {
143 #address-cells = <1>;
144 #size-cells = <1>;
145 compatible = "jedec,spi-nor";
146 reg = <0>;
147 spi-max-frequency = <24000000>;
148
149 /* partitions are passed via bootloader */
150 partitions {
151 partition-art {
152 label = "0:ART";
153
154 nvmem-layout {
155 compatible = "fixed-layout";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 macaddr_gmac0: macaddr@0 {
160 reg = <0x0 0x6>;
161 };
162
163 macaddr_gmac1: macaddr@6 {
164 reg = <0x6 0x6>;
165 };
166
167 precal_art_1000: precal@1000 {
168 reg = <0x1000 0x2f20>;
169 };
170
171 precal_art_5000: precal@5000 {
172 reg = <0x5000 0x2f20>;
173 };
174 };
175 };
176 };
177 };
178 };
179
180 &blsp1_uart1 {
181 pinctrl-0 = <&serial_pins>;
182 pinctrl-names = "default";
183 status = "okay";
184 };
185
186 &cryptobam {
187 status = "okay";
188 };
189
190 &usb2 {
191 status = "okay";
192 };
193
194 &usb2_hs_phy {
195 status = "okay";
196 };
197
198 &mdio {
199 status = "okay";
200 };
201
202 &gmac {
203 status = "okay";
204 };
205
206 &switch {
207 status = "okay";
208 };
209
210 &swport4 {
211 status = "okay";
212 label = "ethernet2";
213
214 nvmem-cell-names = "mac-address";
215 nvmem-cells = <&macaddr_gmac1>;
216 };
217
218 &swport5 {
219 status = "okay";
220 label = "ethernet1";
221
222 nvmem-cell-names = "mac-address";
223 nvmem-cells = <&macaddr_gmac0>;
224 };
225
226 &wifi0 {
227 status = "okay";
228 qcom,ath10k-calibration-variant = "OM-A42";
229
230 nvmem-cell-names = "pre-calibration";
231 nvmem-cells = <&precal_art_1000>;
232 };
233
234 &wifi1 {
235 status = "okay";
236 qcom,ath10k-calibration-variant = "OM-A42";
237
238 nvmem-cell-names = "pre-calibration";
239 nvmem-cells = <&precal_art_5000>;
240 };