xref: /OK3568_Linux_fs/kernel/arch/arc/boot/dts/axc003_idu.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun// SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyun/*
3*4882a593Smuzhiyun * Copyright (C) 2014, 2015 Synopsys, Inc. (www.synopsys.com)
4*4882a593Smuzhiyun */
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun/*
7*4882a593Smuzhiyun * Device tree for AXC003 CPU card: HS38x2 (Dual Core) with IDU intc
8*4882a593Smuzhiyun */
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun/include/ "skeleton_hs_idu.dtsi"
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun/ {
13*4882a593Smuzhiyun	compatible = "snps,arc";
14*4882a593Smuzhiyun	#address-cells = <2>;
15*4882a593Smuzhiyun	#size-cells = <2>;
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun	cpu_card {
18*4882a593Smuzhiyun		compatible = "simple-bus";
19*4882a593Smuzhiyun		#address-cells = <1>;
20*4882a593Smuzhiyun		#size-cells = <1>;
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun		ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun		input_clk: input-clk {
25*4882a593Smuzhiyun			#clock-cells = <0>;
26*4882a593Smuzhiyun			compatible = "fixed-clock";
27*4882a593Smuzhiyun			clock-frequency = <33333333>;
28*4882a593Smuzhiyun		};
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun		core_clk: core-clk@80 {
31*4882a593Smuzhiyun			compatible = "snps,axs10x-arc-pll-clock";
32*4882a593Smuzhiyun			reg = <0x80 0x10>, <0x100 0x10>;
33*4882a593Smuzhiyun			#clock-cells = <0>;
34*4882a593Smuzhiyun			clocks = <&input_clk>;
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun			/*
37*4882a593Smuzhiyun			 * Set initial core pll output frequency to 100MHz.
38*4882a593Smuzhiyun			 * It will be applied at the core pll driver probing
39*4882a593Smuzhiyun			 * on early boot.
40*4882a593Smuzhiyun			 */
41*4882a593Smuzhiyun			assigned-clocks = <&core_clk>;
42*4882a593Smuzhiyun			assigned-clock-rates = <100000000>;
43*4882a593Smuzhiyun		};
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun		core_intc: archs-intc@cpu {
46*4882a593Smuzhiyun			compatible = "snps,archs-intc";
47*4882a593Smuzhiyun			interrupt-controller;
48*4882a593Smuzhiyun			#interrupt-cells = <1>;
49*4882a593Smuzhiyun		};
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun		idu_intc: idu-interrupt-controller {
52*4882a593Smuzhiyun			compatible = "snps,archs-idu-intc";
53*4882a593Smuzhiyun			interrupt-controller;
54*4882a593Smuzhiyun			interrupt-parent = <&core_intc>;
55*4882a593Smuzhiyun			#interrupt-cells = <1>;
56*4882a593Smuzhiyun		};
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun		/*
59*4882a593Smuzhiyun		 * this GPIO block ORs all interrupts on CPU card (creg,..)
60*4882a593Smuzhiyun		 * to uplink only 1 IRQ to ARC core intc
61*4882a593Smuzhiyun		 */
62*4882a593Smuzhiyun		dw-apb-gpio@2000 {
63*4882a593Smuzhiyun			compatible = "snps,dw-apb-gpio";
64*4882a593Smuzhiyun			reg = < 0x2000 0x80 >;
65*4882a593Smuzhiyun			#address-cells = <1>;
66*4882a593Smuzhiyun			#size-cells = <0>;
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun			ictl_intc: gpio-controller@0 {
69*4882a593Smuzhiyun				compatible = "snps,dw-apb-gpio-port";
70*4882a593Smuzhiyun				gpio-controller;
71*4882a593Smuzhiyun				#gpio-cells = <2>;
72*4882a593Smuzhiyun				snps,nr-gpios = <30>;
73*4882a593Smuzhiyun				reg = <0>;
74*4882a593Smuzhiyun				interrupt-controller;
75*4882a593Smuzhiyun				#interrupt-cells = <2>;
76*4882a593Smuzhiyun				interrupt-parent = <&idu_intc>;
77*4882a593Smuzhiyun				interrupts = <1>;
78*4882a593Smuzhiyun			};
79*4882a593Smuzhiyun		};
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun		debug_uart: dw-apb-uart@5000 {
82*4882a593Smuzhiyun			compatible = "snps,dw-apb-uart";
83*4882a593Smuzhiyun			reg = <0x5000 0x100>;
84*4882a593Smuzhiyun			clock-frequency = <33333000>;
85*4882a593Smuzhiyun			interrupt-parent = <&ictl_intc>;
86*4882a593Smuzhiyun			interrupts = <2 4>;
87*4882a593Smuzhiyun			baud = <115200>;
88*4882a593Smuzhiyun			reg-shift = <2>;
89*4882a593Smuzhiyun			reg-io-width = <4>;
90*4882a593Smuzhiyun		};
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun		arcpct0: pct {
93*4882a593Smuzhiyun			compatible = "snps,archs-pct";
94*4882a593Smuzhiyun			#interrupt-cells = <1>;
95*4882a593Smuzhiyun			interrupt-parent = <&core_intc>;
96*4882a593Smuzhiyun			interrupts = <20>;
97*4882a593Smuzhiyun		};
98*4882a593Smuzhiyun	};
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun	/*
101*4882a593Smuzhiyun	 * Mark DMA peripherals connected via IOC port as dma-coherent. We do
102*4882a593Smuzhiyun	 * it via overlay because peripherals defined in axs10x_mb.dtsi are
103*4882a593Smuzhiyun	 * used for both AXS101 and AXS103 boards and only AXS103 has IOC (so
104*4882a593Smuzhiyun	 * only AXS103 board has HW-coherent DMA peripherals)
105*4882a593Smuzhiyun	 * We don't need to mark pgu@17000 as dma-coherent because it uses
106*4882a593Smuzhiyun	 * external DMA buffer located outside of IOC aperture.
107*4882a593Smuzhiyun	 */
108*4882a593Smuzhiyun	axs10x_mb {
109*4882a593Smuzhiyun		ethernet@18000 {
110*4882a593Smuzhiyun			dma-coherent;
111*4882a593Smuzhiyun		};
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun		ehci@40000 {
114*4882a593Smuzhiyun			dma-coherent;
115*4882a593Smuzhiyun		};
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun		ohci@60000 {
118*4882a593Smuzhiyun			dma-coherent;
119*4882a593Smuzhiyun		};
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun		mmc@15000 {
122*4882a593Smuzhiyun			dma-coherent;
123*4882a593Smuzhiyun		};
124*4882a593Smuzhiyun	};
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun	/*
127*4882a593Smuzhiyun	 * This INTC is actually connected to DW APB GPIO
128*4882a593Smuzhiyun	 * which acts as a wire between MB INTC and CPU INTC.
129*4882a593Smuzhiyun	 * GPIO INTC is configured in platform init code
130*4882a593Smuzhiyun	 * and here we mimic direct connection from MB INTC to
131*4882a593Smuzhiyun	 * CPU INTC, thus we set "interrupts = <0 1>" instead of
132*4882a593Smuzhiyun	 * "interrupts = <12>"
133*4882a593Smuzhiyun	 *
134*4882a593Smuzhiyun	 * This intc actually resides on MB, but we move it here to
135*4882a593Smuzhiyun	 * avoid duplicating the MB dtsi file given that IRQ from
136*4882a593Smuzhiyun	 * this intc to cpu intc are different for axs101 and axs103
137*4882a593Smuzhiyun	 */
138*4882a593Smuzhiyun	mb_intc: interrupt-controller@e0012000 {
139*4882a593Smuzhiyun		#interrupt-cells = <1>;
140*4882a593Smuzhiyun		compatible = "snps,dw-apb-ictl";
141*4882a593Smuzhiyun		reg = < 0x0 0xe0012000 0x0 0x200 >;
142*4882a593Smuzhiyun		interrupt-controller;
143*4882a593Smuzhiyun		interrupt-parent = <&idu_intc>;
144*4882a593Smuzhiyun		interrupts = <0>;
145*4882a593Smuzhiyun	};
146*4882a593Smuzhiyun
147*4882a593Smuzhiyun	memory {
148*4882a593Smuzhiyun		device_type = "memory";
149*4882a593Smuzhiyun		/* CONFIG_LINUX_RAM_BASE needs to match low mem start */
150*4882a593Smuzhiyun		reg = <0x0 0x80000000 0x0 0x20000000	/* 512 MiB low mem */
151*4882a593Smuzhiyun		       0x1 0xc0000000 0x0 0x40000000>;	/* 1 GiB highmem */
152*4882a593Smuzhiyun	};
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun	reserved-memory {
155*4882a593Smuzhiyun		#address-cells = <2>;
156*4882a593Smuzhiyun		#size-cells = <2>;
157*4882a593Smuzhiyun		ranges;
158*4882a593Smuzhiyun		/*
159*4882a593Smuzhiyun		 * Move frame buffer out of IOC aperture (0x8z-0xaz).
160*4882a593Smuzhiyun		 */
161*4882a593Smuzhiyun		frame_buffer: frame_buffer@be000000 {
162*4882a593Smuzhiyun			compatible = "shared-dma-pool";
163*4882a593Smuzhiyun			reg = <0x0 0xbe000000 0x0 0x2000000>;
164*4882a593Smuzhiyun			no-map;
165*4882a593Smuzhiyun		};
166*4882a593Smuzhiyun	};
167*4882a593Smuzhiyun};
168