Loading...
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_ACPI
19 tristate "ChromeOS specific ACPI extensions"
20 depends on ACPI
21 help
22 This driver provides the firmware interface for the services
23 exported through the ChromeOS interfaces when using ChromeOS
24 ACPI firmware.
25
26 If you have an ACPI-compatible Chromebook, say Y or M here.
27 The module will be called chromeos_acpi.
28
29config CHROMEOS_LAPTOP
30 tristate "Chrome OS Laptop"
31 depends on I2C && DMI && X86
32 help
33 This driver instantiates i2c and smbus devices such as
34 light sensors and touchpads.
35
36 If you have a supported Chromebook, choose Y or M here.
37 The module will be called chromeos_laptop.
38
39config CHROMEOS_PSTORE
40 tristate "Chrome OS pstore support"
41 depends on X86
42 help
43 This module instantiates the persistent storage on x86 ChromeOS
44 devices. It can be used to store away console logs and crash
45 information across reboots.
46
47 The range of memory used is 0xf00000-0x1000000, traditionally
48 the memory used to back VGA controller memory.
49
50 If you have a supported Chromebook, choose Y or M here.
51 The module will be called chromeos_pstore.
52
53config CHROMEOS_TBMC
54 tristate "ChromeOS Tablet Switch Controller"
55 depends on ACPI
56 depends on INPUT
57 help
58 This option adds a driver for the tablet switch on
59 select Chrome OS systems.
60
61 To compile this driver as a module, choose M here: the
62 module will be called chromeos_tbmc.
63
64config CROS_EC
65 tristate "ChromeOS Embedded Controller"
66 select CROS_EC_PROTO
67 depends on X86 || ARM || ARM64 || COMPILE_TEST
68 help
69 If you say Y here you get support for the ChromeOS Embedded
70 Controller (EC) providing keyboard, battery and power services.
71 You also need to enable the driver for the bus you are using. The
72 protocol for talking to the EC is defined by the bus driver.
73
74 To compile this driver as a module, choose M here: the
75 module will be called cros_ec.
76
77config CROS_EC_I2C
78 tristate "ChromeOS Embedded Controller (I2C)"
79 depends on CROS_EC && I2C
80
81 help
82 If you say Y here, you get support for talking to the ChromeOS
83 EC through an I2C bus. This uses a simple byte-level protocol with
84 a checksum. Failing accesses will be retried three times to
85 improve reliability.
86
87config CROS_EC_RPMSG
88 tristate "ChromeOS Embedded Controller (rpmsg)"
89 depends on CROS_EC && RPMSG && OF
90 help
91 If you say Y here, you get support for talking to the ChromeOS EC
92 through rpmsg. This uses a simple byte-level protocol with a
93 checksum. Also since there's no addition EC-to-host interrupt, this
94 use a byte in message to distinguish host event from host command.
95
96 To compile this driver as a module, choose M here: the
97 module will be called cros_ec_rpmsg.
98
99config CROS_EC_ISHTP
100 tristate "ChromeOS Embedded Controller (ISHTP)"
101 depends on CROS_EC
102 depends on INTEL_ISH_HID
103 help
104 If you say Y here, you get support for talking to the ChromeOS EC
105 firmware running on Intel Integrated Sensor Hub (ISH), using the
106 ISH Transport protocol (ISH-TP). This uses a simple byte-level
107 protocol with a checksum.
108
109 To compile this driver as a module, choose M here: the
110 module will be called cros_ec_ishtp.
111
112config CROS_EC_SPI
113 tristate "ChromeOS Embedded Controller (SPI)"
114 depends on CROS_EC && SPI
115
116 help
117 If you say Y here, you get support for talking to the ChromeOS EC
118 through a SPI bus, using a byte-level protocol. Since the EC's
119 response time cannot be guaranteed, we support ignoring
120 'pre-amble' bytes before the response actually starts.
121
122config CROS_EC_LPC
123 tristate "ChromeOS Embedded Controller (LPC)"
124 depends on CROS_EC && ACPI && (X86 || COMPILE_TEST)
125 help
126 If you say Y here, you get support for talking to the ChromeOS EC
127 over an LPC bus, including the LPC Microchip EC (MEC) variant.
128 This uses a simple byte-level protocol with a checksum. This is
129 used for userspace access only. The kernel typically has its own
130 communication methods.
131
132 To compile this driver as a module, choose M here: the
133 module will be called cros_ec_lpcs.
134
135config CROS_EC_PROTO
136 bool
137 help
138 ChromeOS EC communication protocol helpers.
139
140config CROS_KBD_LED_BACKLIGHT
141 tristate "Backlight LED support for Chrome OS keyboards"
142 depends on LEDS_CLASS && (ACPI || CROS_EC)
143 help
144 This option enables support for the keyboard backlight LEDs on
145 select Chrome OS systems.
146
147 To compile this driver as a module, choose M here: the
148 module will be called cros_kbd_led_backlight.
149
150config CROS_EC_CHARDEV
151 tristate "ChromeOS EC miscdevice"
152 depends on MFD_CROS_EC_DEV
153 default MFD_CROS_EC_DEV
154 help
155 This driver adds file operations support to talk with the
156 ChromeOS EC from userspace via a character device.
157
158 To compile this driver as a module, choose M here: the
159 module will be called cros_ec_chardev.
160
161config CROS_EC_LIGHTBAR
162 tristate "Chromebook Pixel's lightbar support"
163 depends on MFD_CROS_EC_DEV
164 default MFD_CROS_EC_DEV
165 help
166 This option exposes the Chromebook Pixel's lightbar to
167 userspace.
168
169 To compile this driver as a module, choose M here: the
170 module will be called cros_ec_lightbar.
171
172config CROS_EC_VBC
173 tristate "ChromeOS EC vboot context support"
174 depends on MFD_CROS_EC_DEV && OF
175 default MFD_CROS_EC_DEV
176 help
177 This option exposes the ChromeOS EC vboot context nvram to
178 userspace.
179
180 To compile this driver as a module, choose M here: the
181 module will be called cros_ec_vbc.
182
183config CROS_EC_DEBUGFS
184 tristate "Export ChromeOS EC internals in DebugFS"
185 depends on MFD_CROS_EC_DEV && DEBUG_FS
186 default MFD_CROS_EC_DEV
187 help
188 This option exposes the ChromeOS EC device internals to
189 userspace.
190
191 To compile this driver as a module, choose M here: the
192 module will be called cros_ec_debugfs.
193
194config CROS_EC_SENSORHUB
195 tristate "ChromeOS EC MEMS Sensor Hub"
196 depends on MFD_CROS_EC_DEV
197 default MFD_CROS_EC_DEV
198 help
199 Allow loading IIO sensors. This driver is loaded by MFD and will in
200 turn query the EC and register the sensors.
201 It also spreads the sensor data coming from the EC to the IIO sensor
202 object.
203
204 To compile this driver as a module, choose M here: the
205 module will be called cros_ec_sensorhub.
206
207config CROS_EC_SYSFS
208 tristate "ChromeOS EC control and information through sysfs"
209 depends on MFD_CROS_EC_DEV && SYSFS
210 default MFD_CROS_EC_DEV
211 help
212 This option exposes some sysfs attributes to control and get
213 information from ChromeOS EC.
214
215 To compile this driver as a module, choose M here: the
216 module will be called cros_ec_sysfs.
217
218config CROS_EC_TYPEC
219 tristate "ChromeOS EC Type-C Connector Control"
220 depends on MFD_CROS_EC_DEV && TYPEC
221 depends on CROS_USBPD_NOTIFY
222 depends on USB_ROLE_SWITCH
223 default MFD_CROS_EC_DEV
224 help
225 If you say Y here, you get support for accessing Type C connector
226 information from the Chrome OS EC.
227
228 To compile this driver as a module, choose M here: the module will be
229 called cros_ec_typec.
230
231config CROS_HPS_I2C
232 tristate "ChromeOS HPS device"
233 depends on HID && I2C && PM
234 help
235 Say Y here if you want to enable support for the ChromeOS
236 human presence sensor (HPS), attached via I2C. The driver supports a
237 sensor connected to the I2C bus and exposes it as a character device.
238 To save power, the sensor is automatically powered down when no
239 clients are accessing it.
240
241config CROS_USBPD_LOGGER
242 tristate "Logging driver for USB PD charger"
243 depends on CHARGER_CROS_USBPD
244 default y
245 select RTC_LIB
246 help
247 This option enables support for logging event data for the USB PD charger
248 available in the Embedded Controller on ChromeOS systems.
249
250 To compile this driver as a module, choose M here: the
251 module will be called cros_usbpd_logger.
252
253config CROS_USBPD_NOTIFY
254 tristate "ChromeOS Type-C power delivery event notifier"
255 depends on MFD_CROS_EC_DEV
256 default MFD_CROS_EC_DEV
257 help
258 If you say Y here, you get support for Type-C PD event notifications
259 from the ChromeOS EC. On ACPI platorms this driver will bind to the
260 GOOG0003 ACPI device, and on platforms which don't have this device it
261 will get initialized on ECs which support the feature
262 EC_FEATURE_USB_PD.
263
264 To compile this driver as a module, choose M here: the
265 module will be called cros_usbpd_notify.
266
267config CHROMEOS_PRIVACY_SCREEN
268 tristate "ChromeOS Privacy Screen support"
269 depends on ACPI
270 depends on DRM
271 select DRM_PRIVACY_SCREEN
272 help
273 This driver provides the support needed for the in-built electronic
274 privacy screen that is present on some ChromeOS devices. When enabled,
275 this should probably always be built into the kernel to avoid or
276 minimize drm probe deferral.
277
278config CROS_TYPEC_SWITCH
279 tristate "ChromeOS EC Type-C Switch Control"
280 depends on MFD_CROS_EC_DEV && TYPEC && ACPI
281 default MFD_CROS_EC_DEV
282 help
283 If you say Y here, you get support for configuring the ChromeOS EC Type-C
284 muxes and retimers.
285
286 To compile this driver as a module, choose M here: the module will be
287 called cros_typec_switch.
288
289source "drivers/platform/chrome/wilco_ec/Kconfig"
290
291# Kunit test cases
292config CROS_KUNIT
293 tristate "Kunit tests for ChromeOS" if !KUNIT_ALL_TESTS
294 depends on KUNIT && CROS_EC
295 default KUNIT_ALL_TESTS
296 select CROS_EC_PROTO
297 help
298 ChromeOS Kunit tests.
299
300endif # CHROMEOS_PLATFORMS
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
54 tristate "ChromeOS Embedded Controller"
55 select CROS_EC_PROTO
56 depends on X86 || ARM || ARM64 || COMPILE_TEST
57 help
58 If you say Y here you get support for the ChromeOS Embedded
59 Controller (EC) providing keyboard, battery and power services.
60 You also need to enable the driver for the bus you are using. The
61 protocol for talking to the EC is defined by the bus driver.
62
63 To compile this driver as a module, choose M here: the
64 module will be called cros_ec.
65
66config CROS_EC_I2C
67 tristate "ChromeOS Embedded Controller (I2C)"
68 depends on CROS_EC && I2C
69
70 help
71 If you say Y here, you get support for talking to the ChromeOS
72 EC through an I2C bus. This uses a simple byte-level protocol with
73 a checksum. Failing accesses will be retried three times to
74 improve reliability.
75
76config CROS_EC_RPMSG
77 tristate "ChromeOS Embedded Controller (rpmsg)"
78 depends on CROS_EC && RPMSG && OF
79 help
80 If you say Y here, you get support for talking to the ChromeOS EC
81 through rpmsg. This uses a simple byte-level protocol with a
82 checksum. Also since there's no addition EC-to-host interrupt, this
83 use a byte in message to distinguish host event from host command.
84
85 To compile this driver as a module, choose M here: the
86 module will be called cros_ec_rpmsg.
87
88config CROS_EC_ISHTP
89 tristate "ChromeOS Embedded Controller (ISHTP)"
90 depends on CROS_EC
91 depends on INTEL_ISH_HID
92 help
93 If you say Y here, you get support for talking to the ChromeOS EC
94 firmware running on Intel Integrated Sensor Hub (ISH), using the
95 ISH Transport protocol (ISH-TP). This uses a simple byte-level
96 protocol with a checksum.
97
98 To compile this driver as a module, choose M here: the
99 module will be called cros_ec_ishtp.
100
101config CROS_EC_SPI
102 tristate "ChromeOS Embedded Controller (SPI)"
103 depends on CROS_EC && SPI
104
105 help
106 If you say Y here, you get support for talking to the ChromeOS EC
107 through a SPI bus, using a byte-level protocol. Since the EC's
108 response time cannot be guaranteed, we support ignoring
109 'pre-amble' bytes before the response actually starts.
110
111config CROS_EC_LPC
112 tristate "ChromeOS Embedded Controller (LPC)"
113 depends on CROS_EC && ACPI && (X86 || COMPILE_TEST)
114 help
115 If you say Y here, you get support for talking to the ChromeOS EC
116 over an LPC bus, including the LPC Microchip EC (MEC) variant.
117 This uses a simple byte-level protocol with a checksum. This is
118 used for userspace access only. The kernel typically has its own
119 communication methods.
120
121 To compile this driver as a module, choose M here: the
122 module will be called cros_ec_lpcs.
123
124config CROS_EC_PROTO
125 bool
126 help
127 ChromeOS EC communication protocol helpers.
128
129config CROS_KBD_LED_BACKLIGHT
130 tristate "Backlight LED support for Chrome OS keyboards"
131 depends on LEDS_CLASS && ACPI
132 help
133 This option enables support for the keyboard backlight LEDs on
134 select Chrome OS systems.
135
136 To compile this driver as a module, choose M here: the
137 module will be called cros_kbd_led_backlight.
138
139config CROS_EC_CHARDEV
140 tristate "ChromeOS EC miscdevice"
141 depends on MFD_CROS_EC_DEV
142 default MFD_CROS_EC_DEV
143 help
144 This driver adds file operations support to talk with the
145 ChromeOS EC from userspace via a character device.
146
147 To compile this driver as a module, choose M here: the
148 module will be called cros_ec_chardev.
149
150config CROS_EC_LIGHTBAR
151 tristate "Chromebook Pixel's lightbar support"
152 depends on MFD_CROS_EC_DEV
153 default MFD_CROS_EC_DEV
154 help
155 This option exposes the Chromebook Pixel's lightbar to
156 userspace.
157
158 To compile this driver as a module, choose M here: the
159 module will be called cros_ec_lightbar.
160
161config CROS_EC_VBC
162 tristate "ChromeOS EC vboot context support"
163 depends on MFD_CROS_EC_DEV && OF
164 default MFD_CROS_EC_DEV
165 help
166 This option exposes the ChromeOS EC vboot context nvram to
167 userspace.
168
169 To compile this driver as a module, choose M here: the
170 module will be called cros_ec_vbc.
171
172config CROS_EC_DEBUGFS
173 tristate "Export ChromeOS EC internals in DebugFS"
174 depends on MFD_CROS_EC_DEV && DEBUG_FS
175 default MFD_CROS_EC_DEV
176 help
177 This option exposes the ChromeOS EC device internals to
178 userspace.
179
180 To compile this driver as a module, choose M here: the
181 module will be called cros_ec_debugfs.
182
183config CROS_EC_SENSORHUB
184 tristate "ChromeOS EC MEMS Sensor Hub"
185 depends on MFD_CROS_EC_DEV
186 default MFD_CROS_EC_DEV
187 help
188 Allow loading IIO sensors. This driver is loaded by MFD and will in
189 turn query the EC and register the sensors.
190 It also spreads the sensor data coming from the EC to the IIO sensor
191 object.
192
193 To compile this driver as a module, choose M here: the
194 module will be called cros_ec_sensorhub.
195
196config CROS_EC_SYSFS
197 tristate "ChromeOS EC control and information through sysfs"
198 depends on MFD_CROS_EC_DEV && SYSFS
199 default MFD_CROS_EC_DEV
200 help
201 This option exposes some sysfs attributes to control and get
202 information from ChromeOS EC.
203
204 To compile this driver as a module, choose M here: the
205 module will be called cros_ec_sysfs.
206
207config CROS_EC_TYPEC
208 tristate "ChromeOS EC Type-C Connector Control"
209 depends on MFD_CROS_EC_DEV && TYPEC
210 depends on CROS_USBPD_NOTIFY
211 depends on USB_ROLE_SWITCH
212 default MFD_CROS_EC_DEV
213 help
214 If you say Y here, you get support for accessing Type C connector
215 information from the Chrome OS EC.
216
217 To compile this driver as a module, choose M here: the module will be
218 called cros_ec_typec.
219
220config CROS_USBPD_LOGGER
221 tristate "Logging driver for USB PD charger"
222 depends on CHARGER_CROS_USBPD
223 default y
224 select RTC_LIB
225 help
226 This option enables support for logging event data for the USB PD charger
227 available in the Embedded Controller on ChromeOS systems.
228
229 To compile this driver as a module, choose M here: the
230 module will be called cros_usbpd_logger.
231
232config CROS_USBPD_NOTIFY
233 tristate "ChromeOS Type-C power delivery event notifier"
234 depends on MFD_CROS_EC_DEV
235 default MFD_CROS_EC_DEV
236 help
237 If you say Y here, you get support for Type-C PD event notifications
238 from the ChromeOS EC. On ACPI platorms this driver will bind to the
239 GOOG0003 ACPI device, and on platforms which don't have this device it
240 will get initialized on ECs which support the feature
241 EC_FEATURE_USB_PD.
242
243 To compile this driver as a module, choose M here: the
244 module will be called cros_usbpd_notify.
245
246source "drivers/platform/chrome/wilco_ec/Kconfig"
247
248endif # CHROMEOS_PLATFORMS