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 12204a8bdd1SBhanu Prakash Maiyaconfig CROS_EC_UART 12304a8bdd1SBhanu Prakash Maiya tristate "ChromeOS Embedded Controller (UART)" 12404a8bdd1SBhanu Prakash Maiya depends on CROS_EC && ACPI && SERIAL_DEV_BUS 12504a8bdd1SBhanu Prakash Maiya help 12604a8bdd1SBhanu Prakash Maiya If you say Y here, you get support for talking to the ChromeOS EC 12704a8bdd1SBhanu Prakash Maiya through a UART, using a byte-level protocol. 12804a8bdd1SBhanu Prakash Maiya 12904a8bdd1SBhanu Prakash Maiya To compile this driver as a module, choose M here: the 13004a8bdd1SBhanu Prakash Maiya module will be called cros_ec_uart. 13104a8bdd1SBhanu Prakash Maiya 132ec2f33abSBill Richardsonconfig CROS_EC_LPC 133ec2f33abSBill Richardson tristate "ChromeOS Embedded Controller (LPC)" 13447f11e0bSEnric Balletbo i Serra depends on CROS_EC && ACPI && (X86 || COMPILE_TEST) 135ec2f33abSBill Richardson help 136ec2f33abSBill Richardson If you say Y here, you get support for talking to the ChromeOS EC 13722c040faSEnric Balletbo i Serra over an LPC bus, including the LPC Microchip EC (MEC) variant. 13822c040faSEnric Balletbo i Serra This uses a simple byte-level protocol with a checksum. This is 13922c040faSEnric Balletbo i Serra used for userspace access only. The kernel typically has its own 14022c040faSEnric Balletbo i Serra communication methods. 141ec2f33abSBill Richardson 142ec2f33abSBill Richardson To compile this driver as a module, choose M here: the 14322c040faSEnric Balletbo i Serra module will be called cros_ec_lpcs. 1448d4a3dc4SShawn Nematbakhsh 145062476f2SJavier Martinez Canillasconfig CROS_EC_PROTO 146062476f2SJavier Martinez Canillas bool 147062476f2SJavier Martinez Canillas help 148062476f2SJavier Martinez Canillas ChromeOS EC communication protocol helpers. 149062476f2SJavier Martinez Canillas 150492ef782SSimon Queconfig CROS_KBD_LED_BACKLIGHT 151492ef782SSimon Que tristate "Backlight LED support for Chrome OS keyboards" 15240f58143STzung-Bi Shih depends on LEDS_CLASS && (ACPI || CROS_EC) 153492ef782SSimon Que help 154492ef782SSimon Que This option enables support for the keyboard backlight LEDs on 155492ef782SSimon Que select Chrome OS systems. 156492ef782SSimon Que 157492ef782SSimon Que To compile this driver as a module, choose M here: the 158492ef782SSimon Que module will be called cros_kbd_led_backlight. 159492ef782SSimon Que 160eda2e30cSEnric Balletbo i Serraconfig CROS_EC_CHARDEV 161eda2e30cSEnric Balletbo i Serra tristate "ChromeOS EC miscdevice" 1622fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 1632fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 164eda2e30cSEnric Balletbo i Serra help 165eda2e30cSEnric Balletbo i Serra This driver adds file operations support to talk with the 166eda2e30cSEnric Balletbo i Serra ChromeOS EC from userspace via a character device. 167eda2e30cSEnric Balletbo i Serra 168eda2e30cSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 169eda2e30cSEnric Balletbo i Serra module will be called cros_ec_chardev. 170eda2e30cSEnric Balletbo i Serra 171ecf8a6cdSEnric Balletbo i Serraconfig CROS_EC_LIGHTBAR 172ecf8a6cdSEnric Balletbo i Serra tristate "Chromebook Pixel's lightbar support" 1732fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 1742fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 175ecf8a6cdSEnric Balletbo i Serra help 176ecf8a6cdSEnric Balletbo i Serra This option exposes the Chromebook Pixel's lightbar to 177ecf8a6cdSEnric Balletbo i Serra userspace. 178ecf8a6cdSEnric Balletbo i Serra 179ecf8a6cdSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 180ecf8a6cdSEnric Balletbo i Serra module will be called cros_ec_lightbar. 181ecf8a6cdSEnric Balletbo i Serra 182acb9900fSEnric Balletbo i Serraconfig CROS_EC_VBC 183acb9900fSEnric Balletbo i Serra tristate "ChromeOS EC vboot context support" 1842fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && OF 1852fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 186acb9900fSEnric Balletbo i Serra help 187acb9900fSEnric Balletbo i Serra This option exposes the ChromeOS EC vboot context nvram to 188acb9900fSEnric Balletbo i Serra userspace. 189acb9900fSEnric Balletbo i Serra 190acb9900fSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 191acb9900fSEnric Balletbo i Serra module will be called cros_ec_vbc. 192acb9900fSEnric Balletbo i Serra 1936fce0a2cSEnric Balletbo i Serraconfig CROS_EC_DEBUGFS 1946fce0a2cSEnric Balletbo i Serra tristate "Export ChromeOS EC internals in DebugFS" 1952fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && DEBUG_FS 1962fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 1976fce0a2cSEnric Balletbo i Serra help 1986fce0a2cSEnric Balletbo i Serra This option exposes the ChromeOS EC device internals to 1996fce0a2cSEnric Balletbo i Serra userspace. 2006fce0a2cSEnric Balletbo i Serra 2016fce0a2cSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 2026fce0a2cSEnric Balletbo i Serra module will be called cros_ec_debugfs. 2036fce0a2cSEnric Balletbo i Serra 20453067471SGwendal Grignouconfig CROS_EC_SENSORHUB 20553067471SGwendal Grignou tristate "ChromeOS EC MEMS Sensor Hub" 20674c166b5SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 20774c166b5SEnric Balletbo i Serra default MFD_CROS_EC_DEV 20853067471SGwendal Grignou help 20953067471SGwendal Grignou Allow loading IIO sensors. This driver is loaded by MFD and will in 21053067471SGwendal Grignou turn query the EC and register the sensors. 21153067471SGwendal Grignou It also spreads the sensor data coming from the EC to the IIO sensor 21253067471SGwendal Grignou object. 21353067471SGwendal Grignou 21453067471SGwendal Grignou To compile this driver as a module, choose M here: the 21553067471SGwendal Grignou module will be called cros_ec_sensorhub. 21653067471SGwendal Grignou 2176fd7f2bbSEnric Balletbo i Serraconfig CROS_EC_SYSFS 2186fd7f2bbSEnric Balletbo i Serra tristate "ChromeOS EC control and information through sysfs" 2192fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && SYSFS 2202fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 2216fd7f2bbSEnric Balletbo i Serra help 2226fd7f2bbSEnric Balletbo i Serra This option exposes some sysfs attributes to control and get 2236fd7f2bbSEnric Balletbo i Serra information from ChromeOS EC. 2246fd7f2bbSEnric Balletbo i Serra 2256fd7f2bbSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 2266fd7f2bbSEnric Balletbo i Serra module will be called cros_ec_sysfs. 2276fd7f2bbSEnric Balletbo i Serra 228fdc6b21eSPrashant Malaniconfig CROS_EC_TYPEC 229fdc6b21eSPrashant Malani tristate "ChromeOS EC Type-C Connector Control" 230fdc6b21eSPrashant Malani depends on MFD_CROS_EC_DEV && TYPEC 2317110f5f0SPrashant Malani depends on CROS_USBPD_NOTIFY 232bdc40945SEnric Balletbo i Serra depends on USB_ROLE_SWITCH 233fdc6b21eSPrashant Malani default MFD_CROS_EC_DEV 234fdc6b21eSPrashant Malani help 235fdc6b21eSPrashant Malani If you say Y here, you get support for accessing Type C connector 236fdc6b21eSPrashant Malani information from the Chrome OS EC. 237fdc6b21eSPrashant Malani 238fdc6b21eSPrashant Malani To compile this driver as a module, choose M here: the module will be 239*e5eea6a3SPrashant Malani called cros-ec-typec. 240fdc6b21eSPrashant Malani 2415f995254SDan Callaghanconfig CROS_HPS_I2C 2425f995254SDan Callaghan tristate "ChromeOS HPS device" 2435f995254SDan Callaghan depends on HID && I2C && PM 2445f995254SDan Callaghan help 2455f995254SDan Callaghan Say Y here if you want to enable support for the ChromeOS 2465f995254SDan Callaghan human presence sensor (HPS), attached via I2C. The driver supports a 2475f995254SDan Callaghan sensor connected to the I2C bus and exposes it as a character device. 2485f995254SDan Callaghan To save power, the sensor is automatically powered down when no 2495f995254SDan Callaghan clients are accessing it. 2505f995254SDan Callaghan 251a2679b64SGuenter Roeckconfig CROS_USBPD_LOGGER 252a2679b64SGuenter Roeck tristate "Logging driver for USB PD charger" 253a2679b64SGuenter Roeck depends on CHARGER_CROS_USBPD 254a2679b64SGuenter Roeck default y 255a2679b64SGuenter Roeck select RTC_LIB 256a2679b64SGuenter Roeck help 257a2679b64SGuenter Roeck This option enables support for logging event data for the USB PD charger 258a2679b64SGuenter Roeck available in the Embedded Controller on ChromeOS systems. 259a2679b64SGuenter Roeck 260a2679b64SGuenter Roeck To compile this driver as a module, choose M here: the 261a2679b64SGuenter Roeck module will be called cros_usbpd_logger. 262a2679b64SGuenter Roeck 263ec2daf6eSJon Flatleyconfig CROS_USBPD_NOTIFY 264ec2daf6eSJon Flatley tristate "ChromeOS Type-C power delivery event notifier" 265ec2daf6eSJon Flatley depends on MFD_CROS_EC_DEV 266ec2daf6eSJon Flatley default MFD_CROS_EC_DEV 267ec2daf6eSJon Flatley help 268ec2daf6eSJon Flatley If you say Y here, you get support for Type-C PD event notifications 269ec2daf6eSJon Flatley from the ChromeOS EC. On ACPI platorms this driver will bind to the 270ec2daf6eSJon Flatley GOOG0003 ACPI device, and on platforms which don't have this device it 271ec2daf6eSJon Flatley will get initialized on ECs which support the feature 272ec2daf6eSJon Flatley EC_FEATURE_USB_PD. 273ec2daf6eSJon Flatley 274ec2daf6eSJon Flatley To compile this driver as a module, choose M here: the 275ec2daf6eSJon Flatley module will be called cros_usbpd_notify. 276ec2daf6eSJon Flatley 2773fb57847SRajat Jainconfig CHROMEOS_PRIVACY_SCREEN 2783fb57847SRajat Jain tristate "ChromeOS Privacy Screen support" 2793fb57847SRajat Jain depends on ACPI 2803fb57847SRajat Jain depends on DRM 2813fb57847SRajat Jain select DRM_PRIVACY_SCREEN 2823fb57847SRajat Jain help 2833fb57847SRajat Jain This driver provides the support needed for the in-built electronic 2843fb57847SRajat Jain privacy screen that is present on some ChromeOS devices. When enabled, 2853fb57847SRajat Jain this should probably always be built into the kernel to avoid or 2863fb57847SRajat Jain minimize drm probe deferral. 2873fb57847SRajat Jain 288affc804cSPrashant Malaniconfig CROS_TYPEC_SWITCH 289affc804cSPrashant Malani tristate "ChromeOS EC Type-C Switch Control" 290affc804cSPrashant Malani depends on MFD_CROS_EC_DEV && TYPEC && ACPI 291affc804cSPrashant Malani default MFD_CROS_EC_DEV 292affc804cSPrashant Malani help 293affc804cSPrashant Malani If you say Y here, you get support for configuring the ChromeOS EC Type-C 294affc804cSPrashant Malani muxes and retimers. 295affc804cSPrashant Malani 296affc804cSPrashant Malani To compile this driver as a module, choose M here: the module will be 297affc804cSPrashant Malani called cros_typec_switch. 298affc804cSPrashant Malani 2997b3d4f44SNick Crewssource "drivers/platform/chrome/wilco_ec/Kconfig" 3007b3d4f44SNick Crews 301db681eafSTzung-Bi Shih# Kunit test cases 302b99eb596STzung-Bi Shihconfig CROS_KUNIT 303f92dd147STzung-Bi Shih tristate "Kunit tests for ChromeOS" if !KUNIT_ALL_TESTS 304db681eafSTzung-Bi Shih depends on KUNIT && CROS_EC 305db681eafSTzung-Bi Shih default KUNIT_ALL_TESTS 306db681eafSTzung-Bi Shih select CROS_EC_PROTO 307db681eafSTzung-Bi Shih help 308f92dd147STzung-Bi Shih ChromeOS Kunit tests. 309db681eafSTzung-Bi Shih 310ab043105SOlof Johanssonendif # CHROMEOS_PLATFORMS 311