xref: /linux/drivers/platform/chrome/Kconfig (revision 3fc361af8ab0a96619ba0146a5f694f59ae3f4c2)
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
64*3fc361afSChen-Yu Tsaiconfig CHROMEOS_OF_HW_PROBER
65*3fc361afSChen-Yu Tsai	tristate "ChromeOS Device Tree Hardware Prober"
66*3fc361afSChen-Yu Tsai	depends on OF
67*3fc361afSChen-Yu Tsai	depends on I2C
68*3fc361afSChen-Yu Tsai	select OF_DYNAMIC
69*3fc361afSChen-Yu Tsai	default OF
70*3fc361afSChen-Yu Tsai	help
71*3fc361afSChen-Yu Tsai	  This option enables the device tree hardware prober for ChromeOS
72*3fc361afSChen-Yu Tsai	  devices. The driver will probe the correct component variant in
73*3fc361afSChen-Yu Tsai	  devices that have multiple drop-in options for one component.
74*3fc361afSChen-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
240fdc6b21eSPrashant Malaniconfig CROS_EC_TYPEC
241fdc6b21eSPrashant Malani	tristate "ChromeOS EC Type-C Connector Control"
242fdc6b21eSPrashant Malani	depends on MFD_CROS_EC_DEV && TYPEC
2437110f5f0SPrashant Malani	depends on CROS_USBPD_NOTIFY
244bdc40945SEnric Balletbo i Serra	depends on USB_ROLE_SWITCH
245fdc6b21eSPrashant Malani	default MFD_CROS_EC_DEV
246fdc6b21eSPrashant Malani	help
247fdc6b21eSPrashant Malani	  If you say Y here, you get support for accessing Type C connector
248fdc6b21eSPrashant Malani	  information from the Chrome OS EC.
249fdc6b21eSPrashant Malani
250fdc6b21eSPrashant Malani	  To compile this driver as a module, choose M here: the module will be
251e5eea6a3SPrashant Malani	  called cros-ec-typec.
252fdc6b21eSPrashant Malani
2535f995254SDan Callaghanconfig CROS_HPS_I2C
2545f995254SDan Callaghan	tristate "ChromeOS HPS device"
2555f995254SDan Callaghan	depends on HID && I2C && PM
2565f995254SDan Callaghan	help
2575f995254SDan Callaghan	  Say Y here if you want to enable support for the ChromeOS
2585f995254SDan Callaghan	  human presence sensor (HPS), attached via I2C. The driver supports a
2595f995254SDan Callaghan	  sensor connected to the I2C bus and exposes it as a character device.
2605f995254SDan Callaghan	  To save power, the sensor is automatically powered down when no
2615f995254SDan Callaghan	  clients are accessing it.
2625f995254SDan Callaghan
263a2679b64SGuenter Roeckconfig CROS_USBPD_LOGGER
264a2679b64SGuenter Roeck	tristate "Logging driver for USB PD charger"
265a2679b64SGuenter Roeck	depends on CHARGER_CROS_USBPD
266a2679b64SGuenter Roeck	default y
267a2679b64SGuenter Roeck	select RTC_LIB
268a2679b64SGuenter Roeck	help
269a2679b64SGuenter Roeck	  This option enables support for logging event data for the USB PD charger
270a2679b64SGuenter Roeck	  available in the Embedded Controller on ChromeOS systems.
271a2679b64SGuenter Roeck
272a2679b64SGuenter Roeck	  To compile this driver as a module, choose M here: the
273a2679b64SGuenter Roeck	  module will be called cros_usbpd_logger.
274a2679b64SGuenter Roeck
275ec2daf6eSJon Flatleyconfig CROS_USBPD_NOTIFY
276ec2daf6eSJon Flatley	tristate "ChromeOS Type-C power delivery event notifier"
277ec2daf6eSJon Flatley	depends on MFD_CROS_EC_DEV
278ec2daf6eSJon Flatley	default MFD_CROS_EC_DEV
279ec2daf6eSJon Flatley	help
280ec2daf6eSJon Flatley	  If you say Y here, you get support for Type-C PD event notifications
281ec2daf6eSJon Flatley	  from the ChromeOS EC. On ACPI platorms this driver will bind to the
282ec2daf6eSJon Flatley	  GOOG0003 ACPI device, and on platforms which don't have this device it
283ec2daf6eSJon Flatley	  will get initialized on ECs which support the feature
284ec2daf6eSJon Flatley	  EC_FEATURE_USB_PD.
285ec2daf6eSJon Flatley
286ec2daf6eSJon Flatley	  To compile this driver as a module, choose M here: the
287ec2daf6eSJon Flatley	  module will be called cros_usbpd_notify.
288ec2daf6eSJon Flatley
2893fb57847SRajat Jainconfig CHROMEOS_PRIVACY_SCREEN
2903fb57847SRajat Jain	tristate "ChromeOS Privacy Screen support"
2913fb57847SRajat Jain	depends on ACPI
2923fb57847SRajat Jain	depends on DRM
2933fb57847SRajat Jain	select DRM_PRIVACY_SCREEN
2943fb57847SRajat Jain	help
2953fb57847SRajat Jain	  This driver provides the support needed for the in-built electronic
2963fb57847SRajat Jain	  privacy screen that is present on some ChromeOS devices. When enabled,
2973fb57847SRajat Jain	  this should probably always be built into the kernel to avoid or
2983fb57847SRajat Jain	  minimize drm probe deferral.
2993fb57847SRajat Jain
300affc804cSPrashant Malaniconfig CROS_TYPEC_SWITCH
301affc804cSPrashant Malani	tristate "ChromeOS EC Type-C Switch Control"
302affc804cSPrashant Malani	depends on MFD_CROS_EC_DEV && TYPEC && ACPI
303affc804cSPrashant Malani	default MFD_CROS_EC_DEV
304affc804cSPrashant Malani	help
305affc804cSPrashant Malani	  If you say Y here, you get support for configuring the ChromeOS EC Type-C
306affc804cSPrashant Malani	  muxes and retimers.
307affc804cSPrashant Malani
308affc804cSPrashant Malani	  To compile this driver as a module, choose M here: the module will be
309affc804cSPrashant Malani	  called cros_typec_switch.
310affc804cSPrashant Malani
3117b3d4f44SNick Crewssource "drivers/platform/chrome/wilco_ec/Kconfig"
3127b3d4f44SNick Crews
313db681eafSTzung-Bi Shih# Kunit test cases
314466f70fbSTzung-Bi Shihconfig CROS_KUNIT_EC_PROTO_TEST
315466f70fbSTzung-Bi Shih	tristate "Kunit tests for ChromeOS EC protocol" if !KUNIT_ALL_TESTS
316db681eafSTzung-Bi Shih	depends on KUNIT && CROS_EC
317db681eafSTzung-Bi Shih	default KUNIT_ALL_TESTS
318db681eafSTzung-Bi Shih	select CROS_EC_PROTO
319db681eafSTzung-Bi Shih	help
320466f70fbSTzung-Bi Shih	  Kunit tests for ChromeOS EC protocol.
321db681eafSTzung-Bi Shih
322ab043105SOlof Johanssonendif # CHROMEOS_PLATFORMS
323