b47685587eb00d1bc29668ea92df1c3d819af7cc
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / sun7i-a20.dtsi
1 /*
2  * Copyright 2013 Maxime Ripard
3  *
4  * Maxime Ripard <maxime.ripard@free-electrons.com>
5  *
6  * The code contained herein is licensed under the GNU General Public
7  * License. You may obtain a copy of the GNU General Public License
8  * Version 2 or later at the following locations:
9  *
10  * http://www.opensource.org/licenses/gpl-license.html
11  * http://www.gnu.org/copyleft/gpl.html
12  */
13
14 /include/ "skeleton.dtsi"
15
16 / {
17         interrupt-parent = <&gic>;
18
19         aliases {
20                 ethernet0 = &emac;
21                 serial0 = &uart0;
22                 serial1 = &uart1;
23                 serial2 = &uart2;
24                 serial3 = &uart3;
25                 serial4 = &uart4;
26                 serial5 = &uart5;
27                 serial6 = &uart6;
28                 serial7 = &uart7;
29         };
30
31         cpus {
32                 #address-cells = <1>;
33                 #size-cells = <0>;
34
35                 cpu@0 {
36                         compatible = "arm,cortex-a7";
37                         device_type = "cpu";
38                         reg = <0>;
39                 };
40
41                 cpu@1 {
42                         compatible = "arm,cortex-a7";
43                         device_type = "cpu";
44                         reg = <1>;
45                 };
46         };
47
48         memory {
49                 reg = <0x40000000 0x80000000>;
50         };
51
52         clocks {
53                 #address-cells = <1>;
54                 #size-cells = <1>;
55                 ranges;
56
57                 osc24M: osc24M@01c20050 {
58                         #clock-cells = <0>;
59                         compatible = "allwinner,sun4i-osc-clk";
60                         reg = <0x01c20050 0x4>;
61                         clock-frequency = <24000000>;
62                 };
63
64                 osc32k: clk@0 {
65                         #clock-cells = <0>;
66                         compatible = "fixed-clock";
67                         clock-frequency = <32768>;
68                         clock-output-names = "osc32k";
69                 };
70
71                 pll1: pll1@01c20000 {
72                         #clock-cells = <0>;
73                         compatible = "allwinner,sun4i-pll1-clk";
74                         reg = <0x01c20000 0x4>;
75                         clocks = <&osc24M>;
76                 };
77
78                 pll4: pll4@01c20018 {
79                         #clock-cells = <0>;
80                         compatible = "allwinner,sun4i-pll1-clk";
81                         reg = <0x01c20018 0x4>;
82                         clocks = <&osc24M>;
83                 };
84
85                 pll5: pll5@01c20020 {
86                         #clock-cells = <1>;
87                         compatible = "allwinner,sun4i-pll5-clk";
88                         reg = <0x01c20020 0x4>;
89                         clocks = <&osc24M>;
90                         clock-output-names = "pll5_ddr", "pll5_other";
91                 };
92
93                 pll6: pll6@01c20028 {
94                         #clock-cells = <1>;
95                         compatible = "allwinner,sun4i-pll6-clk";
96                         reg = <0x01c20028 0x4>;
97                         clocks = <&osc24M>;
98                         clock-output-names = "pll6_sata", "pll6_other", "pll6";
99                 };
100
101                 cpu: cpu@01c20054 {
102                         #clock-cells = <0>;
103                         compatible = "allwinner,sun4i-cpu-clk";
104                         reg = <0x01c20054 0x4>;
105                         clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll6 1>;
106                 };
107
108                 axi: axi@01c20054 {
109                         #clock-cells = <0>;
110                         compatible = "allwinner,sun4i-axi-clk";
111                         reg = <0x01c20054 0x4>;
112                         clocks = <&cpu>;
113                 };
114
115                 ahb: ahb@01c20054 {
116                         #clock-cells = <0>;
117                         compatible = "allwinner,sun4i-ahb-clk";
118                         reg = <0x01c20054 0x4>;
119                         clocks = <&axi>;
120                 };
121
122                 ahb_gates: ahb_gates@01c20060 {
123                         #clock-cells = <1>;
124                         compatible = "allwinner,sun7i-a20-ahb-gates-clk";
125                         reg = <0x01c20060 0x8>;
126                         clocks = <&ahb>;
127                         clock-output-names = "ahb_usb0", "ahb_ehci0",
128                                 "ahb_ohci0", "ahb_ehci1", "ahb_ohci1",
129                                 "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0",
130                                 "ahb_mmc1", "ahb_mmc2", "ahb_mmc3", "ahb_ms",
131                                 "ahb_nand", "ahb_sdram", "ahb_ace",
132                                 "ahb_emac", "ahb_ts", "ahb_spi0", "ahb_spi1",
133                                 "ahb_spi2", "ahb_spi3", "ahb_sata",
134                                 "ahb_hstimer", "ahb_ve", "ahb_tvd", "ahb_tve0",
135                                 "ahb_tve1", "ahb_lcd0", "ahb_lcd1", "ahb_csi0",
136                                 "ahb_csi1", "ahb_hdmi1", "ahb_hdmi0",
137                                 "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0",
138                                 "ahb_de_fe1", "ahb_gmac", "ahb_mp",
139                                 "ahb_mali";
140                 };
141
142                 apb0: apb0@01c20054 {
143                         #clock-cells = <0>;
144                         compatible = "allwinner,sun4i-apb0-clk";
145                         reg = <0x01c20054 0x4>;
146                         clocks = <&ahb>;
147                 };
148
149                 apb0_gates: apb0_gates@01c20068 {
150                         #clock-cells = <1>;
151                         compatible = "allwinner,sun7i-a20-apb0-gates-clk";
152                         reg = <0x01c20068 0x4>;
153                         clocks = <&apb0>;
154                         clock-output-names = "apb0_codec", "apb0_spdif",
155                                 "apb0_ac97", "apb0_iis0", "apb0_iis1",
156                                 "apb0_pio", "apb0_ir0", "apb0_ir1",
157                                 "apb0_iis2", "apb0_keypad";
158                 };
159
160                 apb1_mux: apb1_mux@01c20058 {
161                         #clock-cells = <0>;
162                         compatible = "allwinner,sun4i-apb1-mux-clk";
163                         reg = <0x01c20058 0x4>;
164                         clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
165                 };
166
167                 apb1: apb1@01c20058 {
168                         #clock-cells = <0>;
169                         compatible = "allwinner,sun4i-apb1-clk";
170                         reg = <0x01c20058 0x4>;
171                         clocks = <&apb1_mux>;
172                 };
173
174                 apb1_gates: apb1_gates@01c2006c {
175                         #clock-cells = <1>;
176                         compatible = "allwinner,sun7i-a20-apb1-gates-clk";
177                         reg = <0x01c2006c 0x4>;
178                         clocks = <&apb1>;
179                         clock-output-names = "apb1_i2c0", "apb1_i2c1",
180                                 "apb1_i2c2", "apb1_i2c3", "apb1_can",
181                                 "apb1_scr", "apb1_ps20", "apb1_ps21",
182                                 "apb1_i2c4", "apb1_uart0", "apb1_uart1",
183                                 "apb1_uart2", "apb1_uart3", "apb1_uart4",
184                                 "apb1_uart5", "apb1_uart6", "apb1_uart7";
185                 };
186
187                 nand_clk: clk@01c20080 {
188                         #clock-cells = <0>;
189                         compatible = "allwinner,sun4i-mod0-clk";
190                         reg = <0x01c20080 0x4>;
191                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
192                         clock-output-names = "nand";
193                 };
194
195                 ms_clk: clk@01c20084 {
196                         #clock-cells = <0>;
197                         compatible = "allwinner,sun4i-mod0-clk";
198                         reg = <0x01c20084 0x4>;
199                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
200                         clock-output-names = "ms";
201                 };
202
203                 mmc0_clk: clk@01c20088 {
204                         #clock-cells = <0>;
205                         compatible = "allwinner,sun4i-mod0-clk";
206                         reg = <0x01c20088 0x4>;
207                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
208                         clock-output-names = "mmc0";
209                 };
210
211                 mmc1_clk: clk@01c2008c {
212                         #clock-cells = <0>;
213                         compatible = "allwinner,sun4i-mod0-clk";
214                         reg = <0x01c2008c 0x4>;
215                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
216                         clock-output-names = "mmc1";
217                 };
218
219                 mmc2_clk: clk@01c20090 {
220                         #clock-cells = <0>;
221                         compatible = "allwinner,sun4i-mod0-clk";
222                         reg = <0x01c20090 0x4>;
223                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
224                         clock-output-names = "mmc2";
225                 };
226
227                 mmc3_clk: clk@01c20094 {
228                         #clock-cells = <0>;
229                         compatible = "allwinner,sun4i-mod0-clk";
230                         reg = <0x01c20094 0x4>;
231                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
232                         clock-output-names = "mmc3";
233                 };
234
235                 ts_clk: clk@01c20098 {
236                         #clock-cells = <0>;
237                         compatible = "allwinner,sun4i-mod0-clk";
238                         reg = <0x01c20098 0x4>;
239                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
240                         clock-output-names = "ts";
241                 };
242
243                 ss_clk: clk@01c2009c {
244                         #clock-cells = <0>;
245                         compatible = "allwinner,sun4i-mod0-clk";
246                         reg = <0x01c2009c 0x4>;
247                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
248                         clock-output-names = "ss";
249                 };
250
251                 spi0_clk: clk@01c200a0 {
252                         #clock-cells = <0>;
253                         compatible = "allwinner,sun4i-mod0-clk";
254                         reg = <0x01c200a0 0x4>;
255                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
256                         clock-output-names = "spi0";
257                 };
258
259                 spi1_clk: clk@01c200a4 {
260                         #clock-cells = <0>;
261                         compatible = "allwinner,sun4i-mod0-clk";
262                         reg = <0x01c200a4 0x4>;
263                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
264                         clock-output-names = "spi1";
265                 };
266
267                 spi2_clk: clk@01c200a8 {
268                         #clock-cells = <0>;
269                         compatible = "allwinner,sun4i-mod0-clk";
270                         reg = <0x01c200a8 0x4>;
271                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
272                         clock-output-names = "spi2";
273                 };
274
275                 pata_clk: clk@01c200ac {
276                         #clock-cells = <0>;
277                         compatible = "allwinner,sun4i-mod0-clk";
278                         reg = <0x01c200ac 0x4>;
279                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
280                         clock-output-names = "pata";
281                 };
282
283                 ir0_clk: clk@01c200b0 {
284                         #clock-cells = <0>;
285                         compatible = "allwinner,sun4i-mod0-clk";
286                         reg = <0x01c200b0 0x4>;
287                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
288                         clock-output-names = "ir0";
289                 };
290
291                 ir1_clk: clk@01c200b4 {
292                         #clock-cells = <0>;
293                         compatible = "allwinner,sun4i-mod0-clk";
294                         reg = <0x01c200b4 0x4>;
295                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
296                         clock-output-names = "ir1";
297                 };
298
299                 spi3_clk: clk@01c200d4 {
300                         #clock-cells = <0>;
301                         compatible = "allwinner,sun4i-mod0-clk";
302                         reg = <0x01c200d4 0x4>;
303                         clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
304                         clock-output-names = "spi3";
305                 };
306
307                 mbus_clk: clk@01c2015c {
308                         #clock-cells = <0>;
309                         compatible = "allwinner,sun4i-mod0-clk";
310                         reg = <0x01c2015c 0x4>;
311                         clocks = <&osc24M>, <&pll6 2>, <&pll5 1>;
312                         clock-output-names = "mbus";
313                 };
314
315                 /*
316                  * Dummy clock used by output clocks
317                  */
318                 osc24M_32k: clk@1 {
319                         #clock-cells = <0>;
320                         compatible = "fixed-factor-clock";
321                         clock-div = <750>;
322                         clock-mult = <1>;
323                         clocks = <&osc24M>;
324                         clock-output-names = "osc24M_32k";
325                 };
326
327                 clk_out_a: clk@01c201f0 {
328                         #clock-cells = <0>;
329                         compatible = "allwinner,sun7i-a20-out-clk";
330                         reg = <0x01c201f0 0x4>;
331                         clocks = <&osc24M_32k>, <&osc32k>, <&osc24M>;
332                         clock-output-names = "clk_out_a";
333                 };
334
335                 clk_out_b: clk@01c201f4 {
336                         #clock-cells = <0>;
337                         compatible = "allwinner,sun7i-a20-out-clk";
338                         reg = <0x01c201f4 0x4>;
339                         clocks = <&osc24M_32k>, <&osc32k>, <&osc24M>;
340                         clock-output-names = "clk_out_b";
341                 };
342         };
343
344         soc@01c00000 {
345                 compatible = "simple-bus";
346                 #address-cells = <1>;
347                 #size-cells = <1>;
348                 ranges;
349
350                 emac: ethernet@01c0b000 {
351                         compatible = "allwinner,sun4i-emac";
352                         reg = <0x01c0b000 0x1000>;
353                         interrupts = <0 55 4>;
354                         clocks = <&ahb_gates 17>;
355                         status = "disabled";
356                 };
357
358                 mdio@01c0b080 {
359                         compatible = "allwinner,sun4i-mdio";
360                         reg = <0x01c0b080 0x14>;
361                         status = "disabled";
362                         #address-cells = <1>;
363                         #size-cells = <0>;
364                 };
365
366                 pio: pinctrl@01c20800 {
367                         compatible = "allwinner,sun7i-a20-pinctrl";
368                         reg = <0x01c20800 0x400>;
369                         interrupts = <0 28 4>;
370                         clocks = <&apb0_gates 5>;
371                         gpio-controller;
372                         interrupt-controller;
373                         #address-cells = <1>;
374                         #size-cells = <0>;
375                         #gpio-cells = <3>;
376
377                         uart0_pins_a: uart0@0 {
378                                 allwinner,pins = "PB22", "PB23";
379                                 allwinner,function = "uart0";
380                                 allwinner,drive = <0>;
381                                 allwinner,pull = <0>;
382                         };
383
384                         uart6_pins_a: uart6@0 {
385                                 allwinner,pins = "PI12", "PI13";
386                                 allwinner,function = "uart6";
387                                 allwinner,drive = <0>;
388                                 allwinner,pull = <0>;
389                         };
390
391                         uart7_pins_a: uart7@0 {
392                                 allwinner,pins = "PI20", "PI21";
393                                 allwinner,function = "uart7";
394                                 allwinner,drive = <0>;
395                                 allwinner,pull = <0>;
396                         };
397
398                         i2c0_pins_a: i2c0@0 {
399                                 allwinner,pins = "PB0", "PB1";
400                                 allwinner,function = "i2c0";
401                                 allwinner,drive = <0>;
402                                 allwinner,pull = <0>;
403                         };
404
405                         i2c1_pins_a: i2c1@0 {
406                                 allwinner,pins = "PB18", "PB19";
407                                 allwinner,function = "i2c1";
408                                 allwinner,drive = <0>;
409                                 allwinner,pull = <0>;
410                         };
411
412                         i2c2_pins_a: i2c2@0 {
413                                 allwinner,pins = "PB20", "PB21";
414                                 allwinner,function = "i2c2";
415                                 allwinner,drive = <0>;
416                                 allwinner,pull = <0>;
417                         };
418
419                         emac_pins_a: emac0@0 {
420                                 allwinner,pins = "PA0", "PA1", "PA2",
421                                                 "PA3", "PA4", "PA5", "PA6",
422                                                 "PA7", "PA8", "PA9", "PA10",
423                                                 "PA11", "PA12", "PA13", "PA14",
424                                                 "PA15", "PA16";
425                                 allwinner,function = "emac";
426                                 allwinner,drive = <0>;
427                                 allwinner,pull = <0>;
428                         };
429
430                         clk_out_a_pins_a: clk_out_a@0 {
431                                 allwinner,pins = "PI12";
432                                 allwinner,function = "clk_out_a";
433                                 allwinner,drive = <0>;
434                                 allwinner,pull = <0>;
435                         };
436
437                         clk_out_b_pins_a: clk_out_b@0 {
438                                 allwinner,pins = "PI13";
439                                 allwinner,function = "clk_out_b";
440                                 allwinner,drive = <0>;
441                                 allwinner,pull = <0>;
442                         };
443                 };
444
445                 timer@01c20c00 {
446                         compatible = "allwinner,sun4i-timer";
447                         reg = <0x01c20c00 0x90>;
448                         interrupts = <0 22 4>,
449                                      <0 23 4>,
450                                      <0 24 4>,
451                                      <0 25 4>,
452                                      <0 67 4>,
453                                      <0 68 4>;
454                         clocks = <&osc24M>;
455                 };
456
457                 wdt: watchdog@01c20c90 {
458                         compatible = "allwinner,sun4i-wdt";
459                         reg = <0x01c20c90 0x10>;
460                 };
461
462                 rtc: rtc@01c20d00 {
463                         compatible = "allwinner,sun7i-a20-rtc";
464                         reg = <0x01c20d00 0x20>;
465                         interrupts = <0 24 1>;
466                 };
467
468                 sid: eeprom@01c23800 {
469                         compatible = "allwinner,sun7i-a20-sid";
470                         reg = <0x01c23800 0x200>;
471                 };
472
473                 rtp: rtp@01c25000 {
474                         compatible = "allwinner,sun4i-ts";
475                         reg = <0x01c25000 0x100>;
476                         interrupts = <0 29 4>;
477                 };
478
479                 uart0: serial@01c28000 {
480                         compatible = "snps,dw-apb-uart";
481                         reg = <0x01c28000 0x400>;
482                         interrupts = <0 1 4>;
483                         reg-shift = <2>;
484                         reg-io-width = <4>;
485                         clocks = <&apb1_gates 16>;
486                         status = "disabled";
487                 };
488
489                 uart1: serial@01c28400 {
490                         compatible = "snps,dw-apb-uart";
491                         reg = <0x01c28400 0x400>;
492                         interrupts = <0 2 4>;
493                         reg-shift = <2>;
494                         reg-io-width = <4>;
495                         clocks = <&apb1_gates 17>;
496                         status = "disabled";
497                 };
498
499                 uart2: serial@01c28800 {
500                         compatible = "snps,dw-apb-uart";
501                         reg = <0x01c28800 0x400>;
502                         interrupts = <0 3 4>;
503                         reg-shift = <2>;
504                         reg-io-width = <4>;
505                         clocks = <&apb1_gates 18>;
506                         status = "disabled";
507                 };
508
509                 uart3: serial@01c28c00 {
510                         compatible = "snps,dw-apb-uart";
511                         reg = <0x01c28c00 0x400>;
512                         interrupts = <0 4 4>;
513                         reg-shift = <2>;
514                         reg-io-width = <4>;
515                         clocks = <&apb1_gates 19>;
516                         status = "disabled";
517                 };
518
519                 uart4: serial@01c29000 {
520                         compatible = "snps,dw-apb-uart";
521                         reg = <0x01c29000 0x400>;
522                         interrupts = <0 17 4>;
523                         reg-shift = <2>;
524                         reg-io-width = <4>;
525                         clocks = <&apb1_gates 20>;
526                         status = "disabled";
527                 };
528
529                 uart5: serial@01c29400 {
530                         compatible = "snps,dw-apb-uart";
531                         reg = <0x01c29400 0x400>;
532                         interrupts = <0 18 4>;
533                         reg-shift = <2>;
534                         reg-io-width = <4>;
535                         clocks = <&apb1_gates 21>;
536                         status = "disabled";
537                 };
538
539                 uart6: serial@01c29800 {
540                         compatible = "snps,dw-apb-uart";
541                         reg = <0x01c29800 0x400>;
542                         interrupts = <0 19 4>;
543                         reg-shift = <2>;
544                         reg-io-width = <4>;
545                         clocks = <&apb1_gates 22>;
546                         status = "disabled";
547                 };
548
549                 uart7: serial@01c29c00 {
550                         compatible = "snps,dw-apb-uart";
551                         reg = <0x01c29c00 0x400>;
552                         interrupts = <0 20 4>;
553                         reg-shift = <2>;
554                         reg-io-width = <4>;
555                         clocks = <&apb1_gates 23>;
556                         status = "disabled";
557                 };
558
559                 i2c0: i2c@01c2ac00 {
560                         compatible = "allwinner,sun4i-i2c";
561                         reg = <0x01c2ac00 0x400>;
562                         interrupts = <0 7 4>;
563                         clocks = <&apb1_gates 0>;
564                         clock-frequency = <100000>;
565                         status = "disabled";
566                 };
567
568                 i2c1: i2c@01c2b000 {
569                         compatible = "allwinner,sun4i-i2c";
570                         reg = <0x01c2b000 0x400>;
571                         interrupts = <0 8 4>;
572                         clocks = <&apb1_gates 1>;
573                         clock-frequency = <100000>;
574                         status = "disabled";
575                 };
576
577                 i2c2: i2c@01c2b400 {
578                         compatible = "allwinner,sun4i-i2c";
579                         reg = <0x01c2b400 0x400>;
580                         interrupts = <0 9 4>;
581                         clocks = <&apb1_gates 2>;
582                         clock-frequency = <100000>;
583                         status = "disabled";
584                 };
585
586                 i2c3: i2c@01c2b800 {
587                         compatible = "allwinner,sun4i-i2c";
588                         reg = <0x01c2b800 0x400>;
589                         interrupts = <0 88 4>;
590                         clocks = <&apb1_gates 3>;
591                         clock-frequency = <100000>;
592                         status = "disabled";
593                 };
594
595                 i2c4: i2c@01c2bc00 {
596                         compatible = "allwinner,sun4i-i2c";
597                         reg = <0x01c2bc00 0x400>;
598                         interrupts = <0 89 4>;
599                         clocks = <&apb1_gates 15>;
600                         clock-frequency = <100000>;
601                         status = "disabled";
602                 };
603
604                 hstimer@01c60000 {
605                         compatible = "allwinner,sun7i-a20-hstimer";
606                         reg = <0x01c60000 0x1000>;
607                         interrupts = <0 81 1>,
608                                      <0 82 1>,
609                                      <0 83 1>,
610                                      <0 84 1>;
611                         clocks = <&ahb_gates 28>;
612                 };
613
614                 gic: interrupt-controller@01c81000 {
615                         compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
616                         reg = <0x01c81000 0x1000>,
617                               <0x01c82000 0x1000>,
618                               <0x01c84000 0x2000>,
619                               <0x01c86000 0x2000>;
620                         interrupt-controller;
621                         #interrupt-cells = <3>;
622                         interrupts = <1 9 0xf04>;
623                 };
624         };
625 };