xref: /OK3568_Linux_fs/kernel/drivers/platform/chrome/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# Platform support for Chrome OS hardware (Chromebooks and Chromeboxes)
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun
6*4882a593Smuzhiyunmenuconfig CHROME_PLATFORMS
7*4882a593Smuzhiyun	bool "Platform support for Chrome hardware"
8*4882a593Smuzhiyun	depends on X86 || ARM || ARM64 || COMPILE_TEST
9*4882a593Smuzhiyun	help
10*4882a593Smuzhiyun	  Say Y here to get to see options for platform support for
11*4882a593Smuzhiyun	  various Chromebooks and Chromeboxes. This option alone does
12*4882a593Smuzhiyun	  not add any kernel code.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun	  If you say N, all options in this submenu will be skipped and disabled.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyunif CHROME_PLATFORMS
17*4882a593Smuzhiyun
18*4882a593Smuzhiyunconfig CHROMEOS_LAPTOP
19*4882a593Smuzhiyun	tristate "Chrome OS Laptop"
20*4882a593Smuzhiyun	depends on I2C && DMI && X86
21*4882a593Smuzhiyun	help
22*4882a593Smuzhiyun	  This driver instantiates i2c and smbus devices such as
23*4882a593Smuzhiyun	  light sensors and touchpads.
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun	  If you have a supported Chromebook, choose Y or M here.
26*4882a593Smuzhiyun	  The module will be called chromeos_laptop.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyunconfig CHROMEOS_PSTORE
29*4882a593Smuzhiyun	tristate "Chrome OS pstore support"
30*4882a593Smuzhiyun	depends on X86
31*4882a593Smuzhiyun	help
32*4882a593Smuzhiyun	  This module instantiates the persistent storage on x86 ChromeOS
33*4882a593Smuzhiyun	  devices. It can be used to store away console logs and crash
34*4882a593Smuzhiyun	  information across reboots.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun	  The range of memory used is 0xf00000-0x1000000, traditionally
37*4882a593Smuzhiyun	  the memory used to back VGA controller memory.
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun	  If you have a supported Chromebook, choose Y or M here.
40*4882a593Smuzhiyun	  The module will be called chromeos_pstore.
41*4882a593Smuzhiyun
42*4882a593Smuzhiyunconfig CHROMEOS_TBMC
43*4882a593Smuzhiyun	tristate "ChromeOS Tablet Switch Controller"
44*4882a593Smuzhiyun	depends on ACPI
45*4882a593Smuzhiyun	depends on INPUT
46*4882a593Smuzhiyun	help
47*4882a593Smuzhiyun	  This option adds a driver for the tablet switch on
48*4882a593Smuzhiyun	  select Chrome OS systems.
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
51*4882a593Smuzhiyun	  module will be called chromeos_tbmc.
52*4882a593Smuzhiyun
53*4882a593Smuzhiyunconfig CROS_EC
54*4882a593Smuzhiyun	tristate "ChromeOS Embedded Controller"
55*4882a593Smuzhiyun	select CROS_EC_PROTO
56*4882a593Smuzhiyun	depends on X86 || ARM || ARM64 || COMPILE_TEST
57*4882a593Smuzhiyun	help
58*4882a593Smuzhiyun	  If you say Y here you get support for the ChromeOS Embedded
59*4882a593Smuzhiyun	  Controller (EC) providing keyboard, battery and power services.
60*4882a593Smuzhiyun	  You also need to enable the driver for the bus you are using. The
61*4882a593Smuzhiyun	  protocol for talking to the EC is defined by the bus driver.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
64*4882a593Smuzhiyun	  module will be called cros_ec.
65*4882a593Smuzhiyun
66*4882a593Smuzhiyunconfig CROS_EC_I2C
67*4882a593Smuzhiyun	tristate "ChromeOS Embedded Controller (I2C)"
68*4882a593Smuzhiyun	depends on CROS_EC && I2C
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun	help
71*4882a593Smuzhiyun	  If you say Y here, you get support for talking to the ChromeOS
72*4882a593Smuzhiyun	  EC through an I2C bus. This uses a simple byte-level protocol with
73*4882a593Smuzhiyun	  a checksum. Failing accesses will be retried three times to
74*4882a593Smuzhiyun	  improve reliability.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyunconfig CROS_EC_RPMSG
77*4882a593Smuzhiyun	tristate "ChromeOS Embedded Controller (rpmsg)"
78*4882a593Smuzhiyun	depends on CROS_EC && RPMSG && OF
79*4882a593Smuzhiyun	help
80*4882a593Smuzhiyun	  If you say Y here, you get support for talking to the ChromeOS EC
81*4882a593Smuzhiyun	  through rpmsg. This uses a simple byte-level protocol with a
82*4882a593Smuzhiyun	  checksum. Also since there's no addition EC-to-host interrupt, this
83*4882a593Smuzhiyun	  use a byte in message to distinguish host event from host command.
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
86*4882a593Smuzhiyun	  module will be called cros_ec_rpmsg.
87*4882a593Smuzhiyun
88*4882a593Smuzhiyunconfig CROS_EC_ISHTP
89*4882a593Smuzhiyun	tristate "ChromeOS Embedded Controller (ISHTP)"
90*4882a593Smuzhiyun	depends on CROS_EC
91*4882a593Smuzhiyun	depends on INTEL_ISH_HID
92*4882a593Smuzhiyun	help
93*4882a593Smuzhiyun	  If you say Y here, you get support for talking to the ChromeOS EC
94*4882a593Smuzhiyun	  firmware running on Intel Integrated Sensor Hub (ISH), using the
95*4882a593Smuzhiyun	  ISH Transport protocol (ISH-TP). This uses a simple byte-level
96*4882a593Smuzhiyun	  protocol with a checksum.
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
99*4882a593Smuzhiyun	  module will be called cros_ec_ishtp.
100*4882a593Smuzhiyun
101*4882a593Smuzhiyunconfig CROS_EC_SPI
102*4882a593Smuzhiyun	tristate "ChromeOS Embedded Controller (SPI)"
103*4882a593Smuzhiyun	depends on CROS_EC && SPI
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun	help
106*4882a593Smuzhiyun	  If you say Y here, you get support for talking to the ChromeOS EC
107*4882a593Smuzhiyun	  through a SPI bus, using a byte-level protocol. Since the EC's
108*4882a593Smuzhiyun	  response time cannot be guaranteed, we support ignoring
109*4882a593Smuzhiyun	  'pre-amble' bytes before the response actually starts.
110*4882a593Smuzhiyun
111*4882a593Smuzhiyunconfig CROS_EC_LPC
112*4882a593Smuzhiyun	tristate "ChromeOS Embedded Controller (LPC)"
113*4882a593Smuzhiyun	depends on CROS_EC && ACPI && (X86 || COMPILE_TEST)
114*4882a593Smuzhiyun	help
115*4882a593Smuzhiyun	  If you say Y here, you get support for talking to the ChromeOS EC
116*4882a593Smuzhiyun	  over an LPC bus, including the LPC Microchip EC (MEC) variant.
117*4882a593Smuzhiyun	  This uses a simple byte-level protocol with a checksum. This is
118*4882a593Smuzhiyun	  used for userspace access only. The kernel typically has its own
119*4882a593Smuzhiyun	  communication methods.
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
122*4882a593Smuzhiyun	  module will be called cros_ec_lpcs.
123*4882a593Smuzhiyun
124*4882a593Smuzhiyunconfig CROS_EC_PROTO
125*4882a593Smuzhiyun	bool
126*4882a593Smuzhiyun	help
127*4882a593Smuzhiyun	  ChromeOS EC communication protocol helpers.
128*4882a593Smuzhiyun
129*4882a593Smuzhiyunconfig CROS_KBD_LED_BACKLIGHT
130*4882a593Smuzhiyun	tristate "Backlight LED support for Chrome OS keyboards"
131*4882a593Smuzhiyun	depends on LEDS_CLASS && ACPI
132*4882a593Smuzhiyun	help
133*4882a593Smuzhiyun	  This option enables support for the keyboard backlight LEDs on
134*4882a593Smuzhiyun	  select Chrome OS systems.
135*4882a593Smuzhiyun
136*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
137*4882a593Smuzhiyun	  module will be called cros_kbd_led_backlight.
138*4882a593Smuzhiyun
139*4882a593Smuzhiyunconfig CROS_EC_CHARDEV
140*4882a593Smuzhiyun	tristate "ChromeOS EC miscdevice"
141*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV
142*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
143*4882a593Smuzhiyun	help
144*4882a593Smuzhiyun	  This driver adds file operations support to talk with the
145*4882a593Smuzhiyun	  ChromeOS EC from userspace via a character device.
146*4882a593Smuzhiyun
147*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
148*4882a593Smuzhiyun	  module will be called cros_ec_chardev.
149*4882a593Smuzhiyun
150*4882a593Smuzhiyunconfig CROS_EC_LIGHTBAR
151*4882a593Smuzhiyun	tristate "Chromebook Pixel's lightbar support"
152*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV
153*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
154*4882a593Smuzhiyun	help
155*4882a593Smuzhiyun	  This option exposes the Chromebook Pixel's lightbar to
156*4882a593Smuzhiyun	  userspace.
157*4882a593Smuzhiyun
158*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
159*4882a593Smuzhiyun	  module will be called cros_ec_lightbar.
160*4882a593Smuzhiyun
161*4882a593Smuzhiyunconfig CROS_EC_VBC
162*4882a593Smuzhiyun	tristate "ChromeOS EC vboot context support"
163*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV && OF
164*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
165*4882a593Smuzhiyun	help
166*4882a593Smuzhiyun	  This option exposes the ChromeOS EC vboot context nvram to
167*4882a593Smuzhiyun	  userspace.
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
170*4882a593Smuzhiyun	  module will be called cros_ec_vbc.
171*4882a593Smuzhiyun
172*4882a593Smuzhiyunconfig CROS_EC_DEBUGFS
173*4882a593Smuzhiyun	tristate "Export ChromeOS EC internals in DebugFS"
174*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV && DEBUG_FS
175*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
176*4882a593Smuzhiyun	help
177*4882a593Smuzhiyun	  This option exposes the ChromeOS EC device internals to
178*4882a593Smuzhiyun	  userspace.
179*4882a593Smuzhiyun
180*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
181*4882a593Smuzhiyun	  module will be called cros_ec_debugfs.
182*4882a593Smuzhiyun
183*4882a593Smuzhiyunconfig CROS_EC_SENSORHUB
184*4882a593Smuzhiyun	tristate "ChromeOS EC MEMS Sensor Hub"
185*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV
186*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
187*4882a593Smuzhiyun	help
188*4882a593Smuzhiyun	  Allow loading IIO sensors. This driver is loaded by MFD and will in
189*4882a593Smuzhiyun	  turn query the EC and register the sensors.
190*4882a593Smuzhiyun	  It also spreads the sensor data coming from the EC to the IIO sensor
191*4882a593Smuzhiyun	  object.
192*4882a593Smuzhiyun
193*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
194*4882a593Smuzhiyun	  module will be called cros_ec_sensorhub.
195*4882a593Smuzhiyun
196*4882a593Smuzhiyunconfig CROS_EC_SYSFS
197*4882a593Smuzhiyun	tristate "ChromeOS EC control and information through sysfs"
198*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV && SYSFS
199*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
200*4882a593Smuzhiyun	help
201*4882a593Smuzhiyun	  This option exposes some sysfs attributes to control and get
202*4882a593Smuzhiyun	  information from ChromeOS EC.
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
205*4882a593Smuzhiyun	  module will be called cros_ec_sysfs.
206*4882a593Smuzhiyun
207*4882a593Smuzhiyunconfig CROS_EC_TYPEC
208*4882a593Smuzhiyun	tristate "ChromeOS EC Type-C Connector Control"
209*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV && TYPEC
210*4882a593Smuzhiyun	depends on CROS_USBPD_NOTIFY
211*4882a593Smuzhiyun	depends on USB_ROLE_SWITCH
212*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
213*4882a593Smuzhiyun	help
214*4882a593Smuzhiyun	  If you say Y here, you get support for accessing Type C connector
215*4882a593Smuzhiyun	  information from the Chrome OS EC.
216*4882a593Smuzhiyun
217*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the module will be
218*4882a593Smuzhiyun	  called cros_ec_typec.
219*4882a593Smuzhiyun
220*4882a593Smuzhiyunconfig CROS_USBPD_LOGGER
221*4882a593Smuzhiyun	tristate "Logging driver for USB PD charger"
222*4882a593Smuzhiyun	depends on CHARGER_CROS_USBPD
223*4882a593Smuzhiyun	default y
224*4882a593Smuzhiyun	select RTC_LIB
225*4882a593Smuzhiyun	help
226*4882a593Smuzhiyun	  This option enables support for logging event data for the USB PD charger
227*4882a593Smuzhiyun	  available in the Embedded Controller on ChromeOS systems.
228*4882a593Smuzhiyun
229*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
230*4882a593Smuzhiyun	  module will be called cros_usbpd_logger.
231*4882a593Smuzhiyun
232*4882a593Smuzhiyunconfig CROS_USBPD_NOTIFY
233*4882a593Smuzhiyun	tristate "ChromeOS Type-C power delivery event notifier"
234*4882a593Smuzhiyun	depends on MFD_CROS_EC_DEV
235*4882a593Smuzhiyun	default MFD_CROS_EC_DEV
236*4882a593Smuzhiyun	help
237*4882a593Smuzhiyun	  If you say Y here, you get support for Type-C PD event notifications
238*4882a593Smuzhiyun	  from the ChromeOS EC. On ACPI platorms this driver will bind to the
239*4882a593Smuzhiyun	  GOOG0003 ACPI device, and on platforms which don't have this device it
240*4882a593Smuzhiyun	  will get initialized on ECs which support the feature
241*4882a593Smuzhiyun	  EC_FEATURE_USB_PD.
242*4882a593Smuzhiyun
243*4882a593Smuzhiyun	  To compile this driver as a module, choose M here: the
244*4882a593Smuzhiyun	  module will be called cros_usbpd_notify.
245*4882a593Smuzhiyun
246*4882a593Smuzhiyunsource "drivers/platform/chrome/wilco_ec/Kconfig"
247*4882a593Smuzhiyun
248*4882a593Smuzhiyunendif # CHROMEOS_PLATFORMS
249