1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2015, 2016 Imagination Technologies Ltd.
4 * Copyright (C) 2015 Google, Inc.
7 #include <dt-bindings/clock/pistachio-clk.h>
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/interrupt-controller/irq.h>
10 #include <dt-bindings/interrupt-controller/mips-gic.h>
11 #include <dt-bindings/reset/pistachio-resets.h>
14 compatible = "img,pistachio";
19 interrupt-parent = <&gic>;
27 compatible = "mti,interaptiv";
29 clocks = <&clk_core CLK_MIPS_PLL>;
31 clock-latency = <1000>;
45 compatible = "img,scb-i2c";
46 reg = <0x18100000 0x200>;
47 interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>;
48 clocks = <&clk_periph PERIPH_CLK_I2C0>,
49 <&cr_periph SYS_CLK_I2C0>;
50 clock-names = "scb", "sys";
51 assigned-clocks = <&clk_periph PERIPH_CLK_I2C0_PRE_DIV>,
52 <&clk_periph PERIPH_CLK_I2C0_DIV>;
53 assigned-clock-rates = <100000000>, <33333334>;
55 pinctrl-names = "default";
56 pinctrl-0 = <&i2c0_pins>;
63 compatible = "img,scb-i2c";
64 reg = <0x18100200 0x200>;
65 interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
66 clocks = <&clk_periph PERIPH_CLK_I2C1>,
67 <&cr_periph SYS_CLK_I2C1>;
68 clock-names = "scb", "sys";
69 assigned-clocks = <&clk_periph PERIPH_CLK_I2C1_PRE_DIV>,
70 <&clk_periph PERIPH_CLK_I2C1_DIV>;
71 assigned-clock-rates = <100000000>, <33333334>;
73 pinctrl-names = "default";
74 pinctrl-0 = <&i2c1_pins>;
81 compatible = "img,scb-i2c";
82 reg = <0x18100400 0x200>;
83 interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>;
84 clocks = <&clk_periph PERIPH_CLK_I2C2>,
85 <&cr_periph SYS_CLK_I2C2>;
86 clock-names = "scb", "sys";
87 assigned-clocks = <&clk_periph PERIPH_CLK_I2C2_PRE_DIV>,
88 <&clk_periph PERIPH_CLK_I2C2_DIV>;
89 assigned-clock-rates = <100000000>, <33333334>;
91 pinctrl-names = "default";
92 pinctrl-0 = <&i2c2_pins>;
99 compatible = "img,scb-i2c";
100 reg = <0x18100600 0x200>;
101 interrupts = <GIC_SHARED 5 IRQ_TYPE_LEVEL_HIGH>;
102 clocks = <&clk_periph PERIPH_CLK_I2C3>,
103 <&cr_periph SYS_CLK_I2C3>;
104 clock-names = "scb", "sys";
105 assigned-clocks = <&clk_periph PERIPH_CLK_I2C3_PRE_DIV>,
106 <&clk_periph PERIPH_CLK_I2C3_DIV>;
107 assigned-clock-rates = <100000000>, <33333334>;
109 pinctrl-names = "default";
110 pinctrl-0 = <&i2c3_pins>;
112 #address-cells = <1>;
116 i2s_in: i2s-in@18100800 {
117 compatible = "img,i2s-in";
118 reg = <0x18100800 0x200>;
119 interrupts = <GIC_SHARED 7 IRQ_TYPE_LEVEL_HIGH>;
120 dmas = <&mdc 30 0xffffffff 0>;
122 clocks = <&cr_periph SYS_CLK_I2S_IN>;
124 img,i2s-channels = <6>;
125 pinctrl-names = "default";
126 pinctrl-0 = <&i2s_in_pins>;
129 #sound-dai-cells = <0>;
132 i2s_out: i2s-out@18100a00 {
133 compatible = "img,i2s-out";
134 reg = <0x18100a00 0x200>;
135 interrupts = <GIC_SHARED 13 IRQ_TYPE_LEVEL_HIGH>;
136 dmas = <&mdc 23 0xffffffff 0>;
138 clocks = <&cr_periph SYS_CLK_I2S_OUT>,
140 clock-names = "sys", "ref";
141 assigned-clocks = <&clk_core CLK_I2S_DIV>;
142 assigned-clock-rates = <12288000>;
143 img,i2s-channels = <6>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&i2s_out_pins>;
147 resets = <&pistachio_reset PISTACHIO_RESET_I2S_OUT>;
149 #sound-dai-cells = <0>;
152 parallel_out: parallel-audio-out@18100c00 {
153 compatible = "img,parallel-out";
154 reg = <0x18100c00 0x100>;
155 interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>;
156 dmas = <&mdc 16 0xffffffff 0>;
158 clocks = <&cr_periph SYS_CLK_PAUD_OUT>,
159 <&clk_core CLK_AUDIO_DAC>;
160 clock-names = "sys", "ref";
161 assigned-clocks = <&clk_core CLK_AUDIO_DAC_DIV>;
162 assigned-clock-rates = <12288000>;
164 resets = <&pistachio_reset PISTACHIO_RESET_PRL_OUT>;
166 #sound-dai-cells = <0>;
169 spdif_out: spdif-out@18100d00 {
170 compatible = "img,spdif-out";
171 reg = <0x18100d00 0x100>;
172 interrupts = <GIC_SHARED 21 IRQ_TYPE_LEVEL_HIGH>;
173 dmas = <&mdc 14 0xffffffff 0>;
175 clocks = <&cr_periph SYS_CLK_SPDIF_OUT>,
176 <&clk_core CLK_SPDIF>;
177 clock-names = "sys", "ref";
178 assigned-clocks = <&clk_core CLK_SPDIF_DIV>;
179 assigned-clock-rates = <12288000>;
180 pinctrl-names = "default";
181 pinctrl-0 = <&spdif_out_pin>;
183 resets = <&pistachio_reset PISTACHIO_RESET_SPDIF_OUT>;
185 #sound-dai-cells = <0>;
188 spdif_in: spdif-in@18100e00 {
189 compatible = "img,spdif-in";
190 reg = <0x18100e00 0x100>;
191 interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
192 dmas = <&mdc 15 0xffffffff 0>;
194 clocks = <&cr_periph SYS_CLK_SPDIF_IN>;
196 pinctrl-names = "default";
197 pinctrl-0 = <&spdif_in_pin>;
200 #sound-dai-cells = <0>;
203 internal_dac: internal-dac {
204 compatible = "img,pistachio-internal-dac";
205 img,cr-top = <&cr_top>;
206 img,voltage-select = <1>;
208 #sound-dai-cells = <0>;
211 spfi0: spi@18100f00 {
212 compatible = "img,spfi";
213 reg = <0x18100f00 0x100>;
214 interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
215 clocks = <&clk_core CLK_SPI0>, <&cr_periph SYS_CLK_SPI0_MASTER>;
216 clock-names = "sys", "spfi";
217 dmas = <&mdc 9 0xffffffff 0>, <&mdc 10 0xffffffff 0>;
218 dma-names = "rx", "tx";
219 spfi-max-frequency = <50000000>;
222 #address-cells = <1>;
226 spfi1: spi@18101000 {
227 compatible = "img,spfi";
228 reg = <0x18101000 0x100>;
229 interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>;
230 clocks = <&clk_core CLK_SPI1>, <&cr_periph SYS_CLK_SPI1>;
231 clock-names = "sys", "spfi";
232 dmas = <&mdc 1 0xffffffff 0>, <&mdc 2 0xffffffff 0>;
233 dma-names = "rx", "tx";
234 img,supports-quad-mode;
235 spfi-max-frequency = <50000000>;
238 #address-cells = <1>;
243 compatible = "img,pistachio-pwm";
244 reg = <0x18101300 0x100>;
245 clocks = <&clk_periph PERIPH_CLK_PWM>,
246 <&cr_periph SYS_CLK_PWM>;
247 clock-names = "pwm", "sys";
248 img,cr-periph = <&cr_periph>;
253 uart0: uart@18101400 {
254 compatible = "snps,dw-apb-uart";
255 reg = <0x18101400 0x100>;
256 interrupts = <GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>;
257 clocks = <&clk_core CLK_UART0>, <&cr_periph SYS_CLK_UART0>;
258 clock-names = "baudclk", "apb_pclk";
259 assigned-clocks = <&clk_core CLK_UART0_INTERNAL_DIV>,
260 <&clk_core CLK_UART0_DIV>;
263 pinctrl-0 = <&uart0_pins>, <&uart0_rts_cts_pins>;
264 pinctrl-names = "default";
268 uart1: uart@18101500 {
269 compatible = "snps,dw-apb-uart";
270 reg = <0x18101500 0x100>;
271 interrupts = <GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
272 clocks = <&clk_core CLK_UART1>, <&cr_periph SYS_CLK_UART1>;
273 clock-names = "baudclk", "apb_pclk";
274 assigned-clocks = <&clk_core CLK_UART1_INTERNAL_DIV>,
275 <&clk_core CLK_UART1_DIV>;
276 assigned-clock-rates = <114278400>, <1843200>;
279 pinctrl-0 = <&uart1_pins>;
280 pinctrl-names = "default";
285 compatible = "cosmic,10001-adc";
286 reg = <0x18101600 0x24>;
287 adc-reserved-channels = <0x30>;
288 clocks = <&clk_core CLK_AUX_ADC>;
290 assigned-clocks = <&clk_core CLK_AUX_ADC_INTERNAL_DIV>,
291 <&clk_core CLK_AUX_ADC_DIV>;
292 assigned-clock-rates = <100000000>, <1000000>;
295 #io-channel-cells = <1>;
298 pinctrl: pinctrl@18101c00 {
299 compatible = "img,pistachio-system-pinctrl";
300 reg = <0x18101c00 0x400>;
303 interrupts = <GIC_SHARED 71 IRQ_TYPE_LEVEL_HIGH>;
307 gpio-ranges = <&pinctrl 0 0 16>;
309 interrupt-controller;
310 #interrupt-cells = <2>;
314 interrupts = <GIC_SHARED 72 IRQ_TYPE_LEVEL_HIGH>;
318 gpio-ranges = <&pinctrl 0 16 16>;
320 interrupt-controller;
321 #interrupt-cells = <2>;
325 interrupts = <GIC_SHARED 73 IRQ_TYPE_LEVEL_HIGH>;
329 gpio-ranges = <&pinctrl 0 32 16>;
331 interrupt-controller;
332 #interrupt-cells = <2>;
336 interrupts = <GIC_SHARED 74 IRQ_TYPE_LEVEL_HIGH>;
340 gpio-ranges = <&pinctrl 0 48 16>;
342 interrupt-controller;
343 #interrupt-cells = <2>;
347 interrupts = <GIC_SHARED 75 IRQ_TYPE_LEVEL_HIGH>;
351 gpio-ranges = <&pinctrl 0 64 16>;
353 interrupt-controller;
354 #interrupt-cells = <2>;
358 interrupts = <GIC_SHARED 76 IRQ_TYPE_LEVEL_HIGH>;
362 gpio-ranges = <&pinctrl 0 80 10>;
364 interrupt-controller;
365 #interrupt-cells = <2>;
368 i2c0_pins: i2c0-pins {
370 pins = "mfio28", "mfio29";
372 drive-strength = <4>;
376 i2c1_pins: i2c1-pins {
378 pins = "mfio30", "mfio31";
380 drive-strength = <4>;
384 i2c2_pins: i2c2-pins {
386 pins = "mfio32", "mfio33";
388 drive-strength = <4>;
392 i2c3_pins: i2c3-pins {
394 pins = "mfio34", "mfio35";
396 drive-strength = <4>;
400 spim0_pins: spim0-pins {
402 pins = "mfio9", "mfio10";
404 drive-strength = <4>;
406 spim0_clk: spim0-clk {
409 drive-strength = <4>;
413 spim0_cs0_alt_pin: spim0-cs0-alt-pin {
416 drive-strength = <2>;
420 spim0_cs1_pin: spim0-cs1-pin {
423 drive-strength = <2>;
427 spim0_cs2_pin: spim0-cs2-pin {
430 drive-strength = <2>;
434 spim0_cs2_alt_pin: spim0-cs2-alt-pin {
437 drive-strength = <2>;
441 spim0_cs3_pin: spim0-cs3-pin {
444 drive-strength = <2>;
448 spim0_cs3_alt_pin: spim0-cs3-alt-pin {
451 drive-strength = <2>;
455 spim0_cs4_pin: spim0-cs4-pin {
458 drive-strength = <2>;
462 spim0_cs4_alt_pin: spim0-cs4-alt-pin {
465 drive-strength = <2>;
469 spim1_pins: spim1-pins {
471 pins = "mfio3", "mfio4", "mfio5";
473 drive-strength = <2>;
477 spim1_quad_pins: spim1-quad-pins {
479 pins = "mfio6", "mfio7";
481 drive-strength = <2>;
485 spim1_cs0_pin: spim1-cs0-pins {
489 drive-strength = <2>;
493 spim1_cs1_pin: spim1-cs1-pin {
497 drive-strength = <2>;
501 spim1_cs1_alt_pin: spim1-cs1-alt-pin {
505 drive-strength = <2>;
509 spim1_cs2_pin: spim1-cs2-pin {
513 drive-strength = <2>;
517 spim1_cs2_alt0_pin: spim1-cs2-alt0-pin {
521 drive-strength = <2>;
525 spim1_cs2_alt1_pin: spim1-cs2-alt1-pin {
529 drive-strength = <2>;
533 spim1_cs3_pin: spim1-cs3-pin {
537 drive-strength = <2>;
541 spim1_cs4_pin: spim1-cs4-pin {
545 drive-strength = <2>;
549 uart0_pins: uart0-pins {
551 pins = "mfio55", "mfio56";
553 drive-strength = <2>;
557 uart0_rts_cts_pins: uart0-rts-cts-pins {
559 pins = "mfio57", "mfio58";
561 drive-strength = <2>;
565 uart1_pins: uart1-pins {
567 pins = "mfio59", "mfio60";
569 drive-strength = <2>;
573 uart1_rts_cts_pins: uart1-rts-cts-pins {
575 pins = "mfio1", "mfio2";
577 drive-strength = <2>;
581 enet_pins: enet-pins {
583 pins = "mfio63", "mfio64", "mfio65", "mfio66",
584 "mfio67", "mfio68", "mfio69", "mfio70";
587 drive-strength = <4>;
589 pin_enet_phy_clk: enet-phy-clk {
593 drive-strength = <8>;
597 sdhost_pins: sdhost-pins {
598 pin_sdhost_clk: sdhost-clk {
602 drive-strength = <4>;
604 pin_sdhost_cmd: sdhost-cmd {
608 drive-strength = <4>;
610 pin_sdhost_data: sdhost-data {
611 pins = "mfio17", "mfio18", "mfio19", "mfio20",
612 "mfio21", "mfio22", "mfio23", "mfio24";
615 drive-strength = <4>;
617 pin_sdhost_power_select: sdhost-power-select {
621 drive-strength = <2>;
623 pin_sdhost_card_detect: sdhost-card-detect {
626 drive-strength = <2>;
628 pin_sdhost_write_protect: sdhost-write-protect {
631 drive-strength = <2>;
639 drive-strength = <2>;
643 pwmpdm0_pin: pwmpdm0-pin {
647 drive-strength = <2>;
651 pwmpdm1_pin: pwmpdm1-pin {
655 drive-strength = <2>;
659 pwmpdm2_pin: pwmpdm2-pin {
663 drive-strength = <2>;
667 pwmpdm3_pin: pwmpdm3-pin {
671 drive-strength = <2>;
675 dac_clk_pin: dac-clk-pin {
676 pin_dac_clk: dac-clk {
678 function = "i2s_dac_clk";
679 drive-strength = <4>;
683 i2s_mclk_pin: i2s-mclk-pin {
684 pin_i2s_mclk: i2s-mclk {
686 function = "i2s_out";
687 drive-strength = <4>;
691 spdif_out_pin: spdif-out-pin {
694 function = "spdif_out";
696 drive-strength = <2>;
700 spdif_in_pin: spdif-in-pin {
703 function = "spdif_in";
704 drive-strength = <2>;
708 i2s_out_pins: i2s-out-pins {
709 pins_i2s_out_clk: i2s-out-clk {
710 pins = "mfio37", "mfio38";
711 function = "i2s_out";
712 drive-strength = <4>;
714 pins_i2s_out: i2s-out {
715 pins = "mfio39", "mfio40",
718 function = "i2s_out";
719 drive-strength = <2>;
723 i2s_in_pins: i2s-in-pins {
725 pins = "mfio47", "mfio48", "mfio49",
726 "mfio50", "mfio51", "mfio52",
729 drive-strength = <2>;
734 timer: timer@18102000 {
735 compatible = "img,pistachio-gptimer";
736 reg = <0x18102000 0x100>;
737 interrupts = <GIC_SHARED 60 IRQ_TYPE_LEVEL_HIGH>;
738 clocks = <&clk_periph PERIPH_CLK_COUNTER_FAST>,
739 <&cr_periph SYS_CLK_TIMER>;
740 clock-names = "fast", "sys";
741 img,cr-periph = <&cr_periph>;
744 wdt: watchdog@18102100 {
745 compatible = "img,pdc-wdt";
746 reg = <0x18102100 0x100>;
747 interrupts = <GIC_SHARED 52 IRQ_TYPE_LEVEL_HIGH>;
748 clocks = <&clk_periph PERIPH_CLK_WD>, <&cr_periph SYS_CLK_WD>;
749 clock-names = "wdt", "sys";
750 assigned-clocks = <&clk_periph PERIPH_CLK_WD_PRE_DIV>,
751 <&clk_periph PERIPH_CLK_WD_DIV>;
752 assigned-clock-rates = <4000000>, <32768>;
756 compatible = "img,ir-rev1";
757 reg = <0x18102200 0x100>;
758 interrupts = <GIC_SHARED 51 IRQ_TYPE_LEVEL_HIGH>;
759 clocks = <&clk_periph PERIPH_CLK_IR>, <&cr_periph SYS_CLK_IR>;
760 clock-names = "core", "sys";
761 assigned-clocks = <&clk_periph PERIPH_CLK_IR_PRE_DIV>,
762 <&clk_periph PERIPH_CLK_IR_DIV>;
763 assigned-clock-rates = <4000000>, <32768>;
764 pinctrl-0 = <&ir_pin>;
765 pinctrl-names = "default";
770 compatible = "snps,dwc2";
771 reg = <0x18120000 0x1c000>;
772 interrupts = <GIC_SHARED 49 IRQ_TYPE_LEVEL_HIGH>;
774 phy-names = "usb2-phy";
775 g-tx-fifo-size = <256 256 256 256>;
779 enet: ethernet@18140000 {
780 compatible = "snps,dwmac";
781 reg = <0x18140000 0x2000>;
782 interrupts = <GIC_SHARED 50 IRQ_TYPE_LEVEL_HIGH>;
783 interrupt-names = "macirq";
784 clocks = <&clk_core CLK_ENET>, <&cr_periph SYS_CLK_ENET>;
785 clock-names = "stmmaceth", "pclk";
786 assigned-clocks = <&clk_core CLK_ENET_MUX>,
787 <&clk_core CLK_ENET_DIV>;
788 assigned-clock-parents = <&clk_core CLK_SYS_INTERNAL_DIV>;
789 assigned-clock-rates = <0>, <50000000>;
790 pinctrl-0 = <&enet_pins>;
791 pinctrl-names = "default";
796 sdhost: mmc@18142000 {
797 compatible = "img,pistachio-dw-mshc";
798 reg = <0x18142000 0x400>;
799 interrupts = <GIC_SHARED 39 IRQ_TYPE_LEVEL_HIGH>;
800 clocks = <&clk_core CLK_SD_HOST>, <&cr_periph SYS_CLK_SD_HOST>;
801 clock-names = "ciu", "biu";
802 pinctrl-0 = <&sdhost_pins>;
803 pinctrl-names = "default";
805 clock-frequency = <50000000>;
812 sram: sram@1b000000 {
813 compatible = "mmio-sram";
814 reg = <0x1b000000 0x10000>;
817 mdc: dma-controller@18143000 {
818 compatible = "img,pistachio-mdc-dma";
819 reg = <0x18143000 0x1000>;
820 interrupts = <GIC_SHARED 27 IRQ_TYPE_LEVEL_HIGH>,
821 <GIC_SHARED 28 IRQ_TYPE_LEVEL_HIGH>,
822 <GIC_SHARED 29 IRQ_TYPE_LEVEL_HIGH>,
823 <GIC_SHARED 30 IRQ_TYPE_LEVEL_HIGH>,
824 <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>,
825 <GIC_SHARED 32 IRQ_TYPE_LEVEL_HIGH>,
826 <GIC_SHARED 33 IRQ_TYPE_LEVEL_HIGH>,
827 <GIC_SHARED 34 IRQ_TYPE_LEVEL_HIGH>,
828 <GIC_SHARED 35 IRQ_TYPE_LEVEL_HIGH>,
829 <GIC_SHARED 36 IRQ_TYPE_LEVEL_HIGH>,
830 <GIC_SHARED 37 IRQ_TYPE_LEVEL_HIGH>,
831 <GIC_SHARED 38 IRQ_TYPE_LEVEL_HIGH>;
832 clocks = <&cr_periph SYS_CLK_MDC>;
835 img,max-burst-multiplier = <16>;
836 img,cr-periph = <&cr_periph>;
841 clk_core: clk@18144000 {
842 compatible = "img,pistachio-clk", "syscon";
843 clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>,
844 <&cr_top EXT_CLK_ENET_IN>;
845 clock-names = "xtal", "audio_refclk_ext_gate",
847 reg = <0x18144000 0x800>;
851 clk_periph: clk@18144800 {
852 compatible = "img,pistachio-clk-periph";
853 reg = <0x18144800 0x1000>;
854 clocks = <&clk_core CLK_PERIPH_SYS>;
855 clock-names = "periph_sys_core";
859 cr_periph: clk@18148000 {
860 compatible = "img,pistachio-cr-periph", "syscon", "simple-bus";
861 reg = <0x18148000 0x1000>;
862 clocks = <&clk_periph PERIPH_CLK_SYS>;
866 pistachio_reset: reset-controller {
867 compatible = "img,pistachio-reset";
872 cr_top: clk@18149000 {
873 compatible = "img,pistachio-cr-top", "syscon";
874 reg = <0x18149000 0x200>;
878 hash: hash@18149600 {
879 compatible = "img,hash-accelerator";
880 reg = <0x18149600 0x100>, <0x18101100 0x4>;
881 interrupts = <GIC_SHARED 59 IRQ_TYPE_LEVEL_HIGH>;
882 dmas = <&mdc 8 0xffffffff 0>;
884 clocks = <&cr_periph SYS_CLK_HASH>,
885 <&clk_periph PERIPH_CLK_ROM>;
886 clock-names = "sys", "hash";
889 gic: interrupt-controller@1bdc0000 {
890 compatible = "mti,gic";
891 reg = <0x1bdc0000 0x20000>;
893 interrupt-controller;
894 #interrupt-cells = <3>;
897 compatible = "mti,gic-timer";
898 interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
899 clocks = <&clk_core CLK_MIPS>;
904 compatible = "img,pistachio-usb-phy";
905 clocks = <&clk_core CLK_USB_PHY>;
906 clock-names = "usb_phy";
907 assigned-clocks = <&clk_core CLK_USB_PHY_DIV>;
908 assigned-clock-rates = <50000000>;
910 img,cr-top = <&cr_top>;
915 compatible = "fixed-clock";
917 clock-frequency = <52000000>;
918 clock-output-names = "xtal";