mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
6dedbd1d54
The TI K3 family of SoCs typically have one or more dual-core Arm Cortex R5F processor clusters/subsystems (R5FSS). This R5F subsystem/cluster can be configured at boot time to be either run in a LockStep mode or in an Asymmetric Multi Processing (AMP) fashion in Split-mode. This subsystem has 64 KB each Tightly-Coupled Memory (TCM) internal memories for each core split between two banks - TCMA and TCMB (further interleaved into two banks). The subsystem does not have an MMU, but has a Region Address Translater (RAT) module that is accessible only from the R5Fs for providing translations between 32-bit CPU addresses into larger system bus addresses. Add a remoteproc driver to support this subsystem to be able to load and boot the R5F cores primarily in LockStep mode. The code also includes the base support for Split mode. Error Recovery and Power Management features are not currently supported. Loading support includes the internal TCMs and DDR. RAT support is left for a future patch, and as such the reserved memory carveout regions are all expected to be using memory regions within the first 2 GB. The R5F remote processors do not have an MMU, and so require fixed memory carveout regions matching the firmware image addresses. Support for this is provided by mandating multiple memory regions to be attached to the remoteproc device. The first memory region will be used to serve as the DMA pool for all dynamic allocations like the vrings and vring buffers. The remaining memory regions are mapped into the kernel at device probe time, and are used to provide address translations for firmware image segments without the need for any RSC_CARVEOUT entries. Any firmware image using memory outside of the supplied reserved memory carveout regions will be errored out. The R5F processors on TI K3 SoCs require a specific sequence for booting and shutting down the processors. This sequence is also dependent on the mode (LockStep or Split) the R5F cluster is configured for. The R5F cores have a Memory Protection Unit (MPU) that has a default configuration that does not allow the cores to run out of DDR out of reset. This is resolved by using the TCMs for boot-strapping code that applies the appropriate executable permissions on desired DDR memory. The loading into the TCMs requires that the resets be released first with the cores in halted state. The Power Sleep Controller (PSC) module on K3 SoCs requires that the cores be in WFI/WFE states with no active bus transactions before the cores can be put back into reset. Support for this is provided by using the newly introduced .prepare() and .unprepare() ops in the remoteproc core. The .prepare() ops is invoked before any loading, and the .unprepare() ops is invoked after the remoteproc resource cleanup. The R5F core resets are deasserted in .prepare() and asserted in .unprepare(), and the cores themselves are started and halted in .start() and .stop() ops. This ensures symmetric usage and allows the R5F cores state machine to be maintained properly between using the sysfs 'state' variable, bind/unbind and regular module load/unload flows. The subsystem is represented as a single remoteproc in LockStep mode, and as two remoteprocs in Split mode. The driver uses various TI-SCI interfaces to talk to the System Controller (DMSC) for managing configuration, power and reset management of these cores. IPC between the A53 cores and the R5 cores is supported through the virtio rpmsg stack using shared memory and OMAP Mailboxes. The AM65x SoCs typically have a single R5FSS in the MCU voltage domain. The J721E SoCs uses a slightly revised IP and typically have three R5FSSs, with one cluster present within the MCU voltage domain (MCU_R5FSS0), and the remaining two clusters present in the MAIN voltage domain (MAIN_R5FSS0 and MAIN_R5FSS1). The integration of these clusters on J721E SoC is also slightly different in that these IPs do support an actual local reset line, while they are a no-op on AM65x SoCs. Signed-off-by: Suman Anna <s-anna@ti.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20201002234234.20704-3-s-anna@ti.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
294 lines
8.6 KiB
Plaintext
294 lines
8.6 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
menu "Remoteproc drivers"
|
|
|
|
config REMOTEPROC
|
|
bool "Support for Remote Processor subsystem"
|
|
depends on HAS_DMA
|
|
select CRC32
|
|
select FW_LOADER
|
|
select VIRTIO
|
|
select WANT_DEV_COREDUMP
|
|
help
|
|
Support for remote processors (such as DSP coprocessors). These
|
|
are mainly used on embedded systems.
|
|
|
|
if REMOTEPROC
|
|
|
|
config REMOTEPROC_CDEV
|
|
bool "Remoteproc character device interface"
|
|
help
|
|
Say y here to have a character device interface for the remoteproc
|
|
framework. Userspace can boot/shutdown remote processors through
|
|
this interface.
|
|
|
|
It's safe to say N if you don't want to use this interface.
|
|
|
|
config IMX_REMOTEPROC
|
|
tristate "IMX6/7 remoteproc support"
|
|
depends on ARCH_MXC
|
|
help
|
|
Say y here to support iMX's remote processors (Cortex M4
|
|
on iMX7D) via the remote processor framework.
|
|
|
|
It's safe to say N here.
|
|
|
|
config INGENIC_VPU_RPROC
|
|
tristate "Ingenic JZ47xx VPU remoteproc support"
|
|
depends on MIPS || COMPILE_TEST
|
|
help
|
|
Say y or m here to support the VPU in the JZ47xx SoCs from Ingenic.
|
|
|
|
This can be either built-in or a loadable module.
|
|
If unsure say N.
|
|
|
|
config MTK_SCP
|
|
tristate "Mediatek SCP support"
|
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
|
select RPMSG_MTK_SCP
|
|
help
|
|
Say y here to support Mediatek's System Companion Processor (SCP) via
|
|
the remote processor framework.
|
|
|
|
It's safe to say N here.
|
|
|
|
config OMAP_REMOTEPROC
|
|
tristate "OMAP remoteproc support"
|
|
depends on ARCH_OMAP4 || SOC_OMAP5 || SOC_DRA7XX
|
|
depends on OMAP_IOMMU
|
|
select MAILBOX
|
|
select OMAP2PLUS_MBOX
|
|
help
|
|
Say y here to support OMAP's remote processors (dual M3
|
|
and DSP on OMAP4) via the remote processor framework.
|
|
|
|
Currently only supported on OMAP4.
|
|
|
|
Usually you want to say Y here, in order to enable multimedia
|
|
use-cases to run on your platform (multimedia codecs are
|
|
offloaded to remote DSP processors using this framework).
|
|
|
|
It's safe to say N here if you're not interested in multimedia
|
|
offloading or just want a bare minimum kernel.
|
|
|
|
config OMAP_REMOTEPROC_WATCHDOG
|
|
bool "OMAP remoteproc watchdog timer"
|
|
depends on OMAP_REMOTEPROC
|
|
default n
|
|
help
|
|
Say Y here to enable watchdog timer for remote processors.
|
|
|
|
This option controls the watchdog functionality for the remote
|
|
processors in OMAP. Dedicated OMAP DMTimers are used by the remote
|
|
processors and triggers the timer interrupt upon a watchdog
|
|
detection.
|
|
|
|
config WKUP_M3_RPROC
|
|
tristate "AMx3xx Wakeup M3 remoteproc support"
|
|
depends on SOC_AM33XX || SOC_AM43XX
|
|
help
|
|
Say y here to support Wakeup M3 remote processor on TI AM33xx
|
|
and AM43xx family of SoCs.
|
|
|
|
Required for Suspend-to-RAM on AM33xx and AM43xx SoCs. Also needed
|
|
for deep CPUIdle states on AM33xx SoCs. Allows for loading of the
|
|
firmware onto these remote processors.
|
|
If unsure say N.
|
|
|
|
config DA8XX_REMOTEPROC
|
|
tristate "DA8xx/OMAP-L13x remoteproc support"
|
|
depends on ARCH_DAVINCI_DA8XX
|
|
depends on DMA_CMA
|
|
help
|
|
Say y here to support DA8xx/OMAP-L13x remote processors via the
|
|
remote processor framework.
|
|
|
|
You want to say y here in order to enable AMP
|
|
use-cases to run on your platform (multimedia codecs are
|
|
offloaded to remote DSP processors using this framework).
|
|
|
|
This module controls the name of the firmware file that gets
|
|
loaded on the DSP. This file must reside in the /lib/firmware
|
|
directory. It can be specified via the module parameter
|
|
da8xx_fw_name=<filename>, and if not specified will default to
|
|
"rproc-dsp-fw".
|
|
|
|
It's safe to say n here if you're not interested in multimedia
|
|
offloading.
|
|
|
|
config KEYSTONE_REMOTEPROC
|
|
tristate "Keystone Remoteproc support"
|
|
depends on ARCH_KEYSTONE
|
|
help
|
|
Say Y here here to support Keystone remote processors (DSP)
|
|
via the remote processor framework.
|
|
|
|
It's safe to say N here if you're not interested in the Keystone
|
|
DSPs or just want to use a bare minimum kernel.
|
|
|
|
config QCOM_PIL_INFO
|
|
tristate
|
|
|
|
config QCOM_RPROC_COMMON
|
|
tristate
|
|
|
|
config QCOM_Q6V5_COMMON
|
|
tristate
|
|
depends on ARCH_QCOM
|
|
depends on QCOM_SMEM
|
|
|
|
config QCOM_Q6V5_ADSP
|
|
tristate "Qualcomm Technology Inc ADSP Peripheral Image Loader"
|
|
depends on OF && ARCH_QCOM
|
|
depends on QCOM_SMEM
|
|
depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
|
|
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
|
|
depends on QCOM_SYSMON || QCOM_SYSMON=n
|
|
select MFD_SYSCON
|
|
select QCOM_PIL_INFO
|
|
select QCOM_MDT_LOADER
|
|
select QCOM_Q6V5_COMMON
|
|
select QCOM_RPROC_COMMON
|
|
help
|
|
Say y here to support the Peripheral Image Loader
|
|
for the Qualcomm Technology Inc. ADSP remote processors.
|
|
|
|
config QCOM_Q6V5_MSS
|
|
tristate "Qualcomm Hexagon V5 self-authenticating modem subsystem support"
|
|
depends on OF && ARCH_QCOM
|
|
depends on QCOM_SMEM
|
|
depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
|
|
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
|
|
depends on QCOM_SYSMON || QCOM_SYSMON=n
|
|
select MFD_SYSCON
|
|
select QCOM_MDT_LOADER
|
|
select QCOM_PIL_INFO
|
|
select QCOM_Q6V5_COMMON
|
|
select QCOM_RPROC_COMMON
|
|
select QCOM_SCM
|
|
help
|
|
Say y here to support the Qualcomm self-authenticating modem
|
|
subsystem based on Hexagon V5.
|
|
|
|
config QCOM_Q6V5_PAS
|
|
tristate "Qualcomm Hexagon v5 Peripheral Authentication Service support"
|
|
depends on OF && ARCH_QCOM
|
|
depends on QCOM_SMEM
|
|
depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
|
|
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
|
|
depends on QCOM_SYSMON || QCOM_SYSMON=n
|
|
select MFD_SYSCON
|
|
select QCOM_PIL_INFO
|
|
select QCOM_MDT_LOADER
|
|
select QCOM_Q6V5_COMMON
|
|
select QCOM_RPROC_COMMON
|
|
select QCOM_SCM
|
|
help
|
|
Say y here to support the TrustZone based Peripherial Image Loader
|
|
for the Qualcomm Hexagon v5 based remote processors. This is commonly
|
|
used to control subsystems such as ADSP, Compute and Sensor.
|
|
|
|
config QCOM_Q6V5_WCSS
|
|
tristate "Qualcomm Hexagon based WCSS Peripheral Image Loader"
|
|
depends on OF && ARCH_QCOM
|
|
depends on QCOM_SMEM
|
|
depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
|
|
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
|
|
depends on QCOM_SYSMON || QCOM_SYSMON=n
|
|
select MFD_SYSCON
|
|
select QCOM_MDT_LOADER
|
|
select QCOM_PIL_INFO
|
|
select QCOM_Q6V5_COMMON
|
|
select QCOM_RPROC_COMMON
|
|
select QCOM_SCM
|
|
help
|
|
Say y here to support the Qualcomm Peripheral Image Loader for the
|
|
Hexagon V5 based WCSS remote processors.
|
|
|
|
config QCOM_SYSMON
|
|
tristate "Qualcomm sysmon driver"
|
|
depends on RPMSG
|
|
depends on ARCH_QCOM
|
|
depends on NET
|
|
select QCOM_QMI_HELPERS
|
|
help
|
|
The sysmon driver implements a sysmon QMI client and a handler for
|
|
the sys_mon SMD and GLINK channel, which are used for graceful
|
|
shutdown, retrieving failure information and propagating information
|
|
about other subsystems being shut down.
|
|
|
|
Say y here if your system runs firmware on any other subsystems, e.g.
|
|
modem or DSP.
|
|
|
|
config QCOM_WCNSS_PIL
|
|
tristate "Qualcomm WCNSS Peripheral Image Loader"
|
|
depends on OF && ARCH_QCOM
|
|
depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
|
|
depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
|
|
depends on QCOM_SMEM
|
|
depends on QCOM_SYSMON || QCOM_SYSMON=n
|
|
select QCOM_MDT_LOADER
|
|
select QCOM_PIL_INFO
|
|
select QCOM_RPROC_COMMON
|
|
select QCOM_SCM
|
|
help
|
|
Say y here to support the Peripheral Image Loader for the Qualcomm
|
|
Wireless Connectivity Subsystem.
|
|
|
|
config ST_REMOTEPROC
|
|
tristate "ST remoteproc support"
|
|
depends on ARCH_STI
|
|
select MAILBOX
|
|
select STI_MBOX
|
|
help
|
|
Say y here to support ST's adjunct processors via the remote
|
|
processor framework.
|
|
This can be either built-in or a loadable module.
|
|
|
|
config ST_SLIM_REMOTEPROC
|
|
tristate
|
|
|
|
config STM32_RPROC
|
|
tristate "STM32 remoteproc support"
|
|
depends on ARCH_STM32
|
|
depends on REMOTEPROC
|
|
select MAILBOX
|
|
help
|
|
Say y here to support STM32 MCU processors via the
|
|
remote processor framework.
|
|
|
|
You want to say y here in order to enable AMP
|
|
use-cases to run on your platform (dedicated firmware could be
|
|
offloaded to remote MCU processors using this framework).
|
|
|
|
This can be either built-in or a loadable module.
|
|
|
|
config TI_K3_DSP_REMOTEPROC
|
|
tristate "TI K3 DSP remoteproc support"
|
|
depends on ARCH_K3
|
|
select MAILBOX
|
|
select OMAP2PLUS_MBOX
|
|
help
|
|
Say m here to support TI's C66x and C71x DSP remote processor
|
|
subsystems on various TI K3 family of SoCs through the remote
|
|
processor framework.
|
|
|
|
It's safe to say N here if you're not interested in utilizing
|
|
the DSP slave processors.
|
|
|
|
config TI_K3_R5_REMOTEPROC
|
|
tristate "TI K3 R5 remoteproc support"
|
|
depends on ARCH_K3
|
|
select MAILBOX
|
|
select OMAP2PLUS_MBOX
|
|
help
|
|
Say m here to support TI's R5F remote processor subsystems
|
|
on various TI K3 family of SoCs through the remote processor
|
|
framework.
|
|
|
|
It's safe to say N here if you're not interested in utilizing
|
|
a slave processor.
|
|
|
|
endif # REMOTEPROC
|
|
|
|
endmenu
|