Skip to contentSkip to conversation

Add R5F and C7x DSP nodes for AM62a SoC

PATCH Superseded Hari Nagalla 4 participants 9 messages Aug 10, 2023

Subsystems (3)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add R5F and C7x DSP nodes for AM62a SoC

This patch series adds R5F and C7x dsp processor nodes for AM62A SoC. The first patch amends the dsp node binding doc file and the remaining patches configure the remote processor device nodes.

v1: 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 remote proc nodes

Hari Nagalla (2):
dt-bindings: remoteproc: k3-dsp: correct optional sram properties for
AM62A SoCs
arm64: dts: k3-am62a-mcu: Add R5F remote proc node

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

 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  | 16 ++++-
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi     | 11 +++
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi      | 35 ++++++++++
 arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi   | 23 +++++++
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts       | 68 +++++++++++++++++++
 5 files changed, 151 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/5 dt-bindings: remoteproc: k3-dsp: correct optional sram properties for AM62A SoCs

The C7xv-dsp on AM62A have 32KB L1 I-cache and a 64KB L1 D-cache. It does not have an addressable l1dram . So, remove this optional sram property from the bindings to fix device tree build warnings.

Also set the 'memory-regions' property as optional. This is because the remote processors can function without carveout regions.

---
Changes since v1:
- Corrected dsp node binding doc file to fix yamllint warnings for am62a.

 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml     | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +14 -2
index f16e90380df1..8dd22c57e22d 100644
@@ -111,7 +111,6 @@ else:
     properties:
       compatible:
         enum:
-          - ti,am62a-c7xv-dsp
           - ti,j721e-c71-dsp
           - ti,j721s2-c71-dsp
   then:
@@ -124,6 +123,20 @@ else:
         items:
           - const: l2sram
           - const: l1dram
+  else:
+    if:
+      properties:
+        compatible:
+          enum:
+            - ti,am62a-c7xv-dsp
+    then:
+      properties:
+        reg:
+          items:
+            - description: Address and Size of the L2 SRAM internal memory region
+        reg-names:
+          items:
+            - const: l2sram
 
 required:
   - compatible
@@ -135,7 +148,6 @@ required:
   - resets
   - firmware-name
   - mboxes
-  - memory-region
 
 unevaluatedProperties: false
 
Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH v2 1/5] dt-bindings: remoteproc: k3-dsp: correct optional sram properties for AM62A SoCs

Quoted 7 lines · Hari Nagalla

The C7xv-dsp on AM62A have 32KB L1 I-cache and a 64KB L1 D-cache. It does not have an addressable l1dram . So, remove this optional sram property from the bindings to fix device tree build warnings.

Also set the 'memory-regions' property as optional. This is because the remote processors can function without carveout regions.

Quoted 8 lines

---
Changes since v1:
- Corrected dsp node binding doc file to fix yamllint warnings for am62a.

 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml     | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

#3 lore raw

Re: [PATCH v2 1/5] dt-bindings: remoteproc: k3-dsp: correct optional sram properties for AM62A SoCs

In reply to Hari Nagalla
Quoted 7 lines · Hari Nagalla

The C7xv-dsp on AM62A have 32KB L1 I-cache and a 64KB L1 D-cache. It does not have an addressable l1dram . So, remove this optional sram property from the bindings to fix device tree build warnings.

Also set the 'memory-regions' property as optional. This is because the remote processors can function without carveout regions.

That seems like an unrelated change that deserves its own commit..

Quoted 53 lines

---
Changes since v1:
- Corrected dsp node binding doc file to fix yamllint warnings for am62a.

 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml     | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml +14 -2
index f16e90380df1..8dd22c57e22d 100644
@@ -111,7 +111,6 @@ else:
     properties:
       compatible:
         enum:
-          - ti,am62a-c7xv-dsp
           - ti,j721e-c71-dsp
           - ti,j721s2-c71-dsp
   then:
@@ -124,6 +123,20 @@ else:
         items:
           - const: l2sram
           - const: l1dram
+  else:
+    if:
+      properties:
+        compatible:
+          enum:
+            - ti,am62a-c7xv-dsp
+    then:
+      properties:
+        reg:
+          items:
+            - description: Address and Size of the L2 SRAM internal memory region
+        reg-names:
+          items:
+            - const: l2sram
 
 required:
   - compatible
@@ -135,7 +148,6 @@ required:
   - resets
   - firmware-name
   - mboxes
-  - memory-region
 
 unevaluatedProperties: false
 
Signature · 1 line
2.34.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

PATCH v2 2/5 arm64: dts: k3-am62a-main: Add C7xv device node

In reply to Hari Nagalla

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.

---
Changes since v1:
- Divided the remote proc patch into separate per domain patch

 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +11 -0
