162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_cimenu "ARM System Control and Management Interface Protocol" 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciconfig ARM_SCMI_PROTOCOL 562306a36Sopenharmony_ci tristate "ARM System Control and Management Interface (SCMI) Message Protocol" 662306a36Sopenharmony_ci depends on ARM || ARM64 || COMPILE_TEST 762306a36Sopenharmony_ci help 862306a36Sopenharmony_ci ARM System Control and Management Interface (SCMI) protocol is a 962306a36Sopenharmony_ci set of operating system-independent software interfaces that are 1062306a36Sopenharmony_ci used in system management. SCMI is extensible and currently provides 1162306a36Sopenharmony_ci interfaces for: Discovery and self-description of the interfaces 1262306a36Sopenharmony_ci it supports, Power domain management which is the ability to place 1362306a36Sopenharmony_ci a given device or domain into the various power-saving states that 1462306a36Sopenharmony_ci it supports, Performance management which is the ability to control 1562306a36Sopenharmony_ci the performance of a domain that is composed of compute engines 1662306a36Sopenharmony_ci such as application processors and other accelerators, Clock 1762306a36Sopenharmony_ci management which is the ability to set and inquire rates on platform 1862306a36Sopenharmony_ci managed clocks and Sensor management which is the ability to read 1962306a36Sopenharmony_ci sensor data, and be notified of sensor value. 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci This protocol library provides interface for all the client drivers 2262306a36Sopenharmony_ci making use of the features offered by the SCMI. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciif ARM_SCMI_PROTOCOL 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciconfig ARM_SCMI_NEED_DEBUGFS 2762306a36Sopenharmony_ci bool 2862306a36Sopenharmony_ci help 2962306a36Sopenharmony_ci This declares whether at least one SCMI facility is configured 3062306a36Sopenharmony_ci which needs debugfs support. When selected causess the creation 3162306a36Sopenharmony_ci of a common SCMI debugfs root directory. 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ciconfig ARM_SCMI_RAW_MODE_SUPPORT 3462306a36Sopenharmony_ci bool "Enable support for SCMI Raw transmission mode" 3562306a36Sopenharmony_ci depends on DEBUG_FS 3662306a36Sopenharmony_ci select ARM_SCMI_NEED_DEBUGFS 3762306a36Sopenharmony_ci help 3862306a36Sopenharmony_ci Enable support for SCMI Raw transmission mode. 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci If enabled allows the direct injection and snooping of SCMI bare 4162306a36Sopenharmony_ci messages through a dedicated debugfs interface. 4262306a36Sopenharmony_ci It is meant to be used by SCMI compliance/testing suites. 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci When enabled regular SCMI drivers interactions are inhibited in 4562306a36Sopenharmony_ci order to avoid unexpected interactions with the SCMI Raw message 4662306a36Sopenharmony_ci flow. If unsure say N. 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ciconfig ARM_SCMI_RAW_MODE_SUPPORT_COEX 4962306a36Sopenharmony_ci bool "Allow SCMI Raw mode coexistence with normal SCMI stack" 5062306a36Sopenharmony_ci depends on ARM_SCMI_RAW_MODE_SUPPORT 5162306a36Sopenharmony_ci help 5262306a36Sopenharmony_ci Allow SCMI Raw transmission mode to coexist with normal SCMI stack. 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci This will allow regular SCMI drivers to register with the core and 5562306a36Sopenharmony_ci operate normally, thing which could make an SCMI test suite using the 5662306a36Sopenharmony_ci SCMI Raw mode support unreliable. If unsure, say N. 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ciconfig ARM_SCMI_HAVE_TRANSPORT 5962306a36Sopenharmony_ci bool 6062306a36Sopenharmony_ci help 6162306a36Sopenharmony_ci This declares whether at least one SCMI transport has been configured. 6262306a36Sopenharmony_ci Used to trigger a build bug when trying to build SCMI without any 6362306a36Sopenharmony_ci configured transport. 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ciconfig ARM_SCMI_HAVE_SHMEM 6662306a36Sopenharmony_ci bool 6762306a36Sopenharmony_ci help 6862306a36Sopenharmony_ci This declares whether a shared memory based transport for SCMI is 6962306a36Sopenharmony_ci available. 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ciconfig ARM_SCMI_HAVE_MSG 7262306a36Sopenharmony_ci bool 7362306a36Sopenharmony_ci help 7462306a36Sopenharmony_ci This declares whether a message passing based transport for SCMI is 7562306a36Sopenharmony_ci available. 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ciconfig ARM_SCMI_TRANSPORT_MAILBOX 7862306a36Sopenharmony_ci bool "SCMI transport based on Mailbox" 7962306a36Sopenharmony_ci depends on MAILBOX 8062306a36Sopenharmony_ci select ARM_SCMI_HAVE_TRANSPORT 8162306a36Sopenharmony_ci select ARM_SCMI_HAVE_SHMEM 8262306a36Sopenharmony_ci default y 8362306a36Sopenharmony_ci help 8462306a36Sopenharmony_ci Enable mailbox based transport for SCMI. 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci If you want the ARM SCMI PROTOCOL stack to include support for a 8762306a36Sopenharmony_ci transport based on mailboxes, answer Y. 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ciconfig ARM_SCMI_TRANSPORT_OPTEE 9062306a36Sopenharmony_ci bool "SCMI transport based on OP-TEE service" 9162306a36Sopenharmony_ci depends on OPTEE=y || OPTEE=ARM_SCMI_PROTOCOL 9262306a36Sopenharmony_ci select ARM_SCMI_HAVE_TRANSPORT 9362306a36Sopenharmony_ci select ARM_SCMI_HAVE_SHMEM 9462306a36Sopenharmony_ci select ARM_SCMI_HAVE_MSG 9562306a36Sopenharmony_ci default y 9662306a36Sopenharmony_ci help 9762306a36Sopenharmony_ci This enables the OP-TEE service based transport for SCMI. 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci If you want the ARM SCMI PROTOCOL stack to include support for a 10062306a36Sopenharmony_ci transport based on OP-TEE SCMI service, answer Y. 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ciconfig ARM_SCMI_TRANSPORT_SMC 10362306a36Sopenharmony_ci bool "SCMI transport based on SMC" 10462306a36Sopenharmony_ci depends on HAVE_ARM_SMCCC_DISCOVERY 10562306a36Sopenharmony_ci select ARM_SCMI_HAVE_TRANSPORT 10662306a36Sopenharmony_ci select ARM_SCMI_HAVE_SHMEM 10762306a36Sopenharmony_ci default y 10862306a36Sopenharmony_ci help 10962306a36Sopenharmony_ci Enable SMC based transport for SCMI. 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci If you want the ARM SCMI PROTOCOL stack to include support for a 11262306a36Sopenharmony_ci transport based on SMC, answer Y. 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ciconfig ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE 11562306a36Sopenharmony_ci bool "Enable atomic mode support for SCMI SMC transport" 11662306a36Sopenharmony_ci depends on ARM_SCMI_TRANSPORT_SMC 11762306a36Sopenharmony_ci help 11862306a36Sopenharmony_ci Enable support of atomic operation for SCMI SMC based transport. 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci If you want the SCMI SMC based transport to operate in atomic 12162306a36Sopenharmony_ci mode, avoiding any kind of sleeping behaviour for selected 12262306a36Sopenharmony_ci transactions on the TX path, answer Y. 12362306a36Sopenharmony_ci Enabling atomic mode operations allows any SCMI driver using this 12462306a36Sopenharmony_ci transport to optionally ask for atomic SCMI transactions and operate 12562306a36Sopenharmony_ci in atomic context too, at the price of using a number of busy-waiting 12662306a36Sopenharmony_ci primitives all over instead. If unsure say N. 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ciconfig ARM_SCMI_TRANSPORT_VIRTIO 12962306a36Sopenharmony_ci bool "SCMI transport based on VirtIO" 13062306a36Sopenharmony_ci depends on VIRTIO=y || VIRTIO=ARM_SCMI_PROTOCOL 13162306a36Sopenharmony_ci select ARM_SCMI_HAVE_TRANSPORT 13262306a36Sopenharmony_ci select ARM_SCMI_HAVE_MSG 13362306a36Sopenharmony_ci help 13462306a36Sopenharmony_ci This enables the virtio based transport for SCMI. 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci If you want the ARM SCMI PROTOCOL stack to include support for a 13762306a36Sopenharmony_ci transport based on VirtIO, answer Y. 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ciconfig ARM_SCMI_TRANSPORT_VIRTIO_VERSION1_COMPLIANCE 14062306a36Sopenharmony_ci bool "SCMI VirtIO transport Version 1 compliance" 14162306a36Sopenharmony_ci depends on ARM_SCMI_TRANSPORT_VIRTIO 14262306a36Sopenharmony_ci default y 14362306a36Sopenharmony_ci help 14462306a36Sopenharmony_ci This enforces strict compliance with VirtIO Version 1 specification. 14562306a36Sopenharmony_ci 14662306a36Sopenharmony_ci If you want the ARM SCMI VirtIO transport layer to refuse to work 14762306a36Sopenharmony_ci with Legacy VirtIO backends and instead support only VirtIO Version 1 14862306a36Sopenharmony_ci devices (or above), answer Y. 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci If you want instead to support also old Legacy VirtIO backends (like 15162306a36Sopenharmony_ci the ones implemented by kvmtool) and let the core Kernel VirtIO layer 15262306a36Sopenharmony_ci take care of the needed conversions, say N. 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ciconfig ARM_SCMI_TRANSPORT_VIRTIO_ATOMIC_ENABLE 15562306a36Sopenharmony_ci bool "Enable atomic mode for SCMI VirtIO transport" 15662306a36Sopenharmony_ci depends on ARM_SCMI_TRANSPORT_VIRTIO 15762306a36Sopenharmony_ci help 15862306a36Sopenharmony_ci Enable support of atomic operation for SCMI VirtIO based transport. 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ci If you want the SCMI VirtIO based transport to operate in atomic 16162306a36Sopenharmony_ci mode, avoiding any kind of sleeping behaviour for selected 16262306a36Sopenharmony_ci transactions on the TX path, answer Y. 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci Enabling atomic mode operations allows any SCMI driver using this 16562306a36Sopenharmony_ci transport to optionally ask for atomic SCMI transactions and operate 16662306a36Sopenharmony_ci in atomic context too, at the price of using a number of busy-waiting 16762306a36Sopenharmony_ci primitives all over instead. If unsure say N. 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ciendif #ARM_SCMI_PROTOCOL 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ciconfig ARM_SCMI_POWER_DOMAIN 17262306a36Sopenharmony_ci tristate "SCMI power domain driver" 17362306a36Sopenharmony_ci depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF) 17462306a36Sopenharmony_ci default y 17562306a36Sopenharmony_ci select PM_GENERIC_DOMAINS if PM 17662306a36Sopenharmony_ci help 17762306a36Sopenharmony_ci This enables support for the SCMI power domains which can be 17862306a36Sopenharmony_ci enabled or disabled via the SCP firmware 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci This driver can also be built as a module. If so, the module 18162306a36Sopenharmony_ci will be called scmi_pm_domain. Note this may needed early in boot 18262306a36Sopenharmony_ci before rootfs may be available. 18362306a36Sopenharmony_ci 18462306a36Sopenharmony_ciconfig ARM_SCMI_POWER_CONTROL 18562306a36Sopenharmony_ci tristate "SCMI system power control driver" 18662306a36Sopenharmony_ci depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF) 18762306a36Sopenharmony_ci help 18862306a36Sopenharmony_ci This enables System Power control logic which binds system shutdown or 18962306a36Sopenharmony_ci reboot actions to SCMI System Power notifications generated by SCP 19062306a36Sopenharmony_ci firmware. 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci This driver can also be built as a module. If so, the module will be 19362306a36Sopenharmony_ci called scmi_power_control. Note this may needed early in boot to catch 19462306a36Sopenharmony_ci early shutdown/reboot SCMI requests. 19562306a36Sopenharmony_ci 19662306a36Sopenharmony_ciendmenu 197