1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2ab043105SOlof Johansson# 3ab043105SOlof Johansson# Platform support for Chrome OS hardware (Chromebooks and Chromeboxes) 4ab043105SOlof Johansson# 5ab043105SOlof Johansson 6ab043105SOlof Johanssonmenuconfig CHROME_PLATFORMS 7ab043105SOlof Johansson bool "Platform support for Chrome hardware" 823ecee32SThierry Reding depends on X86 || ARM || ARM64 || COMPILE_TEST 9a7f7f624SMasahiro Yamada help 10ab043105SOlof Johansson Say Y here to get to see options for platform support for 11ab043105SOlof Johansson various Chromebooks and Chromeboxes. This option alone does 12ab043105SOlof Johansson not add any kernel code. 13ab043105SOlof Johansson 14ab043105SOlof Johansson If you say N, all options in this submenu will be skipped and disabled. 15ab043105SOlof Johansson 16ab043105SOlof Johanssonif CHROME_PLATFORMS 17ab043105SOlof Johansson 180a4cad9cSEnric Balletbo i Serraconfig CHROMEOS_ACPI 190a4cad9cSEnric Balletbo i Serra tristate "ChromeOS specific ACPI extensions" 200a4cad9cSEnric Balletbo i Serra depends on ACPI 210a4cad9cSEnric Balletbo i Serra help 220a4cad9cSEnric Balletbo i Serra This driver provides the firmware interface for the services 230a4cad9cSEnric Balletbo i Serra exported through the ChromeOS interfaces when using ChromeOS 240a4cad9cSEnric Balletbo i Serra ACPI firmware. 250a4cad9cSEnric Balletbo i Serra 260a4cad9cSEnric Balletbo i Serra If you have an ACPI-compatible Chromebook, say Y or M here. 270a4cad9cSEnric Balletbo i Serra The module will be called chromeos_acpi. 280a4cad9cSEnric Balletbo i Serra 29ab043105SOlof Johanssonconfig CHROMEOS_LAPTOP 30ab043105SOlof Johansson tristate "Chrome OS Laptop" 31e7c256fbSBill Richardson depends on I2C && DMI && X86 32a7f7f624SMasahiro Yamada help 33ab043105SOlof Johansson This driver instantiates i2c and smbus devices such as 34ab043105SOlof Johansson light sensors and touchpads. 35ab043105SOlof Johansson 36ab043105SOlof Johansson If you have a supported Chromebook, choose Y or M here. 37ab043105SOlof Johansson The module will be called chromeos_laptop. 38ab043105SOlof Johansson 399742e127SOlof Johanssonconfig CHROMEOS_PSTORE 409742e127SOlof Johansson tristate "Chrome OS pstore support" 41e7c256fbSBill Richardson depends on X86 42a7f7f624SMasahiro Yamada help 439742e127SOlof Johansson This module instantiates the persistent storage on x86 ChromeOS 449742e127SOlof Johansson devices. It can be used to store away console logs and crash 459742e127SOlof Johansson information across reboots. 469742e127SOlof Johansson 479742e127SOlof Johansson The range of memory used is 0xf00000-0x1000000, traditionally 489742e127SOlof Johansson the memory used to back VGA controller memory. 499742e127SOlof Johansson 509742e127SOlof Johansson If you have a supported Chromebook, choose Y or M here. 519742e127SOlof Johansson The module will be called chromeos_pstore. 529742e127SOlof Johansson 53b418f741SGwendal Grignouconfig CHROMEOS_TBMC 54b418f741SGwendal Grignou tristate "ChromeOS Tablet Switch Controller" 55b418f741SGwendal Grignou depends on ACPI 56485aa74aSArnd Bergmann depends on INPUT 57b418f741SGwendal Grignou help 58b418f741SGwendal Grignou This option adds a driver for the tablet switch on 59b418f741SGwendal Grignou select Chrome OS systems. 60b418f741SGwendal Grignou 61b418f741SGwendal Grignou To compile this driver as a module, choose M here: the 62b418f741SGwendal Grignou module will be called chromeos_tbmc. 63b418f741SGwendal Grignou 6447f11e0bSEnric Balletbo i Serraconfig CROS_EC 6547f11e0bSEnric Balletbo i Serra tristate "ChromeOS Embedded Controller" 6647f11e0bSEnric Balletbo i Serra select CROS_EC_PROTO 6747f11e0bSEnric Balletbo i Serra depends on X86 || ARM || ARM64 || COMPILE_TEST 6847f11e0bSEnric Balletbo i Serra help 6947f11e0bSEnric Balletbo i Serra If you say Y here you get support for the ChromeOS Embedded 7047f11e0bSEnric Balletbo i Serra Controller (EC) providing keyboard, battery and power services. 7147f11e0bSEnric Balletbo i Serra You also need to enable the driver for the bus you are using. The 7247f11e0bSEnric Balletbo i Serra protocol for talking to the EC is defined by the bus driver. 7347f11e0bSEnric Balletbo i Serra 7447f11e0bSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 7547f11e0bSEnric Balletbo i Serra module will be called cros_ec. 7647f11e0bSEnric Balletbo i Serra 77d00a8741SEnric Balletbo i Serraconfig CROS_EC_I2C 78d00a8741SEnric Balletbo i Serra tristate "ChromeOS Embedded Controller (I2C)" 7947f11e0bSEnric Balletbo i Serra depends on CROS_EC && I2C 80d00a8741SEnric Balletbo i Serra 81d00a8741SEnric Balletbo i Serra help 82d00a8741SEnric Balletbo i Serra If you say Y here, you get support for talking to the ChromeOS 83d00a8741SEnric Balletbo i Serra EC through an I2C bus. This uses a simple byte-level protocol with 84d00a8741SEnric Balletbo i Serra a checksum. Failing accesses will be retried three times to 85d00a8741SEnric Balletbo i Serra improve reliability. 86d00a8741SEnric Balletbo i Serra 872de89fd9SPi-Hsun Shihconfig CROS_EC_RPMSG 882de89fd9SPi-Hsun Shih tristate "ChromeOS Embedded Controller (rpmsg)" 8947f11e0bSEnric Balletbo i Serra depends on CROS_EC && RPMSG && OF 902de89fd9SPi-Hsun Shih help 912de89fd9SPi-Hsun Shih If you say Y here, you get support for talking to the ChromeOS EC 922de89fd9SPi-Hsun Shih through rpmsg. This uses a simple byte-level protocol with a 932de89fd9SPi-Hsun Shih checksum. Also since there's no addition EC-to-host interrupt, this 942de89fd9SPi-Hsun Shih use a byte in message to distinguish host event from host command. 952de89fd9SPi-Hsun Shih 962de89fd9SPi-Hsun Shih To compile this driver as a module, choose M here: the 972de89fd9SPi-Hsun Shih module will be called cros_ec_rpmsg. 982de89fd9SPi-Hsun Shih 9926a14267SRushikesh S Kadamconfig CROS_EC_ISHTP 10026a14267SRushikesh S Kadam tristate "ChromeOS Embedded Controller (ISHTP)" 1012fa2b980SEnric Balletbo i Serra depends on CROS_EC 10226a14267SRushikesh S Kadam depends on INTEL_ISH_HID 10326a14267SRushikesh S Kadam help 10426a14267SRushikesh S Kadam If you say Y here, you get support for talking to the ChromeOS EC 10526a14267SRushikesh S Kadam firmware running on Intel Integrated Sensor Hub (ISH), using the 10626a14267SRushikesh S Kadam ISH Transport protocol (ISH-TP). This uses a simple byte-level 10726a14267SRushikesh S Kadam protocol with a checksum. 10826a14267SRushikesh S Kadam 10926a14267SRushikesh S Kadam To compile this driver as a module, choose M here: the 11026a14267SRushikesh S Kadam module will be called cros_ec_ishtp. 11126a14267SRushikesh S Kadam 112d00a8741SEnric Balletbo i Serraconfig CROS_EC_SPI 113d00a8741SEnric Balletbo i Serra tristate "ChromeOS Embedded Controller (SPI)" 11447f11e0bSEnric Balletbo i Serra depends on CROS_EC && SPI 115d00a8741SEnric Balletbo i Serra 116a7f7f624SMasahiro Yamada help 117d00a8741SEnric Balletbo i Serra If you say Y here, you get support for talking to the ChromeOS EC 118d00a8741SEnric Balletbo i Serra through a SPI bus, using a byte-level protocol. Since the EC's 119d00a8741SEnric Balletbo i Serra response time cannot be guaranteed, we support ignoring 120d00a8741SEnric Balletbo i Serra 'pre-amble' bytes before the response actually starts. 121d00a8741SEnric Balletbo i Serra 122ec2f33abSBill Richardsonconfig CROS_EC_LPC 123ec2f33abSBill Richardson tristate "ChromeOS Embedded Controller (LPC)" 12447f11e0bSEnric Balletbo i Serra depends on CROS_EC && ACPI && (X86 || COMPILE_TEST) 125ec2f33abSBill Richardson help 126ec2f33abSBill Richardson If you say Y here, you get support for talking to the ChromeOS EC 12722c040faSEnric Balletbo i Serra over an LPC bus, including the LPC Microchip EC (MEC) variant. 12822c040faSEnric Balletbo i Serra This uses a simple byte-level protocol with a checksum. This is 12922c040faSEnric Balletbo i Serra used for userspace access only. The kernel typically has its own 13022c040faSEnric Balletbo i Serra communication methods. 131ec2f33abSBill Richardson 132ec2f33abSBill Richardson To compile this driver as a module, choose M here: the 13322c040faSEnric Balletbo i Serra module will be called cros_ec_lpcs. 1348d4a3dc4SShawn Nematbakhsh 135062476f2SJavier Martinez Canillasconfig CROS_EC_PROTO 136062476f2SJavier Martinez Canillas bool 137062476f2SJavier Martinez Canillas help 138062476f2SJavier Martinez Canillas ChromeOS EC communication protocol helpers. 139062476f2SJavier Martinez Canillas 140492ef782SSimon Queconfig CROS_KBD_LED_BACKLIGHT 141492ef782SSimon Que tristate "Backlight LED support for Chrome OS keyboards" 14240f58143STzung-Bi Shih depends on LEDS_CLASS && (ACPI || CROS_EC) 143492ef782SSimon Que help 144492ef782SSimon Que This option enables support for the keyboard backlight LEDs on 145492ef782SSimon Que select Chrome OS systems. 146492ef782SSimon Que 147492ef782SSimon Que To compile this driver as a module, choose M here: the 148492ef782SSimon Que module will be called cros_kbd_led_backlight. 149492ef782SSimon Que 150eda2e30cSEnric Balletbo i Serraconfig CROS_EC_CHARDEV 151eda2e30cSEnric Balletbo i Serra tristate "ChromeOS EC miscdevice" 1522fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 1532fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 154eda2e30cSEnric Balletbo i Serra help 155eda2e30cSEnric Balletbo i Serra This driver adds file operations support to talk with the 156eda2e30cSEnric Balletbo i Serra ChromeOS EC from userspace via a character device. 157eda2e30cSEnric Balletbo i Serra 158eda2e30cSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 159eda2e30cSEnric Balletbo i Serra module will be called cros_ec_chardev. 160eda2e30cSEnric Balletbo i Serra 161ecf8a6cdSEnric Balletbo i Serraconfig CROS_EC_LIGHTBAR 162ecf8a6cdSEnric Balletbo i Serra tristate "Chromebook Pixel's lightbar support" 1632fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 1642fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 165ecf8a6cdSEnric Balletbo i Serra help 166ecf8a6cdSEnric Balletbo i Serra This option exposes the Chromebook Pixel's lightbar to 167ecf8a6cdSEnric Balletbo i Serra userspace. 168ecf8a6cdSEnric Balletbo i Serra 169ecf8a6cdSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 170ecf8a6cdSEnric Balletbo i Serra module will be called cros_ec_lightbar. 171ecf8a6cdSEnric Balletbo i Serra 172acb9900fSEnric Balletbo i Serraconfig CROS_EC_VBC 173acb9900fSEnric Balletbo i Serra tristate "ChromeOS EC vboot context support" 1742fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && OF 1752fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 176acb9900fSEnric Balletbo i Serra help 177acb9900fSEnric Balletbo i Serra This option exposes the ChromeOS EC vboot context nvram to 178acb9900fSEnric Balletbo i Serra userspace. 179acb9900fSEnric Balletbo i Serra 180acb9900fSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 181acb9900fSEnric Balletbo i Serra module will be called cros_ec_vbc. 182acb9900fSEnric Balletbo i Serra 1836fce0a2cSEnric Balletbo i Serraconfig CROS_EC_DEBUGFS 1846fce0a2cSEnric Balletbo i Serra tristate "Export ChromeOS EC internals in DebugFS" 1852fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && DEBUG_FS 1862fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 1876fce0a2cSEnric Balletbo i Serra help 1886fce0a2cSEnric Balletbo i Serra This option exposes the ChromeOS EC device internals to 1896fce0a2cSEnric Balletbo i Serra userspace. 1906fce0a2cSEnric Balletbo i Serra 1916fce0a2cSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 1926fce0a2cSEnric Balletbo i Serra module will be called cros_ec_debugfs. 1936fce0a2cSEnric Balletbo i Serra 19453067471SGwendal Grignouconfig CROS_EC_SENSORHUB 19553067471SGwendal Grignou tristate "ChromeOS EC MEMS Sensor Hub" 19674c166b5SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 19774c166b5SEnric Balletbo i Serra default MFD_CROS_EC_DEV 19853067471SGwendal Grignou help 19953067471SGwendal Grignou Allow loading IIO sensors. This driver is loaded by MFD and will in 20053067471SGwendal Grignou turn query the EC and register the sensors. 20153067471SGwendal Grignou It also spreads the sensor data coming from the EC to the IIO sensor 20253067471SGwendal Grignou object. 20353067471SGwendal Grignou 20453067471SGwendal Grignou To compile this driver as a module, choose M here: the 20553067471SGwendal Grignou module will be called cros_ec_sensorhub. 20653067471SGwendal Grignou 2076fd7f2bbSEnric Balletbo i Serraconfig CROS_EC_SYSFS 2086fd7f2bbSEnric Balletbo i Serra tristate "ChromeOS EC control and information through sysfs" 2092fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && SYSFS 2102fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 2116fd7f2bbSEnric Balletbo i Serra help 2126fd7f2bbSEnric Balletbo i Serra This option exposes some sysfs attributes to control and get 2136fd7f2bbSEnric Balletbo i Serra information from ChromeOS EC. 2146fd7f2bbSEnric Balletbo i Serra 2156fd7f2bbSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 2166fd7f2bbSEnric Balletbo i Serra module will be called cros_ec_sysfs. 2176fd7f2bbSEnric Balletbo i Serra 218fdc6b21eSPrashant Malaniconfig CROS_EC_TYPEC 219fdc6b21eSPrashant Malani tristate "ChromeOS EC Type-C Connector Control" 220fdc6b21eSPrashant Malani depends on MFD_CROS_EC_DEV && TYPEC 2217110f5f0SPrashant Malani depends on CROS_USBPD_NOTIFY 222bdc40945SEnric Balletbo i Serra depends on USB_ROLE_SWITCH 223fdc6b21eSPrashant Malani default MFD_CROS_EC_DEV 224fdc6b21eSPrashant Malani help 225fdc6b21eSPrashant Malani If you say Y here, you get support for accessing Type C connector 226fdc6b21eSPrashant Malani information from the Chrome OS EC. 227fdc6b21eSPrashant Malani 228fdc6b21eSPrashant Malani To compile this driver as a module, choose M here: the module will be 229fdc6b21eSPrashant Malani called cros_ec_typec. 230fdc6b21eSPrashant Malani 231*5f995254SDan Callaghanconfig CROS_HPS_I2C 232*5f995254SDan Callaghan tristate "ChromeOS HPS device" 233*5f995254SDan Callaghan depends on HID && I2C && PM 234*5f995254SDan Callaghan help 235*5f995254SDan Callaghan Say Y here if you want to enable support for the ChromeOS 236*5f995254SDan Callaghan human presence sensor (HPS), attached via I2C. The driver supports a 237*5f995254SDan Callaghan sensor connected to the I2C bus and exposes it as a character device. 238*5f995254SDan Callaghan To save power, the sensor is automatically powered down when no 239*5f995254SDan Callaghan clients are accessing it. 240*5f995254SDan Callaghan 241a2679b64SGuenter Roeckconfig CROS_USBPD_LOGGER 242a2679b64SGuenter Roeck tristate "Logging driver for USB PD charger" 243a2679b64SGuenter Roeck depends on CHARGER_CROS_USBPD 244a2679b64SGuenter Roeck default y 245a2679b64SGuenter Roeck select RTC_LIB 246a2679b64SGuenter Roeck help 247a2679b64SGuenter Roeck This option enables support for logging event data for the USB PD charger 248a2679b64SGuenter Roeck available in the Embedded Controller on ChromeOS systems. 249a2679b64SGuenter Roeck 250a2679b64SGuenter Roeck To compile this driver as a module, choose M here: the 251a2679b64SGuenter Roeck module will be called cros_usbpd_logger. 252a2679b64SGuenter Roeck 253ec2daf6eSJon Flatleyconfig CROS_USBPD_NOTIFY 254ec2daf6eSJon Flatley tristate "ChromeOS Type-C power delivery event notifier" 255ec2daf6eSJon Flatley depends on MFD_CROS_EC_DEV 256ec2daf6eSJon Flatley default MFD_CROS_EC_DEV 257ec2daf6eSJon Flatley help 258ec2daf6eSJon Flatley If you say Y here, you get support for Type-C PD event notifications 259ec2daf6eSJon Flatley from the ChromeOS EC. On ACPI platorms this driver will bind to the 260ec2daf6eSJon Flatley GOOG0003 ACPI device, and on platforms which don't have this device it 261ec2daf6eSJon Flatley will get initialized on ECs which support the feature 262ec2daf6eSJon Flatley EC_FEATURE_USB_PD. 263ec2daf6eSJon Flatley 264ec2daf6eSJon Flatley To compile this driver as a module, choose M here: the 265ec2daf6eSJon Flatley module will be called cros_usbpd_notify. 266ec2daf6eSJon Flatley 2673fb57847SRajat Jainconfig CHROMEOS_PRIVACY_SCREEN 2683fb57847SRajat Jain tristate "ChromeOS Privacy Screen support" 2693fb57847SRajat Jain depends on ACPI 2703fb57847SRajat Jain depends on DRM 2713fb57847SRajat Jain select DRM_PRIVACY_SCREEN 2723fb57847SRajat Jain help 2733fb57847SRajat Jain This driver provides the support needed for the in-built electronic 2743fb57847SRajat Jain privacy screen that is present on some ChromeOS devices. When enabled, 2753fb57847SRajat Jain this should probably always be built into the kernel to avoid or 2763fb57847SRajat Jain minimize drm probe deferral. 2773fb57847SRajat Jain 278affc804cSPrashant Malaniconfig CROS_TYPEC_SWITCH 279affc804cSPrashant Malani tristate "ChromeOS EC Type-C Switch Control" 280affc804cSPrashant Malani depends on MFD_CROS_EC_DEV && TYPEC && ACPI 281affc804cSPrashant Malani default MFD_CROS_EC_DEV 282affc804cSPrashant Malani help 283affc804cSPrashant Malani If you say Y here, you get support for configuring the ChromeOS EC Type-C 284affc804cSPrashant Malani muxes and retimers. 285affc804cSPrashant Malani 286affc804cSPrashant Malani To compile this driver as a module, choose M here: the module will be 287affc804cSPrashant Malani called cros_typec_switch. 288affc804cSPrashant Malani 2897b3d4f44SNick Crewssource "drivers/platform/chrome/wilco_ec/Kconfig" 2907b3d4f44SNick Crews 291db681eafSTzung-Bi Shih# Kunit test cases 292b99eb596STzung-Bi Shihconfig CROS_KUNIT 293f92dd147STzung-Bi Shih tristate "Kunit tests for ChromeOS" if !KUNIT_ALL_TESTS 294db681eafSTzung-Bi Shih depends on KUNIT && CROS_EC 295db681eafSTzung-Bi Shih default KUNIT_ALL_TESTS 296db681eafSTzung-Bi Shih select CROS_EC_PROTO 297db681eafSTzung-Bi Shih help 298f92dd147STzung-Bi Shih ChromeOS Kunit tests. 299db681eafSTzung-Bi Shih 300ab043105SOlof Johanssonendif # CHROMEOS_PLATFORMS 301