2 * Copyright (C) 2015, 2016 Imagination Technologies Ltd.
3 * Copyright (C) 2015 Google, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
10 #include <dt-bindings/clock/pistachio-clk.h>
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/interrupt-controller/irq.h>
13 #include <dt-bindings/interrupt-controller/mips-gic.h>
14 #include <dt-bindings/reset/pistachio-resets.h>
17 compatible = "img,pistachio";
22 interrupt-parent = <&gic>;
30 compatible = "mti,interaptiv";
32 clocks = <&clk_core CLK_MIPS_PLL>;
34 clock-latency = <1000>;
48 compatible = "img,scb-i2c";
49 reg = <0x18100000 0x200>;
50 interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>;
51 clocks = <&clk_periph PERIPH_CLK_I2C0>,
52 <&cr_periph SYS_CLK_I2C0>;
53 clock-names = "scb", "sys";
54 assigned-clocks = <&clk_periph PERIPH_CLK_I2C0_PRE_DIV>,
55 <&clk_periph PERIPH_CLK_I2C0_DIV>;
56 assigned-clock-rates = <100000000>, <33333334>;
58 pinctrl-names = "default";
59 pinctrl-0 = <&i2c0_pins>;
66 compatible = "img,scb-i2c";
67 reg = <0x18100200 0x200>;
68 interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
69 clocks = <&clk_periph PERIPH_CLK_I2C1>,
70 <&cr_periph SYS_CLK_I2C1>;
71 clock-names = "scb", "sys";
72 assigned-clocks = <&clk_periph PERIPH_CLK_I2C1_PRE_DIV>,
73 <&clk_periph PERIPH_CLK_I2C1_DIV>;
74 assigned-clock-rates = <100000000>, <33333334>;
76 pinctrl-names = "default";
77 pinctrl-0 = <&i2c1_pins>;
84 compatible = "img,scb-i2c";
85 reg = <0x18100400 0x200>;
86 interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>;
87 clocks = <&clk_periph PERIPH_CLK_I2C2>,
88 <&cr_periph SYS_CLK_I2C2>;
89 clock-names = "scb", "sys";
90 assigned-clocks = <&clk_periph PERIPH_CLK_I2C2_PRE_DIV>,
91 <&clk_periph PERIPH_CLK_I2C2_DIV>;
92 assigned-clock-rates = <100000000>, <33333334>;
94 pinctrl-names = "default";
95 pinctrl-0 = <&i2c2_pins>;
102 compatible = "img,scb-i2c";
103 reg = <0x18100600 0x200>;
104 interrupts = <GIC_SHARED 5 IRQ_TYPE_LEVEL_HIGH>;
105 clocks = <&clk_periph PERIPH_CLK_I2C3>,
106 <&cr_periph SYS_CLK_I2C3>;
107 clock-names = "scb", "sys";
108 assigned-clocks = <&clk_periph PERIPH_CLK_I2C3_PRE_DIV>,
109 <&clk_periph PERIPH_CLK_I2C3_DIV>;
110 assigned-clock-rates = <100000000>, <33333334>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&i2c3_pins>;
115 #address-cells = <1>;
119 i2s_in: i2s-in@18100800 {
120 compatible = "img,i2s-in";
121 reg = <0x18100800 0x200>;
122 interrupts = <GIC_SHARED 7 IRQ_TYPE_LEVEL_HIGH>;
123 dmas = <&mdc 30 0xffffffff 0>;
125 clocks = <&cr_periph SYS_CLK_I2S_IN>;
127 img,i2s-channels = <6>;
128 pinctrl-names = "default";
129 pinctrl-0 = <&i2s_in_pins>;
132 #sound-dai-cells = <0>;
135 i2s_out: i2s-out@18100a00 {
136 compatible = "img,i2s-out";
137 reg = <0x18100a00 0x200>;
138 interrupts = <GIC_SHARED 13 IRQ_TYPE_LEVEL_HIGH>;
139 dmas = <&mdc 23 0xffffffff 0>;
141 clocks = <&cr_periph SYS_CLK_I2S_OUT>,
143 clock-names = "sys", "ref";
144 assigned-clocks = <&clk_core CLK_I2S_DIV>;
145 assigned-clock-rates = <12288000>;
146 img,i2s-channels = <6>;
147 pinctrl-names = "default";
148 pinctrl-0 = <&i2s_out_pins>;
150 resets = <&pistachio_reset PISTACHIO_RESET_I2S_OUT>;
152 #sound-dai-cells = <0>;
155 parallel_out: parallel-audio-out@18100c00 {
156 compatible = "img,parallel-out";
157 reg = <0x18100c00 0x100>;
158 interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>;
159 dmas = <&mdc 16 0xffffffff 0>;
161 clocks = <&cr_periph SYS_CLK_PAUD_OUT>,
162 <&clk_core CLK_AUDIO_DAC>;
163 clock-names = "sys", "ref";
164 assigned-clocks = <&clk_core CLK_AUDIO_DAC_DIV>;
165 assigned-clock-rates = <12288000>;
167 resets = <&pistachio_reset PISTACHIO_RESET_PRL_OUT>;
169 #sound-dai-cells = <0>;
172 spdif_out: spdif-out@18100d00 {
173 compatible = "img,spdif-out";
174 reg = <0x18100d00 0x100>;
175 interrupts = <GIC_SHARED 21 IRQ_TYPE_LEVEL_HIGH>;
176 dmas = <&mdc 14 0xffffffff 0>;
178 clocks = <&cr_periph SYS_CLK_SPDIF_OUT>,
179 <&clk_core CLK_SPDIF>;
180 clock-names = "sys", "ref";
181 assigned-clocks = <&clk_core CLK_SPDIF_DIV>;
182 assigned-clock-rates = <12288000>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&spdif_out_pin>;
186 resets = <&pistachio_reset PISTACHIO_RESET_SPDIF_OUT>;
188 #sound-dai-cells = <0>;
191 spdif_in: spdif-in@18100e00 {
192 compatible = "img,spdif-in";
193 reg = <0x18100e00 0x100>;
194 interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
195 dmas = <&mdc 15 0xffffffff 0>;
197 clocks = <&cr_periph SYS_CLK_SPDIF_IN>;
199 pinctrl-names = "default";
200 pinctrl-0 = <&spdif_in_pin>;
203 #sound-dai-cells = <0>;
206 internal_dac: internal-dac {
207 compatible = "img,pistachio-internal-dac";
208 img,cr-top = <&cr_top>;
209 img,voltage-select = <1>;
211 #sound-dai-cells = <0>;
214 spfi0: spi@18100f00 {
215 compatible = "img,spfi";
216 reg = <0x18100f00 0x100>;
217 interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
218 clocks = <&clk_core CLK_SPI0>, <&cr_periph SYS_CLK_SPI0_MASTER>;
219 clock-names = "sys", "spfi";
220 dmas = <&mdc 9 0xffffffff 0>, <&mdc 10 0xffffffff 0>;
221 dma-names = "rx", "tx";
222 spfi-max-frequency = <50000000>;
225 #address-cells = <1>;
229 spfi1: spi@18101000 {
230 compatible = "img,spfi";
231 reg = <0x18101000 0x100>;
232 interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>;
233 clocks = <&clk_core CLK_SPI1>, <&cr_periph SYS_CLK_SPI1>;
234 clock-names = "sys", "spfi";
235 dmas = <&mdc 1 0xffffffff 0>, <&mdc 2 0xffffffff 0>;
236 dma-names = "rx", "tx";
237 img,supports-quad-mode;
238 spfi-max-frequency = <50000000>;
241 #address-cells = <1>;
246 compatible = "img,pistachio-pwm";
247 reg = <0x18101300 0x100>;
248 clocks = <&clk_periph PERIPH_CLK_PWM>,
249 <&cr_periph SYS_CLK_PWM>;
250 clock-names = "pwm", "sys";
251 img,cr-periph = <&cr_periph>;
256 uart0: uart@18101400 {
257 compatible = "snps,dw-apb-uart";
258 reg = <0x18101400 0x100>;
259 interrupts = <GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>;
260 clocks = <&clk_core CLK_UART0>, <&cr_periph SYS_CLK_UART0>;
261 clock-names = "baudclk", "apb_pclk";
262 assigned-clocks = <&clk_core CLK_UART0_INTERNAL_DIV>,
263 <&clk_core CLK_UART0_DIV>;
266 pinctrl-0 = <&uart0_pins>, <&uart0_rts_cts_pins>;
267 pinctrl-names = "default";
271 uart1: uart@18101500 {
272 compatible = "snps,dw-apb-uart";
273 reg = <0x18101500 0x100>;
274 interrupts = <GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
275 clocks = <&clk_core CLK_UART1>, <&cr_periph SYS_CLK_UART1>;
276 clock-names = "baudclk", "apb_pclk";
277 assigned-clocks = <&clk_core CLK_UART1_INTERNAL_DIV>,
278 <&clk_core CLK_UART1_DIV>;
279 assigned-clock-rates = <114278400>, <1843200>;
282 pinctrl-0 = <&uart1_pins>;
283 pinctrl-names = "default";
288 compatible = "cosmic,10001-adc";
289 reg = <0x18101600 0x24>;
290 adc-reserved-channels = <0x30>;
291 clocks = <&clk_core CLK_AUX_ADC>;
293 assigned-clocks = <&clk_core CLK_AUX_ADC_INTERNAL_DIV>,
294 <&clk_core CLK_AUX_ADC_DIV>;
295 assigned-clock-rates = <100000000>, <1000000>;
298 #io-channel-cells = <1>;
301 pinctrl: pinctrl@18101c00 {
302 compatible = "img,pistachio-system-pinctrl";
303 reg = <0x18101c00 0x400>;
306 interrupts = <GIC_SHARED 71 IRQ_TYPE_LEVEL_HIGH>;
310 gpio-ranges = <&pinctrl 0 0 16>;
312 interrupt-controller;
313 #interrupt-cells = <2>;
317 interrupts = <GIC_SHARED 72 IRQ_TYPE_LEVEL_HIGH>;
321 gpio-ranges = <&pinctrl 0 16 16>;
323 interrupt-controller;
324 #interrupt-cells = <2>;
328 interrupts = <GIC_SHARED 73 IRQ_TYPE_LEVEL_HIGH>;
332 gpio-ranges = <&pinctrl 0 32 16>;
334 interrupt-controller;
335 #interrupt-cells = <2>;
339 interrupts = <GIC_SHARED 74 IRQ_TYPE_LEVEL_HIGH>;
343 gpio-ranges = <&pinctrl 0 48 16>;
345 interrupt-controller;
346 #interrupt-cells = <2>;
350 interrupts = <GIC_SHARED 75 IRQ_TYPE_LEVEL_HIGH>;
354 gpio-ranges = <&pinctrl 0 64 16>;
356 interrupt-controller;
357 #interrupt-cells = <2>;
361 interrupts = <GIC_SHARED 76 IRQ_TYPE_LEVEL_HIGH>;
365 gpio-ranges = <&pinctrl 0 80 10>;
367 interrupt-controller;
368 #interrupt-cells = <2>;
371 i2c0_pins: i2c0-pins {
373 pins = "mfio28", "mfio29";
375 drive-strength = <4>;
379 i2c1_pins: i2c1-pins {
381 pins = "mfio30", "mfio31";
383 drive-strength = <4>;
387 i2c2_pins: i2c2-pins {
389 pins = "mfio32", "mfio33";
391 drive-strength = <4>;
395 i2c3_pins: i2c3-pins {
397 pins = "mfio34", "mfio35";
399 drive-strength = <4>;
403 spim0_pins: spim0-pins {
405 pins = "mfio9", "mfio10";
407 drive-strength = <4>;
409 spim0_clk: spim0-clk {
412 drive-strength = <4>;
416 spim0_cs0_alt_pin: spim0-cs0-alt-pin {
419 drive-strength = <2>;
423 spim0_cs1_pin: spim0-cs1-pin {
426 drive-strength = <2>;
430 spim0_cs2_pin: spim0-cs2-pin {
433 drive-strength = <2>;
437 spim0_cs2_alt_pin: spim0-cs2-alt-pin {
440 drive-strength = <2>;
444 spim0_cs3_pin: spim0-cs3-pin {
447 drive-strength = <2>;
451 spim0_cs3_alt_pin: spim0-cs3-alt-pin {
454 drive-strength = <2>;
458 spim0_cs4_pin: spim0-cs4-pin {
461 drive-strength = <2>;
465 spim0_cs4_alt_pin: spim0-cs4-alt-pin {
468 drive-strength = <2>;
472 spim1_pins: spim1-pins {
474 pins = "mfio3", "mfio4", "mfio5";
476 drive-strength = <2>;
480 spim1_quad_pins: spim1-quad-pins {
482 pins = "mfio6", "mfio7";
484 drive-strength = <2>;
488 spim1_cs0_pin: spim1-cs0-pins {
492 drive-strength = <2>;
496 spim1_cs1_pin: spim1-cs1-pin {
500 drive-strength = <2>;
504 spim1_cs1_alt_pin: spim1-cs1-alt-pin {
508 drive-strength = <2>;
512 spim1_cs2_pin: spim1-cs2-pin {
516 drive-strength = <2>;
520 spim1_cs2_alt0_pin: spim1-cs2-alt0-pin {
524 drive-strength = <2>;
528 spim1_cs2_alt1_pin: spim1-cs2-alt1-pin {
532 drive-strength = <2>;
536 spim1_cs3_pin: spim1-cs3-pin {
540 drive-strength = <2>;
544 spim1_cs4_pin: spim1-cs4-pin {
548 drive-strength = <2>;
552 uart0_pins: uart0-pins {
554 pins = "mfio55", "mfio56";
556 drive-strength = <2>;
560 uart0_rts_cts_pins: uart0-rts-cts-pins {
562 pins = "mfio57", "mfio58";
564 drive-strength = <2>;
568 uart1_pins: uart1-pins {
570 pins = "mfio59", "mfio60";
572 drive-strength = <2>;
576 uart1_rts_cts_pins: uart1-rts-cts-pins {
578 pins = "mfio1", "mfio2";
580 drive-strength = <2>;
584 enet_pins: enet-pins {
586 pins = "mfio63", "mfio64", "mfio65", "mfio66",
587 "mfio67", "mfio68", "mfio69", "mfio70";
590 drive-strength = <4>;
592 pin_enet_phy_clk: enet-phy-clk {
596 drive-strength = <8>;
600 sdhost_pins: sdhost-pins {
601 pin_sdhost_clk: sdhost-clk {
605 drive-strength = <4>;
607 pin_sdhost_cmd: sdhost-cmd {
611 drive-strength = <4>;
613 pin_sdhost_data: sdhost-data {
614 pins = "mfio17", "mfio18", "mfio19", "mfio20",
615 "mfio21", "mfio22", "mfio23", "mfio24";
618 drive-strength = <4>;
620 pin_sdhost_power_select: sdhost-power-select {
624 drive-strength = <2>;
626 pin_sdhost_card_detect: sdhost-card-detect {
629 drive-strength = <2>;
631 pin_sdhost_write_protect: sdhost-write-protect {
634 drive-strength = <2>;
642 drive-strength = <2>;
646 pwmpdm0_pin: pwmpdm0-pin {
650 drive-strength = <2>;
654 pwmpdm1_pin: pwmpdm1-pin {
658 drive-strength = <2>;
662 pwmpdm2_pin: pwmpdm2-pin {
666 drive-strength = <2>;
670 pwmpdm3_pin: pwmpdm3-pin {
674 drive-strength = <2>;
678 dac_clk_pin: dac-clk-pin {
679 pin_dac_clk: dac-clk {
681 function = "i2s_dac_clk";
682 drive-strength = <4>;
686 i2s_mclk_pin: i2s-mclk-pin {
687 pin_i2s_mclk: i2s-mclk {
689 function = "i2s_out";
690 drive-strength = <4>;
694 spdif_out_pin: spdif-out-pin {
697 function = "spdif_out";
699 drive-strength = <2>;
703 spdif_in_pin: spdif-in-pin {
706 function = "spdif_in";
707 drive-strength = <2>;
711 i2s_out_pins: i2s-out-pins {
712 pins_i2s_out_clk: i2s-out-clk {
713 pins = "mfio37", "mfio38";
714 function = "i2s_out";
715 drive-strength = <4>;
717 pins_i2s_out: i2s-out {
718 pins = "mfio39", "mfio40",
721 function = "i2s_out";
722 drive-strength = <2>;
726 i2s_in_pins: i2s-in-pins {
728 pins = "mfio47", "mfio48", "mfio49",
729 "mfio50", "mfio51", "mfio52",
732 drive-strength = <2>;
737 timer: timer@18102000 {
738 compatible = "img,pistachio-gptimer";
739 reg = <0x18102000 0x100>;
740 interrupts = <GIC_SHARED 60 IRQ_TYPE_LEVEL_HIGH>;
741 clocks = <&clk_periph PERIPH_CLK_COUNTER_FAST>,
742 <&cr_periph SYS_CLK_TIMER>;
743 clock-names = "fast", "sys";
744 img,cr-periph = <&cr_periph>;
747 wdt: watchdog@18102100 {
748 compatible = "img,pdc-wdt";
749 reg = <0x18102100 0x100>;
750 interrupts = <GIC_SHARED 52 IRQ_TYPE_LEVEL_HIGH>;
751 clocks = <&clk_periph PERIPH_CLK_WD>, <&cr_periph SYS_CLK_WD>;
752 clock-names = "wdt", "sys";
753 assigned-clocks = <&clk_periph PERIPH_CLK_WD_PRE_DIV>,
754 <&clk_periph PERIPH_CLK_WD_DIV>;
755 assigned-clock-rates = <4000000>, <32768>;
759 compatible = "img,ir-rev1";
760 reg = <0x18102200 0x100>;
761 interrupts = <GIC_SHARED 51 IRQ_TYPE_LEVEL_HIGH>;
762 clocks = <&clk_periph PERIPH_CLK_IR>, <&cr_periph SYS_CLK_IR>;
763 clock-names = "core", "sys";
764 assigned-clocks = <&clk_periph PERIPH_CLK_IR_PRE_DIV>,
765 <&clk_periph PERIPH_CLK_IR_DIV>;
766 assigned-clock-rates = <4000000>, <32768>;
767 pinctrl-0 = <&ir_pin>;
768 pinctrl-names = "default";
773 compatible = "snps,dwc2";
774 reg = <0x18120000 0x1c000>;
775 interrupts = <GIC_SHARED 49 IRQ_TYPE_LEVEL_HIGH>;
777 phy-names = "usb2-phy";
778 g-tx-fifo-size = <256 256 256 256>;
782 enet: ethernet@18140000 {
783 compatible = "snps,dwmac";
784 reg = <0x18140000 0x2000>;
785 interrupts = <GIC_SHARED 50 IRQ_TYPE_LEVEL_HIGH>;
786 interrupt-names = "macirq";
787 clocks = <&clk_core CLK_ENET>, <&cr_periph SYS_CLK_ENET>;
788 clock-names = "stmmaceth", "pclk";
789 assigned-clocks = <&clk_core CLK_ENET_MUX>,
790 <&clk_core CLK_ENET_DIV>;
791 assigned-clock-parents = <&clk_core CLK_SYS_INTERNAL_DIV>;
792 assigned-clock-rates = <0>, <50000000>;
793 pinctrl-0 = <&enet_pins>;
794 pinctrl-names = "default";
799 sdhost: mmc@18142000 {
800 compatible = "img,pistachio-dw-mshc";
801 reg = <0x18142000 0x400>;
802 interrupts = <GIC_SHARED 39 IRQ_TYPE_LEVEL_HIGH>;
803 clocks = <&clk_core CLK_SD_HOST>, <&cr_periph SYS_CLK_SD_HOST>;
804 clock-names = "ciu", "biu";
805 pinctrl-0 = <&sdhost_pins>;
806 pinctrl-names = "default";
808 clock-frequency = <50000000>;
815 sram: sram@1b000000 {
816 compatible = "mmio-sram";
817 reg = <0x1b000000 0x10000>;
820 mdc: dma-controller@18143000 {
821 compatible = "img,pistachio-mdc-dma";
822 reg = <0x18143000 0x1000>;
823 interrupts = <GIC_SHARED 27 IRQ_TYPE_LEVEL_HIGH>,
824 <GIC_SHARED 28 IRQ_TYPE_LEVEL_HIGH>,
825 <GIC_SHARED 29 IRQ_TYPE_LEVEL_HIGH>,
826 <GIC_SHARED 30 IRQ_TYPE_LEVEL_HIGH>,
827 <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>,
828 <GIC_SHARED 32 IRQ_TYPE_LEVEL_HIGH>,
829 <GIC_SHARED 33 IRQ_TYPE_LEVEL_HIGH>,
830 <GIC_SHARED 34 IRQ_TYPE_LEVEL_HIGH>,
831 <GIC_SHARED 35 IRQ_TYPE_LEVEL_HIGH>,
832 <GIC_SHARED 36 IRQ_TYPE_LEVEL_HIGH>,
833 <GIC_SHARED 37 IRQ_TYPE_LEVEL_HIGH>,
834 <GIC_SHARED 38 IRQ_TYPE_LEVEL_HIGH>;
835 clocks = <&cr_periph SYS_CLK_MDC>;
838 img,max-burst-multiplier = <16>;
839 img,cr-periph = <&cr_periph>;
844 clk_core: clk@18144000 {
845 compatible = "img,pistachio-clk", "syscon";
846 clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>,
847 <&cr_top EXT_CLK_ENET_IN>;
848 clock-names = "xtal", "audio_refclk_ext_gate",
850 reg = <0x18144000 0x800>;
854 clk_periph: clk@18144800 {
855 compatible = "img,pistachio-clk-periph";
856 reg = <0x18144800 0x1000>;
857 clocks = <&clk_core CLK_PERIPH_SYS>;
858 clock-names = "periph_sys_core";
862 cr_periph: clk@18148000 {
863 compatible = "img,pistachio-cr-periph", "syscon", "simple-bus";
864 reg = <0x18148000 0x1000>;
865 clocks = <&clk_periph PERIPH_CLK_SYS>;
869 pistachio_reset: reset-controller {
870 compatible = "img,pistachio-reset";
875 cr_top: clk@18149000 {
876 compatible = "img,pistachio-cr-top", "syscon";
877 reg = <0x18149000 0x200>;
881 hash: hash@18149600 {
882 compatible = "img,hash-accelerator";
883 reg = <0x18149600 0x100>, <0x18101100 0x4>;
884 interrupts = <GIC_SHARED 59 IRQ_TYPE_LEVEL_HIGH>;
885 dmas = <&mdc 8 0xffffffff 0>;
887 clocks = <&cr_periph SYS_CLK_HASH>,
888 <&clk_periph PERIPH_CLK_ROM>;
889 clock-names = "sys", "hash";
892 gic: interrupt-controller@1bdc0000 {
893 compatible = "mti,gic";
894 reg = <0x1bdc0000 0x20000>;
896 interrupt-controller;
897 #interrupt-cells = <3>;
900 compatible = "mti,gic-timer";
901 interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
902 clocks = <&clk_core CLK_MIPS>;
907 compatible = "img,pistachio-usb-phy";
908 clocks = <&clk_core CLK_USB_PHY>;
909 clock-names = "usb_phy";
910 assigned-clocks = <&clk_core CLK_USB_PHY_DIV>;
911 assigned-clock-rates = <50000000>;
913 img,cr-top = <&cr_top>;
918 compatible = "fixed-clock";
920 clock-frequency = <52000000>;
921 clock-output-names = "xtal";