xref: /openbmc/linux/drivers/firmware/arm_scmi/Kconfig (revision 6f6249a599e52e1a5f0b632f8edff733cfa76450)
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_NEED_DEBUGFS
27	bool
28	help
29	  This declares whether at least one SCMI facility is configured
30	  which needs debugfs support. When selected causess the creation
31	  of a common SCMI debugfs root directory.
32
33config ARM_SCMI_RAW_MODE_SUPPORT
34	bool "Enable support for SCMI Raw transmission mode"
35	depends on DEBUG_FS
36	select ARM_SCMI_NEED_DEBUGFS
37	help
38	  Enable support for SCMI Raw transmission mode.
39
40	  If enabled allows the direct injection and snooping of SCMI bare
41	  messages through a dedicated debugfs interface.
42	  It is meant to be used by SCMI compliance/testing suites.
43
44	  When enabled regular SCMI drivers interactions are inhibited in
45	  order to avoid unexpected interactions with the SCMI Raw message
46	  flow. If unsure say N.
47
48config ARM_SCMI_RAW_MODE_SUPPORT_COEX
49	bool "Allow SCMI Raw mode coexistence with normal SCMI stack"
50	depends on ARM_SCMI_RAW_MODE_SUPPORT
51	help
52	  Allow SCMI Raw transmission mode to coexist with normal SCMI stack.
53
54	  This will allow regular SCMI drivers to register with the core and
55	  operate normally, thing which could make an SCMI test suite using the
56	  SCMI Raw mode support unreliable. If unsure, say N.
57
58config ARM_SCMI_DEBUG_COUNTERS
59	bool "Enable SCMI communication debug metrics tracking"
60	select ARM_SCMI_NEED_DEBUGFS
61	depends on DEBUG_FS
62	default n
63	help
64	  Enables tracking of some key communication metrics for debug
65	  purposes. It may track metrics like how many messages were sent
66	  or received, were there any failures, what kind of failures, ..etc.
67
68	  Enable this option to create a new debugfs directory which contains
69	  such useful debug counters. This can be helpful for debugging and
70	  SCMI monitoring.
71
72config ARM_SCMI_HAVE_TRANSPORT
73	bool
74	help
75	  This declares whether at least one SCMI transport has been configured.
76	  Used to trigger a build bug when trying to build SCMI without any
77	  configured transport.
78
79config ARM_SCMI_HAVE_SHMEM
80	bool
81	help
82	  This declares whether a shared memory based transport for SCMI is
83	  available.
84
85config ARM_SCMI_HAVE_MSG
86	bool
87	help
88	  This declares whether a message passing based transport for SCMI is
89	  available.
90
91config ARM_SCMI_TRANSPORT_MAILBOX
92	bool "SCMI transport based on Mailbox"
93	depends on MAILBOX
94	select ARM_SCMI_HAVE_TRANSPORT
95	select ARM_SCMI_HAVE_SHMEM
96	default y
97	help
98	  Enable mailbox based transport for SCMI.
99
100	  If you want the ARM SCMI PROTOCOL stack to include support for a
101	  transport based on mailboxes, answer Y.
102
103config ARM_SCMI_TRANSPORT_OPTEE
104	bool "SCMI transport based on OP-TEE service"
105	depends on OPTEE=y || OPTEE=ARM_SCMI_PROTOCOL
106	select ARM_SCMI_HAVE_TRANSPORT
107	select ARM_SCMI_HAVE_SHMEM
108	select ARM_SCMI_HAVE_MSG
109	default y
110	help
111	  This enables the OP-TEE service based transport for SCMI.
112
113	  If you want the ARM SCMI PROTOCOL stack to include support for a
114	  transport based on OP-TEE SCMI service, answer Y.
115
116config ARM_SCMI_TRANSPORT_SMC
117	bool "SCMI transport based on SMC"
118	depends on HAVE_ARM_SMCCC_DISCOVERY
119	select ARM_SCMI_HAVE_TRANSPORT
120	select ARM_SCMI_HAVE_SHMEM
121	default y
122	help
123	  Enable SMC based transport for SCMI.
124
125	  If you want the ARM SCMI PROTOCOL stack to include support for a
126	  transport based on SMC, answer Y.
127
128config ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE
129	bool "Enable atomic mode support for SCMI SMC transport"
130	depends on ARM_SCMI_TRANSPORT_SMC
131	help
132	  Enable support of atomic operation for SCMI SMC based transport.
133
134	  If you want the SCMI SMC based transport to operate in atomic
135	  mode, avoiding any kind of sleeping behaviour for selected
136	  transactions on the TX path, answer Y.
137	  Enabling atomic mode operations allows any SCMI driver using this
138	  transport to optionally ask for atomic SCMI transactions and operate
139	  in atomic context too, at the price of using a number of busy-waiting
140	  primitives all over instead. If unsure say N.
141
142config ARM_SCMI_TRANSPORT_VIRTIO
143	bool "SCMI transport based on VirtIO"
144	depends on VIRTIO=y || VIRTIO=ARM_SCMI_PROTOCOL
145	select ARM_SCMI_HAVE_TRANSPORT
146	select ARM_SCMI_HAVE_MSG
147	help
148	  This enables the virtio based transport for SCMI.
149
150	  If you want the ARM SCMI PROTOCOL stack to include support for a
151	  transport based on VirtIO, answer Y.
152
153config ARM_SCMI_TRANSPORT_VIRTIO_VERSION1_COMPLIANCE
154	bool "SCMI VirtIO transport Version 1 compliance"
155	depends on ARM_SCMI_TRANSPORT_VIRTIO
156	default y
157	help
158	  This enforces strict compliance with VirtIO Version 1 specification.
159
160	  If you want the ARM SCMI VirtIO transport layer to refuse to work
161	  with Legacy VirtIO backends and instead support only VirtIO Version 1
162	  devices (or above), answer Y.
163
164	  If you want instead to support also old Legacy VirtIO backends (like
165	  the ones implemented by kvmtool) and let the core Kernel VirtIO layer
166	  take care of the needed conversions, say N.
167
168config ARM_SCMI_TRANSPORT_VIRTIO_ATOMIC_ENABLE
169	bool "Enable atomic mode for SCMI VirtIO transport"
170	depends on ARM_SCMI_TRANSPORT_VIRTIO
171	help
172	  Enable support of atomic operation for SCMI VirtIO based transport.
173
174	  If you want the SCMI VirtIO based transport to operate in atomic
175	  mode, avoiding any kind of sleeping behaviour for selected
176	  transactions on the TX path, answer Y.
177
178	  Enabling atomic mode operations allows any SCMI driver using this
179	  transport to optionally ask for atomic SCMI transactions and operate
180	  in atomic context too, at the price of using a number of busy-waiting
181	  primitives all over instead. If unsure say N.
182
183endif #ARM_SCMI_PROTOCOL
184
185config ARM_SCMI_POWER_DOMAIN
186	tristate "SCMI power domain driver"
187	depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
188	default y
189	select PM_GENERIC_DOMAINS if PM
190	help
191	  This enables support for the SCMI power domains which can be
192	  enabled or disabled via the SCP firmware
193
194	  This driver can also be built as a module.  If so, the module
195	  will be called scmi_pm_domain. Note this may needed early in boot
196	  before rootfs may be available.
197
198config ARM_SCMI_POWER_CONTROL
199	tristate "SCMI system power control driver"
200	depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
201	help
202	  This enables System Power control logic which binds system shutdown or
203	  reboot actions to SCMI System Power notifications generated by SCP
204	  firmware.
205
206	  This driver can also be built as a module.  If so, the module will be
207	  called scmi_power_control. Note this may needed early in boot to catch
208	  early shutdown/reboot SCMI requests.
209
210endmenu
211