1# Copyright (c) 2021 ITE Corporation. All Rights Reserved.
2# SPDX-License-Identifier: Apache-2.0
3
4config ESPI_IT8XXX2
5	bool "ITE IT8XXX2 embedded controller ESPI driver"
6	default y
7	depends on DT_HAS_ITE_IT8XXX2_ESPI_ENABLED
8	depends on SOC_IT8XXX2
9	help
10	  Enable ITE IT8XXX2 ESPI driver.
11
12if ESPI_IT8XXX2
13
14config ESPI_OOB_CHANNEL
15	default y
16
17config ESPI_PERIPHERAL_8042_KBC
18	default y
19
20config ESPI_PERIPHERAL_HOST_IO
21	default y
22
23config ESPI_PERIPHERAL_DEBUG_PORT_80
24	default y
25
26config ESPI_PERIPHERAL_EC_HOST_CMD
27	default y
28
29choice IT8XXX2_H2RAM_HC_SIZE_CHOICE
30	prompt "H2RAM space for ec host command"
31	default IT8XXX2_H2RAM_HC_SIZE_256
32	depends on ESPI_PERIPHERAL_EC_HOST_CMD
33
34config IT8XXX2_H2RAM_HC_SIZE_16
35	bool "16"
36
37config IT8XXX2_H2RAM_HC_SIZE_32
38	bool "32"
39
40config IT8XXX2_H2RAM_HC_SIZE_64
41	bool "64"
42
43config IT8XXX2_H2RAM_HC_SIZE_128
44	bool "128"
45
46config IT8XXX2_H2RAM_HC_SIZE_256
47	bool "256"
48
49config IT8XXX2_H2RAM_HC_SIZE_512
50	bool "512"
51
52config IT8XXX2_H2RAM_HC_SIZE_1024
53	bool "1024"
54
55config IT8XXX2_H2RAM_HC_SIZE_2048
56	bool "2048"
57
58endchoice
59
60config ESPI_IT8XXX2_HC_H2RAM_SIZE
61	int
62	depends on ESPI_PERIPHERAL_EC_HOST_CMD
63	default 16 if IT8XXX2_H2RAM_HC_SIZE_16
64	default 32 if IT8XXX2_H2RAM_HC_SIZE_32
65	default 64 if IT8XXX2_H2RAM_HC_SIZE_64
66	default 128 if IT8XXX2_H2RAM_HC_SIZE_128
67	default 256 if IT8XXX2_H2RAM_HC_SIZE_256
68	default 512 if IT8XXX2_H2RAM_HC_SIZE_512
69	default 1024 if IT8XXX2_H2RAM_HC_SIZE_1024
70	default 2048 if IT8XXX2_H2RAM_HC_SIZE_2048
71
72config ESPI_PERIPHERAL_ACPI_SHM_REGION
73	default y
74
75choice IT8XXX2_H2RAM_ACPI_SHM_SIZE_CHOICE
76	prompt "H2RAM space for ACPI shared memory region"
77	default IT8XXX2_H2RAM_ACPI_SHM_SIZE_256
78	depends on ESPI_PERIPHERAL_ACPI_SHM_REGION
79
80config IT8XXX2_H2RAM_ACPI_SHM_SIZE_16
81	bool "16"
82
83config IT8XXX2_H2RAM_ACPI_SHM_SIZE_32
84	bool "32"
85
86config IT8XXX2_H2RAM_ACPI_SHM_SIZE_64
87	bool "64"
88
89config IT8XXX2_H2RAM_ACPI_SHM_SIZE_128
90	bool "128"
91
92config IT8XXX2_H2RAM_ACPI_SHM_SIZE_256
93	bool "256"
94
95config IT8XXX2_H2RAM_ACPI_SHM_SIZE_512
96	bool "512"
97
98config IT8XXX2_H2RAM_ACPI_SHM_SIZE_1024
99	bool "1024"
100
101config IT8XXX2_H2RAM_ACPI_SHM_SIZE_2048
102	bool "2048"
103
104endchoice
105
106config ESPI_IT8XXX2_ACPI_SHM_H2RAM_SIZE
107	int
108	depends on ESPI_PERIPHERAL_ACPI_SHM_REGION
109	default 16 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_16
110	default 32 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_32
111	default 64 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_64
112	default 128 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_128
113	default 256 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_256
114	default 512 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_512
115	default 1024 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_1024
116	default 2048 if IT8XXX2_H2RAM_ACPI_SHM_SIZE_2048
117
118config ESPI_PERIPHERAL_CUSTOM_OPCODE
119	default y
120
121config ESPI_FLASH_CHANNEL
122	default y
123
124config ESPI_IT8XXX2_PNPCFG_DEVICE_KBC_MOUSE
125	bool "ITE IT8XXX2 KBC mouse device"
126	help
127	  With this option enabled, EC will send IRQ12 signal to host when the
128	  KBC mouse output buffer is full.
129
130endif #ESPI_IT8XXX2
131