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