Skip to contentSkip to conversation

Add R5F and C7x DSP nodes for AM62a SoC

PATCH New Hari Nagalla 1 participant 5 messages Aug 22, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v5 cover Add R5F and C7x DSP nodes for AM62a SoC

This patch series adds R5F and C7x dsp processor nodes and shared memory based Virtio/IPC configuration for AM62A SoC.

changes in v5:
*) Reordered Remoteproc device node properties to list reset, firmware
properties before vendor specific properties.
*) Remote the SRAM node from patch2, as it can be used by other
components and is not specific to this patchset.
*) Added new lines between sub nodes as needed.

v4: https://lore.kernel.org/all/[email protected]/

Devarsh Thakkar (2):
arm64: dts: k3-am62a-wakeup: Add R5F device node
arm64: dts: ti: k3-am62a7-sk: Enable ipc with Remoteproc nodes

Hari Nagalla (1):
arm64: dts: k3-am62a-mcu: Add R5F Remoteproc node

Jai Luthra (1):
arm64: dts: k3-am62a-main: Add C7xv device node

 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi   | 12 ++++
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi    | 25 ++++++++
 arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 24 +++++++
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts     | 71 +++++++++++++++++++++
 4 files changed, 132 insertions(+)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v5 1/4 arm64: dts: k3-am62a-main: Add C7xv device node

From: Jai Luthra <[email protected]>

AM62A SoCs have a C7xv DSP subsystem with Analytics engine capability. This subsystem is intended for deep learning purposes. Define the device node for C7xv DSP.

---
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +12 -0
index 916fcf3cc57d..8546ed35529b 100644
@@ -1088,4 +1088,16 @@ vpu: video-codec@30210000 {
 		clocks = <&k3_clks 204 2>;
 		power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
 	};
+
+	c7x_0: dsp@7e000000 {
+		compatible = "ti,am62a-c7xv-dsp";
+		reg = <0x00 0x7e000000 0x00 0x00100000>;
+		reg-names = "l2sram";
+		resets = <&k3_reset 208 1>;
+		firmware-name = "am62a-c71_0-fw";
+		ti,sci = <&dmsc>;
+		ti,sci-dev-id = <208>;
+		ti,sci-proc-ids = <0x04 0xff>;
+		status = "disabled";
+	};
 };
Signature · 1 line
2.34.1
#2 lore raw

PATCH v5 2/4 arm64: dts: k3-am62a-mcu: Add R5F Remoteproc node

In reply to Hari Nagalla

AM62A SoCs have a single R5F core in the MCU voltage domain. The MCU core can run safety applications or can also be used as a general purpose MCU.

---
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 25 ++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +25 -0
index 8c36e56f4138..f0facc9a268c 100644
@@ -167,4 +167,29 @@ mcu_mcan1: can@4e18000 {
 		bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
 		status = "disabled";
 	};
+
+	mcu_r5fss0: r5fss@79000000 {
+		compatible = "ti,am62-r5fss";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x79000000 0x00 0x79000000 0x8000>,
+			 <0x79020000 0x00 0x79020000 0x8000>;
+		power-domains = <&k3_pds 7 TI_SCI_PD_EXCLUSIVE>;
+
+		mcu_r5fss0_core0: r5f@79000000 {
+			compatible = "ti,am62-r5f";
+			reg = <0x79000000 0x00008000>,
+				<0x79020000 0x00008000>;
+			reg-names = "atcm", "btcm";
+			resets = <&k3_reset 9 1>;
+			firmware-name = "am62a-mcu-r5f0_0-fw";
+			ti,sci = <&dmsc>;
+			ti,sci-dev-id = <9>;
+			ti,sci-proc-ids = <0x03 0xff>;
+			ti,atcm-enable = <0>;
+			ti,btcm-enable = <1>;
+			ti,loczrama = <0>;
+			status = "disabled";
+		};
+	};
 };
Signature · 1 line
2.34.1
#3 lore raw

PATCH v5 3/4 arm64: dts: k3-am62a-wakeup: Add R5F device node

In reply to Hari Nagalla

From: Devarsh Thakkar <[email protected]>

AM62A SoCs have a single R5F core in waekup domain. This core is also used as a device manager for the SoC.

---
 arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 24 +++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +24 -0
index f5ac101a04df..71c2b8bc5cda 100644
@@ -76,6 +76,30 @@ wkup_rti0: watchdog@2b000000 {
 		status = "reserved";
 	};
 
