Skip to contentSkip to conversation

Introduce K3 remoteproc driver for M4 subsystem

PATCH Superseded Judith Mendez 1 participant 6 messages Jan 30, 2025 – Feb 4, 2025 Remote processor (remoteproc)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover Introduce K3 remoteproc driver for M4 subsystem

Some K3 devices like am62x and am64x have a M4 processor in the MCU voltage domain. This patch series introduces remoteproc M4 driver which will be used to load firmware into and start the M4 remote core.

This series also adds support for R5F cores on am64x SoCs in patch 2/4, sets up environment to load FW in remote cores in patch 3/4, and enables config options for R5F and M4 remoteproc support in patch 4/4.

This patch series was tested on am64x EVM using commands:

=> setenv dorprocboot 1
=> run boot_rprocs

Changes since v2:
- Cleanup unused labels
- Remove optional init and reset functions which do not do anything
- In stop, call unprepare() instead of ti_sci_proc_power_domain_off() Since it is already a wrapper for ti_sci_proc_power_domain_off

Hari Nagalla (4):
remoteproc: k3-m4: Introduce K3 remote proc driver for M4 subsystem
remoteproc: k3-r5: Add support for R5F cores on AM64x SoCs
env: ti: am64x: set rproc_fw_binaries
configs: am64x_evm_a53_defconfig: Enable R5F and M4 remote proc
support

 board/ti/am64x/am64x.env             |   6 +
 configs/am64x_evm_a53_defconfig      |   2 +
 drivers/remoteproc/Kconfig           |  10 +
 drivers/remoteproc/Makefile          |   1 +
 drivers/remoteproc/ti_k3_m4_rproc.c  | 370 +++++++++++++++++++++++++++
 drivers/remoteproc/ti_k3_r5f_rproc.c |   2 +
 6 files changed, 391 insertions(+)
 create mode 100644 drivers/remoteproc/ti_k3_m4_rproc.c

base-commit: 021baf7b08cceb58bb850859dba1614424e16a83

Signature · 1 line
2.48.0
#1 lore raw

PATCH v3 1/4 remoteproc: k3-m4: Introduce K3 remote proc driver for M4 subsystem

From: Hari Nagalla <[email protected]>

Some K3 devices like AM64, AM62 devices have a M4 processor in MCU voltage domain.

Add a remote proc driver to support this subsystem to be able to load and boot the M4 core.

[Judith: Fixed comments, cleanup driver by removing uses_lreset
which is always enabled for M4 remoteproc, fixed warnings]

---
Changes since v2:
- Cleanup unused labels
- Remove optional init and reset functions which do not do anything
- In stop, call unprepare() instead of ti_sci_proc_power_domain_off() Since it is already a wrapper for ti_sci_proc_power_domain_off

---
 drivers/remoteproc/Kconfig          |  10 +
 drivers/remoteproc/Makefile         |   1 +
 drivers/remoteproc/ti_k3_m4_rproc.c | 370 ++++++++++++++++++++++++++++
 3 files changed, 381 insertions(+)
 create mode 100644 drivers/remoteproc/ti_k3_m4_rproc.c
drivers/remoteproc/Kconfig +10 -0
index 2790b168b19..8a5d88917d6 100644
@@ -70,6 +70,16 @@ config REMOTEPROC_TI_K3_DSP
 	  on various TI K3 family of SoCs through the remote processor
 	  framework.
 
+config REMOTEPROC_TI_K3_M4F
+	bool "TI K3 M4F remoteproc support"
+	select REMOTEPROC
+	depends on ARCH_K3
+	depends on TI_SCI_PROTOCOL
+	help
+	  Say y here to support TI's M4F remote processor subsystems
+	  on various TI K3 family of SoCs through the remote processor
+	  framework.
+
 config REMOTEPROC_TI_K3_R5F
 	bool "TI K3 R5F remoteproc support"
 	select REMOTEPROC
drivers/remoteproc/Makefile +1 -0
index 3a092b7660e..f81e5009c5e 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_REMOTEPROC_SANDBOX) += sandbox_testproc.o
 obj-$(CONFIG_REMOTEPROC_STM32_COPRO) += stm32_copro.o
 obj-$(CONFIG_REMOTEPROC_TI_K3_ARM64) += ti_k3_arm64_rproc.o
 obj-$(CONFIG_REMOTEPROC_TI_K3_DSP) += ti_k3_dsp_rproc.o
+obj-$(CONFIG_REMOTEPROC_TI_K3_M4F) += ti_k3_m4_rproc.o
 obj-$(CONFIG_REMOTEPROC_TI_K3_R5F) += ti_k3_r5f_rproc.o
 obj-$(CONFIG_REMOTEPROC_TI_POWER) += ti_power_proc.o
 obj-$(CONFIG_REMOTEPROC_TI_PRU) += pru_rproc.o
