ipq40xx: utilize nvmem-cells for openmesh,a62
[openwrt/staging/lynxis.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-a62.dts
1 // SPDX-License-Identifier: ISC
2 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
3 * Copyright (c) 2017-2018, 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/soc/qcom,tcsr.h>
10
11 / {
12 model = "OpenMesh A62";
13 compatible = "openmesh,a62";
14
15 soc {
16 rng@22000 {
17 status = "okay";
18 };
19
20 tcsr@194b000 {
21 /* select hostmode */
22 compatible = "qcom,tcsr";
23 reg = <0x194b000 0x100>;
24 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
25 status = "okay";
26 };
27
28 tcsr@1949000 {
29 compatible = "qcom,tcsr";
30 reg = <0x1949000 0x100>;
31 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
32 };
33
34 ess_tcsr@1953000 {
35 compatible = "qcom,tcsr";
36 reg = <0x1953000 0x1000>;
37 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
38 };
39
40 tcsr@1957000 {
41 compatible = "qcom,tcsr";
42 reg = <0x1957000 0x100>;
43 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
44 };
45
46 usb2: usb2@60f8800 {
47 status = "okay";
48 };
49
50 crypto@8e3a000 {
51 status = "okay";
52 };
53
54 watchdog@b017000 {
55 status = "okay";
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART >;
66 };
67 };
68
69 aliases {
70 led-boot = &led_status_green;
71 led-failsafe = &led_status_green;
72 led-running = &led_status_green;
73 led-upgrade = &led_status_green;
74 label-mac-device = &swport4;
75 };
76
77 leds {
78 compatible = "gpio-leds";
79
80 status_red {
81 label = "red:status";
82 gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
83 };
84
85 led_status_green: status_green {
86 label = "green:status";
87 gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
88 };
89
90 status_blue {
91 label = "blue:status";
92 gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
93 };
94 };
95
96 watchdog {
97 compatible = "linux,wdt-gpio";
98 gpios = <&tlmm 59 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 = "gpio16", "gpio17";
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 = "gpio13", "gpio14", "gpio15";
119 drive-strength = <12>;
120 bias-disable;
121 };
122 pin_cs {
123 function = "gpio";
124 pins = "gpio12";
125 drive-strength = <2>;
126 bias-disable;
127 output-high;
128 };
129 };
130
131 enable-usb-power {
132 gpio-hog;
133 gpios = <58 GPIO_ACTIVE_HIGH>;
134 output-low;
135 line-name = "enable USB2 power";
136 };
137 };
138
139 &blsp_dma {
140 status = "okay";
141 };
142
143 &blsp1_spi1 {
144 pinctrl-0 = <&spi_0_pins>;
145 pinctrl-names = "default";
146 status = "okay";
147 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
148
149 flash@0 {
150 #address-cells = <1>;
151 #size-cells = <1>;
152 compatible = "jedec,spi-nor";
153 reg = <0>;
154 spi-max-frequency = <24000000>;
155
156 /* partitions are passed via bootloader */
157 partitions {
158 partition-art {
159 compatible = "nvmem-cells";
160 #address-cells = <1>;
161 #size-cells = <1>;
162 label = "0:ART";
163
164 precal_art_1000: precal@1000 {
165 reg = <0x1000 0x2f20>;
166 };
167
168 precal_art_5000: precal@5000 {
169 reg = <0x5000 0x2f20>;
170 };
171
172 precal_art_9000: precal@9000 {
173 reg = <0x9000 0x2f20>;
174 };
175
176 macaddr_gmac0: macaddr@0 {
177 reg = <0x0 0x6>;
178 };
179
180 macaddr_gmac1: macaddr@6 {
181 reg = <0x6 0x6>;
182 };
183 };
184 };
185 };
186 };
187
188 &blsp1_uart1 {
189 pinctrl-0 = <&serial_pins>;
190 pinctrl-names = "default";
191 status = "okay";
192 };
193
194 &cryptobam {
195 status = "okay";
196 };
197
198 &usb2_hs_phy {
199 status = "okay";
200 };
201
202 &pcie0 {
203 status = "okay";
204 perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
205 wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
206
207 bridge@0,0 {
208 reg = <0x00000000 0 0 0 0>;
209 #address-cells = <3>;
210 #size-cells = <2>;
211 ranges;
212
213 wifi2: wifi@1,0 {
214 compatible = "qcom,ath10k";
215 status = "okay";
216 reg = <0x00010000 0 0 0 0>;
217 qcom,ath10k-calibration-variant = "OM-A62";
218 ieee80211-freq-limit = <5170000 5350000>;
219
220 nvmem-cell-names = "pre-calibration";
221 nvmem-cells = <&precal_art_9000>;
222 };
223 };
224 };
225
226 &mdio {
227 status = "okay";
228 };
229
230 &gmac {
231 status = "okay";
232 };
233
234 &switch {
235 status = "okay";
236 };
237
238 &swport4 {
239 status = "okay";
240 label = "ethernet1";
241
242 nvmem-cell-names = "mac-address";
243 nvmem-cells = <&macaddr_gmac0>;
244 };
245
246 &swport5 {
247 status = "okay";
248 label = "ethernet2";
249
250 nvmem-cell-names = "mac-address";
251 nvmem-cells = <&macaddr_gmac1>;
252 };
253
254 &wifi0 {
255 status = "okay";
256 qcom,ath10k-calibration-variant = "OM-A62";
257
258 nvmem-cell-names = "pre-calibration";
259 nvmem-cells = <&precal_art_1000>;
260 };
261
262 &wifi1 {
263 status = "okay";
264 qcom,ath10k-calibration-variant = "OM-A62";
265 ieee80211-freq-limit = <5470000 5875000>;
266
267 nvmem-cell-names = "pre-calibration";
268 nvmem-cells = <&precal_art_5000>;
269 };