GNU Linux-libre 4.19.245-gnu1
[releases.git] / arch / arm64 / boot / dts / marvell / armada-37xx.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Device Tree Include file for Marvell Armada 37xx family of SoCs.
4  *
5  * Copyright (C) 2016 Marvell
6  *
7  * Gregory CLEMENT <gregory.clement@free-electrons.com>
8  *
9  */
10
11 #include <dt-bindings/interrupt-controller/arm-gic.h>
12
13 / {
14         model = "Marvell Armada 37xx SoC";
15         compatible = "marvell,armada3700";
16         interrupt-parent = <&gic>;
17         #address-cells = <2>;
18         #size-cells = <2>;
19
20         aliases {
21                 serial0 = &uart0;
22                 serial1 = &uart1;
23         };
24
25         reserved-memory {
26                 #address-cells = <2>;
27                 #size-cells = <2>;
28                 ranges;
29
30                 /*
31                  * The PSCI firmware region depicted below is the default one
32                  * and should be updated by the bootloader.
33                  */
34                 psci-area@4000000 {
35                         reg = <0 0x4000000 0 0x200000>;
36                         no-map;
37                 };
38         };
39
40         cpus {
41                 #address-cells = <1>;
42                 #size-cells = <0>;
43                 cpu@0 {
44                         device_type = "cpu";
45                         compatible = "arm,cortex-a53", "arm,armv8";
46                         reg = <0>;
47                         clocks = <&nb_periph_clk 16>;
48                         enable-method = "psci";
49                 };
50         };
51
52         psci {
53                 compatible = "arm,psci-0.2";
54                 method = "smc";
55         };
56
57         timer {
58                 compatible = "arm,armv8-timer";
59                 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>,
60                              <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>,
61                              <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>,
62                              <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>;
63         };
64
65         pmu {
66                 compatible = "arm,armv8-pmuv3";
67                 interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
68         };
69
70         soc {
71                 compatible = "simple-bus";
72                 #address-cells = <2>;
73                 #size-cells = <2>;
74                 ranges;
75
76                 internal-regs@d0000000 {
77                         #address-cells = <1>;
78                         #size-cells = <1>;
79                         compatible = "simple-bus";
80                         /* 32M internal register @ 0xd000_0000 */
81                         ranges = <0x0 0x0 0xd0000000 0x2000000>;
82
83                         spi0: spi@10600 {
84                                 compatible = "marvell,armada-3700-spi";
85                                 #address-cells = <1>;
86                                 #size-cells = <0>;
87                                 reg = <0x10600 0xA00>;
88                                 clocks = <&nb_periph_clk 7>;
89                                 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
90                                 num-cs = <4>;
91                                 status = "disabled";
92                         };
93
94                         i2c0: i2c@11000 {
95                                 compatible = "marvell,armada-3700-i2c";
96                                 reg = <0x11000 0x24>;
97                                 #address-cells = <1>;
98                                 #size-cells = <0>;
99                                 clocks = <&nb_periph_clk 10>;
100                                 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
101                                 mrvl,i2c-fast-mode;
102                                 status = "disabled";
103                         };
104
105                         i2c1: i2c@11080 {
106                                 compatible = "marvell,armada-3700-i2c";
107                                 reg = <0x11080 0x24>;
108                                 #address-cells = <1>;
109                                 #size-cells = <0>;
110                                 clocks = <&nb_periph_clk 9>;
111                                 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
112                                 mrvl,i2c-fast-mode;
113                                 status = "disabled";
114                         };
115
116                         avs: avs@11500 {
117                                 compatible = "marvell,armada-3700-avs",
118                                              "syscon";
119                                 reg = <0x11500 0x40>;
120                         };
121
122                         uart0: serial@12000 {
123                                 compatible = "marvell,armada-3700-uart";
124                                 reg = <0x12000 0x18>;
125                                 clocks = <&xtalclk>;
126                                 interrupts =
127                                 <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
128                                 <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
129                                 <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
130                                 interrupt-names = "uart-sum", "uart-tx", "uart-rx";
131                                 status = "disabled";
132                         };
133
134                         uart1: serial@12200 {
135                                 compatible = "marvell,armada-3700-uart-ext";
136                                 reg = <0x12200 0x30>;
137                                 clocks = <&xtalclk>;
138                                 interrupts =
139                                 <GIC_SPI 30 IRQ_TYPE_EDGE_RISING>,
140                                 <GIC_SPI 31 IRQ_TYPE_EDGE_RISING>;
141                                 interrupt-names = "uart-tx", "uart-rx";
142                                 status = "disabled";
143                         };
144
145                         nb_periph_clk: nb-periph-clk@13000 {
146                                 compatible = "marvell,armada-3700-periph-clock-nb",
147                                              "syscon";
148                                 reg = <0x13000 0x100>;
149                                 clocks = <&tbg 0>, <&tbg 1>, <&tbg 2>,
150                                 <&tbg 3>, <&xtalclk>;
151                                 #clock-cells = <1>;
152                         };
153
154                         sb_periph_clk: sb-periph-clk@18000 {
155                                 compatible = "marvell,armada-3700-periph-clock-sb";
156                                 reg = <0x18000 0x100>;
157                                 clocks = <&tbg 0>, <&tbg 1>, <&tbg 2>,
158                                 <&tbg 3>, <&xtalclk>;
159                                 #clock-cells = <1>;
160                         };
161
162                         tbg: tbg@13200 {
163                                 compatible = "marvell,armada-3700-tbg-clock";
164                                 reg = <0x13200 0x100>;
165                                 clocks = <&xtalclk>;
166                                 #clock-cells = <1>;
167                         };
168
169                         pinctrl_nb: pinctrl@13800 {
170                                 compatible = "marvell,armada3710-nb-pinctrl",
171                                              "syscon", "simple-mfd";
172                                 reg = <0x13800 0x100>, <0x13C00 0x20>;
173                                 /* MPP1[19:0] */
174                                 gpionb: gpio {
175                                         #gpio-cells = <2>;
176                                         gpio-ranges = <&pinctrl_nb 0 0 36>;
177                                         gpio-controller;
178                                         interrupt-controller;
179                                         #interrupt-cells = <2>;
180                                         interrupts =
181                                         <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
182                                         <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
183                                         <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
184                                         <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
185                                         <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
186                                         <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
187                                         <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
188                                         <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
189                                         <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>,
190                                         <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
191                                         <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>,
192                                         <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
193                                 };
194
195                                 xtalclk: xtal-clk {
196                                         compatible = "marvell,armada-3700-xtal-clock";
197                                         clock-output-names = "xtal";
198                                         #clock-cells = <0>;
199                                 };
200
201                                 spi_quad_pins: spi-quad-pins {
202                                         groups = "spi_quad";
203                                         function = "spi";
204                                 };
205
206                                 i2c1_pins: i2c1-pins {
207                                         groups = "i2c1";
208                                         function = "i2c";
209                                 };
210
211                                 i2c2_pins: i2c2-pins {
212                                         groups = "i2c2";
213                                         function = "i2c";
214                                 };
215
216                                 uart1_pins: uart1-pins {
217                                         groups = "uart1";
218                                         function = "uart";
219                                 };
220
221                                 uart2_pins: uart2-pins {
222                                         groups = "uart2";
223                                         function = "uart";
224                                 };
225                         };
226
227                         nb_pm: syscon@14000 {
228                                 compatible = "marvell,armada-3700-nb-pm",
229                                              "syscon";
230                                 reg = <0x14000 0x60>;
231                         };
232
233                         pinctrl_sb: pinctrl@18800 {
234                                 compatible = "marvell,armada3710-sb-pinctrl",
235                                              "syscon", "simple-mfd";
236                                 reg = <0x18800 0x100>, <0x18C00 0x20>;
237                                 /* MPP2[23:0] */
238                                 gpiosb: gpio {
239                                         #gpio-cells = <2>;
240                                         gpio-ranges = <&pinctrl_sb 0 0 30>;
241                                         gpio-controller;
242                                         interrupt-controller;
243                                         #interrupt-cells = <2>;
244                                         interrupts =
245                                         <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
246                                         <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
247                                         <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
248                                         <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
249                                         <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
250                                 };
251
252                                 rgmii_pins: mii-pins {
253                                         groups = "rgmii";
254                                         function = "mii";
255                                 };
256
257                                 pcie_reset_pins: pcie-reset-pins {
258                                         groups = "pcie1";
259                                         function = "gpio";
260                                 };
261
262                                 pcie_clkreq_pins: pcie-clkreq-pins {
263                                         groups = "pcie1_clkreq";
264                                         function = "pcie";
265                                 };
266                         };
267
268                         eth0: ethernet@30000 {
269                                    compatible = "marvell,armada-3700-neta";
270                                    reg = <0x30000 0x4000>;
271                                    interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
272                                    clocks = <&sb_periph_clk 8>;
273                                    status = "disabled";
274                         };
275
276                         mdio: mdio@32004 {
277                                 #address-cells = <1>;
278                                 #size-cells = <0>;
279                                 compatible = "marvell,orion-mdio";
280                                 reg = <0x32004 0x4>;
281                         };
282
283                         eth1: ethernet@40000 {
284                                 compatible = "marvell,armada-3700-neta";
285                                 reg = <0x40000 0x4000>;
286                                 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
287                                 clocks = <&sb_periph_clk 7>;
288                                 status = "disabled";
289                         };
290
291                         usb3: usb@58000 {
292                                 compatible = "marvell,armada3700-xhci",
293                                 "generic-xhci";
294                                 reg = <0x58000 0x4000>;
295                                 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
296                                 clocks = <&sb_periph_clk 12>;
297                                 status = "disabled";
298                         };
299
300                         usb2: usb@5e000 {
301                                 compatible = "marvell,armada-3700-ehci";
302                                 reg = <0x5e000 0x2000>;
303                                 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
304                                 status = "disabled";
305                         };
306
307                         xor@60900 {
308                                 compatible = "marvell,armada-3700-xor";
309                                 reg = <0x60900 0x100>,
310                                       <0x60b00 0x100>;
311
312                                 xor10 {
313                                         interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
314                                 };
315                                 xor11 {
316                                         interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
317                                 };
318                         };
319
320                         crypto: crypto@90000 {
321                                 compatible = "inside-secure,safexcel-eip97ies";
322                                 reg = <0x90000 0x20000>;
323                                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
324                                              <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
325                                              <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
326                                              <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
327                                              <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
328                                              <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
329                                 interrupt-names = "mem", "ring0", "ring1",
330                                                   "ring2", "ring3", "eip";
331                                 clocks = <&nb_periph_clk 15>;
332                         };
333
334                         sdhci1: sdhci@d0000 {
335                                 compatible = "marvell,armada-3700-sdhci",
336                                              "marvell,sdhci-xenon";
337                                 reg = <0xd0000 0x300>,
338                                       <0x1e808 0x4>;
339                                 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
340                                 clocks = <&nb_periph_clk 0>;
341                                 clock-names = "core";
342                                 status = "disabled";
343                         };
344
345                         sdhci0: sdhci@d8000 {
346                                 compatible = "marvell,armada-3700-sdhci",
347                                              "marvell,sdhci-xenon";
348                                 reg = <0xd8000 0x300>,
349                                       <0x17808 0x4>;
350                                 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
351                                 clocks = <&nb_periph_clk 0>;
352                                 clock-names = "core";
353                                 status = "disabled";
354                         };
355
356                         sata: sata@e0000 {
357                                 compatible = "marvell,armada-3700-ahci";
358                                 reg = <0xe0000 0x2000>;
359                                 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
360                                 status = "disabled";
361                         };
362
363                         gic: interrupt-controller@1d00000 {
364                                 compatible = "arm,gic-v3";
365                                 #interrupt-cells = <3>;
366                                 interrupt-controller;
367                                 reg = <0x1d00000 0x10000>, /* GICD */
368                                       <0x1d40000 0x40000>, /* GICR */
369                                       <0x1d80000 0x2000>,  /* GICC */
370                                       <0x1d90000 0x2000>,  /* GICH */
371                                       <0x1da0000 0x20000>; /* GICV */
372                                 interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
373                         };
374                 };
375
376                 pcie0: pcie@d0070000 {
377                         compatible = "marvell,armada-3700-pcie";
378                         device_type = "pci";
379                         status = "disabled";
380                         reg = <0 0xd0070000 0 0x20000>;
381                         #address-cells = <3>;
382                         #size-cells = <2>;
383                         bus-range = <0x00 0xff>;
384                         interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
385                         #interrupt-cells = <1>;
386                         msi-parent = <&pcie0>;
387                         msi-controller;
388                         /*
389                          * The 128 MiB address range [0xe8000000-0xf0000000] is
390                          * dedicated for PCIe and can be assigned to 8 windows
391                          * with size a power of two. Use one 64 KiB window for
392                          * IO at the end and the remaining seven windows
393                          * (totaling 127 MiB) for MEM.
394                          */
395                         ranges = <0x82000000 0 0xe8000000   0 0xe8000000   0 0x07f00000   /* Port 0 MEM */
396                                   0x81000000 0 0xefff0000   0 0xefff0000   0 0x00010000>; /* Port 0 IO */
397                         interrupt-map-mask = <0 0 0 7>;
398                         interrupt-map = <0 0 0 1 &pcie_intc 0>,
399                                         <0 0 0 2 &pcie_intc 1>,
400                                         <0 0 0 3 &pcie_intc 2>,
401                                         <0 0 0 4 &pcie_intc 3>;
402                         pcie_intc: interrupt-controller {
403                                 interrupt-controller;
404                                 #interrupt-cells = <1>;
405                         };
406                 };
407         };
408 };