xref: /linux/drivers/firmware/arm_scmi/Kconfig (revision 34f7c6e7d4396090692a09789db231e12cb4762b)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "ARM System Control and Management Interface Protocol"
3
4config ARM_SCMI_PROTOCOL
5	tristate "ARM System Control and Management Interface (SCMI) Message Protocol"
6	depends on ARM || ARM64 || COMPILE_TEST
7	help
8	  ARM System Control and Management Interface (SCMI) protocol is a
9	  set of operating system-independent software interfaces that are
10	  used in system management. SCMI is extensible and currently provides
11	  interfaces for: Discovery and self-description of the interfaces
12	  it supports, Power domain management which is the ability to place
13	  a given device or domain into the various power-saving states that
14	  it supports, Performance management which is the ability to control
15	  the performance of a domain that is composed of compute engines
16	  such as application processors and other accelerators, Clock
17	  management which is the ability to set and inquire rates on platform
18	  managed clocks and Sensor management which is the ability to read
19	  sensor data, and be notified of sensor value.
20
21	  This protocol library provides interface for all the client drivers
22	  making use of the features offered by the SCMI.
23
24if ARM_SCMI_PROTOCOL
25
26config ARM_SCMI_HAVE_TRANSPORT
27	bool
28	help
29	  This declares whether at least one SCMI transport has been configured.
30	  Used to trigger a build bug when trying to build SCMI without any
31	  configured transport.
32
33config ARM_SCMI_HAVE_SHMEM
34	bool
35	help
36	  This declares whether a shared memory based transport for SCMI is
37	  available.
38
39config ARM_SCMI_HAVE_MSG
40	bool
41	help
42	  This declares whether a message passing based transport for SCMI is
43	  available.
44
45config ARM_SCMI_TRANSPORT_MAILBOX
46	bool "SCMI transport based on Mailbox"
47	depends on MAILBOX
48	select ARM_SCMI_HAVE_TRANSPORT
49	select ARM_SCMI_HAVE_SHMEM
50	default y
51	help
52	  Enable mailbox based transport for SCMI.
53
54	  If you want the ARM SCMI PROTOCOL stack to include support for a
55	  transport based on mailboxes, answer Y.
56
57config ARM_SCMI_TRANSPORT_OPTEE
58	bool "SCMI transport based on OP-TEE service"
59	depends on OPTEE=y || OPTEE=ARM_SCMI_PROTOCOL
60	select ARM_SCMI_HAVE_TRANSPORT
61	select ARM_SCMI_HAVE_SHMEM
62	default y
63	help
64	  This enables the OP-TEE service based transport for SCMI.
65
66	  If you want the ARM SCMI PROTOCOL stack to include support for a
67	  transport based on OP-TEE SCMI service, answer Y.
68
69config ARM_SCMI_TRANSPORT_SMC
70	bool "SCMI transport based on SMC"
71	depends on HAVE_ARM_SMCCC_DISCOVERY
72	select ARM_SCMI_HAVE_TRANSPORT
73	select ARM_SCMI_HAVE_SHMEM
74	default y
75	help
76	  Enable SMC based transport for SCMI.
77
78	  If you want the ARM SCMI PROTOCOL stack to include support for a
79	  transport based on SMC, answer Y.
80
81config ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE
82	bool "Enable atomic mode support for SCMI SMC transport"
83	depends on ARM_SCMI_TRANSPORT_SMC
84	help
85	  Enable support of atomic operation for SCMI SMC based transport.
86
87	  If you want the SCMI SMC based transport to operate in atomic
88	  mode, avoiding any kind of sleeping behaviour for selected
89	  transactions on the TX path, answer Y.
90	  Enabling atomic mode operations allows any SCMI driver using this
91	  transport to optionally ask for atomic SCMI transactions and operate
92	  in atomic context too, at the price of using a number of busy-waiting
93	  primitives all over instead. If unsure say N.
94
95config ARM_SCMI_TRANSPORT_VIRTIO
96	bool "SCMI transport based on VirtIO"
97	depends on VIRTIO=y || VIRTIO=ARM_SCMI_PROTOCOL
98	select ARM_SCMI_HAVE_TRANSPORT
99	select ARM_SCMI_HAVE_MSG
100	help
101	  This enables the virtio based transport for SCMI.
102
103	  If you want the ARM SCMI PROTOCOL stack to include support for a
104	  transport based on VirtIO, answer Y.
105
106config ARM_SCMI_TRANSPORT_VIRTIO_VERSION1_COMPLIANCE
107	bool "SCMI VirtIO transport Version 1 compliance"
108	depends on ARM_SCMI_TRANSPORT_VIRTIO
109	default y
110	help
111	  This enforces strict compliance with VirtIO Version 1 specification.
112
113	  If you want the ARM SCMI VirtIO transport layer to refuse to work
114	  with Legacy VirtIO backends and instead support only VirtIO Version 1
115	  devices (or above), answer Y.
116
117	  If you want instead to support also old Legacy VirtIO backends (like
118	  the ones implemented by kvmtool) and let the core Kernel VirtIO layer
119	  take care of the needed conversions, say N.
120
121config ARM_SCMI_TRANSPORT_VIRTIO_ATOMIC_ENABLE
122	bool "Enable atomic mode for SCMI VirtIO transport"
123	depends on ARM_SCMI_TRANSPORT_VIRTIO
124	help
125	  Enable support of atomic operation for SCMI VirtIO based transport.
126
127	  If you want the SCMI VirtIO based transport to operate in atomic
128	  mode, avoiding any kind of sleeping behaviour for selected
129	  transactions on the TX path, answer Y.
130
131	  Enabling atomic mode operations allows any SCMI driver using this
132	  transport to optionally ask for atomic SCMI transactions and operate
133	  in atomic context too, at the price of using a number of busy-waiting
134	  primitives all over instead. If unsure say N.
135
136endif #ARM_SCMI_PROTOCOL
137
138config ARM_SCMI_POWER_DOMAIN
139	tristate "SCMI power domain driver"
140	depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
141	default y
142	select PM_GENERIC_DOMAINS if PM
143	help
144	  This enables support for the SCMI power domains which can be
145	  enabled or disabled via the SCP firmware
146
147	  This driver can also be built as a module.  If so, the module
148	  will be called scmi_pm_domain. Note this may needed early in boot
149	  before rootfs may be available.
150
151endmenu
152