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