0001 # SPDX-License-Identifier: GPL-2.0-only
0002 #
0003 # Platform support for Chrome OS hardware (Chromebooks and Chromeboxes)
0004 #
0005
0006 menuconfig CHROME_PLATFORMS
0007 bool "Platform support for Chrome hardware"
0008 depends on X86 || ARM || ARM64 || COMPILE_TEST
0009 help
0010 Say Y here to get to see options for platform support for
0011 various Chromebooks and Chromeboxes. This option alone does
0012 not add any kernel code.
0013
0014 If you say N, all options in this submenu will be skipped and disabled.
0015
0016 if CHROME_PLATFORMS
0017
0018 config CHROMEOS_ACPI
0019 tristate "ChromeOS specific ACPI extensions"
0020 depends on ACPI
0021 help
0022 This driver provides the firmware interface for the services
0023 exported through the ChromeOS interfaces when using ChromeOS
0024 ACPI firmware.
0025
0026 If you have an ACPI-compatible Chromebook, say Y or M here.
0027 The module will be called chromeos_acpi.
0028
0029 config CHROMEOS_LAPTOP
0030 tristate "Chrome OS Laptop"
0031 depends on I2C && DMI && X86
0032 help
0033 This driver instantiates i2c and smbus devices such as
0034 light sensors and touchpads.
0035
0036 If you have a supported Chromebook, choose Y or M here.
0037 The module will be called chromeos_laptop.
0038
0039 config CHROMEOS_PSTORE
0040 tristate "Chrome OS pstore support"
0041 depends on X86
0042 help
0043 This module instantiates the persistent storage on x86 ChromeOS
0044 devices. It can be used to store away console logs and crash
0045 information across reboots.
0046
0047 The range of memory used is 0xf00000-0x1000000, traditionally
0048 the memory used to back VGA controller memory.
0049
0050 If you have a supported Chromebook, choose Y or M here.
0051 The module will be called chromeos_pstore.
0052
0053 config CHROMEOS_TBMC
0054 tristate "ChromeOS Tablet Switch Controller"
0055 depends on ACPI
0056 depends on INPUT
0057 help
0058 This option adds a driver for the tablet switch on
0059 select Chrome OS systems.
0060
0061 To compile this driver as a module, choose M here: the
0062 module will be called chromeos_tbmc.
0063
0064 config CROS_EC
0065 tristate "ChromeOS Embedded Controller"
0066 select CROS_EC_PROTO
0067 depends on X86 || ARM || ARM64 || COMPILE_TEST
0068 help
0069 If you say Y here you get support for the ChromeOS Embedded
0070 Controller (EC) providing keyboard, battery and power services.
0071 You also need to enable the driver for the bus you are using. The
0072 protocol for talking to the EC is defined by the bus driver.
0073
0074 To compile this driver as a module, choose M here: the
0075 module will be called cros_ec.
0076
0077 config CROS_EC_I2C
0078 tristate "ChromeOS Embedded Controller (I2C)"
0079 depends on CROS_EC && I2C
0080
0081 help
0082 If you say Y here, you get support for talking to the ChromeOS
0083 EC through an I2C bus. This uses a simple byte-level protocol with
0084 a checksum. Failing accesses will be retried three times to
0085 improve reliability.
0086
0087 config CROS_EC_RPMSG
0088 tristate "ChromeOS Embedded Controller (rpmsg)"
0089 depends on CROS_EC && RPMSG && OF
0090 help
0091 If you say Y here, you get support for talking to the ChromeOS EC
0092 through rpmsg. This uses a simple byte-level protocol with a
0093 checksum. Also since there's no addition EC-to-host interrupt, this
0094 use a byte in message to distinguish host event from host command.
0095
0096 To compile this driver as a module, choose M here: the
0097 module will be called cros_ec_rpmsg.
0098
0099 config CROS_EC_ISHTP
0100 tristate "ChromeOS Embedded Controller (ISHTP)"
0101 depends on CROS_EC
0102 depends on INTEL_ISH_HID
0103 help
0104 If you say Y here, you get support for talking to the ChromeOS EC
0105 firmware running on Intel Integrated Sensor Hub (ISH), using the
0106 ISH Transport protocol (ISH-TP). This uses a simple byte-level
0107 protocol with a checksum.
0108
0109 To compile this driver as a module, choose M here: the
0110 module will be called cros_ec_ishtp.
0111
0112 config CROS_EC_SPI
0113 tristate "ChromeOS Embedded Controller (SPI)"
0114 depends on CROS_EC && SPI
0115
0116 help
0117 If you say Y here, you get support for talking to the ChromeOS EC
0118 through a SPI bus, using a byte-level protocol. Since the EC's
0119 response time cannot be guaranteed, we support ignoring
0120 'pre-amble' bytes before the response actually starts.
0121
0122 config CROS_EC_LPC
0123 tristate "ChromeOS Embedded Controller (LPC)"
0124 depends on CROS_EC && ACPI && (X86 || COMPILE_TEST)
0125 help
0126 If you say Y here, you get support for talking to the ChromeOS EC
0127 over an LPC bus, including the LPC Microchip EC (MEC) variant.
0128 This uses a simple byte-level protocol with a checksum. This is
0129 used for userspace access only. The kernel typically has its own
0130 communication methods.
0131
0132 To compile this driver as a module, choose M here: the
0133 module will be called cros_ec_lpcs.
0134
0135 config CROS_EC_PROTO
0136 bool
0137 help
0138 ChromeOS EC communication protocol helpers.
0139
0140 config CROS_KBD_LED_BACKLIGHT
0141 tristate "Backlight LED support for Chrome OS keyboards"
0142 depends on LEDS_CLASS && (ACPI || CROS_EC)
0143 help
0144 This option enables support for the keyboard backlight LEDs on
0145 select Chrome OS systems.
0146
0147 To compile this driver as a module, choose M here: the
0148 module will be called cros_kbd_led_backlight.
0149
0150 config CROS_EC_CHARDEV
0151 tristate "ChromeOS EC miscdevice"
0152 depends on MFD_CROS_EC_DEV
0153 default MFD_CROS_EC_DEV
0154 help
0155 This driver adds file operations support to talk with the
0156 ChromeOS EC from userspace via a character device.
0157
0158 To compile this driver as a module, choose M here: the
0159 module will be called cros_ec_chardev.
0160
0161 config CROS_EC_LIGHTBAR
0162 tristate "Chromebook Pixel's lightbar support"
0163 depends on MFD_CROS_EC_DEV
0164 default MFD_CROS_EC_DEV
0165 help
0166 This option exposes the Chromebook Pixel's lightbar to
0167 userspace.
0168
0169 To compile this driver as a module, choose M here: the
0170 module will be called cros_ec_lightbar.
0171
0172 config CROS_EC_VBC
0173 tristate "ChromeOS EC vboot context support"
0174 depends on MFD_CROS_EC_DEV && OF
0175 default MFD_CROS_EC_DEV
0176 help
0177 This option exposes the ChromeOS EC vboot context nvram to
0178 userspace.
0179
0180 To compile this driver as a module, choose M here: the
0181 module will be called cros_ec_vbc.
0182
0183 config CROS_EC_DEBUGFS
0184 tristate "Export ChromeOS EC internals in DebugFS"
0185 depends on MFD_CROS_EC_DEV && DEBUG_FS
0186 default MFD_CROS_EC_DEV
0187 help
0188 This option exposes the ChromeOS EC device internals to
0189 userspace.
0190
0191 To compile this driver as a module, choose M here: the
0192 module will be called cros_ec_debugfs.
0193
0194 config CROS_EC_SENSORHUB
0195 tristate "ChromeOS EC MEMS Sensor Hub"
0196 depends on MFD_CROS_EC_DEV
0197 default MFD_CROS_EC_DEV
0198 help
0199 Allow loading IIO sensors. This driver is loaded by MFD and will in
0200 turn query the EC and register the sensors.
0201 It also spreads the sensor data coming from the EC to the IIO sensor
0202 object.
0203
0204 To compile this driver as a module, choose M here: the
0205 module will be called cros_ec_sensorhub.
0206
0207 config CROS_EC_SYSFS
0208 tristate "ChromeOS EC control and information through sysfs"
0209 depends on MFD_CROS_EC_DEV && SYSFS
0210 default MFD_CROS_EC_DEV
0211 help
0212 This option exposes some sysfs attributes to control and get
0213 information from ChromeOS EC.
0214
0215 To compile this driver as a module, choose M here: the
0216 module will be called cros_ec_sysfs.
0217
0218 config CROS_EC_TYPEC
0219 tristate "ChromeOS EC Type-C Connector Control"
0220 depends on MFD_CROS_EC_DEV && TYPEC
0221 depends on CROS_USBPD_NOTIFY
0222 depends on USB_ROLE_SWITCH
0223 default MFD_CROS_EC_DEV
0224 help
0225 If you say Y here, you get support for accessing Type C connector
0226 information from the Chrome OS EC.
0227
0228 To compile this driver as a module, choose M here: the module will be
0229 called cros_ec_typec.
0230
0231 config CROS_USBPD_LOGGER
0232 tristate "Logging driver for USB PD charger"
0233 depends on CHARGER_CROS_USBPD
0234 default y
0235 select RTC_LIB
0236 help
0237 This option enables support for logging event data for the USB PD charger
0238 available in the Embedded Controller on ChromeOS systems.
0239
0240 To compile this driver as a module, choose M here: the
0241 module will be called cros_usbpd_logger.
0242
0243 config CROS_USBPD_NOTIFY
0244 tristate "ChromeOS Type-C power delivery event notifier"
0245 depends on MFD_CROS_EC_DEV
0246 default MFD_CROS_EC_DEV
0247 help
0248 If you say Y here, you get support for Type-C PD event notifications
0249 from the ChromeOS EC. On ACPI platorms this driver will bind to the
0250 GOOG0003 ACPI device, and on platforms which don't have this device it
0251 will get initialized on ECs which support the feature
0252 EC_FEATURE_USB_PD.
0253
0254 To compile this driver as a module, choose M here: the
0255 module will be called cros_usbpd_notify.
0256
0257 config CHROMEOS_PRIVACY_SCREEN
0258 tristate "ChromeOS Privacy Screen support"
0259 depends on ACPI
0260 depends on DRM
0261 select DRM_PRIVACY_SCREEN
0262 help
0263 This driver provides the support needed for the in-built electronic
0264 privacy screen that is present on some ChromeOS devices. When enabled,
0265 this should probably always be built into the kernel to avoid or
0266 minimize drm probe deferral.
0267
0268 source "drivers/platform/chrome/wilco_ec/Kconfig"
0269
0270 # Kunit test cases
0271 config CROS_KUNIT
0272 tristate "Kunit tests for ChromeOS" if !KUNIT_ALL_TESTS
0273 depends on KUNIT && CROS_EC
0274 default KUNIT_ALL_TESTS
0275 select CROS_EC_PROTO
0276 help
0277 ChromeOS Kunit tests.
0278
0279 endif # CHROMEOS_PLATFORMS