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 643fc361afSChen-Yu Tsaiconfig CHROMEOS_OF_HW_PROBER 653fc361afSChen-Yu Tsai tristate "ChromeOS Device Tree Hardware Prober" 663fc361afSChen-Yu Tsai depends on OF 673fc361afSChen-Yu Tsai depends on I2C 683fc361afSChen-Yu Tsai select OF_DYNAMIC 693fc361afSChen-Yu Tsai default OF 703fc361afSChen-Yu Tsai help 713fc361afSChen-Yu Tsai This option enables the device tree hardware prober for ChromeOS 723fc361afSChen-Yu Tsai devices. The driver will probe the correct component variant in 733fc361afSChen-Yu Tsai devices that have multiple drop-in options for one component. 743fc361afSChen-Yu Tsai 7547f11e0bSEnric Balletbo i Serraconfig CROS_EC 7647f11e0bSEnric Balletbo i Serra tristate "ChromeOS Embedded Controller" 7747f11e0bSEnric Balletbo i Serra select CROS_EC_PROTO 7847f11e0bSEnric Balletbo i Serra depends on X86 || ARM || ARM64 || COMPILE_TEST 7947f11e0bSEnric Balletbo i Serra help 8047f11e0bSEnric Balletbo i Serra If you say Y here you get support for the ChromeOS Embedded 8147f11e0bSEnric Balletbo i Serra Controller (EC) providing keyboard, battery and power services. 8247f11e0bSEnric Balletbo i Serra You also need to enable the driver for the bus you are using. The 8347f11e0bSEnric Balletbo i Serra protocol for talking to the EC is defined by the bus driver. 8447f11e0bSEnric Balletbo i Serra 8547f11e0bSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 8647f11e0bSEnric Balletbo i Serra module will be called cros_ec. 8747f11e0bSEnric Balletbo i Serra 88d00a8741SEnric Balletbo i Serraconfig CROS_EC_I2C 89d00a8741SEnric Balletbo i Serra tristate "ChromeOS Embedded Controller (I2C)" 9047f11e0bSEnric Balletbo i Serra depends on CROS_EC && I2C 91d00a8741SEnric Balletbo i Serra 92d00a8741SEnric Balletbo i Serra help 93d00a8741SEnric Balletbo i Serra If you say Y here, you get support for talking to the ChromeOS 94d00a8741SEnric Balletbo i Serra EC through an I2C bus. This uses a simple byte-level protocol with 95d00a8741SEnric Balletbo i Serra a checksum. Failing accesses will be retried three times to 96d00a8741SEnric Balletbo i Serra improve reliability. 97d00a8741SEnric Balletbo i Serra 982de89fd9SPi-Hsun Shihconfig CROS_EC_RPMSG 992de89fd9SPi-Hsun Shih tristate "ChromeOS Embedded Controller (rpmsg)" 10047f11e0bSEnric Balletbo i Serra depends on CROS_EC && RPMSG && OF 1012de89fd9SPi-Hsun Shih help 1022de89fd9SPi-Hsun Shih If you say Y here, you get support for talking to the ChromeOS EC 1032de89fd9SPi-Hsun Shih through rpmsg. This uses a simple byte-level protocol with a 1042de89fd9SPi-Hsun Shih checksum. Also since there's no addition EC-to-host interrupt, this 1052de89fd9SPi-Hsun Shih use a byte in message to distinguish host event from host command. 1062de89fd9SPi-Hsun Shih 1072de89fd9SPi-Hsun Shih To compile this driver as a module, choose M here: the 1082de89fd9SPi-Hsun Shih module will be called cros_ec_rpmsg. 1092de89fd9SPi-Hsun Shih 11026a14267SRushikesh S Kadamconfig CROS_EC_ISHTP 11126a14267SRushikesh S Kadam tristate "ChromeOS Embedded Controller (ISHTP)" 1122fa2b980SEnric Balletbo i Serra depends on CROS_EC 11326a14267SRushikesh S Kadam depends on INTEL_ISH_HID 11426a14267SRushikesh S Kadam help 11526a14267SRushikesh S Kadam If you say Y here, you get support for talking to the ChromeOS EC 11626a14267SRushikesh S Kadam firmware running on Intel Integrated Sensor Hub (ISH), using the 11726a14267SRushikesh S Kadam ISH Transport protocol (ISH-TP). This uses a simple byte-level 11826a14267SRushikesh S Kadam protocol with a checksum. 11926a14267SRushikesh S Kadam 12026a14267SRushikesh S Kadam To compile this driver as a module, choose M here: the 12126a14267SRushikesh S Kadam module will be called cros_ec_ishtp. 12226a14267SRushikesh S Kadam 123d00a8741SEnric Balletbo i Serraconfig CROS_EC_SPI 124d00a8741SEnric Balletbo i Serra tristate "ChromeOS Embedded Controller (SPI)" 12547f11e0bSEnric Balletbo i Serra depends on CROS_EC && SPI 126d00a8741SEnric Balletbo i Serra 127a7f7f624SMasahiro Yamada help 128d00a8741SEnric Balletbo i Serra If you say Y here, you get support for talking to the ChromeOS EC 129d00a8741SEnric Balletbo i Serra through a SPI bus, using a byte-level protocol. Since the EC's 130d00a8741SEnric Balletbo i Serra response time cannot be guaranteed, we support ignoring 131d00a8741SEnric Balletbo i Serra 'pre-amble' bytes before the response actually starts. 132d00a8741SEnric Balletbo i Serra 13304a8bdd1SBhanu Prakash Maiyaconfig CROS_EC_UART 13404a8bdd1SBhanu Prakash Maiya tristate "ChromeOS Embedded Controller (UART)" 13504a8bdd1SBhanu Prakash Maiya depends on CROS_EC && ACPI && SERIAL_DEV_BUS 13604a8bdd1SBhanu Prakash Maiya help 13704a8bdd1SBhanu Prakash Maiya If you say Y here, you get support for talking to the ChromeOS EC 13804a8bdd1SBhanu Prakash Maiya through a UART, using a byte-level protocol. 13904a8bdd1SBhanu Prakash Maiya 14004a8bdd1SBhanu Prakash Maiya To compile this driver as a module, choose M here: the 14104a8bdd1SBhanu Prakash Maiya module will be called cros_ec_uart. 14204a8bdd1SBhanu Prakash Maiya 143ec2f33abSBill Richardsonconfig CROS_EC_LPC 144ec2f33abSBill Richardson tristate "ChromeOS Embedded Controller (LPC)" 14547f11e0bSEnric Balletbo i Serra depends on CROS_EC && ACPI && (X86 || COMPILE_TEST) 146d33d2255SNiklas Schnelle depends on HAS_IOPORT 147ec2f33abSBill Richardson help 148ec2f33abSBill Richardson If you say Y here, you get support for talking to the ChromeOS EC 14922c040faSEnric Balletbo i Serra over an LPC bus, including the LPC Microchip EC (MEC) variant. 15022c040faSEnric Balletbo i Serra This uses a simple byte-level protocol with a checksum. This is 15122c040faSEnric Balletbo i Serra used for userspace access only. The kernel typically has its own 15222c040faSEnric Balletbo i Serra communication methods. 153ec2f33abSBill Richardson 154ec2f33abSBill Richardson To compile this driver as a module, choose M here: the 15522c040faSEnric Balletbo i Serra module will be called cros_ec_lpcs. 1568d4a3dc4SShawn Nematbakhsh 157062476f2SJavier Martinez Canillasconfig CROS_EC_PROTO 158062476f2SJavier Martinez Canillas bool 159062476f2SJavier Martinez Canillas help 160062476f2SJavier Martinez Canillas ChromeOS EC communication protocol helpers. 161062476f2SJavier Martinez Canillas 162492ef782SSimon Queconfig CROS_KBD_LED_BACKLIGHT 163492ef782SSimon Que tristate "Backlight LED support for Chrome OS keyboards" 164baa19b65SThomas Weißschuh depends on LEDS_CLASS && (ACPI || CROS_EC || MFD_CROS_EC_DEV) 165492ef782SSimon Que help 166492ef782SSimon Que This option enables support for the keyboard backlight LEDs on 167492ef782SSimon Que select Chrome OS systems. 168492ef782SSimon Que 169492ef782SSimon Que To compile this driver as a module, choose M here: the 170492ef782SSimon Que module will be called cros_kbd_led_backlight. 171492ef782SSimon Que 172eda2e30cSEnric Balletbo i Serraconfig CROS_EC_CHARDEV 173eda2e30cSEnric Balletbo i Serra tristate "ChromeOS EC miscdevice" 1742fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 1752fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 176eda2e30cSEnric Balletbo i Serra help 177eda2e30cSEnric Balletbo i Serra This driver adds file operations support to talk with the 178eda2e30cSEnric Balletbo i Serra ChromeOS EC from userspace via a character device. 179eda2e30cSEnric Balletbo i Serra 180eda2e30cSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 181eda2e30cSEnric Balletbo i Serra module will be called cros_ec_chardev. 182eda2e30cSEnric Balletbo i Serra 183ecf8a6cdSEnric Balletbo i Serraconfig CROS_EC_LIGHTBAR 184ecf8a6cdSEnric Balletbo i Serra tristate "Chromebook Pixel's lightbar support" 1852fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 1862fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 187ecf8a6cdSEnric Balletbo i Serra help 188ecf8a6cdSEnric Balletbo i Serra This option exposes the Chromebook Pixel's lightbar to 189ecf8a6cdSEnric Balletbo i Serra userspace. 190ecf8a6cdSEnric Balletbo i Serra 191ecf8a6cdSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 192ecf8a6cdSEnric Balletbo i Serra module will be called cros_ec_lightbar. 193ecf8a6cdSEnric Balletbo i Serra 194acb9900fSEnric Balletbo i Serraconfig CROS_EC_VBC 195acb9900fSEnric Balletbo i Serra tristate "ChromeOS EC vboot context support" 1962fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && OF 1972fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 198acb9900fSEnric Balletbo i Serra help 199acb9900fSEnric Balletbo i Serra This option exposes the ChromeOS EC vboot context nvram to 200acb9900fSEnric Balletbo i Serra userspace. 201acb9900fSEnric Balletbo i Serra 202acb9900fSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 203acb9900fSEnric Balletbo i Serra module will be called cros_ec_vbc. 204acb9900fSEnric Balletbo i Serra 2056fce0a2cSEnric Balletbo i Serraconfig CROS_EC_DEBUGFS 2066fce0a2cSEnric Balletbo i Serra tristate "Export ChromeOS EC internals in DebugFS" 2072fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && DEBUG_FS 2082fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 2096fce0a2cSEnric Balletbo i Serra help 2106fce0a2cSEnric Balletbo i Serra This option exposes the ChromeOS EC device internals to 2116fce0a2cSEnric Balletbo i Serra userspace. 2126fce0a2cSEnric Balletbo i Serra 2136fce0a2cSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 2146fce0a2cSEnric Balletbo i Serra module will be called cros_ec_debugfs. 2156fce0a2cSEnric Balletbo i Serra 21653067471SGwendal Grignouconfig CROS_EC_SENSORHUB 21753067471SGwendal Grignou tristate "ChromeOS EC MEMS Sensor Hub" 21874c166b5SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV 21974c166b5SEnric Balletbo i Serra default MFD_CROS_EC_DEV 22053067471SGwendal Grignou help 22153067471SGwendal Grignou Allow loading IIO sensors. This driver is loaded by MFD and will in 22253067471SGwendal Grignou turn query the EC and register the sensors. 22353067471SGwendal Grignou It also spreads the sensor data coming from the EC to the IIO sensor 22453067471SGwendal Grignou object. 22553067471SGwendal Grignou 22653067471SGwendal Grignou To compile this driver as a module, choose M here: the 22753067471SGwendal Grignou module will be called cros_ec_sensorhub. 22853067471SGwendal Grignou 2296fd7f2bbSEnric Balletbo i Serraconfig CROS_EC_SYSFS 2306fd7f2bbSEnric Balletbo i Serra tristate "ChromeOS EC control and information through sysfs" 2312fa2b980SEnric Balletbo i Serra depends on MFD_CROS_EC_DEV && SYSFS 2322fa2b980SEnric Balletbo i Serra default MFD_CROS_EC_DEV 2336fd7f2bbSEnric Balletbo i Serra help 2346fd7f2bbSEnric Balletbo i Serra This option exposes some sysfs attributes to control and get 2356fd7f2bbSEnric Balletbo i Serra information from ChromeOS EC. 2366fd7f2bbSEnric Balletbo i Serra 2376fd7f2bbSEnric Balletbo i Serra To compile this driver as a module, choose M here: the 2386fd7f2bbSEnric Balletbo i Serra module will be called cros_ec_sysfs. 2396fd7f2bbSEnric Balletbo i Serra 240dbb3fc0fSAbhishek Pandit-Subediconfig CROS_EC_TYPEC_ALTMODES 241dbb3fc0fSAbhishek Pandit-Subedi bool 242dbb3fc0fSAbhishek Pandit-Subedi help 243dbb3fc0fSAbhishek Pandit-Subedi Selectable symbol to enable altmodes. 244dbb3fc0fSAbhishek Pandit-Subedi 245fdc6b21eSPrashant Malaniconfig CROS_EC_TYPEC 246fdc6b21eSPrashant Malani tristate "ChromeOS EC Type-C Connector Control" 247fdc6b21eSPrashant Malani depends on MFD_CROS_EC_DEV && TYPEC 2487110f5f0SPrashant Malani depends on CROS_USBPD_NOTIFY 249bdc40945SEnric Balletbo i Serra depends on USB_ROLE_SWITCH 250fdc6b21eSPrashant Malani default MFD_CROS_EC_DEV 251dbb3fc0fSAbhishek Pandit-Subedi select CROS_EC_TYPEC_ALTMODES if TYPEC_DP_ALTMODE 252*3b00be26SAbhishek Pandit-Subedi select CROS_EC_TYPEC_ALTMODES if TYPEC_TBT_ALTMODE 253fdc6b21eSPrashant Malani help 254fdc6b21eSPrashant Malani If you say Y here, you get support for accessing Type C connector 255fdc6b21eSPrashant Malani information from the Chrome OS EC. 256fdc6b21eSPrashant Malani 257fdc6b21eSPrashant Malani To compile this driver as a module, choose M here: the module will be 258e5eea6a3SPrashant Malani called cros-ec-typec. 259fdc6b21eSPrashant Malani 2605f995254SDan Callaghanconfig CROS_HPS_I2C 2615f995254SDan Callaghan tristate "ChromeOS HPS device" 2625f995254SDan Callaghan depends on HID && I2C && PM 2635f995254SDan Callaghan help 2645f995254SDan Callaghan Say Y here if you want to enable support for the ChromeOS 2655f995254SDan Callaghan human presence sensor (HPS), attached via I2C. The driver supports a 2665f995254SDan Callaghan sensor connected to the I2C bus and exposes it as a character device. 2675f995254SDan Callaghan To save power, the sensor is automatically powered down when no 2685f995254SDan Callaghan clients are accessing it. 2695f995254SDan Callaghan 270a2679b64SGuenter Roeckconfig CROS_USBPD_LOGGER 271a2679b64SGuenter Roeck tristate "Logging driver for USB PD charger" 272a2679b64SGuenter Roeck depends on CHARGER_CROS_USBPD 273a2679b64SGuenter Roeck default y 274a2679b64SGuenter Roeck select RTC_LIB 275a2679b64SGuenter Roeck help 276a2679b64SGuenter Roeck This option enables support for logging event data for the USB PD charger 277a2679b64SGuenter Roeck available in the Embedded Controller on ChromeOS systems. 278a2679b64SGuenter Roeck 279a2679b64SGuenter Roeck To compile this driver as a module, choose M here: the 280a2679b64SGuenter Roeck module will be called cros_usbpd_logger. 281a2679b64SGuenter Roeck 282ec2daf6eSJon Flatleyconfig CROS_USBPD_NOTIFY 283ec2daf6eSJon Flatley tristate "ChromeOS Type-C power delivery event notifier" 284ec2daf6eSJon Flatley depends on MFD_CROS_EC_DEV 285ec2daf6eSJon Flatley default MFD_CROS_EC_DEV 286ec2daf6eSJon Flatley help 287ec2daf6eSJon Flatley If you say Y here, you get support for Type-C PD event notifications 288ec2daf6eSJon Flatley from the ChromeOS EC. On ACPI platorms this driver will bind to the 289ec2daf6eSJon Flatley GOOG0003 ACPI device, and on platforms which don't have this device it 290ec2daf6eSJon Flatley will get initialized on ECs which support the feature 291ec2daf6eSJon Flatley EC_FEATURE_USB_PD. 292ec2daf6eSJon Flatley 293ec2daf6eSJon Flatley To compile this driver as a module, choose M here: the 294ec2daf6eSJon Flatley module will be called cros_usbpd_notify. 295ec2daf6eSJon Flatley 2963fb57847SRajat Jainconfig CHROMEOS_PRIVACY_SCREEN 2973fb57847SRajat Jain tristate "ChromeOS Privacy Screen support" 2983fb57847SRajat Jain depends on ACPI 2993fb57847SRajat Jain depends on DRM 3003fb57847SRajat Jain select DRM_PRIVACY_SCREEN 3013fb57847SRajat Jain help 3023fb57847SRajat Jain This driver provides the support needed for the in-built electronic 3033fb57847SRajat Jain privacy screen that is present on some ChromeOS devices. When enabled, 3043fb57847SRajat Jain this should probably always be built into the kernel to avoid or 3053fb57847SRajat Jain minimize drm probe deferral. 3063fb57847SRajat Jain 307affc804cSPrashant Malaniconfig CROS_TYPEC_SWITCH 308affc804cSPrashant Malani tristate "ChromeOS EC Type-C Switch Control" 309affc804cSPrashant Malani depends on MFD_CROS_EC_DEV && TYPEC && ACPI 310affc804cSPrashant Malani default MFD_CROS_EC_DEV 311affc804cSPrashant Malani help 312affc804cSPrashant Malani If you say Y here, you get support for configuring the ChromeOS EC Type-C 313affc804cSPrashant Malani muxes and retimers. 314affc804cSPrashant Malani 315affc804cSPrashant Malani To compile this driver as a module, choose M here: the module will be 316affc804cSPrashant Malani called cros_typec_switch. 317affc804cSPrashant Malani 3187b3d4f44SNick Crewssource "drivers/platform/chrome/wilco_ec/Kconfig" 3197b3d4f44SNick Crews 320db681eafSTzung-Bi Shih# Kunit test cases 321466f70fbSTzung-Bi Shihconfig CROS_KUNIT_EC_PROTO_TEST 322466f70fbSTzung-Bi Shih tristate "Kunit tests for ChromeOS EC protocol" if !KUNIT_ALL_TESTS 323db681eafSTzung-Bi Shih depends on KUNIT && CROS_EC 324db681eafSTzung-Bi Shih default KUNIT_ALL_TESTS 325db681eafSTzung-Bi Shih select CROS_EC_PROTO 326db681eafSTzung-Bi Shih help 327466f70fbSTzung-Bi Shih Kunit tests for ChromeOS EC protocol. 328db681eafSTzung-Bi Shih 329ab043105SOlof Johanssonendif # CHROMEOS_PLATFORMS 330