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
13source "drivers/espi/Kconfig.xec"
14
15source "drivers/espi/Kconfig.npcx"
16
17source "drivers/espi/Kconfig.espi_emul"
18
19source "drivers/espi/Kconfig.it8xxx2"
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_PVT_PORT_NUM
114	hex "Host I/O peripheral Private Channel"
115	depends on ESPI_PERIPHERAL_HOST_IO_PVT
116	default 0x06A00000
117	help
118	  This is the port number used by the Host and EC to communicate over
119	  the private channel. Please ensure the Host code is configured to use
120	  the same port. Also, ensure the port number selected doesn't clash
121	  with the existing ports (like 80, 92, 62 etc).
122
123config ESPI_PERIPHERAL_DEBUG_PORT_80
124	bool "Debug Port 80 peripheral"
125	help
126	  Enables debug Port 80 over eSPI peripheral channel.
127
128config ESPI_PERIPHERAL_EC_HOST_CMD
129	bool "Host peripheral device support EC host command subsystem"
130	help
131	  Enables Embedded Controller (EC) host command subsystem via eSPI
132	  peripheral channel.
133
134config ESPI_PERIPHERAL_ACPI_SHM_REGION
135	bool "Host peripheral device support shared memory region"
136	help
137	  Enables shared memory region over eSPI peripheral channel to access
138	  the ACPI response data.
139
140config ESPI_PERIPHERAL_ACPI_SHM_REGION_PORT_NUM
141	hex "Host I/O peripheral port number for shared memory region"
142	depends on ESPI_PERIPHERAL_ACPI_SHM_REGION
143	default 0x0900
144	help
145	  This is the port number used by the Host and EC to communicate over
146	  the shared memory region to access the ACPI response data. Please
147	  ensure the Host code is configured to use for accessing ACPI response
148	  data. Also, ensure the port number selected doesn't clash with the
149	  existing ports.
150
151config ESPI_PERIPHERAL_CUSTOM_OPCODE
152	bool "Host peripheral device support customized opcode"
153	help
154	  Enables opcode is customized for certain platforms such as Chromebook
155	  and so on over eSPI peripheral channel.
156
157config ESPI_PERIPHERAL_HOST_CMD_DATA_PORT_NUM
158	hex "Host I/O peripheral port number for ec host command data"
159	depends on ESPI_PERIPHERAL_EC_HOST_CMD
160	default 0x0200
161	help
162	  This is the port number used by the Host and EC to communicate over
163	  the eSPI peripheral channel to send EC host command data and its
164	  result. Please ensure the Host code is configured to use for accessing
165	  host command data and result. Also, ensure the port number selected
166	  doesn't clash with the existing ports.
167
168config ESPI_PERIPHERAL_HOST_CMD_PARAM_PORT_NUM
169	hex "Host I/O peripheral port number for ec host command parameters"
170	depends on ESPI_PERIPHERAL_EC_HOST_CMD
171	default 0x0800
172	help
173	  This is the port number used by the Host and EC to communicate over
174	  the eSPI peripheral channel to access the host command request and
175	  response data. Please ensure the Host code is configured to use for
176	  accessing these package data. Also, ensure the port number selected
177	  doesn't clash with the existing ports.
178
179endif # ESPI_PERIPHERAL_CHANNEL
180
181config ESPI_OOB_CHANNEL_RX_ASYNC
182	bool "OOB host-initiated traffic handling"
183	depends on ESPI_OOB_CHANNEL
184	help
185	  Enables asynchronous handling for host-initiated OOB traffic.
186	  Otherwise OOB traffic is assumed to be always client-initiated.
187
188config ESPI_TAF
189	bool "ESPI TAF driver"
190	depends on ESPI_FLASH_CHANNEL
191	help
192	  Enable Target Attached Flash eSPI driver. TAF depends upon ESPI driver
193	  and flash channel.
194
195config ESPI_TAF_INIT_PRIORITY
196	int "ESPI TAF driver initialization priority"
197	depends on ESPI_TAF
198	default 4
199	help
200	  Driver initialization priority for eSPI TAF driver. TAF driver must
201	  initialize after the ESPI driver.
202
203endif # ESPI
204