• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## SPDX-License-Identifier: GPL-2.0-only
2
3config EC_GOOGLE_CHROMEEC
4	bool
5	select EC_SUPPORTS_DPTF_TEVT
6	help
7	  Google's Chrome EC
8
9if EC_GOOGLE_CHROMEEC
10
11config EC_GOOGLE_CHROMEEC_ACPI_MEMMAP
12	depends on EC_GOOGLE_CHROMEEC_LPC
13	def_bool n
14	help
15	  When defined, ACPI accesses EC memmap data on ports 66h/62h. When
16	  not defined, the memmap data is instead accessed on 900h-9ffh via
17	  the LPC bus.
18
19config EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER
20	def_bool n
21	help
22	  Expose methods for enabling and disabling port power on individual USB
23	  ports through the EC.
24
25config EC_GOOGLE_CHROMEEC_BOARDID
26	def_bool n
27	help
28	  Provides common routine for reading boardid from Chrome EC.
29
30config EC_GOOGLE_CHROMEEC_I2C
31	bool
32	default n
33	help
34	  Google's Chrome EC via I2C bus.
35
36config EC_GOOGLE_CHROMEEC_I2C_BUS
37	depends on EC_GOOGLE_CHROMEEC_I2C
38	hex "I2C bus for Google's Chrome EC"
39
40config EC_GOOGLE_CHROMEEC_I2C_CHIP
41	depends on EC_GOOGLE_CHROMEEC_I2C
42	hex
43	default 0x1e
44
45config EC_GOOGLE_CHROMEEC_I2C_PROTO3
46	depends on EC_GOOGLE_CHROMEEC_I2C
47	bool
48	default n
49	help
50	  Use only proto3 for i2c EC communication.
51
52config EC_GOOGLE_CHROMEEC_ESPI
53	depends on ARCH_X86  # Needs Plug-and-play.
54	def_bool n
55	select EC_GOOGLE_CHROMEEC_LPC
56	help
57	  Google Chrome EC via eSPI bus.
58
59	  The EC communication code is the same between eSPI and LPC, so
60	  this option simply enables the LPC EC code.  The eSPI device
61	  still needs to correctly configure the bus transactions.
62
63config EC_GOOGLE_CHROMEEC_LPC
64	depends on ARCH_X86  # Needs Plug-and-play.
65	def_bool n
66	help
67	  Google Chrome EC via LPC bus.
68
69config EC_GOOGLE_CHROMEEC_MEC
70	depends on EC_GOOGLE_CHROMEEC_LPC
71	def_bool n
72	select EC_GOOGLE_COMMON_MEC
73	help
74	  Microchip EC variant for LPC register access.
75
76config EC_GOOGLE_CHROMEEC_PD
77	def_bool n
78	help
79	  Indicates that Google's Chrome USB PD chip is present.
80
81config EC_GOOGLE_CHROMEEC_SPI
82	def_bool n
83	help
84	  Google's Chrome EC via SPI bus.
85
86config EC_GOOGLE_CHROMEEC_SPI_BUS
87	depends on EC_GOOGLE_CHROMEEC_SPI
88	hex
89
90config EC_GOOGLE_CHROMEEC_SPI_WAKEUP_DELAY_US
91	depends on EC_GOOGLE_CHROMEEC_SPI
92	int
93	default 0
94	help
95	  Force delay after asserting /CS to allow EC to wakeup.
96
97config EC_GOOGLE_CHROMEEC_SPI_CHIP
98	depends on EC_GOOGLE_CHROMEEC_SPI
99	hex
100	default 0x0
101
102config EC_GOOGLE_CHROMEEC_SKUID
103	def_bool n
104	help
105	  Provides common routine for reporting the skuid to ChromeOS.
106
107config EC_GOOGLE_CHROMEEC_BOARDNAME
108	string "Chrome EC board name for EC"
109	default ""
110	help
111	  The board name used in the Chrome EC code base to build
112	  the EC firmware.  If set, the coreboot build with also
113	  build the EC firmware and add it to the image.
114
115config EC_GOOGLE_CHROMEEC_PD_BOARDNAME
116	depends on EC_GOOGLE_CHROMEEC_PD
117	string "Chrome EC board name for PD"
118	default ""
119	help
120	  The board name used in the Chrome EC code base to build
121	  the PD firmware.  If set, the coreboot build with also
122	  build the EC firmware and add it to the image.
123
124config EC_GOOGLE_CHROMEEC_RTC
125	bool "Enable ChromeOS EC RTC"
126	help
127	  Enable support for the real-time clock on the ChromeOS EC. This
128	  uses the EC_CMD_RTC_GET_VALUE command to read the current time.
129
130choice
131	prompt "Chrome EC firmware source"
132	default EC_GOOGLE_CHROMEEC_FIRMWARE_BUILTIN if EC_GOOGLE_CHROMEEC_BOARDNAME != ""
133	default EC_GOOGLE_CHROMEEC_FIRMWARE_NONE
134
135	config EC_GOOGLE_CHROMEEC_FIRMWARE_NONE
136	bool "No EC firmware is included"
137	help
138	  Disable building and including any EC firmware in the image.
139
140	config EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL
141	bool "External EC firmware is included"
142	help
143	  Include EC firmware binary in the image from an external source.
144	  It is expected to be built externally.
145
146	config EC_GOOGLE_CHROMEEC_FIRMWARE_BUILTIN
147	bool "Builtin EC firmware is included"
148	help
149	  Build and include EC firmware binary in the image.
150
151endchoice
152
153config EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
154	string "Chrome EC firmware path and filename"
155	depends on EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL
156	help
157	  The path and filename of the EC firmware file to use.
158
159choice
160	prompt "Chrome EC firmware source for PD"
161	depends on EC_GOOGLE_CHROMEEC_PD
162	default EC_GOOGLE_CHROMEEC_PD_FIRMWARE_BUILTIN if EC_GOOGLE_CHROMEEC_PD_BOARDNAME != ""
163	default EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE
164
165	config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE
166	bool "No PD firmware is included"
167	help
168	  Disable building and including any PD firmware in the image.
169
170	config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL
171	bool "External PD firmware is included"
172	help
173	  Include PD firmware binary in the image from an external source.
174	  It is expected to be built externally.
175
176	config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_BUILTIN
177	bool "Builtin PD firmware is included"
178	help
179	  Build and include PD firmware binary in the image.
180
181endchoice
182
183config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
184	string "Chrome EC firmware path and filename for PD"
185	depends on EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL
186	help
187	  The path and filename of the PD firmware file to use.
188
189config EC_GOOGLE_CHROMEEC_SWITCHES
190	depends on VBOOT
191	bool
192	help
193	  Enable support for ChromeOS mode switches provided by the ChromeOS
194	  EC.
195
196config EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG
197	depends on FW_CONFIG_SOURCE_CHROMEEC_CBI
198	bool
199	help
200	  Fetch Second Source Factory Cache from CBI EEPROM and add it in the most significant
201	  32 bits of firmware configuration.
202
203config EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL
204	bool "Enable automatic fan control"
205	help
206	  Put the fan in auto mode at boot.
207
208endif # EC_GOOGLE_CHROMEEC
209
210source "src/ec/google/chromeec/*/Kconfig"
211