index 3198af08fb9f..8886710d9a29 100644
@@ -816,4 +816,15 @@ ecap2: pwm@23120000 {
 		clock-names = "fck";
 		status = "disabled";
 	};
+
+	c7x_0: dsp@7e000000 {
+		compatible = "ti,am62a-c7xv-dsp";
+		reg = <0x00 0x7e000000 0x00 0x00100000>;
+		reg-names = "l2sram";
+		ti,sci = <&dmsc>;
+		ti,sci-dev-id = <208>;
+		ti,sci-proc-ids = <0x04 0xff>;
+		resets = <&k3_reset 208 1>;
+		firmware-name = "am62a-c71_0-fw";
+	};
 };
Signature · 1 line
2.34.1
#5 lore raw

PATCH v2 3/5 arm64: dts: k3-am62a-mcu: Add R5F remote proc node

In reply to Hari Nagalla

AM62A SoCs have a single R5F core in the MCU voltage domain. The MCU domain also has a 512KB sram memory, the R5F core can use for applications needing fast memory access.

---
Changes since v1:
- Divided the remote proc patch into separate per domain patch

 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi | 35 ++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +35 -0
index a6d16a94088c..cce08a85ad3b 100644
@@ -6,6 +6,17 @@
  */
 
 &cbass_mcu {
+	mcu_ram: sram@79100000 {
+		compatible = "mmio-sram";
+		reg = <0x00 0x79100000 0x00 0x80000>;
+		ranges = <0x00 0x00 0x79100000 0x80000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		mcu_sram1@0 {
+			reg = <0x0 0x80000>;
+		};
+	};
 	mcu_pmx0: pinctrl@4084000 {
 		compatible = "pinctrl-single";
 		reg = <0x00 0x04084000 0x00 0x88>;
@@ -167,4 +178,28 @@ 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";
+			ti,sci = <&dmsc>;
+			ti,sci-dev-id = <9>;
+			ti,sci-proc-ids = <0x03 0xff>;
+			resets = <&k3_reset 9 1>;
+			firmware-name = "am62a-mcu-r5f0_0-fw";
+			ti,atcm-enable = <0>;
+			ti,btcm-enable = <1>;
+			ti,loczrama = <0>;
+			sram = <&mcu_ram>;
+		};
+	};
 };
Signature · 1 line
2.34.1
#6 lore raw

PATCH v2 4/5 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.

---
Changes since v1:
- Divided the remote proc patch into separate per domain patch

 arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 23 +++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +23 -0
index 4e8279fa01e1..fd23d3de368f 100644
@@ -63,6 +63,29 @@ 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";
+			ti,sci = <&dmsc>;
+			ti,sci-dev-id = <121>;
+			ti,sci-proc-ids = <0x01 0xff>;
+			resets = <&k3_reset 121 1>;
+			firmware-name = "am62-wkup-r5f0_0-fw";
+			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
#7 lore raw

PATCH v2 5/5 arm64: dts: ti: k3-am62a7-sk: Enable ipc with remote proc nodes

In reply to Hari Nagalla

From: Devarsh Thakkar <[email protected]>

Reserve memory for remote rpoc IPC and bind the mailbox assignments for each remote proc. 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.

---
Changes since v1:
- no change

 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 68 +++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +68 -0
index cff283c75f8e..b589c73972df 100644
@@ -51,11 +51,40 @@ 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 0x01efffff>;
+			no-map;
+		};
 	};
 
 	vmain_pd: regulator-0 {
@@ -361,3 +390,42 @@ cpsw3g_phy0: ethernet-phy@0 {
 		ti,min-output-impedance;
 	};
 };
+
+&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>;
+};
+
+&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>;
+};
Signature · 1 line
2.34.1
maintainer
#8 lore raw
In reply to Hari Nagalla
Quoted 10 lines · Hari Nagalla

This patch series adds R5F and C7x dsp processor nodes for AM62A SoC. The first patch amends the dsp node binding doc file and the remaining patches configure the remote processor device nodes.

v1: 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 remote proc nodes

Quoted 7 lines

Hari Nagalla (2):
dt-bindings: remoteproc: k3-dsp: correct optional sram properties for
AM62A SoCs
arm64: dts: k3-am62a-mcu: Add R5F remote proc node

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

please send the binding fix to the remoteproc maintainer, SoC TI can pick the dts fixes in the next kernel rc1 rev.

Quoted 11 lines
 .../bindings/remoteproc/ti,k3-dsp-rproc.yaml  | 16 ++++-
 arch/arm64/boot/dts/ti/k3-am62a-main.dtsi     | 11 +++
 arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi      | 35 ++++++++++
 arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi   | 23 +++++++
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts       | 68 +++++++++++++++++++
 5 files changed, 151 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D