xref: /openbmc/linux/drivers/platform/chrome/Kconfig (revision 0c94efab)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Platform support for Chrome OS hardware (Chromebooks and Chromeboxes)
4#
5
6menuconfig CHROME_PLATFORMS
7	bool "Platform support for Chrome hardware"
8	depends on X86 || ARM || ARM64 || COMPILE_TEST
9	---help---
10	  Say Y here to get to see options for platform support for
11	  various Chromebooks and Chromeboxes. This option alone does
12	  not add any kernel code.
13
14	  If you say N, all options in this submenu will be skipped and disabled.
15
16if CHROME_PLATFORMS
17
18config CHROMEOS_LAPTOP
19	tristate "Chrome OS Laptop"
20	depends on I2C && DMI && X86
21	---help---
22	  This driver instantiates i2c and smbus devices such as
23	  light sensors and touchpads.
24
25	  If you have a supported Chromebook, choose Y or M here.
26	  The module will be called chromeos_laptop.
27
28config CHROMEOS_PSTORE
29	tristate "Chrome OS pstore support"
30	depends on X86
31	---help---
32	  This module instantiates the persistent storage on x86 ChromeOS
33	  devices. It can be used to store away console logs and crash
34	  information across reboots.
35
36	  The range of memory used is 0xf00000-0x1000000, traditionally
37	  the memory used to back VGA controller memory.
38
39	  If you have a supported Chromebook, choose Y or M here.
40	  The module will be called chromeos_pstore.
41
42config CHROMEOS_TBMC
43	tristate "ChromeOS Tablet Switch Controller"
44	depends on ACPI
45	depends on INPUT
46	help
47	  This option adds a driver for the tablet switch on
48	  select Chrome OS systems.
49
50	  To compile this driver as a module, choose M here: the
51	  module will be called chromeos_tbmc.
52
53config CROS_EC_I2C
54	tristate "ChromeOS Embedded Controller (I2C)"
55	depends on MFD_CROS_EC && I2C
56
57	help
58	  If you say Y here, you get support for talking to the ChromeOS
59	  EC through an I2C bus. This uses a simple byte-level protocol with
60	  a checksum. Failing accesses will be retried three times to
61	  improve reliability.
62
63config CROS_EC_RPMSG
64	tristate "ChromeOS Embedded Controller (rpmsg)"
65	depends on MFD_CROS_EC && RPMSG && OF
66	help
67	  If you say Y here, you get support for talking to the ChromeOS EC
68	  through rpmsg. This uses a simple byte-level protocol with a
69	  checksum. Also since there's no addition EC-to-host interrupt, this
70	  use a byte in message to distinguish host event from host command.
71
72	  To compile this driver as a module, choose M here: the
73	  module will be called cros_ec_rpmsg.
74
75config CROS_EC_SPI
76	tristate "ChromeOS Embedded Controller (SPI)"
77	depends on MFD_CROS_EC && SPI
78
79	---help---
80	  If you say Y here, you get support for talking to the ChromeOS EC
81	  through a SPI bus, using a byte-level protocol. Since the EC's
82	  response time cannot be guaranteed, we support ignoring
83	  'pre-amble' bytes before the response actually starts.
84
85config CROS_EC_LPC
86        tristate "ChromeOS Embedded Controller (LPC)"
87        depends on MFD_CROS_EC && ACPI && (X86 || COMPILE_TEST)
88        help
89          If you say Y here, you get support for talking to the ChromeOS EC
90          over an LPC bus. This uses a simple byte-level protocol with a
91          checksum. This is used for userspace access only. The kernel
92          typically has its own communication methods.
93
94          To compile this driver as a module, choose M here: the
95          module will be called cros_ec_lpc.
96
97config CROS_EC_LPC_MEC
98	bool "ChromeOS Embedded Controller LPC Microchip EC (MEC) variant"
99	depends on CROS_EC_LPC
100	default n
101	help
102	  If you say Y here, a variant LPC protocol for the Microchip EC
103	  will be used. Note that this variant is not backward compatible
104	  with non-Microchip ECs.
105
106	  If you have a ChromeOS Embedded Controller Microchip EC variant
107	  choose Y here.
108
109config CROS_EC_PROTO
110        bool
111        help
112          ChromeOS EC communication protocol helpers.
113
114config CROS_KBD_LED_BACKLIGHT
115	tristate "Backlight LED support for Chrome OS keyboards"
116	depends on LEDS_CLASS && ACPI
117	help
118	  This option enables support for the keyboard backlight LEDs on
119	  select Chrome OS systems.
120
121	  To compile this driver as a module, choose M here: the
122	  module will be called cros_kbd_led_backlight.
123
124config CROS_EC_LIGHTBAR
125	tristate "Chromebook Pixel's lightbar support"
126	depends on MFD_CROS_EC_CHARDEV
127	default MFD_CROS_EC_CHARDEV
128	help
129	  This option exposes the Chromebook Pixel's lightbar to
130	  userspace.
131
132	  To compile this driver as a module, choose M here: the
133	  module will be called cros_ec_lightbar.
134
135config CROS_EC_VBC
136	tristate "ChromeOS EC vboot context support"
137	depends on MFD_CROS_EC_CHARDEV && OF
138	default MFD_CROS_EC_CHARDEV
139	help
140	  This option exposes the ChromeOS EC vboot context nvram to
141	  userspace.
142
143	  To compile this driver as a module, choose M here: the
144	  module will be called cros_ec_vbc.
145
146config CROS_EC_DEBUGFS
147	tristate "Export ChromeOS EC internals in DebugFS"
148	depends on MFD_CROS_EC_CHARDEV && DEBUG_FS
149	default MFD_CROS_EC_CHARDEV
150	help
151	  This option exposes the ChromeOS EC device internals to
152	  userspace.
153
154	  To compile this driver as a module, choose M here: the
155	  module will be called cros_ec_debugfs.
156
157config CROS_EC_SYSFS
158	tristate "ChromeOS EC control and information through sysfs"
159	depends on MFD_CROS_EC_CHARDEV && SYSFS
160	default MFD_CROS_EC_CHARDEV
161	help
162	  This option exposes some sysfs attributes to control and get
163	  information from ChromeOS EC.
164
165	  To compile this driver as a module, choose M here: the
166	  module will be called cros_ec_sysfs.
167
168config CROS_USBPD_LOGGER
169	tristate "Logging driver for USB PD charger"
170	depends on CHARGER_CROS_USBPD
171	default y
172	select RTC_LIB
173	help
174	  This option enables support for logging event data for the USB PD charger
175	  available in the Embedded Controller on ChromeOS systems.
176
177	  To compile this driver as a module, choose M here: the
178	  module will be called cros_usbpd_logger.
179
180source "drivers/platform/chrome/wilco_ec/Kconfig"
181
182endif # CHROMEOS_PLATFORMS
183