xref: /linux/arch/arc/boot/dts/axc003_idu.dtsi (revision 5fa2daaa8d8223d06fcdba171a7a668dc8e8b179)
1*5fa2daaaSVineet Gupta/*
2*5fa2daaaSVineet Gupta * Copyright (C) 2014, 2015 Synopsys, Inc. (www.synopsys.com)
3*5fa2daaaSVineet Gupta *
4*5fa2daaaSVineet Gupta * This program is free software; you can redistribute it and/or modify
5*5fa2daaaSVineet Gupta * it under the terms of the GNU General Public License version 2 as
6*5fa2daaaSVineet Gupta * published by the Free Software Foundation.
7*5fa2daaaSVineet Gupta */
8*5fa2daaaSVineet Gupta
9*5fa2daaaSVineet Gupta/*
10*5fa2daaaSVineet Gupta * Device tree for AXC003 CPU card: HS38x2 (Dual Core) with IDU intc
11*5fa2daaaSVineet Gupta */
12*5fa2daaaSVineet Gupta
13*5fa2daaaSVineet Gupta/ {
14*5fa2daaaSVineet Gupta	compatible = "snps,arc";
15*5fa2daaaSVineet Gupta	clock-frequency = <75000000>;
16*5fa2daaaSVineet Gupta	#address-cells = <1>;
17*5fa2daaaSVineet Gupta	#size-cells = <1>;
18*5fa2daaaSVineet Gupta
19*5fa2daaaSVineet Gupta	cpu_card {
20*5fa2daaaSVineet Gupta		compatible = "simple-bus";
21*5fa2daaaSVineet Gupta		#address-cells = <1>;
22*5fa2daaaSVineet Gupta		#size-cells = <1>;
23*5fa2daaaSVineet Gupta
24*5fa2daaaSVineet Gupta		ranges = <0x00000000 0xf0000000 0x10000000>;
25*5fa2daaaSVineet Gupta
26*5fa2daaaSVineet Gupta		cpu_intc: archs-intc@cpu {
27*5fa2daaaSVineet Gupta			compatible = "snps,archs-intc";
28*5fa2daaaSVineet Gupta			interrupt-controller;
29*5fa2daaaSVineet Gupta			#interrupt-cells = <1>;
30*5fa2daaaSVineet Gupta		};
31*5fa2daaaSVineet Gupta
32*5fa2daaaSVineet Gupta		idu_intc: idu-interrupt-controller {
33*5fa2daaaSVineet Gupta			compatible = "snps,archs-idu-intc";
34*5fa2daaaSVineet Gupta			interrupt-controller;
35*5fa2daaaSVineet Gupta			interrupt-parent = <&cpu_intc>;
36*5fa2daaaSVineet Gupta
37*5fa2daaaSVineet Gupta			/*
38*5fa2daaaSVineet Gupta			 * <hwirq  distribution>
39*5fa2daaaSVineet Gupta			 * distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3
40*5fa2daaaSVineet Gupta			 */
41*5fa2daaaSVineet Gupta			#interrupt-cells = <2>;
42*5fa2daaaSVineet Gupta
43*5fa2daaaSVineet Gupta			/*
44*5fa2daaaSVineet Gupta			 * upstream irqs to core intc - downstream these are
45*5fa2daaaSVineet Gupta			 * "COMMON" irq 0,1..
46*5fa2daaaSVineet Gupta			 */
47*5fa2daaaSVineet Gupta			interrupts = <24 25>;
48*5fa2daaaSVineet Gupta		};
49*5fa2daaaSVineet Gupta
50*5fa2daaaSVineet Gupta		/*
51*5fa2daaaSVineet Gupta		 * this GPIO block ORs all interrupts on CPU card (creg,..)
52*5fa2daaaSVineet Gupta		 * to uplink only 1 IRQ to ARC core intc
53*5fa2daaaSVineet Gupta		 */
54*5fa2daaaSVineet Gupta		dw-apb-gpio@0x2000 {
55*5fa2daaaSVineet Gupta			compatible = "snps,dw-apb-gpio";
56*5fa2daaaSVineet Gupta			reg = < 0x2000 0x80 >;
57*5fa2daaaSVineet Gupta			#address-cells = <1>;
58*5fa2daaaSVineet Gupta			#size-cells = <0>;
59*5fa2daaaSVineet Gupta
60*5fa2daaaSVineet Gupta			ictl_intc: gpio-controller@0 {
61*5fa2daaaSVineet Gupta				compatible = "snps,dw-apb-gpio-port";
62*5fa2daaaSVineet Gupta				gpio-controller;
63*5fa2daaaSVineet Gupta				#gpio-cells = <2>;
64*5fa2daaaSVineet Gupta				snps,nr-gpios = <30>;
65*5fa2daaaSVineet Gupta				reg = <0>;
66*5fa2daaaSVineet Gupta				interrupt-controller;
67*5fa2daaaSVineet Gupta				#interrupt-cells = <2>;
68*5fa2daaaSVineet Gupta				interrupt-parent = <&idu_intc>;
69*5fa2daaaSVineet Gupta
70*5fa2daaaSVineet Gupta				/*
71*5fa2daaaSVineet Gupta				 * cmn irq 1 -> cpu irq 25
72*5fa2daaaSVineet Gupta				 * Distribute to cpu0 only
73*5fa2daaaSVineet Gupta				 */
74*5fa2daaaSVineet Gupta				interrupts = <1 1>;
75*5fa2daaaSVineet Gupta			};
76*5fa2daaaSVineet Gupta		};
77*5fa2daaaSVineet Gupta
78*5fa2daaaSVineet Gupta		debug_uart: dw-apb-uart@0x5000 {
79*5fa2daaaSVineet Gupta			compatible = "snps,dw-apb-uart";
80*5fa2daaaSVineet Gupta			reg = <0x5000 0x100>;
81*5fa2daaaSVineet Gupta			clock-frequency = <33333000>;
82*5fa2daaaSVineet Gupta			interrupt-parent = <&ictl_intc>;
83*5fa2daaaSVineet Gupta			interrupts = <2 4>;
84*5fa2daaaSVineet Gupta			baud = <115200>;
85*5fa2daaaSVineet Gupta			reg-shift = <2>;
86*5fa2daaaSVineet Gupta			reg-io-width = <4>;
87*5fa2daaaSVineet Gupta		};
88*5fa2daaaSVineet Gupta
89*5fa2daaaSVineet Gupta		arcpct0: pct {
90*5fa2daaaSVineet Gupta			compatible = "snps,archs-pct";
91*5fa2daaaSVineet Gupta			#interrupt-cells = <1>;
92*5fa2daaaSVineet Gupta			interrupt-parent = <&cpu_intc>;
93*5fa2daaaSVineet Gupta			interrupts = <20>;
94*5fa2daaaSVineet Gupta		};
95*5fa2daaaSVineet Gupta	};
96*5fa2daaaSVineet Gupta
97*5fa2daaaSVineet Gupta	/*
98*5fa2daaaSVineet Gupta	 * This INTC is actually connected to DW APB GPIO
99*5fa2daaaSVineet Gupta	 * which acts as a wire between MB INTC and CPU INTC.
100*5fa2daaaSVineet Gupta	 * GPIO INTC is configured in platform init code
101*5fa2daaaSVineet Gupta	 * and here we mimic direct connection from MB INTC to
102*5fa2daaaSVineet Gupta	 * CPU INTC, thus we set "interrupts = <0 1>" instead of
103*5fa2daaaSVineet Gupta	 * "interrupts = <12>"
104*5fa2daaaSVineet Gupta	 *
105*5fa2daaaSVineet Gupta	 * This intc actually resides on MB, but we move it here to
106*5fa2daaaSVineet Gupta	 * avoid duplicating the MB dtsi file given that IRQ from
107*5fa2daaaSVineet Gupta	 * this intc to cpu intc are different for axs101 and axs103
108*5fa2daaaSVineet Gupta	 */
109*5fa2daaaSVineet Gupta	mb_intc: dw-apb-ictl@0xe0012000 {
110*5fa2daaaSVineet Gupta		#interrupt-cells = <1>;
111*5fa2daaaSVineet Gupta		compatible = "snps,dw-apb-ictl";
112*5fa2daaaSVineet Gupta		reg = < 0xe0012000 0x200 >;
113*5fa2daaaSVineet Gupta		interrupt-controller;
114*5fa2daaaSVineet Gupta		interrupt-parent = <&idu_intc>;
115*5fa2daaaSVineet Gupta		interrupts = <0 1>;	/* cmn irq 0 -> cpu irq 24
116*5fa2daaaSVineet Gupta					   distribute to cpu0 only */
117*5fa2daaaSVineet Gupta	};
118*5fa2daaaSVineet Gupta
119*5fa2daaaSVineet Gupta	memory {
120*5fa2daaaSVineet Gupta		#address-cells = <1>;
121*5fa2daaaSVineet Gupta		#size-cells = <1>;
122*5fa2daaaSVineet Gupta		ranges = <0x00000000 0x80000000 0x40000000>;
123*5fa2daaaSVineet Gupta		device_type = "memory";
124*5fa2daaaSVineet Gupta		reg = <0x00000000 0x20000000>;	/* 512MiB */
125*5fa2daaaSVineet Gupta	};
126*5fa2daaaSVineet Gupta};
127