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