xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/remoteproc/ti,keystone-rproc.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunTI Keystone DSP devices
2*4882a593Smuzhiyun=======================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThe TI Keystone 2 family of SoCs usually have one or more (upto 8) TI DSP Core
5*4882a593Smuzhiyunsub-systems that are used to offload some of the processor-intensive tasks or
6*4882a593Smuzhiyunalgorithms, for achieving various system level goals.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunThese processor sub-systems usually contain additional sub-modules like L1
9*4882a593Smuzhiyunand/or L2 caches/SRAMs, an Interrupt Controller, an external memory controller,
10*4882a593Smuzhiyuna dedicated local power/sleep controller etc. The DSP processor core in
11*4882a593SmuzhiyunKeystone 2 SoCs is usually a TMS320C66x CorePac processor.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunDSP Device Node:
14*4882a593Smuzhiyun================
15*4882a593SmuzhiyunEach DSP Core sub-system is represented as a single DT node, and should also
16*4882a593Smuzhiyunhave an alias with the stem 'rproc' defined. Each node has a number of required
17*4882a593Smuzhiyunor optional properties that enable the OS running on the host processor (ARM
18*4882a593SmuzhiyunCorePac) to perform the device management of the remote processor and to
19*4882a593Smuzhiyuncommunicate with the remote processor.
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunRequired properties:
22*4882a593Smuzhiyun--------------------
23*4882a593SmuzhiyunThe following are the mandatory properties:
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun- compatible:		Should be one of the following,
26*4882a593Smuzhiyun			    "ti,k2hk-dsp" for DSPs on Keystone 2 66AK2H/K SoCs
27*4882a593Smuzhiyun			    "ti,k2l-dsp" for DSPs on Keystone 2 66AK2L SoCs
28*4882a593Smuzhiyun			    "ti,k2e-dsp" for DSPs on Keystone 2 66AK2E SoCs
29*4882a593Smuzhiyun			    "ti,k2g-dsp" for DSPs on Keystone 2 66AK2G SoCs
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun- reg:			Should contain an entry for each value in 'reg-names'.
32*4882a593Smuzhiyun			Each entry should have the memory region's start address
33*4882a593Smuzhiyun			and the size of the region, the representation matching
34*4882a593Smuzhiyun			the parent node's '#address-cells' and '#size-cells' values.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun- reg-names:		Should contain strings with the following names, each
37*4882a593Smuzhiyun			representing a specific internal memory region, and
38*4882a593Smuzhiyun			should be defined in this order,
39*4882a593Smuzhiyun			     "l2sram", "l1pram", "l1dram"
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun- ti,syscon-dev:	Should be a pair of the phandle to the Keystone Device
42*4882a593Smuzhiyun			State Control node, and the register offset of the DSP
43*4882a593Smuzhiyun			boot address register within that node's address space.
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun- resets:		Should contain the phandle to the reset controller node
46*4882a593Smuzhiyun			managing the resets for this device, and a reset
47*4882a593Smuzhiyun			specifier. Please refer to either of the following reset
48*4882a593Smuzhiyun			bindings for the reset argument specifier as per SoC,
49*4882a593Smuzhiyun			Documentation/devicetree/bindings/reset/ti-syscon-reset.txt
50*4882a593Smuzhiyun			    for 66AK2HK/66AK2L/66AK2E SoCs or,
51*4882a593Smuzhiyun			Documentation/devicetree/bindings/reset/ti,sci-reset.txt
52*4882a593Smuzhiyun			    for 66AK2G SoCs
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun- interrupts: 		Should contain an entry for each value in 'interrupt-names'.
55*4882a593Smuzhiyun			Each entry should have the interrupt source number used by
56*4882a593Smuzhiyun			the remote processor to the host processor. The values should
57*4882a593Smuzhiyun			follow the interrupt-specifier format as dictated by the
58*4882a593Smuzhiyun			'interrupt-parent' node. The purpose of each is as per the
59*4882a593Smuzhiyun			description in the 'interrupt-names' property.
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun- interrupt-names:	Should contain strings with the following names, each
62*4882a593Smuzhiyun			representing a specific interrupt,
63*4882a593Smuzhiyun			    "vring" - interrupt for virtio based IPC
64*4882a593Smuzhiyun			    "exception" - interrupt for exception notification
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun- kick-gpios: 		Should specify the gpio device needed for the virtio IPC
67*4882a593Smuzhiyun			stack. This will be used to interrupt the remote processor.
68*4882a593Smuzhiyun			The gpio device to be used is as per the bindings in,
69*4882a593Smuzhiyun			Documentation/devicetree/bindings/gpio/gpio-dsp-keystone.txt
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunSoC-specific Required properties:
72*4882a593Smuzhiyun---------------------------------
73*4882a593SmuzhiyunThe following are mandatory properties for Keystone 2 66AK2HK, 66AK2L and 66AK2E
74*4882a593SmuzhiyunSoCs only:
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun- clocks: 		Should contain the device's input clock, and should be
77*4882a593Smuzhiyun			defined as per the bindings in,
78*4882a593Smuzhiyun			Documentation/devicetree/bindings/clock/keystone-gate.txt
79*4882a593Smuzhiyun
80*4882a593SmuzhiyunThe following are mandatory properties for Keystone 2 66AK2G SoCs only:
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun- power-domains:	Should contain a phandle to a PM domain provider node
83*4882a593Smuzhiyun			and an args specifier containing the DSP device id
84*4882a593Smuzhiyun			value. This property is as per the binding,
85*4882a593Smuzhiyun			Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
86*4882a593Smuzhiyun
87*4882a593SmuzhiyunOptional properties:
88*4882a593Smuzhiyun--------------------
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun- memory-region:	phandle to the reserved memory node to be associated
91*4882a593Smuzhiyun			with the remoteproc device. The reserved memory node
92*4882a593Smuzhiyun			can be a CMA memory node, and should be defined as
93*4882a593Smuzhiyun			per the bindings in
94*4882a593Smuzhiyun			Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun
97*4882a593SmuzhiyunExamples:
98*4882a593Smuzhiyun---------
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun1.
101*4882a593Smuzhiyun	/* 66AK2H/K DSP aliases */
102*4882a593Smuzhiyun	aliases {
103*4882a593Smuzhiyun		rproc0 = &dsp0;
104*4882a593Smuzhiyun		rproc1 = &dsp1;
105*4882a593Smuzhiyun		rproc2 = &dsp2;
106*4882a593Smuzhiyun		rproc3 = &dsp3;
107*4882a593Smuzhiyun		rproc4 = &dsp4;
108*4882a593Smuzhiyun		rproc5 = &dsp5;
109*4882a593Smuzhiyun		rproc6 = &dsp6;
110*4882a593Smuzhiyun		rproc7 = &dsp7;
111*4882a593Smuzhiyun	};
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun	/* 66AK2H/K DSP memory node */
114*4882a593Smuzhiyun	reserved-memory {
115*4882a593Smuzhiyun		#address-cells = <2>;
116*4882a593Smuzhiyun		#size-cells = <2>;
117*4882a593Smuzhiyun		ranges;
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun		dsp_common_memory: dsp-common-memory@81f800000 {
120*4882a593Smuzhiyun			compatible = "shared-dma-pool";
121*4882a593Smuzhiyun			reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
122*4882a593Smuzhiyun			reusable;
123*4882a593Smuzhiyun		};
124*4882a593Smuzhiyun	};
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun	/* 66AK2H/K DSP node */
127*4882a593Smuzhiyun	soc {
128*4882a593Smuzhiyun		dsp0: dsp@10800000 {
129*4882a593Smuzhiyun			compatible = "ti,k2hk-dsp";
130*4882a593Smuzhiyun			reg = <0x10800000 0x00100000>,
131*4882a593Smuzhiyun			      <0x10e00000 0x00008000>,
132*4882a593Smuzhiyun			      <0x10f00000 0x00008000>;
133*4882a593Smuzhiyun			reg-names = "l2sram", "l1pram", "l1dram";
134*4882a593Smuzhiyun			clocks = <&clkgem0>;
135*4882a593Smuzhiyun			ti,syscon-dev = <&devctrl 0x40>;
136*4882a593Smuzhiyun			resets = <&pscrst 0>;
137*4882a593Smuzhiyun			interrupt-parent = <&kirq0>;
138*4882a593Smuzhiyun			interrupts = <0 8>;
139*4882a593Smuzhiyun			interrupt-names = "vring", "exception";
140*4882a593Smuzhiyun			kick-gpios = <&dspgpio0 27 0>;
141*4882a593Smuzhiyun			memory-region = <&dsp_common_memory>;
142*4882a593Smuzhiyun		};
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun	};
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun2.
147*4882a593Smuzhiyun	/* 66AK2G DSP alias */
148*4882a593Smuzhiyun	aliases {
149*4882a593Smuzhiyun		rproc0 = &dsp0;
150*4882a593Smuzhiyun	};
151*4882a593Smuzhiyun
152*4882a593Smuzhiyun	/* 66AK2G DSP memory node */
153*4882a593Smuzhiyun	reserved-memory {
154*4882a593Smuzhiyun		#address-cells = <2>;
155*4882a593Smuzhiyun		#size-cells = <2>;
156*4882a593Smuzhiyun		ranges;
157*4882a593Smuzhiyun
158*4882a593Smuzhiyun		dsp_common_memory: dsp-common-memory@81f800000 {
159*4882a593Smuzhiyun			compatible = "shared-dma-pool";
160*4882a593Smuzhiyun			reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
161*4882a593Smuzhiyun			reusable;
162*4882a593Smuzhiyun		};
163*4882a593Smuzhiyun	};
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun	/* 66AK2G DSP node */
166*4882a593Smuzhiyun	soc {
167*4882a593Smuzhiyun		dsp0: dsp@10800000 {
168*4882a593Smuzhiyun			compatible = "ti,k2g-dsp";
169*4882a593Smuzhiyun			reg = <0x10800000 0x00100000>,
170*4882a593Smuzhiyun			      <0x10e00000 0x00008000>,
171*4882a593Smuzhiyun			      <0x10f00000 0x00008000>;
172*4882a593Smuzhiyun			reg-names = "l2sram", "l1pram", "l1dram";
173*4882a593Smuzhiyun			power-domains = <&k2g_pds 0x0046>;
174*4882a593Smuzhiyun			ti,syscon-dev = <&devctrl 0x40>;
175*4882a593Smuzhiyun			resets = <&k2g_reset 0x0046 0x1>;
176*4882a593Smuzhiyun			interrupt-parent = <&kirq0>;
177*4882a593Smuzhiyun			interrupts = <0 8>;
178*4882a593Smuzhiyun			interrupt-names = "vring", "exception";
179*4882a593Smuzhiyun			kick-gpios = <&dspgpio0 27 0>;
180*4882a593Smuzhiyun			memory-region = <&dsp_common_memory>;
181*4882a593Smuzhiyun		};
182*4882a593Smuzhiyun	};
183