Kconfig 9.9 KB

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