drivers/remoteproc/ti_k3_m4_rproc.c new file +370 -0

370 lines not on this page · raw message

Signature · 1 line
2.48.0
#2 lore raw

PATCH v3 2/4 remoteproc: k3-r5: Add support for R5F cores on AM64x SoCs

In reply to Judith Mendez

From: Hari Nagalla <[email protected]>

AM64x SoCs have two R5F clusters in the main power domain. Extend support for R5F remote proc driver on AM64x with compatible strings.

---
Changes since v2:
- No change

---
 drivers/remoteproc/ti_k3_r5f_rproc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/remoteproc/ti_k3_r5f_rproc.c +2 -0
index d78b3fa1bbd..57268e7f8ff 100644
@@ -886,6 +886,7 @@ static const struct udevice_id k3_r5f_rproc_ids[] = {
 	{ .compatible = "ti,j7200-r5f", .data = (ulong)&j7200_j721s2_data, },
 	{ .compatible = "ti,j721s2-r5f", .data = (ulong)&j7200_j721s2_data, },
 	{ .compatible = "ti,am62-r5f", .data = (ulong)&am62_data, },
+	{ .compatible = "ti,am64-r5f", .data = (ulong)&j7200_j721s2_data, },
 	{}
 };
 
@@ -930,6 +931,7 @@ static const struct udevice_id k3_r5fss_ids[] = {
 	{ .compatible = "ti,j7200-r5fss"},
 	{ .compatible = "ti,j721s2-r5fss"},
 	{ .compatible = "ti,am62-r5fss"},
+	{ .compatible = "ti,am64-r5fss"},
 	{}
 };
 
Signature · 1 line
2.48.0
#3 lore raw

PATCH v3 3/4 env: ti: am64x: set rproc_fw_binaries

In reply to Judith Mendez

From: Hari Nagalla <[email protected]>

Set remote proc FW binaries for u-boot loading of remote cores.

---
Changes since v2:
- No change

---
 board/ti/am64x/am64x.env | 6 ++++++
 1 file changed, 6 insertions(+)
board/ti/am64x/am64x.env +6 -0
index 8ad805a613c..43e557b8ec7 100644
@@ -2,6 +2,10 @@
 #include <env/ti/mmc.env>
 #include <env/ti/k3_dfu.env>
 
+#if CONFIG_CMD_REMOTEPROC
+#include <env/ti/k3_rproc.env>
+#endif
+
 name_kern=Image
 console=ttyS2,115200n8
 args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
@@ -14,6 +18,8 @@ bootpart=1:2
 bootdir=/boot
 rd_spec=-
 
+rproc_fw_binaries= 0 /lib/firmware/am64-mcu-m4f0_0-fw 1 /lib/firmware/am64-main-r5f0_0-fw 2 /lib/firmware/am64-main-r5f0_1-fw 3 /lib/firmware/am64-main-r5f1_0-fw 4 /lib/firmware/am64-main-r5f1_1-fw
+
 args_usb=run finduuid;setenv bootargs console=${console}
 	${optargs}
 	root=PARTUUID=${uuid} rw
Signature · 1 line
2.48.0
#4 lore raw

PATCH v3 4/4 configs: am64x_evm_a53_defconfig: Enable R5F and M4 remote proc support

In reply to Judith Mendez

From: Hari Nagalla <[email protected]>

Add support for R5F and M4 remoteproc drivers.

---
Changes since v2:
- No change

---
 configs/am64x_evm_a53_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/am64x_evm_a53_defconfig +2 -0
index a501f3f567e..3036b427974 100644
@@ -151,6 +151,8 @@ CONFIG_K3_SYSTEM_CONTROLLER=y
 CONFIG_REMOTEPROC_TI_K3_ARM64=y
 CONFIG_REMOTEPROC_TI_PRU=y
 CONFIG_CMD_REMOTEPROC=y
+CONFIG_REMOTEPROC_TI_K3_R5F=y
+CONFIG_REMOTEPROC_TI_K3_M4F=y
 CONFIG_RESET_TI_SCI=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_EMULATION=y
Signature · 1 line
2.48.0
#5 lore raw
In reply to Judith Mendez

Hi all,

Quoted 4 lines · Judith Mendez

Some K3 devices like am62x and am64x have a M4 processor in the MCU voltage domain. This patch series introduces remoteproc M4 driver which will be used to load firmware into and start the M4 remote core.

Quoted 9 lines

This series also adds support for R5F cores on am64x SoCs in patch 2/4, sets up environment to load FW in remote cores in patch 3/4, and enables config options for R5F and M4 remoteproc support in patch 4/4.

This patch series was tested on am64x EVM using commands:

=> setenv dorprocboot 1
=> run boot_rprocs

I have missed one warning introduced by the driver in this patch series, so will respin one more time to add the fix.

~ Judith