1# eSPI configuration options
2
3# Copyright (c) 2019 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ESPI
7	bool "Enhanced Serial Peripheral Interface (eSPI) bus drivers"
8	help
9	  Enable ESPI Driver.
10
11if ESPI
12
13# zephyr-keep-sorted-start
14source "drivers/espi/Kconfig.espi_emul"
15source "drivers/espi/Kconfig.it8xxx2"
16source "drivers/espi/Kconfig.npcx"
17source "drivers/espi/Kconfig.rts5912"
18source "drivers/espi/Kconfig.xec"
19# zephyr-keep-sorted-stop
20
21module = ESPI
22module-str = espi
23source "subsys/logging/Kconfig.template.log_config"
24
25config ESPI_TARGET
26	bool "ESPI target driver"
27	default y
28	help
29	  Enables eSPI driver in target mode.
30
31config ESPI_INIT_PRIORITY
32	int "ESPI Controller driver initialization priority"
33	default 3
34	help
35	  Driver initialization priority for eSPI driver.
36
37config ESPI_PERIPHERAL_CHANNEL
38	bool "eSPI peripheral channel"
39	default y
40	help
41	  eSPI Controller supports peripheral channel.
42
43config ESPI_VWIRE_CHANNEL
44	bool "eSPI virtual wire channel"
45	default y
46	help
47	  eSPI Controller supports virtual wires channel.
48
49config ESPI_VWIRE_VALID_BIT_CHECK
50	bool "eSPI virtual wire valid bit check"
51	default y
52	depends on ESPI_VWIRE_CHANNEL
53	help
54	  Enable the checking of the eSPI virtual wire valid bit. If this
55	  configuration is not set, treat the new values as the previously
56	  retained valid values and return the received virtual wire level.
57
58config ESPI_AUTOMATIC_WARNING_ACKNOWLEDGE
59	bool "Automatic acknowledge for eSPI HOST warnings"
60	default y
61	depends on ESPI_VWIRE_CHANNEL
62	depends on ESPI_TARGET
63	help
64	  Enable automatic acknowledgment from eSPI target towards eSPI controller
65	  whenever it receives suspend or reset warning.
66	  If this is disabled, it means the app wants to be give the opportunity
67	  to prepare for either HOST suspend or reset.
68
69config ESPI_AUTOMATIC_BOOT_DONE_ACKNOWLEDGE
70	bool "Automatic acknowledge target boot status"
71	default y
72	depends on ESPI_VWIRE_CHANNEL
73	depends on ESPI_TARGET
74	help
75	  Enable automatic acknowledgment from target basic configuration been
76	  completed by sending a virtual wire message to the eSPI master.
77	  This depends on SPI boot configuration. It could be either very
78	  early in the flow after the VW channel is configured. Or it could be
79	  until flash channel is configured.
80
81config ESPI_OOB_CHANNEL
82	bool "eSPI Out-of-band channel"
83	help
84	  eSPI Controller supports OOB channel.
85
86config ESPI_FLASH_CHANNEL
87	bool "ESPI flash channel"
88	help
89	  eSPI Controller supports flash channel.
90
91if ESPI_PERIPHERAL_CHANNEL
92
93config ESPI_PERIPHERAL_UART
94	bool "UART peripheral"
95	help
96	  Enables UART over eSPI peripheral channel.
97
98config ESPI_PERIPHERAL_8042_KBC
99	bool "8042 kbc peripheral"
100	help
101	  Enables 8042 keyboard controller over eSPI peripheral channel.
102
103config ESPI_PERIPHERAL_HOST_IO
104	bool "Host I/O peripheral"
105	help
106	  Enables ACPI Host I/O over eSPI peripheral channel.
107
108config ESPI_PERIPHERAL_HOST_IO_PVT
109	bool "Host I/O peripheral Private Channel"
110	help
111	  Enables ACPI Host I/O over eSPI peripheral channel for private channel.
112
113config ESPI_PERIPHERAL_HOST_IO_PVT2
114	bool "Host I/O peripheral Private Channel 2"
115	help
116	  Enables ACPI Host I/O over eSPI peripheral channel for private channel 2.
117
118config ESPI_PERIPHERAL_HOST_IO_PVT3
119	bool "Host I/O peripheral Private Channel 3"
120	help
121	  Enables ACPI Host I/O over eSPI peripheral channel for private channel 3.
122
123config ESPI_PERIPHERAL_HOST_IO_PVT_PORT_NUM
124	hex "Host I/O peripheral Private Channel"
125	depends on ESPI_PERIPHERAL_HOST_IO_PVT
126	default 0x06A00000
127	help
128	  This is the port number used by the Host and EC to communicate over
129	  the private channel. Please ensure the Host code is configured to use
130	  the same port. Also, ensure the port number selected doesn't clash
131	  with the existing ports (like 80, 92, 62 etc).
132
133config ESPI_PERIPHERAL_HOST_IO_PVT2_PORT_NUM
134	hex "Host I/O peripheral Private Channel 2"
135	depends on ESPI_PERIPHERAL_HOST_IO_PVT2
136	default 0x0068
137	help
138	  This is the port number used by the Host and EC to communicate over
139	  the private channel 2.
140
141config ESPI_PERIPHERAL_HOST_IO_PVT3_PORT_NUM
142	hex "Host I/O peripheral Private Channel 3"
143	depends on ESPI_PERIPHERAL_HOST_IO_PVT3
144	default 0x0070
145	help
146	  This is the port number used by the Host and EC to communicate over
147	  the private channel 3.
148
149config ESPI_PERIPHERAL_DEBUG_PORT_80
150	bool "Debug Port 80 peripheral"
151	help
152	  Enables debug Port 80 over eSPI peripheral channel.
153
154config ESPI_PERIPHERAL_EC_HOST_CMD
155	bool "Host peripheral device support EC host command subsystem"
156	help
157	  Enables Embedded Controller (EC) host command subsystem via eSPI
158	  peripheral channel.
159
160config ESPI_PERIPHERAL_ACPI_SHM_REGION
161	bool "Host peripheral device support shared memory region"
162	help
163	  Enables shared memory region over eSPI peripheral channel to access
164	  the ACPI response data.
165
166config ESPI_PERIPHERAL_ACPI_SHM_REGION_PORT_NUM
167	hex "Host I/O peripheral port number for shared memory region"
168	depends on ESPI_PERIPHERAL_ACPI_SHM_REGION
169	default 0x0900
170	help
171	  This is the port number used by the Host and EC to communicate over
172	  the shared memory region to access the ACPI response data. Please
173	  ensure the Host code is configured to use for accessing ACPI response
174	  data. Also, ensure the port number selected doesn't clash with the
175	  existing ports.
176
177config ESPI_PERIPHERAL_CUSTOM_OPCODE
178	bool "Host peripheral device support customized opcode"
179	help
180	  Enables opcode is customized for certain platforms such as Chromebook
181	  and so on over eSPI peripheral channel.
182
183config ESPI_PERIPHERAL_HOST_CMD_DATA_PORT_NUM
184	hex "Host I/O peripheral port number for ec host command data"
185	depends on ESPI_PERIPHERAL_EC_HOST_CMD
186	default 0x0200
187	help
188	  This is the port number used by the Host and EC to communicate over
189	  the eSPI peripheral channel to send EC host command data and its
190	  result. Please ensure the Host code is configured to use for accessing
191	  host command data and result. Also, ensure the port number selected
192	  doesn't clash with the existing ports.
193
194config ESPI_PERIPHERAL_HOST_CMD_PARAM_PORT_NUM
195	hex "Host I/O peripheral port number for ec host command parameters"
196	depends on ESPI_PERIPHERAL_EC_HOST_CMD
197	default 0x0800
198	help
199	  This is the port number used by the Host and EC to communicate over
200	  the eSPI peripheral channel to access the host command request and
201	  response data. Please ensure the Host code is configured to use for
202	  accessing these package data. Also, ensure the port number selected
203	  doesn't clash with the existing ports.
204
205endif # ESPI_PERIPHERAL_CHANNEL
206
207config ESPI_OOB_CHANNEL_RX_ASYNC
208	bool "OOB host-initiated traffic handling"
209	depends on ESPI_OOB_CHANNEL
210	help
211	  Enables asynchronous handling for host-initiated OOB traffic.
212	  Otherwise OOB traffic is assumed to be always client-initiated.
213
214config ESPI_TAF
215	bool "ESPI TAF driver"
216	depends on ESPI_FLASH_CHANNEL
217	help
218	  Enable Target Attached Flash eSPI driver. TAF depends upon ESPI driver
219	  and flash channel.
220
221config ESPI_TAF_INIT_PRIORITY
222	int "ESPI TAF driver initialization priority"
223	depends on ESPI_TAF
224	default 4
225	help
226	  Driver initialization priority for eSPI TAF driver. TAF driver must
227	  initialize after the ESPI driver.
228
229endif # ESPI
230