| 1 |
## SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
config EC_GOOGLE_CHROMEEC |
| 4 |
bool |
| 5 |
select EC_SUPPORTS_DPTF_TEVT |
| 6 |
select HAVE_EARLY_POWEROFF_SUPPORT |
| 7 |
help |
| 8 |
Google's Chrome EC |
| 9 |
|
| 10 |
if EC_GOOGLE_CHROMEEC |
| 11 |
|
| 12 |
config EC_GOOGLE_CHROMEEC_ACPI_MEMMAP |
| 13 |
depends on EC_GOOGLE_CHROMEEC_LPC |
| 14 |
def_bool n |
| 15 |
help |
| 16 |
When defined, ACPI accesses EC memmap data on ports 66h/62h. When |
| 17 |
not defined, the memmap data is instead accessed on 900h-9ffh via |
| 18 |
the LPC bus. |
| 19 |
|
| 20 |
config EC_GOOGLE_CHROMEEC_ACPI_USB_PORT_POWER |
| 21 |
def_bool n |
| 22 |
help |
| 23 |
Expose methods for enabling and disabling port power on individual USB |
| 24 |
ports through the EC. |
| 25 |
|
| 26 |
config EC_GOOGLE_CHROMEEC_BOARDID |
| 27 |
def_bool n |
| 28 |
help |
| 29 |
Provides common routine for reading boardid from Chrome EC. |
| 30 |
|
| 31 |
config EC_GOOGLE_CHROMEEC_I2C |
| 32 |
bool |
| 33 |
default n |
| 34 |
help |
| 35 |
Google's Chrome EC via I2C bus. |
| 36 |
|
| 37 |
config EC_GOOGLE_CHROMEEC_I2C_BUS |
| 38 |
depends on EC_GOOGLE_CHROMEEC_I2C |
| 39 |
hex "I2C bus for Google's Chrome EC" |
| 40 |
|
| 41 |
config EC_GOOGLE_CHROMEEC_I2C_CHIP |
| 42 |
depends on EC_GOOGLE_CHROMEEC_I2C |
| 43 |
hex |
| 44 |
default 0x1e |
| 45 |
|
| 46 |
config 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 |
|
| 53 |
config EC_GOOGLE_CHROMEEC_ESPI |
| 54 |
depends on 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 |
|
| 64 |
config EC_GOOGLE_CHROMEEC_MEMMAP_INDEXED_IO |
| 65 |
depends on EC_GOOGLE_CHROMEEC && ARCH_X86 |
| 66 |
def_bool n |
| 67 |
help |
| 68 |
Google Chrome EC enable support for indexed I/O access. |
| 69 |
|
| 70 |
Indexed I/O allows devices with multiple memory locations to be |
| 71 |
accessed using a single I/O port base address and an index register. |
| 72 |
A separate data register, typically located at the address |
| 73 |
immediately following the index register, is used for sending and |
| 74 |
receiving data to the device. |
| 75 |
|
| 76 |
Ensure port address and gen3_dec values are correct when selecting |
| 77 |
this configuration. |
| 78 |
|
| 79 |
config EC_GOOGLE_CHROMEEC_MEMMAP_INDEXED_IO_PORT |
| 80 |
depends on EC_GOOGLE_CHROMEEC_MEMMAP_INDEXED_IO |
| 81 |
hex |
| 82 |
default 0x380 |
| 83 |
help |
| 84 |
Google Chrome EC indexed I/O access address. |
| 85 |
|
| 86 |
Index register port address for memory mapped indexed IO access |
| 87 |
|
| 88 |
config EC_GOOGLE_CHROMEEC_LPC |
| 89 |
depends on ARCH_X86 # Needs Plug-and-play. |
| 90 |
def_bool n |
| 91 |
help |
| 92 |
Google Chrome EC via LPC bus. |
| 93 |
|
| 94 |
config EC_GOOGLE_CHROMEEC_MEC |
| 95 |
depends on EC_GOOGLE_CHROMEEC_LPC |
| 96 |
def_bool n |
| 97 |
select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP |
| 98 |
select EC_GOOGLE_COMMON_MEC |
| 99 |
help |
| 100 |
Microchip EC variant for LPC register access. |
| 101 |
|
| 102 |
config EC_GOOGLE_CHROMEEC_RTK |
| 103 |
depends on EC_GOOGLE_CHROMEEC_LPC |
| 104 |
def_bool n |
| 105 |
select EC_GOOGLE_COMMON_RTK |
| 106 |
help |
| 107 |
Realtek EC variant for LPC register access. |
| 108 |
|
| 109 |
config EC_GOOGLE_CHROMEEC_EC_HOST_CMD_DEBUG |
| 110 |
depends on EC_GOOGLE_CHROMEEC_LPC && HAVE_MONOTONIC_TIMER |
| 111 |
def_bool n |
| 112 |
help |
| 113 |
Enables timestamp and duration logging for host EC commands. |
| 114 |
|
| 115 |
config EC_GOOGLE_CHROMEEC_PD |
| 116 |
def_bool n |
| 117 |
help |
| 118 |
Indicates that Google's Chrome USB PD chip is present. |
| 119 |
|
| 120 |
config EC_GOOGLE_CHROMEEC_SPI |
| 121 |
def_bool n |
| 122 |
help |
| 123 |
Google's Chrome EC via SPI bus. |
| 124 |
|
| 125 |
config EC_GOOGLE_CHROMEEC_SPI_BUS |
| 126 |
depends on EC_GOOGLE_CHROMEEC_SPI |
| 127 |
hex |
| 128 |
|
| 129 |
config EC_GOOGLE_CHROMEEC_SPI_WAKEUP_DELAY_US |
| 130 |
depends on EC_GOOGLE_CHROMEEC_SPI |
| 131 |
int |
| 132 |
default 0 |
| 133 |
help |
| 134 |
Force delay after asserting /CS to allow EC to wakeup. |
| 135 |
|
| 136 |
config EC_GOOGLE_CHROMEEC_SPI_CHIP |
| 137 |
depends on EC_GOOGLE_CHROMEEC_SPI |
| 138 |
hex |
| 139 |
default 0x0 |
| 140 |
|
| 141 |
config EC_GOOGLE_CHROMEEC_SKUID |
| 142 |
def_bool n |
| 143 |
help |
| 144 |
Provides common routine for reporting the skuid to ChromeOS. |
| 145 |
|
| 146 |
config EC_GOOGLE_CHROMEEC_SMBIOS |
| 147 |
def_bool n |
| 148 |
help |
| 149 |
Enable support to get SKU and board information for SMBIOS table |
| 150 |
using Chrome EC host commands. |
| 151 |
|
| 152 |
config EC_GOOGLE_CHROMEEC_RTC |
| 153 |
bool "Enable ChromeOS EC RTC" |
| 154 |
help |
| 155 |
Enable support for the real-time clock on the ChromeOS EC. This |
| 156 |
uses the EC_CMD_RTC_GET_VALUE command to read the current time. |
| 157 |
|
| 158 |
config EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL |
| 159 |
bool "Include an external EC firmware binary" |
| 160 |
help |
| 161 |
Include a precompiled EC firmware binary in the image. |
| 162 |
|
| 163 |
config EC_GOOGLE_CHROMEEC_FIRMWARE_FILE |
| 164 |
string "Chrome EC firmware path and filename" |
| 165 |
depends on EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL |
| 166 |
help |
| 167 |
The path and filename of the EC firmware file to use. |
| 168 |
|
| 169 |
config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL |
| 170 |
bool "Include an external PD firmware binary" |
| 171 |
depends on EC_GOOGLE_CHROMEEC_PD |
| 172 |
help |
| 173 |
Include a precompiled PD firmware binary in the image. |
| 174 |
|
| 175 |
config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE |
| 176 |
string "Chrome EC firmware path and filename for PD" |
| 177 |
depends on EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL |
| 178 |
help |
| 179 |
The path and filename of the PD firmware file to use. |
| 180 |
|
| 181 |
config EC_GOOGLE_CHROMEEC_SWITCHES |
| 182 |
depends on VBOOT |
| 183 |
bool |
| 184 |
help |
| 185 |
Enable support for ChromeOS mode switches provided by the ChromeOS |
| 186 |
EC. |
| 187 |
|
| 188 |
config EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG |
| 189 |
depends on FW_CONFIG_SOURCE_CHROMEEC_CBI |
| 190 |
bool |
| 191 |
help |
| 192 |
Fetch Second Source Factory Cache from CBI EEPROM and add it in the most significant |
| 193 |
32 bits of firmware configuration. |
| 194 |
|
| 195 |
config EC_GOOGLE_CHROMEEC_AUTO_FAN_CTRL |
| 196 |
bool "Enable automatic fan control" |
| 197 |
help |
| 198 |
Put the fan in auto mode at boot. |
| 199 |
|
| 200 |
config EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING |
| 201 |
depends on TPM_GOOGLE |
| 202 |
bool |
| 203 |
default y |
| 204 |
help |
| 205 |
The Chrome EC currently supports two ways to read battery strings on |
| 206 |
ACPI platforms: |
| 207 |
|
| 208 |
* Read up to 8 bytes from EC shared memory BMFG, BMOD, ... |
| 209 |
* Send a EC_CMD_BATTERY_GET_STATIC host command and read longer strings as a response. |
| 210 |
|
| 211 |
Select this config to support readout of longer battery strings. |
| 212 |
|
| 213 |
If unsure, say N. |
| 214 |
|
| 215 |
config EC_GOOGLE_CHROMEEC_LPC_GENERIC_MEMORY_RANGE |
| 216 |
def_bool n |
| 217 |
help |
| 218 |
Select this option to access LPC GMR (Generic Memory Range) Register to |
| 219 |
implement MMIO based communication between EC and AP firmware. |
| 220 |
|
| 221 |
config EC_GOOGLE_CHROMEEC_LPC_GENERIC_MEMORY_BASE |
| 222 |
hex |
| 223 |
default 0xfe0b0000 |
| 224 |
|
| 225 |
config EC_GOOGLE_CHROMEEC_LPC_GENERIC_MEMORY_SIZE |
| 226 |
hex |
| 227 |
default 0x10000 |
| 228 |
|
| 229 |
endif # EC_GOOGLE_CHROMEEC |
| 230 |
|
| 231 |
source "src/ec/google/chromeec/*/Kconfig" |