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