+	wkup_r5fss0: r5fss@78000000 {
+		compatible = "ti,am62-r5fss";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x78000000 0x00 0x78000000 0x8000>,
+			 <0x78100000 0x00 0x78100000 0x8000>;
+		power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>;
+
+		wkup_r5fss0_core0: r5f@78000000 {
+			compatible = "ti,am62-r5f";
+			reg = <0x78000000 0x00008000>,
+				<0x78100000 0x00008000>;
+			reg-names = "atcm", "btcm";
+			resets = <&k3_reset 121 1>;
+			firmware-name = "am62-wkup-r5f0_0-fw";
+			ti,sci = <&dmsc>;
+			ti,sci-dev-id = <121>;
+			ti,sci-proc-ids = <0x01 0xff>;
+			ti,atcm-enable = <1>;
+			ti,btcm-enable = <1>;
+			ti,loczrama = <1>;
+		};
+	};
+
 	wkup_vtm0: temperature-sensor@b00000 {
 		compatible = "ti,j7200-vtm";
 		reg = <0x00 0xb00000 0x00 0x400>,
Signature · 1 line
2.34.1
#4 lore raw

PATCH v5 4/4 arm64: dts: ti: k3-am62a7-sk: Enable ipc with Remoteproc nodes

In reply to Hari Nagalla

From: Devarsh Thakkar <[email protected]>

Reserve memory for Remoteproc IPC and bind the mailbox assignments for each Remoteproc. Two memory regions are reserved for each remote processor. The first region of 1MB of memory is used for Vring shared buffers and the second region is used as external memory to the remote processor, resource table and as tracebuffer.

---
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 71 +++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +71 -0
index 67faf46d7a35..c9c504626b14 100644
@@ -61,11 +61,41 @@ secure_ddr: optee@9e800000 {
 			no-map;
 		};
 
+		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x00 0x9c800000 0x00 0x100000>;
+			no-map;
+		};
+
 		wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
 			compatible = "shared-dma-pool";
 			reg = <0x00 0x9c900000 0x00 0x01e00000>;
 			no-map;
 		};
+
+		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@9b800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x00 0x9b800000 0x00 0x100000>;
+			no-map;
+		};
+
+		mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 {
+			compatible = "shared-dma-pool";
+			reg = <0x00 0x9b900000 0x00 0x0f00000>;
+			no-map;
+		};
+
+		c7x_0_dma_memory_region: c7x-dma-memory@99800000 {
+			compatible = "shared-dma-pool";
+			reg = <0x00 0x99800000 0x00 0x100000>;
+			no-map;
+		};
+
+		c7x_0_memory_region: c7x-memory@99900000 {
+			compatible = "shared-dma-pool";
+			reg = <0x00 0x99900000 0x00 0x01f00000>;
+			no-map;
+		};
 	};
 
 	vmain_pd: regulator-0 {
@@ -728,3 +758,44 @@ dpi1_out: endpoint {
 		};
 	};
 };
+
+&mailbox0_cluster0 {
+	mbox_r5_0: mbox-r5-0 {
+		ti,mbox-rx = <0 0 0>;
+		ti,mbox-tx = <1 0 0>;
+	};
+};
+
+&mailbox0_cluster1 {
+	mbox_c7x_0: mbox-c7x-0 {
+		ti,mbox-rx = <0 0 0>;
+		ti,mbox-tx = <1 0 0>;
+	};
+};
+
+&mailbox0_cluster2 {
+	mbox_mcu_r5_0: mbox-mcu-r5-0 {
+		ti,mbox-rx = <0 0 0>;
+		ti,mbox-tx = <1 0 0>;
+	};
+};
+
+&c7x_0 {
+	mboxes = <&mailbox0_cluster1 &mbox_c7x_0>;
+	memory-region = <&c7x_0_dma_memory_region>,
+			<&c7x_0_memory_region>;
+	status = "okay";
+};
+
+&wkup_r5fss0_core0 {
+	mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
+	memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
+		<&wkup_r5fss0_core0_memory_region>;
+};
+
+&mcu_r5fss0_core0 {
+	mboxes = <&mailbox0_cluster2 &mbox_mcu_r5_0>;
+	memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+			<&mcu_r5fss0_core0_memory_region>;
+	status = "okay";
+};
Signature · 1 line
2.34.1