| 1 | # SPDX-License-Identifier: GPL-2.0-only |
| 2 | # |
| 3 | # Platform support for Chrome OS hardware (Chromebooks and Chromeboxes) |
| 4 | # |
| 5 | |
| 6 | menuconfig CHROME_PLATFORMS |
| 7 | bool "Platform support for Chrome hardware" |
| 8 | depends on X86 || ARM || ARM64 || COMPILE_TEST |
| 9 | depends on !CPU_BIG_ENDIAN || COMPILE_TEST |
| 10 | help |
| 11 | Say Y here to get to see options for platform support for |
| 12 | various Chromebooks and Chromeboxes. This option alone does |
| 13 | not add any kernel code. |
| 14 | |
| 15 | If you say N, all options in this submenu will be skipped and disabled. |
| 16 | |
| 17 | if CHROME_PLATFORMS |
| 18 | |
| 19 | config CHROMEOS_ACPI |
| 20 | tristate "ChromeOS specific ACPI extensions" |
| 21 | depends on ACPI |
| 22 | help |
| 23 | This driver provides the firmware interface for the services |
| 24 | exported through the ChromeOS interfaces when using ChromeOS |
| 25 | ACPI firmware. |
| 26 | |
| 27 | If you have an ACPI-compatible Chromebook, say Y or M here. |
| 28 | The module will be called chromeos_acpi. |
| 29 | |
| 30 | config CHROMEOS_LAPTOP |
| 31 | tristate "Chrome OS Laptop" |
| 32 | depends on I2C && DMI && X86 |
| 33 | help |
| 34 | This driver instantiates i2c and smbus devices such as |
| 35 | light sensors and touchpads. |
| 36 | |
| 37 | If you have a supported Chromebook, choose Y or M here. |
| 38 | The module will be called chromeos_laptop. |
| 39 | |
| 40 | config CHROMEOS_PSTORE |
| 41 | tristate "Chrome OS pstore support" |
| 42 | depends on X86 |
| 43 | help |
| 44 | This module instantiates the persistent storage on x86 ChromeOS |
| 45 | devices. It can be used to store away console logs and crash |
| 46 | information across reboots. |
| 47 | |
| 48 | The range of memory used is 0xf00000-0x1000000, traditionally |
| 49 | the memory used to back VGA controller memory. |
| 50 | |
| 51 | If you have a supported Chromebook, choose Y or M here. |
| 52 | The module will be called chromeos_pstore. |
| 53 | |
| 54 | config CHROMEOS_TBMC |
| 55 | tristate "ChromeOS Tablet Switch Controller" |
| 56 | depends on ACPI |
| 57 | depends on INPUT |
| 58 | help |
| 59 | This option adds a driver for the tablet switch on |
| 60 | select Chrome OS systems. |
| 61 | |
| 62 | To compile this driver as a module, choose M here: the |
| 63 | module will be called chromeos_tbmc. |
| 64 | |
| 65 | config CHROMEOS_OF_HW_PROBER |
| 66 | tristate "ChromeOS Device Tree Hardware Prober" |
| 67 | depends on OF |
| 68 | depends on I2C |
| 69 | select OF_DYNAMIC |
| 70 | default OF |
| 71 | help |
| 72 | This option enables the device tree hardware prober for ChromeOS |
| 73 | devices. The driver will probe the correct component variant in |
| 74 | devices that have multiple drop-in options for one component. |
| 75 | |
| 76 | config CROS_EC |
| 77 | tristate "ChromeOS Embedded Controller" |
| 78 | select CROS_EC_PROTO |
| 79 | help |
| 80 | If you say Y here you get support for the ChromeOS Embedded |
| 81 | Controller (EC) providing keyboard, battery and power services. |
| 82 | You also need to enable the driver for the bus you are using. The |
| 83 | protocol for talking to the EC is defined by the bus driver. |
| 84 | |
| 85 | To compile this driver as a module, choose M here: the |
| 86 | module will be called cros_ec. |
| 87 | |
| 88 | config CROS_EC_I2C |
| 89 | tristate "ChromeOS Embedded Controller (I2C)" |
| 90 | depends on CROS_EC && I2C |
| 91 | |
| 92 | help |
| 93 | If you say Y here, you get support for talking to the ChromeOS |
| 94 | EC through an I2C bus. This uses a simple byte-level protocol with |
| 95 | a checksum. Failing accesses will be retried three times to |
| 96 | improve reliability. |
| 97 | |
| 98 | config CROS_EC_RPMSG |
| 99 | tristate "ChromeOS Embedded Controller (rpmsg)" |
| 100 | depends on CROS_EC && RPMSG && OF |
| 101 | help |
| 102 | If you say Y here, you get support for talking to the ChromeOS EC |
| 103 | through rpmsg. This uses a simple byte-level protocol with a |
| 104 | checksum. Also since there's no addition EC-to-host interrupt, this |
| 105 | use a byte in message to distinguish host event from host command. |
| 106 | |
| 107 | To compile this driver as a module, choose M here: the |
| 108 | module will be called cros_ec_rpmsg. |
| 109 | |
| 110 | config CROS_EC_ISHTP |
| 111 | tristate "ChromeOS Embedded Controller (ISHTP)" |
| 112 | depends on CROS_EC |
| 113 | depends on INTEL_ISH_HID |
| 114 | help |
| 115 | If you say Y here, you get support for talking to the ChromeOS EC |
| 116 | firmware running on Intel Integrated Sensor Hub (ISH), using the |
| 117 | ISH Transport protocol (ISH-TP). This uses a simple byte-level |
| 118 | protocol with a checksum. |
| 119 | |
| 120 | To compile this driver as a module, choose M here: the |
| 121 | module will be called cros_ec_ishtp. |
| 122 | |
| 123 | config CROS_EC_SPI |
| 124 | tristate "ChromeOS Embedded Controller (SPI)" |
| 125 | depends on CROS_EC && SPI |
| 126 | |
| 127 | help |
| 128 | If you say Y here, you get support for talking to the ChromeOS EC |
| 129 | through a SPI bus, using a byte-level protocol. Since the EC's |
| 130 | response time cannot be guaranteed, we support ignoring |
| 131 | 'pre-amble' bytes before the response actually starts. |
| 132 | |
| 133 | config CROS_EC_UART |
| 134 | tristate "ChromeOS Embedded Controller (UART)" |
| 135 | depends on CROS_EC && ACPI && SERIAL_DEV_BUS |
| 136 | help |
| 137 | If you say Y here, you get support for talking to the ChromeOS EC |
| 138 | through a UART, using a byte-level protocol. |
| 139 | |
| 140 | To compile this driver as a module, choose M here: the |
| 141 | module will be called cros_ec_uart. |
| 142 | |
| 143 | config CROS_EC_LPC |
| 144 | tristate "ChromeOS Embedded Controller (LPC)" |
| 145 | depends on CROS_EC && ACPI && (X86 || COMPILE_TEST) |
| 146 | depends on HAS_IOPORT |
| 147 | help |
| 148 | If you say Y here, you get support for talking to the ChromeOS EC |
| 149 | over an LPC bus, including the LPC Microchip EC (MEC) variant. |
| 150 | This uses a simple byte-level protocol with a checksum. This is |
| 151 | used for userspace access only. The kernel typically has its own |
| 152 | communication methods. |
| 153 | |
| 154 | To compile this driver as a module, choose M here: the |
| 155 | module will be called cros_ec_lpcs. |
| 156 | |
| 157 | config CROS_EC_PROTO |
| 158 | tristate |
| 159 | help |
| 160 | ChromeOS EC communication protocol helpers. |
| 161 | |
| 162 | config CROS_KBD_LED_BACKLIGHT |
| 163 | tristate "Backlight LED support for Chrome OS keyboards" |
| 164 | depends on LEDS_CLASS |
| 165 | depends on MFD_CROS_EC_DEV || (MFD_CROS_EC_DEV=n && ACPI) |
| 166 | help |
| 167 | This option enables support for the keyboard backlight LEDs on |
| 168 | select Chrome OS systems. |
| 169 | |
| 170 | To compile this driver as a module, choose M here: the |
| 171 | module will be called cros_kbd_led_backlight. |
| 172 | |
| 173 | config CROS_EC_CHARDEV |
| 174 | tristate "ChromeOS EC miscdevice" |
| 175 | depends on MFD_CROS_EC_DEV |
| 176 | default MFD_CROS_EC_DEV |
| 177 | help |
| 178 | This driver adds file operations support to talk with the |
| 179 | ChromeOS EC from userspace via a character device. |
| 180 | |
| 181 | To compile this driver as a module, choose M here: the |
| 182 | module will be called cros_ec_chardev. |
| 183 | |
| 184 | config CROS_EC_LIGHTBAR |
| 185 | tristate "Chromebook Pixel's lightbar support" |
| 186 | depends on MFD_CROS_EC_DEV |
| 187 | default MFD_CROS_EC_DEV |
| 188 | help |
| 189 | This option exposes the Chromebook Pixel's lightbar to |
| 190 | userspace. |
| 191 | |
| 192 | To compile this driver as a module, choose M here: the |
| 193 | module will be called cros_ec_lightbar. |
| 194 | |
| 195 | config CROS_EC_VBC |
| 196 | tristate "ChromeOS EC vboot context support" |
| 197 | depends on MFD_CROS_EC_DEV && OF |
| 198 | default MFD_CROS_EC_DEV |
| 199 | help |
| 200 | This option exposes the ChromeOS EC vboot context nvram to |
| 201 | userspace. |
| 202 | |
| 203 | To compile this driver as a module, choose M here: the |
| 204 | module will be called cros_ec_vbc. |
| 205 | |
| 206 | config CROS_EC_DEBUGFS |
| 207 | tristate "Export ChromeOS EC internals in DebugFS" |
| 208 | depends on MFD_CROS_EC_DEV && DEBUG_FS |
| 209 | default MFD_CROS_EC_DEV |
| 210 | help |
| 211 | This option exposes the ChromeOS EC device internals to |
| 212 | userspace. |
| 213 | |
| 214 | To compile this driver as a module, choose M here: the |
| 215 | module will be called cros_ec_debugfs. |
| 216 | |
| 217 | config CROS_EC_SENSORHUB |
| 218 | tristate "ChromeOS EC MEMS Sensor Hub" |
| 219 | depends on MFD_CROS_EC_DEV |
| 220 | default MFD_CROS_EC_DEV |
| 221 | help |
| 222 | Allow loading IIO sensors. This driver is loaded by MFD and will in |
| 223 | turn query the EC and register the sensors. |
| 224 | It also spreads the sensor data coming from the EC to the IIO sensor |
| 225 | object. |
| 226 | |
| 227 | To compile this driver as a module, choose M here: the |
| 228 | module will be called cros_ec_sensorhub. |
| 229 | |
| 230 | config CROS_EC_SYSFS |
| 231 | tristate "ChromeOS EC control and information through sysfs" |
| 232 | depends on MFD_CROS_EC_DEV && SYSFS |
| 233 | default MFD_CROS_EC_DEV |
| 234 | help |
| 235 | This option exposes some sysfs attributes to control and get |
| 236 | information from ChromeOS EC. |
| 237 | |
| 238 | To compile this driver as a module, choose M here: the |
| 239 | module will be called cros_ec_sysfs. |
| 240 | |
| 241 | config CROS_EC_TYPEC_ALTMODES |
| 242 | bool |
| 243 | help |
| 244 | Selectable symbol to enable altmodes. |
| 245 | |
| 246 | config CROS_EC_TYPEC |
| 247 | tristate "ChromeOS EC Type-C Connector Control" |
| 248 | depends on MFD_CROS_EC_DEV && TYPEC |
| 249 | depends on CROS_USBPD_NOTIFY |
| 250 | depends on USB_ROLE_SWITCH |
| 251 | default MFD_CROS_EC_DEV |
| 252 | select CROS_EC_TYPEC_ALTMODES if TYPEC_DP_ALTMODE |
| 253 | select CROS_EC_TYPEC_ALTMODES if TYPEC_TBT_ALTMODE |
| 254 | help |
| 255 | If you say Y here, you get support for accessing Type C connector |
| 256 | information from the Chrome OS EC. |
| 257 | |
| 258 | To compile this driver as a module, choose M here: the module will be |
| 259 | called cros-ec-typec. |
| 260 | |
| 261 | config CROS_HPS_I2C |
| 262 | tristate "ChromeOS HPS device" |
| 263 | depends on HID && I2C && PM |
| 264 | help |
| 265 | Say Y here if you want to enable support for the ChromeOS |
| 266 | human presence sensor (HPS), attached via I2C. The driver supports a |
| 267 | sensor connected to the I2C bus and exposes it as a character device. |
| 268 | To save power, the sensor is automatically powered down when no |
| 269 | clients are accessing it. |
| 270 | |
| 271 | config CROS_USBPD_LOGGER |
| 272 | tristate "Logging driver for USB PD charger" |
| 273 | depends on CHARGER_CROS_USBPD |
| 274 | default y |
| 275 | select RTC_LIB |
| 276 | help |
| 277 | This option enables support for logging event data for the USB PD charger |
| 278 | available in the Embedded Controller on ChromeOS systems. |
| 279 | |
| 280 | To compile this driver as a module, choose M here: the |
| 281 | module will be called cros_usbpd_logger. |
| 282 | |
| 283 | config CROS_USBPD_NOTIFY |
| 284 | tristate "ChromeOS Type-C power delivery event notifier" |
| 285 | depends on MFD_CROS_EC_DEV |
| 286 | default MFD_CROS_EC_DEV |
| 287 | help |
| 288 | If you say Y here, you get support for Type-C PD event notifications |
| 289 | from the ChromeOS EC. On ACPI platforms this driver will bind to the |
| 290 | GOOG0003 ACPI device, and on platforms which don't have this device it |
| 291 | will get initialized on ECs which support the feature |
| 292 | EC_FEATURE_USB_PD. |
| 293 | |
| 294 | To compile this driver as a module, choose M here: the |
| 295 | module will be called cros_usbpd_notify. |
| 296 | |
| 297 | config CHROMEOS_PRIVACY_SCREEN |
| 298 | tristate "ChromeOS Privacy Screen support" |
| 299 | depends on ACPI |
| 300 | depends on DRM |
| 301 | select DRM_PRIVACY_SCREEN |
| 302 | help |
| 303 | This driver provides the support needed for the in-built electronic |
| 304 | privacy screen that is present on some ChromeOS devices. When enabled, |
| 305 | this should probably always be built into the kernel to avoid or |
| 306 | minimize drm probe deferral. |
| 307 | |
| 308 | config CROS_TYPEC_SWITCH |
| 309 | tristate "ChromeOS EC Type-C Switch Control" |
| 310 | depends on MFD_CROS_EC_DEV && TYPEC && ACPI |
| 311 | default MFD_CROS_EC_DEV |
| 312 | help |
| 313 | If you say Y here, you get support for configuring the ChromeOS EC Type-C |
| 314 | muxes and retimers. |
| 315 | |
| 316 | To compile this driver as a module, choose M here: the module will be |
| 317 | called cros_typec_switch. |
| 318 | |
| 319 | source "drivers/platform/chrome/wilco_ec/Kconfig" |
| 320 | |
| 321 | # Kunit test cases |
| 322 | config CROS_KUNIT_EC_PROTO_TEST |
| 323 | tristate "Kunit tests for ChromeOS EC protocol" if !KUNIT_ALL_TESTS |
| 324 | depends on KUNIT && CROS_EC |
| 325 | default KUNIT_ALL_TESTS |
| 326 | select CROS_EC_PROTO |
| 327 | help |
| 328 | Kunit tests for ChromeOS EC protocol. |
| 329 | |
| 330 | endif # CHROMEOS_PLATFORMS |