466185e36b8fdc842bb5ab73a0ad25ea5127e7f7
[openwrt/openwrt.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-gl-a1300.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq4019.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/soc/qcom,tcsr.h>
7
8 / {
9 model = "GL.iNet GL-A1300";
10 compatible = "glinet,gl-a1300", "qcom,ipq4019";
11
12 aliases {
13 led-boot = &led_run;
14 led-failsafe = &led_run;
15 led-running = &led_run;
16 led-upgrade = &led_run;
17 label-mac-device = &swport4;
18 };
19
20 chosen {
21 bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1";
22 };
23
24 soc {
25 tcsr@1949000 {
26 compatible = "qcom,tcsr";
27 reg = <0x1949000 0x100>;
28 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
29 };
30
31 tcsr@194b000 {
32 /* select hostmode */
33 compatible = "qcom,tcsr";
34 reg = <0x194b000 0x100>;
35 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
36 status = "okay";
37 };
38
39 ess_tcsr@1953000 {
40 compatible = "qcom,tcsr";
41 reg = <0x1953000 0x1000>;
42 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
43 };
44
45 tcsr@1957000 {
46 compatible = "qcom,tcsr";
47 reg = <0x1957000 0x100>;
48 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
49 };
50 };
51
52 keys {
53 compatible = "gpio-keys";
54
55 reset {
56 label = "reset";
57 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60
61 switch {
62 label = "switch-button";
63 gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;
64 linux,code = <KEY_SETUP>;
65 };
66 };
67
68 leds {
69 compatible = "gpio-leds";
70
71 led_run: blue {
72 label = "blue:status";
73 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
74 };
75
76 white {
77 label = "white:status";
78 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
79 };
80 };
81
82 gpio_export {
83 compatible = "gpio-export";
84
85 usb {
86 gpio-export,name = "usb_power";
87 gpio-export,output = <1>;
88 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
89 };
90 };
91 };
92
93 &prng {
94 status = "okay";
95 };
96
97 &mdio {
98 status = "okay";
99 };
100
101 &blsp_dma {
102 status = "okay";
103 };
104
105 &watchdog {
106 status = "okay";
107 };
108
109 &crypto {
110 status = "okay";
111 };
112
113 &cryptobam {
114 status = "okay";
115 };
116
117 &blsp1_spi1 {
118 status = "okay";
119
120 pinctrl-0 = <&spi0_pins>;
121 pinctrl-names = "default";
122 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 5 GPIO_ACTIVE_HIGH>;
123
124 flash@0 {
125 compatible = "jedec,spi-nor";
126 reg = <0>;
127 spi-max-frequency = <24000000>;
128
129 partitions {
130 compatible = "fixed-partitions";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 partition@0 {
135 label = "SBL1";
136 reg = <0x00000000 0x00040000>;
137 read-only;
138 };
139
140 partition@40000 {
141 label = "MIBIB";
142 reg = <0x00040000 0x00020000>;
143 read-only;
144 };
145
146 partition@60000 {
147 label = "QSEE";
148 reg = <0x00060000 0x00060000>;
149 read-only;
150 };
151
152 partition@c0000 {
153 label = "CDT";
154 reg = <0x000c0000 0x00010000>;
155 read-only;
156 };
157
158 partition@d0000 {
159 label = "DDRPARAMS";
160 reg = <0x000d0000 0x00010000>;
161 read-only;
162 };
163
164 partition@e0000 {
165 label = "APPSBLENV"; /* uboot env*/
166 reg = <0x000e0000 0x00010000>;
167 };
168
169 partition@f0000 {
170 label = "APPSBL"; /* uboot */
171 reg = <0x000f0000 0x00080000>;
172 read-only;
173 };
174
175 partition@170000 {
176 label = "ART";
177 reg = <0x00170000 0x00010000>;
178 read-only;
179
180 nvmem-layout {
181 compatible = "fixed-layout";
182 #address-cells = <1>;
183 #size-cells = <1>;
184
185 macaddr_gmac0: macaddr@0 {
186 reg = <0x0 0x6>;
187 };
188
189 macaddr_gmac1: macaddr@6 {
190 reg = <0x6 0x6>;
191 };
192
193 precal_art_1000: precal@1000 {
194 reg = <0x1000 0x2f20>;
195 };
196
197 precal_art_5000: precal@5000 {
198 reg = <0x5000 0x2f20>;
199 };
200 };
201 };
202
203 partition@180000 {
204 label = "log";
205 reg = <0x00180000 0x00020000>;
206 };
207 };
208 };
209
210 spi-nand@1 {
211 compatible = "spi-nand";
212 reg = <1>;
213 spi-max-frequency = <24000000>;
214
215 partitions {
216 compatible = "fixed-partitions";
217 #address-cells = <1>;
218 #size-cells = <1>;
219
220 partition@0 {
221 label = "ubi";
222 reg = <0x00000000 0x08000000>;
223 };
224 };
225 };
226 };
227
228 &blsp1_uart1 {
229 pinctrl-0 = <&serial_pins>;
230 pinctrl-names = "default";
231 status = "okay";
232 };
233
234 &tlmm {
235 serial_pins: serial_pinmux {
236 mux {
237 pins = "gpio60", "gpio61";
238 function = "blsp_uart0";
239 bias-disable;
240 };
241 };
242
243 i2c_0_pins: i2c_0_pinmux {
244 pinmux {
245 pins = "gpio58", "gpio59";
246 function = "blsp_i2c0";
247 bias-disable;
248 };
249 };
250
251 spi0_pins: spi0_pinmux {
252 mux_spi {
253 function = "blsp_spi0";
254 pins = "gpio55", "gpio56", "gpio57";
255 drive-strength = <12>;
256 bias-disable;
257 };
258
259 mux_cs {
260 function = "gpio";
261 pins = "gpio54", "gpio5";
262 drive-strength = <2>;
263 bias-disable;
264 output-high;
265 };
266 };
267 };
268
269 &blsp1_i2c3 {
270 status = "okay";
271 pinctrl-0 = <&i2c_0_pins>;
272 pinctrl-names = "default";
273 };
274
275 &usb2 {
276 status = "okay";
277 };
278
279 &usb3 {
280 status = "okay";
281 };
282
283 &usb2_hs_phy {
284 status = "okay";
285 };
286
287 &usb3_hs_phy {
288 status = "okay";
289 };
290
291 &usb3_ss_phy {
292 status = "okay";
293 };
294
295 &gmac {
296 status = "okay";
297 };
298
299 &switch {
300 status = "okay";
301 };
302
303 &swport3 {
304 status = "okay";
305
306 label = "lan2";
307 nvmem-cell-names = "mac-address";
308 nvmem-cells = <&macaddr_gmac0>;
309 mac-address-increment = <2>;
310 };
311
312 &swport4 {
313 status = "okay";
314
315 label = "lan1";
316 nvmem-cell-names = "mac-address";
317 nvmem-cells = <&macaddr_gmac0>;
318 };
319
320 &swport5 {
321 status = "okay";
322
323 nvmem-cell-names = "mac-address";
324 nvmem-cells = <&macaddr_gmac1>;
325 };
326
327 &wifi0 {
328 status = "okay";
329 nvmem-cell-names = "pre-calibration";
330 nvmem-cells = <&precal_art_1000>;
331 qcom,ath10k-calibration-variant = "GL-A1300";
332 };
333
334 &wifi1 {
335 status = "okay";
336 nvmem-cell-names = "pre-calibration";
337 nvmem-cells = <&precal_art_5000>;
338 qcom,ath10k-calibration-variant = "GL-A1300";
339 };