Merge remote-tracking branch 'net/master'
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / meson8.dtsi
1 /*
2  * Copyright 2014 Carlo Caione <carlo@caione.org>
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This library is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This library is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  *     You should have received a copy of the GNU General Public License
20  *     along with this program. If not, see <http://www.gnu.org/licenses/>.
21  *
22  * Or, alternatively,
23  *
24  *  b) Permission is hereby granted, free of charge, to any person
25  *     obtaining a copy of this software and associated documentation
26  *     files (the "Software"), to deal in the Software without
27  *     restriction, including without limitation the rights to use,
28  *     copy, modify, merge, publish, distribute, sublicense, and/or
29  *     sell copies of the Software, and to permit persons to whom the
30  *     Software is furnished to do so, subject to the following
31  *     conditions:
32  *
33  *     The above copyright notice and this permission notice shall be
34  *     included in all copies or substantial portions of the Software.
35  *
36  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43  *     OTHER DEALINGS IN THE SOFTWARE.
44  */
45
46 #include <dt-bindings/clock/meson8b-clkc.h>
47 #include <dt-bindings/gpio/meson8-gpio.h>
48 #include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h>
49 #include <dt-bindings/reset/amlogic,meson8b-reset.h>
50 #include "meson.dtsi"
51
52 / {
53         model = "Amlogic Meson8 SoC";
54         compatible = "amlogic,meson8";
55
56         cpus {
57                 #address-cells = <1>;
58                 #size-cells = <0>;
59
60                 cpu0: cpu@200 {
61                         device_type = "cpu";
62                         compatible = "arm,cortex-a9";
63                         next-level-cache = <&L2>;
64                         reg = <0x200>;
65                         enable-method = "amlogic,meson8-smp";
66                         resets = <&clkc CLKC_RESET_CPU0_SOFT_RESET>;
67                         operating-points-v2 = <&cpu_opp_table>;
68                         clocks = <&clkc CLKID_CPUCLK>;
69                 };
70
71                 cpu1: cpu@201 {
72                         device_type = "cpu";
73                         compatible = "arm,cortex-a9";
74                         next-level-cache = <&L2>;
75                         reg = <0x201>;
76                         enable-method = "amlogic,meson8-smp";
77                         resets = <&clkc CLKC_RESET_CPU1_SOFT_RESET>;
78                         operating-points-v2 = <&cpu_opp_table>;
79                         clocks = <&clkc CLKID_CPUCLK>;
80                 };
81
82                 cpu2: cpu@202 {
83                         device_type = "cpu";
84                         compatible = "arm,cortex-a9";
85                         next-level-cache = <&L2>;
86                         reg = <0x202>;
87                         enable-method = "amlogic,meson8-smp";
88                         resets = <&clkc CLKC_RESET_CPU2_SOFT_RESET>;
89                         operating-points-v2 = <&cpu_opp_table>;
90                         clocks = <&clkc CLKID_CPUCLK>;
91                 };
92
93                 cpu3: cpu@203 {
94                         device_type = "cpu";
95                         compatible = "arm,cortex-a9";
96                         next-level-cache = <&L2>;
97                         reg = <0x203>;
98                         enable-method = "amlogic,meson8-smp";
99                         resets = <&clkc CLKC_RESET_CPU3_SOFT_RESET>;
100                         operating-points-v2 = <&cpu_opp_table>;
101                         clocks = <&clkc CLKID_CPUCLK>;
102                 };
103         };
104
105         cpu_opp_table: opp-table {
106                 compatible = "operating-points-v2";
107                 opp-shared;
108
109                 opp-96000000 {
110                         opp-hz = /bits/ 64 <96000000>;
111                         opp-microvolt = <825000>;
112                 };
113                 opp-192000000 {
114                         opp-hz = /bits/ 64 <192000000>;
115                         opp-microvolt = <825000>;
116                 };
117                 opp-312000000 {
118                         opp-hz = /bits/ 64 <312000000>;
119                         opp-microvolt = <825000>;
120                 };
121                 opp-408000000 {
122                         opp-hz = /bits/ 64 <408000000>;
123                         opp-microvolt = <825000>;
124                 };
125                 opp-504000000 {
126                         opp-hz = /bits/ 64 <504000000>;
127                         opp-microvolt = <825000>;
128                 };
129                 opp-600000000 {
130                         opp-hz = /bits/ 64 <600000000>;
131                         opp-microvolt = <850000>;
132                 };
133                 opp-720000000 {
134                         opp-hz = /bits/ 64 <720000000>;
135                         opp-microvolt = <850000>;
136                 };
137                 opp-816000000 {
138                         opp-hz = /bits/ 64 <816000000>;
139                         opp-microvolt = <875000>;
140                 };
141                 opp-1008000000 {
142                         opp-hz = /bits/ 64 <1008000000>;
143                         opp-microvolt = <925000>;
144                 };
145                 opp-1200000000 {
146                         opp-hz = /bits/ 64 <1200000000>;
147                         opp-microvolt = <975000>;
148                 };
149                 opp-1416000000 {
150                         opp-hz = /bits/ 64 <1416000000>;
151                         opp-microvolt = <1025000>;
152                 };
153                 opp-1608000000 {
154                         opp-hz = /bits/ 64 <1608000000>;
155                         opp-microvolt = <1100000>;
156                 };
157                 opp-1800000000 {
158                         status = "disabled";
159                         opp-hz = /bits/ 64 <1800000000>;
160                         opp-microvolt = <1125000>;
161                 };
162                 opp-1992000000 {
163                         status = "disabled";
164                         opp-hz = /bits/ 64 <1992000000>;
165                         opp-microvolt = <1150000>;
166                 };
167         };
168
169         gpu_opp_table: gpu-opp-table {
170                 compatible = "operating-points-v2";
171
172                 opp-182150000 {
173                         opp-hz = /bits/ 64 <182150000>;
174                         opp-microvolt = <1150000>;
175                 };
176                 opp-318750000 {
177                         opp-hz = /bits/ 64 <318750000>;
178                         opp-microvolt = <1150000>;
179                 };
180                 opp-425000000 {
181                         opp-hz = /bits/ 64 <425000000>;
182                         opp-microvolt = <1150000>;
183                 };
184                 opp-510000000 {
185                         opp-hz = /bits/ 64 <510000000>;
186                         opp-microvolt = <1150000>;
187                 };
188                 opp-637500000 {
189                         opp-hz = /bits/ 64 <637500000>;
190                         opp-microvolt = <1150000>;
191                         turbo-mode;
192                 };
193         };
194
195         pmu {
196                 compatible = "arm,cortex-a9-pmu";
197                 interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
198                              <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
199                              <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
200                              <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
201                 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
202         };
203
204         reserved-memory {
205                 #address-cells = <1>;
206                 #size-cells = <1>;
207                 ranges;
208
209                 /* 2 MiB reserved for Hardware ROM Firmware? */
210                 hwrom@0 {
211                         reg = <0x0 0x200000>;
212                         no-map;
213                 };
214
215                 /*
216                  * 1 MiB reserved for the "ARM Power Firmware": this is ARM
217                  * code which is responsible for system suspend. It loads a
218                  * piece of ARC code ("arc_power" in the vendor u-boot tree)
219                  * into SRAM, executes that and shuts down the (last) ARM core.
220                  * The arc_power firmware then checks various wakeup sources
221                  * (IR remote receiver, HDMI CEC, WIFI and Bluetooth wakeup or
222                  * simply the power key) and re-starts the ARM core once it
223                  * detects a wakeup request.
224                  */
225                 power-firmware@4f00000 {
226                         reg = <0x4f00000 0x100000>;
227                         no-map;
228                 };
229         };
230
231         apb: bus@d0000000 {
232                 compatible = "simple-bus";
233                 reg = <0xd0000000 0x200000>;
234                 #address-cells = <1>;
235                 #size-cells = <1>;
236                 ranges = <0x0 0xd0000000 0x200000>;
237
238                 mali: gpu@c0000 {
239                         compatible = "amlogic,meson8-mali", "arm,mali-450";
240                         reg = <0xc0000 0x40000>;
241                         interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
242                                      <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
243                                      <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
244                                      <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
245                                      <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
246                                      <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>,
247                                      <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>,
248                                      <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
249                                      <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
250                                      <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>,
251                                      <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>,
252                                      <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>,
253                                      <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>,
254                                      <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>,
255                                      <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
256                                      <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>,
257                                      <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>,
258                                      <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
259                         interrupt-names = "gp", "gpmmu", "pp", "pmu",
260                                           "pp0", "ppmmu0", "pp1", "ppmmu1",
261                                           "pp2", "ppmmu2", "pp4", "ppmmu4",
262                                           "pp5", "ppmmu5", "pp6", "ppmmu6";
263                         resets = <&reset RESET_MALI>;
264                         clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_MALI>;
265                         clock-names = "bus", "core";
266                         operating-points-v2 = <&gpu_opp_table>;
267                         switch-delay = <0xffff>;
268                 };
269         };
270 }; /* end of / */
271
272 &aobus {
273         pmu: pmu@e0 {
274                 compatible = "amlogic,meson8-pmu", "syscon";
275                 reg = <0xe0 0x8>;
276         };
277
278         pinctrl_aobus: pinctrl@84 {
279                 compatible = "amlogic,meson8-aobus-pinctrl";
280                 reg = <0x84 0xc>;
281                 #address-cells = <1>;
282                 #size-cells = <1>;
283                 ranges;
284
285                 gpio_ao: ao-bank@14 {
286                         reg = <0x14 0x4>,
287                               <0x2c 0x4>,
288                               <0x24 0x8>;
289                         reg-names = "mux", "pull", "gpio";
290                         gpio-controller;
291                         #gpio-cells = <2>;
292                         gpio-ranges = <&pinctrl_aobus 0 0 16>;
293                 };
294
295                 uart_ao_a_pins: uart_ao_a {
296                         mux {
297                                 groups = "uart_tx_ao_a", "uart_rx_ao_a";
298                                 function = "uart_ao";
299                                 bias-disable;
300                         };
301                 };
302
303                 i2c_ao_pins: i2c_mst_ao {
304                         mux {
305                                 groups = "i2c_mst_sck_ao", "i2c_mst_sda_ao";
306                                 function = "i2c_mst_ao";
307                                 bias-disable;
308                         };
309                 };
310
311                 ir_recv_pins: remote {
312                         mux {
313                                 groups = "remote_input";
314                                 function = "remote";
315                                 bias-disable;
316                         };
317                 };
318
319                 pwm_f_ao_pins: pwm-f-ao {
320                         mux {
321                                 groups = "pwm_f_ao";
322                                 function = "pwm_f_ao";
323                                 bias-disable;
324                         };
325                 };
326         };
327 };
328
329 &cbus {
330         reset: reset-controller@4404 {
331                 compatible = "amlogic,meson8b-reset";
332                 reg = <0x4404 0x9c>;
333                 #reset-cells = <1>;
334         };
335
336         analog_top: analog-top@81a8 {
337                 compatible = "amlogic,meson8-analog-top", "syscon";
338                 reg = <0x81a8 0x14>;
339         };
340
341         pwm_ef: pwm@86c0 {
342                 compatible = "amlogic,meson8-pwm", "amlogic,meson8b-pwm";
343                 reg = <0x86c0 0x10>;
344                 #pwm-cells = <3>;
345                 status = "disabled";
346         };
347
348         pinctrl_cbus: pinctrl@9880 {
349                 compatible = "amlogic,meson8-cbus-pinctrl";
350                 reg = <0x9880 0x10>;
351                 #address-cells = <1>;
352                 #size-cells = <1>;
353                 ranges;
354
355                 gpio: banks@80b0 {
356                         reg = <0x80b0 0x28>,
357                               <0x80e8 0x18>,
358                               <0x8120 0x18>,
359                               <0x8030 0x30>;
360                         reg-names = "mux", "pull", "pull-enable", "gpio";
361                         gpio-controller;
362                         #gpio-cells = <2>;
363                         gpio-ranges = <&pinctrl_cbus 0 0 120>;
364                 };
365
366                 sd_a_pins: sd-a {
367                         mux {
368                                 groups = "sd_d0_a", "sd_d1_a", "sd_d2_a",
369                                         "sd_d3_a", "sd_clk_a", "sd_cmd_a";
370                                 function = "sd_a";
371                                 bias-disable;
372                         };
373                 };
374
375                 sd_b_pins: sd-b {
376                         mux {
377                                 groups = "sd_d0_b", "sd_d1_b", "sd_d2_b",
378                                         "sd_d3_b", "sd_clk_b", "sd_cmd_b";
379                                 function = "sd_b";
380                                 bias-disable;
381                         };
382                 };
383
384                 sd_c_pins: sd-c {
385                         mux {
386                                 groups = "sd_d0_c", "sd_d1_c", "sd_d2_c",
387                                         "sd_d3_c", "sd_clk_c", "sd_cmd_c";
388                                 function = "sd_c";
389                                 bias-disable;
390                         };
391                 };
392
393                 spi_nor_pins: nor {
394                         mux {
395                                 groups = "nor_d", "nor_q", "nor_c", "nor_cs";
396                                 function = "nor";
397                                 bias-disable;
398                         };
399                 };
400
401                 eth_pins: ethernet {
402                         mux {
403                                 groups = "eth_tx_clk_50m", "eth_tx_en",
404                                          "eth_txd1", "eth_txd0",
405                                          "eth_rx_clk_in", "eth_rx_dv",
406                                          "eth_rxd1", "eth_rxd0", "eth_mdio",
407                                          "eth_mdc";
408                                 function = "ethernet";
409                                 bias-disable;
410                         };
411                 };
412
413                 pwm_e_pins: pwm-e {
414                         mux {
415                                 groups = "pwm_e";
416                                 function = "pwm_e";
417                                 bias-disable;
418                         };
419                 };
420
421                 uart_a1_pins: uart-a1 {
422                         mux {
423                                 groups = "uart_tx_a1",
424                                        "uart_rx_a1";
425                                 function = "uart_a";
426                                 bias-disable;
427                         };
428                 };
429
430                 uart_a1_cts_rts_pins: uart-a1-cts-rts {
431                         mux {
432                                 groups = "uart_cts_a1",
433                                        "uart_rts_a1";
434                                 function = "uart_a";
435                                 bias-disable;
436                         };
437                 };
438         };
439 };
440
441 &ahb_sram {
442         smp-sram@1ff80 {
443                 compatible = "amlogic,meson8-smp-sram";
444                 reg = <0x1ff80 0x8>;
445         };
446 };
447
448 &efuse {
449         compatible = "amlogic,meson8-efuse";
450         clocks = <&clkc CLKID_EFUSE>;
451         clock-names = "core";
452
453         temperature_calib: calib@1f4 {
454                 /* only the upper two bytes are relevant */
455                 reg = <0x1f4 0x4>;
456         };
457 };
458
459 &ethmac {
460         clocks = <&clkc CLKID_ETH>;
461         clock-names = "stmmaceth";
462 };
463
464 &gpio_intc {
465         compatible = "amlogic,meson8-gpio-intc", "amlogic,meson-gpio-intc";
466         status = "okay";
467 };
468
469 &hhi {
470         clkc: clock-controller {
471                 compatible = "amlogic,meson8-clkc";
472                 #clock-cells = <1>;
473                 #reset-cells = <1>;
474         };
475 };
476
477 &hwrng {
478         compatible = "amlogic,meson8-rng", "amlogic,meson-rng";
479         clocks = <&clkc CLKID_RNG0>;
480         clock-names = "core";
481 };
482
483 &i2c_AO {
484         clocks = <&clkc CLKID_CLK81>;
485 };
486
487 &i2c_A {
488         clocks = <&clkc CLKID_CLK81>;
489 };
490
491 &i2c_B {
492         clocks = <&clkc CLKID_CLK81>;
493 };
494
495 &L2 {
496         arm,data-latency = <3 3 3>;
497         arm,tag-latency = <2 2 2>;
498         arm,filter-ranges = <0x100000 0xc0000000>;
499         prefetch-data = <1>;
500         prefetch-instr = <1>;
501         arm,shared-override;
502 };
503
504 &periph {
505         scu@0 {
506                 compatible = "arm,cortex-a9-scu";
507                 reg = <0x0 0x100>;
508         };
509
510         timer@200 {
511                 compatible = "arm,cortex-a9-global-timer";
512                 reg = <0x200 0x20>;
513                 interrupts = <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
514                 clocks = <&clkc CLKID_PERIPH>;
515
516                 /*
517                  * the arm_global_timer driver currently does not handle clock
518                  * rate changes. Keep it disabled for now.
519                  */
520                 status = "disabled";
521         };
522
523         timer@600 {
524                 compatible = "arm,cortex-a9-twd-timer";
525                 reg = <0x600 0x20>;
526                 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
527                 clocks = <&clkc CLKID_PERIPH>;
528         };
529 };
530
531 &pwm_ab {
532         compatible = "amlogic,meson8-pwm", "amlogic,meson8b-pwm";
533 };
534
535 &pwm_cd {
536         compatible = "amlogic,meson8-pwm", "amlogic,meson8b-pwm";
537 };
538
539 &saradc {
540         compatible = "amlogic,meson8-saradc", "amlogic,meson-saradc";
541         clocks = <&clkc CLKID_XTAL>,
542                 <&clkc CLKID_SAR_ADC>;
543         clock-names = "clkin", "core";
544         amlogic,hhi-sysctrl = <&hhi>;
545         nvmem-cells = <&temperature_calib>;
546         nvmem-cell-names = "temperature_calib";
547 };
548
549 &sdio {
550         compatible = "amlogic,meson8-sdio", "amlogic,meson-mx-sdio";
551         clocks = <&clkc CLKID_SDIO>, <&clkc CLKID_CLK81>;
552         clock-names = "core", "clkin";
553 };
554
555 &spifc {
556         clocks = <&clkc CLKID_CLK81>;
557 };
558
559 &timer_abcde {
560         clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>;
561         clock-names = "xtal", "pclk";
562 };
563
564 &uart_AO {
565         compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
566         clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>;
567         clock-names = "baud", "xtal", "pclk";
568 };
569
570 &uart_A {
571         compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
572         clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART0>;
573         clock-names = "baud", "xtal", "pclk";
574 };
575
576 &uart_B {
577         compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
578         clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART1>;
579         clock-names = "baud", "xtal", "pclk";
580 };
581
582 &uart_C {
583         compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
584         clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART2>;
585         clock-names = "baud", "xtal", "pclk";
586 };
587
588 &usb0 {
589         compatible = "amlogic,meson8-usb", "snps,dwc2";
590         clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
591         clock-names = "otg";
592 };
593
594 &usb1 {
595         compatible = "amlogic,meson8-usb", "snps,dwc2";
596         clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
597         clock-names = "otg";
598 };
599
600 &usb0_phy {
601         compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
602         clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
603         clock-names = "usb_general", "usb";
604         resets = <&reset RESET_USB_OTG>;
605 };
606
607 &usb1_phy {
608         compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
609         clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
610         clock-names = "usb_general", "usb";
611         resets = <&reset RESET_USB_OTG>;
612 };