blob: 3b0beda24ebe41a36a77cd8739acc5006081d492 [file] [log] [blame]
Martin Roth5bdac842024-02-16 10:45:54 -07001## SPDX-License-Identifier: GPL-2.0-only
2
Stefan Reinauerd6682e82013-02-21 15:39:35 -08003config EC_GOOGLE_CHROMEEC
4 bool
Frans Hendriks9cb88a72019-12-06 11:54:01 +01005 select EC_SUPPORTS_DPTF_TEVT
Stefan Reinauerd6682e82013-02-21 15:39:35 -08006 help
7 Google's Chrome EC
8
Shawn Nematbakhsh37b7a662015-03-24 11:07:51 -07009config EC_GOOGLE_CHROMEEC_ACPI_MEMMAP
10 depends on EC_GOOGLE_CHROMEEC_LPC
11 def_bool n
12 help
13 When defined, ACPI accesses EC memmap data on ports 66h/62h. When
14 not defined, the memmap data is instead accessed on 900h-9ffh via
15 the LPC bus.
16
Emil Lundmark9d5f9f22018-05-22 19:31:37 +020017config EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER
18 depends on EC_GOOGLE_CHROMEEC
19 def_bool n
20 help
21 Expose methods for enabling and disabling port power on individual USB
22 ports through the EC.
23
Furquan Shaikha2094832017-09-25 08:04:49 -070024config EC_GOOGLE_CHROMEEC_BOARDID
25 depends on EC_GOOGLE_CHROMEEC
26 def_bool n
27 help
28 Provides common routine for reading boardid from Chrome EC.
29
Hung-Te Lin6bfbb332013-04-15 18:27:24 +080030config EC_GOOGLE_CHROMEEC_I2C
Gabe Black3fb30ee2013-07-09 13:15:05 -070031 depends on EC_GOOGLE_CHROMEEC
Hung-Te Lina904f9e2013-04-11 15:58:12 +080032 bool
Gabe Black3fb30ee2013-07-09 13:15:05 -070033 default n
Hung-Te Lin6bfbb332013-04-15 18:27:24 +080034 help
35 Google's Chrome EC via I2C bus.
36
37config EC_GOOGLE_CHROMEEC_I2C_BUS
38 depends on EC_GOOGLE_CHROMEEC_I2C
39 hex "I2C bus for Google's Chrome EC"
40
41config EC_GOOGLE_CHROMEEC_I2C_CHIP
42 depends on EC_GOOGLE_CHROMEEC_I2C
43 hex
44 default 0x1e
45
Aaron Durbinaee78f02014-08-06 14:38:52 -050046config EC_GOOGLE_CHROMEEC_I2C_PROTO3
47 depends on EC_GOOGLE_CHROMEEC_I2C
48 bool
49 default n
50 help
51 Use only proto3 for i2c EC communication.
52
Martin Rothd12d2522019-08-27 15:49:27 -060053config EC_GOOGLE_CHROMEEC_ESPI
54 depends on EC_GOOGLE_CHROMEEC && ARCH_X86 # Needs Plug-and-play.
55 def_bool n
56 select EC_GOOGLE_CHROMEEC_LPC
57 help
58 Google Chrome EC via eSPI bus.
59
60 The EC communication code is the same between eSPI and LPC, so
61 this option simply enables the LPC EC code. The eSPI device
62 still needs to correctly configure the bus transactions.
63
Hung-Te Lin6bfbb332013-04-15 18:27:24 +080064config EC_GOOGLE_CHROMEEC_LPC
Shawn Nematbakhsh37b7a662015-03-24 11:07:51 -070065 depends on EC_GOOGLE_CHROMEEC && ARCH_X86 # Needs Plug-and-play.
Martin Roth30d3c9e2019-08-29 13:09:06 -060066 def_bool n
Hung-Te Lina904f9e2013-04-11 15:58:12 +080067 help
68 Google Chrome EC via LPC bus.
Hung-Te Lin0ee70622013-06-26 19:42:12 +080069
Shawn Nematbakhsh5725ea32015-04-01 16:52:37 -070070config EC_GOOGLE_CHROMEEC_MEC
71 depends on EC_GOOGLE_CHROMEEC_LPC
72 def_bool n
Duncan Laurie32ca3cd2018-10-12 17:19:53 -070073 select EC_GOOGLE_COMMON_MEC
Shawn Nematbakhsh5725ea32015-04-01 16:52:37 -070074 help
75 Microchip EC variant for LPC register access.
76
Duncan Laurieab40b912015-09-04 10:14:18 -070077config EC_GOOGLE_CHROMEEC_PD
78 depends on EC_GOOGLE_CHROMEEC
79 def_bool n
80 help
81 Indicates that Google's Chrome USB PD chip is present.
82
Hung-Te Lin0ee70622013-06-26 19:42:12 +080083config EC_GOOGLE_CHROMEEC_SPI
84 depends on EC_GOOGLE_CHROMEEC
85 def_bool n
86 help
87 Google's Chrome EC via SPI bus.
88
89config EC_GOOGLE_CHROMEEC_SPI_BUS
90 depends on EC_GOOGLE_CHROMEEC_SPI
Vladimir Serbinenko42f42ff2016-03-04 09:31:14 +010091 hex
Hung-Te Lin0ee70622013-06-26 19:42:12 +080092
David Hendricks767d2452014-09-27 20:04:49 -070093config EC_GOOGLE_CHROMEEC_SPI_WAKEUP_DELAY_US
94 depends on EC_GOOGLE_CHROMEEC_SPI
95 int
96 default 0
97 help
98 Force delay after asserting /CS to allow EC to wakeup.
99
Hung-Te Lin0ee70622013-06-26 19:42:12 +0800100config EC_GOOGLE_CHROMEEC_SPI_CHIP
101 depends on EC_GOOGLE_CHROMEEC_SPI
102 hex
Martin Roth3b878122016-09-30 14:43:01 -0600103 default 0x0
Patrick Georgie995dad22016-02-01 15:26:26 +0100104
Edward O'Callaghan9ed10bf2020-02-20 13:38:49 +1100105config EC_GOOGLE_CHROMEEC_SKUID
106 def_bool n
107 help
108 Provides common routine for reporting the skuid to ChromeOS.
109
Patrick Georgie995dad22016-02-01 15:26:26 +0100110config EC_GOOGLE_CHROMEEC_BOARDNAME
Paul Kocialkowski8ff24802016-08-02 14:28:26 +0200111 depends on EC_GOOGLE_CHROMEEC
Patrick Georgie995dad22016-02-01 15:26:26 +0100112 string "Chrome EC board name for EC"
113 default ""
114 help
115 The board name used in the Chrome EC code base to build
116 the EC firmware. If set, the coreboot build with also
117 build the EC firmware and add it to the image.
118
119config EC_GOOGLE_CHROMEEC_PD_BOARDNAME
Paul Kocialkowski8ff24802016-08-02 14:28:26 +0200120 depends on EC_GOOGLE_CHROMEEC_PD
Patrick Georgie995dad22016-02-01 15:26:26 +0100121 string "Chrome EC board name for PD"
122 default ""
123 help
124 The board name used in the Chrome EC code base to build
125 the PD firmware. If set, the coreboot build with also
126 build the EC firmware and add it to the image.
Simon Glass78659322016-06-10 20:58:24 -0600127
128config EC_GOOGLE_CHROMEEC_RTC
129 depends on EC_GOOGLE_CHROMEEC
Jon Murphyc4e90452022-06-28 10:36:23 -0600130 bool "Enable ChromeOS EC RTC"
Simon Glass78659322016-06-10 20:58:24 -0600131 help
Jon Murphyc4e90452022-06-28 10:36:23 -0600132 Enable support for the real-time clock on the ChromeOS EC. This
Simon Glass78659322016-06-10 20:58:24 -0600133 uses the EC_CMD_RTC_GET_VALUE command to read the current time.
Paul Kocialkowski8ff24802016-08-02 14:28:26 +0200134
135choice
136 prompt "Chrome EC firmware source"
137 depends on EC_GOOGLE_CHROMEEC
138 default EC_GOOGLE_CHROMEEC_FIRMWARE_BUILTIN if EC_GOOGLE_CHROMEEC_BOARDNAME != ""
139 default EC_GOOGLE_CHROMEEC_FIRMWARE_NONE
140
141 config EC_GOOGLE_CHROMEEC_FIRMWARE_NONE
142 bool "No EC firmware is included"
143 help
144 Disable building and including any EC firmware in the image.
145
146 config EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL
147 bool "External EC firmware is included"
148 help
149 Include EC firmware binary in the image from an external source.
150 It is expected to be built externally.
151
152 config EC_GOOGLE_CHROMEEC_FIRMWARE_BUILTIN
153 bool "Builtin EC firmware is included"
154 help
155 Build and include EC firmware binary in the image.
156
157endchoice
158
159config EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
160 string "Chrome EC firmware path and filename"
161 depends on EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL
162 help
163 The path and filename of the EC firmware file to use.
164
165choice
166 prompt "Chrome EC firmware source for PD"
167 depends on EC_GOOGLE_CHROMEEC_PD
168 default EC_GOOGLE_CHROMEEC_PD_FIRMWARE_BUILTIN if EC_GOOGLE_CHROMEEC_PD_BOARDNAME != ""
169 default EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE
170
171 config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE
172 bool "No PD firmware is included"
173 help
174 Disable building and including any PD firmware in the image.
175
176 config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL
177 bool "External PD firmware is included"
178 help
179 Include PD firmware binary in the image from an external source.
180 It is expected to be built externally.
181
182 config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_BUILTIN
183 bool "Builtin PD firmware is included"
184 help
185 Build and include PD firmware binary in the image.
186
187endchoice
188
189config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
190 string "Chrome EC firmware path and filename for PD"
191 depends on EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL
192 help
193 The path and filename of the PD firmware file to use.
Furquan Shaikhcd2afc02016-11-15 20:33:29 -0800194
195config EC_GOOGLE_CHROMEEC_SWITCHES
Julius Werner58c39382017-02-13 17:53:29 -0800196 depends on EC_GOOGLE_CHROMEEC && VBOOT
Furquan Shaikhcd2afc02016-11-15 20:33:29 -0800197 bool
198 help
Jon Murphyc4e90452022-06-28 10:36:23 -0600199 Enable support for ChromeOS mode switches provided by the ChromeOS
Furquan Shaikhcd2afc02016-11-15 20:33:29 -0800200 EC.
Furquan Shaikh38b349c2020-04-19 17:40:22 -0700201
Karthikeyan Ramasubramanian86728842021-02-25 00:29:14 -0700202config EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG
203 depends on FW_CONFIG_SOURCE_CHROMEEC_CBI
204 bool
205 help
206 Fetch Second Source Factory Cache from CBI EEPROM and add it in the most significant
207 32 bits of firmware configuration.
208
Matt DeVillier9bb70d52020-02-20 19:28:31 -0600209config EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL
210 depends on EC_GOOGLE_CHROMEEC
211 bool "Enable automatic fan control"
212 help
213 Put the fan in auto mode at boot.
214
Furquan Shaikh38b349c2020-04-19 17:40:22 -0700215source "src/ec/google/chromeec/*/Kconfig"