162306a36Sopenharmony_ciTI Keystone DSP devices
262306a36Sopenharmony_ci=======================
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciThe TI Keystone 2 family of SoCs usually have one or more (upto 8) TI DSP Core
562306a36Sopenharmony_cisub-systems that are used to offload some of the processor-intensive tasks or
662306a36Sopenharmony_cialgorithms, for achieving various system level goals.
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciThese processor sub-systems usually contain additional sub-modules like L1
962306a36Sopenharmony_ciand/or L2 caches/SRAMs, an Interrupt Controller, an external memory controller,
1062306a36Sopenharmony_cia dedicated local power/sleep controller etc. The DSP processor core in
1162306a36Sopenharmony_ciKeystone 2 SoCs is usually a TMS320C66x CorePac processor.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciDSP Device Node:
1462306a36Sopenharmony_ci================
1562306a36Sopenharmony_ciEach DSP Core sub-system is represented as a single DT node, and should also
1662306a36Sopenharmony_cihave an alias with the stem 'rproc' defined. Each node has a number of required
1762306a36Sopenharmony_cior optional properties that enable the OS running on the host processor (ARM
1862306a36Sopenharmony_ciCorePac) to perform the device management of the remote processor and to
1962306a36Sopenharmony_cicommunicate with the remote processor.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciRequired properties:
2262306a36Sopenharmony_ci--------------------
2362306a36Sopenharmony_ciThe following are the mandatory properties:
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci- compatible:		Should be one of the following,
2662306a36Sopenharmony_ci			    "ti,k2hk-dsp" for DSPs on Keystone 2 66AK2H/K SoCs
2762306a36Sopenharmony_ci			    "ti,k2l-dsp" for DSPs on Keystone 2 66AK2L SoCs
2862306a36Sopenharmony_ci			    "ti,k2e-dsp" for DSPs on Keystone 2 66AK2E SoCs
2962306a36Sopenharmony_ci			    "ti,k2g-dsp" for DSPs on Keystone 2 66AK2G SoCs
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci- reg:			Should contain an entry for each value in 'reg-names'.
3262306a36Sopenharmony_ci			Each entry should have the memory region's start address
3362306a36Sopenharmony_ci			and the size of the region, the representation matching
3462306a36Sopenharmony_ci			the parent node's '#address-cells' and '#size-cells' values.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci- reg-names:		Should contain strings with the following names, each
3762306a36Sopenharmony_ci			representing a specific internal memory region, and
3862306a36Sopenharmony_ci			should be defined in this order,
3962306a36Sopenharmony_ci			     "l2sram", "l1pram", "l1dram"
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci- ti,syscon-dev:	Should be a pair of the phandle to the Keystone Device
4262306a36Sopenharmony_ci			State Control node, and the register offset of the DSP
4362306a36Sopenharmony_ci			boot address register within that node's address space.
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci- resets:		Should contain the phandle to the reset controller node
4662306a36Sopenharmony_ci			managing the resets for this device, and a reset
4762306a36Sopenharmony_ci			specifier. Please refer to either of the following reset
4862306a36Sopenharmony_ci			bindings for the reset argument specifier as per SoC,
4962306a36Sopenharmony_ci			Documentation/devicetree/bindings/reset/ti-syscon-reset.txt
5062306a36Sopenharmony_ci			    for 66AK2HK/66AK2L/66AK2E SoCs or,
5162306a36Sopenharmony_ci			Documentation/devicetree/bindings/reset/ti,sci-reset.yaml
5262306a36Sopenharmony_ci			    for 66AK2G SoCs
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci- interrupts: 		Should contain an entry for each value in 'interrupt-names'.
5562306a36Sopenharmony_ci			Each entry should have the interrupt source number used by
5662306a36Sopenharmony_ci			the remote processor to the host processor. The values should
5762306a36Sopenharmony_ci			follow the interrupt-specifier format as dictated by the
5862306a36Sopenharmony_ci			'interrupt-parent' node. The purpose of each is as per the
5962306a36Sopenharmony_ci			description in the 'interrupt-names' property.
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci- interrupt-names:	Should contain strings with the following names, each
6262306a36Sopenharmony_ci			representing a specific interrupt,
6362306a36Sopenharmony_ci			    "vring" - interrupt for virtio based IPC
6462306a36Sopenharmony_ci			    "exception" - interrupt for exception notification
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci- kick-gpios: 		Should specify the gpio device needed for the virtio IPC
6762306a36Sopenharmony_ci			stack. This will be used to interrupt the remote processor.
6862306a36Sopenharmony_ci			The gpio device to be used is as per the bindings in,
6962306a36Sopenharmony_ci			Documentation/devicetree/bindings/gpio/gpio-dsp-keystone.txt
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ciSoC-specific Required properties:
7262306a36Sopenharmony_ci---------------------------------
7362306a36Sopenharmony_ciThe following are mandatory properties for Keystone 2 66AK2HK, 66AK2L and 66AK2E
7462306a36Sopenharmony_ciSoCs only:
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci- clocks: 		Should contain the device's input clock, and should be
7762306a36Sopenharmony_ci			defined as per the bindings in,
7862306a36Sopenharmony_ci			Documentation/devicetree/bindings/clock/keystone-gate.txt
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciThe following are mandatory properties for Keystone 2 66AK2G SoCs only:
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci- power-domains:	Should contain a phandle to a PM domain provider node
8362306a36Sopenharmony_ci			and an args specifier containing the DSP device id
8462306a36Sopenharmony_ci			value. This property is as per the binding,
8562306a36Sopenharmony_ci			Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ciOptional properties:
8862306a36Sopenharmony_ci--------------------
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci- memory-region:	phandle to the reserved memory node to be associated
9162306a36Sopenharmony_ci			with the remoteproc device. The reserved memory node
9262306a36Sopenharmony_ci			can be a CMA memory node, and should be defined as
9362306a36Sopenharmony_ci			per the bindings in
9462306a36Sopenharmony_ci			Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ciExamples:
9862306a36Sopenharmony_ci---------
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci1.
10162306a36Sopenharmony_ci	/* 66AK2H/K DSP aliases */
10262306a36Sopenharmony_ci	aliases {
10362306a36Sopenharmony_ci		rproc0 = &dsp0;
10462306a36Sopenharmony_ci		rproc1 = &dsp1;
10562306a36Sopenharmony_ci		rproc2 = &dsp2;
10662306a36Sopenharmony_ci		rproc3 = &dsp3;
10762306a36Sopenharmony_ci		rproc4 = &dsp4;
10862306a36Sopenharmony_ci		rproc5 = &dsp5;
10962306a36Sopenharmony_ci		rproc6 = &dsp6;
11062306a36Sopenharmony_ci		rproc7 = &dsp7;
11162306a36Sopenharmony_ci	};
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ci	/* 66AK2H/K DSP memory node */
11462306a36Sopenharmony_ci	reserved-memory {
11562306a36Sopenharmony_ci		#address-cells = <2>;
11662306a36Sopenharmony_ci		#size-cells = <2>;
11762306a36Sopenharmony_ci		ranges;
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci		dsp_common_memory: dsp-common-memory@81f800000 {
12062306a36Sopenharmony_ci			compatible = "shared-dma-pool";
12162306a36Sopenharmony_ci			reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
12262306a36Sopenharmony_ci			reusable;
12362306a36Sopenharmony_ci		};
12462306a36Sopenharmony_ci	};
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci	/* 66AK2H/K DSP node */
12762306a36Sopenharmony_ci	soc {
12862306a36Sopenharmony_ci		dsp0: dsp@10800000 {
12962306a36Sopenharmony_ci			compatible = "ti,k2hk-dsp";
13062306a36Sopenharmony_ci			reg = <0x10800000 0x00100000>,
13162306a36Sopenharmony_ci			      <0x10e00000 0x00008000>,
13262306a36Sopenharmony_ci			      <0x10f00000 0x00008000>;
13362306a36Sopenharmony_ci			reg-names = "l2sram", "l1pram", "l1dram";
13462306a36Sopenharmony_ci			clocks = <&clkgem0>;
13562306a36Sopenharmony_ci			ti,syscon-dev = <&devctrl 0x40>;
13662306a36Sopenharmony_ci			resets = <&pscrst 0>;
13762306a36Sopenharmony_ci			interrupt-parent = <&kirq0>;
13862306a36Sopenharmony_ci			interrupts = <0 8>;
13962306a36Sopenharmony_ci			interrupt-names = "vring", "exception";
14062306a36Sopenharmony_ci			kick-gpios = <&dspgpio0 27 0>;
14162306a36Sopenharmony_ci			memory-region = <&dsp_common_memory>;
14262306a36Sopenharmony_ci		};
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci	};
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci2.
14762306a36Sopenharmony_ci	/* 66AK2G DSP alias */
14862306a36Sopenharmony_ci	aliases {
14962306a36Sopenharmony_ci		rproc0 = &dsp0;
15062306a36Sopenharmony_ci	};
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ci	/* 66AK2G DSP memory node */
15362306a36Sopenharmony_ci	reserved-memory {
15462306a36Sopenharmony_ci		#address-cells = <2>;
15562306a36Sopenharmony_ci		#size-cells = <2>;
15662306a36Sopenharmony_ci		ranges;
15762306a36Sopenharmony_ci
15862306a36Sopenharmony_ci		dsp_common_memory: dsp-common-memory@81f800000 {
15962306a36Sopenharmony_ci			compatible = "shared-dma-pool";
16062306a36Sopenharmony_ci			reg = <0x00000008 0x1f800000 0x00000000 0x800000>;
16162306a36Sopenharmony_ci			reusable;
16262306a36Sopenharmony_ci		};
16362306a36Sopenharmony_ci	};
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ci	/* 66AK2G DSP node */
16662306a36Sopenharmony_ci	soc {
16762306a36Sopenharmony_ci		dsp0: dsp@10800000 {
16862306a36Sopenharmony_ci			compatible = "ti,k2g-dsp";
16962306a36Sopenharmony_ci			reg = <0x10800000 0x00100000>,
17062306a36Sopenharmony_ci			      <0x10e00000 0x00008000>,
17162306a36Sopenharmony_ci			      <0x10f00000 0x00008000>;
17262306a36Sopenharmony_ci			reg-names = "l2sram", "l1pram", "l1dram";
17362306a36Sopenharmony_ci			power-domains = <&k2g_pds 0x0046>;
17462306a36Sopenharmony_ci			ti,syscon-dev = <&devctrl 0x40>;
17562306a36Sopenharmony_ci			resets = <&k2g_reset 0x0046 0x1>;
17662306a36Sopenharmony_ci			interrupt-parent = <&kirq0>;
17762306a36Sopenharmony_ci			interrupts = <0 8>;
17862306a36Sopenharmony_ci			interrupt-names = "vring", "exception";
17962306a36Sopenharmony_ci			kick-gpios = <&dspgpio0 27 0>;
18062306a36Sopenharmony_ci			memory-region = <&dsp_common_memory>;
18162306a36Sopenharmony_ci		};
18262306a36Sopenharmony_ci	};
183