Kconfig 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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 CHROMEOS_OF_HW_PROBER
  52. tristate "ChromeOS Device Tree Hardware Prober"
  53. depends on OF
  54. depends on I2C
  55. select OF_DYNAMIC
  56. default OF
  57. help
  58. This option enables the device tree hardware prober for ChromeOS
  59. devices. The driver will probe the correct component variant in
  60. devices that have multiple drop-in options for one component.
  61. config CROS_EC
  62. tristate "ChromeOS Embedded Controller"
  63. select CROS_EC_PROTO
  64. depends on X86 || ARM || ARM64 || COMPILE_TEST
  65. help
  66. If you say Y here you get support for the ChromeOS Embedded
  67. Controller (EC) providing keyboard, battery and power services.
  68. You also need to enable the driver for the bus you are using. The
  69. protocol for talking to the EC is defined by the bus driver.
  70. To compile this driver as a module, choose M here: the
  71. module will be called cros_ec.
  72. config CROS_EC_I2C
  73. tristate "ChromeOS Embedded Controller (I2C)"
  74. depends on CROS_EC && I2C
  75. help
  76. If you say Y here, you get support for talking to the ChromeOS
  77. EC through an I2C bus. This uses a simple byte-level protocol with
  78. a checksum. Failing accesses will be retried three times to
  79. improve reliability.
  80. config CROS_EC_RPMSG
  81. tristate "ChromeOS Embedded Controller (rpmsg)"
  82. depends on CROS_EC && RPMSG && OF
  83. help
  84. If you say Y here, you get support for talking to the ChromeOS EC
  85. through rpmsg. This uses a simple byte-level protocol with a
  86. checksum. Also since there's no addition EC-to-host interrupt, this
  87. use a byte in message to distinguish host event from host command.
  88. To compile this driver as a module, choose M here: the
  89. module will be called cros_ec_rpmsg.
  90. config CROS_EC_ISHTP
  91. tristate "ChromeOS Embedded Controller (ISHTP)"
  92. depends on CROS_EC
  93. depends on INTEL_ISH_HID
  94. help
  95. If you say Y here, you get support for talking to the ChromeOS EC
  96. firmware running on Intel Integrated Sensor Hub (ISH), using the
  97. ISH Transport protocol (ISH-TP). This uses a simple byte-level
  98. protocol with a checksum.
  99. To compile this driver as a module, choose M here: the
  100. module will be called cros_ec_ishtp.
  101. config CROS_EC_SPI
  102. tristate "ChromeOS Embedded Controller (SPI)"
  103. depends on CROS_EC && SPI
  104. help
  105. If you say Y here, you get support for talking to the ChromeOS EC
  106. through a SPI bus, using a byte-level protocol. Since the EC's
  107. response time cannot be guaranteed, we support ignoring
  108. 'pre-amble' bytes before the response actually starts.
  109. config CROS_EC_UART
  110. tristate "ChromeOS Embedded Controller (UART)"
  111. depends on CROS_EC && ACPI && SERIAL_DEV_BUS
  112. help
  113. If you say Y here, you get support for talking to the ChromeOS EC
  114. through a UART, using a byte-level protocol.
  115. To compile this driver as a module, choose M here: the
  116. module will be called cros_ec_uart.
  117. config CROS_EC_LPC
  118. tristate "ChromeOS Embedded Controller (LPC)"
  119. depends on CROS_EC && ACPI && (X86 || COMPILE_TEST)
  120. depends on HAS_IOPORT
  121. help
  122. If you say Y here, you get support for talking to the ChromeOS EC
  123. over an LPC bus, including the LPC Microchip EC (MEC) variant.
  124. This uses a simple byte-level protocol with a checksum. This is
  125. used for userspace access only. The kernel typically has its own
  126. communication methods.
  127. To compile this driver as a module, choose M here: the
  128. module will be called cros_ec_lpcs.
  129. config CROS_EC_PROTO
  130. tristate
  131. help
  132. ChromeOS EC communication protocol helpers.
  133. config CROS_KBD_LED_BACKLIGHT
  134. tristate "Backlight LED support for Chrome OS keyboards"
  135. depends on LEDS_CLASS
  136. depends on MFD_CROS_EC_DEV || (MFD_CROS_EC_DEV=n && ACPI)
  137. help
  138. This option enables support for the keyboard backlight LEDs on
  139. select Chrome OS systems.
  140. To compile this driver as a module, choose M here: the
  141. module will be called cros_kbd_led_backlight.
  142. config CROS_EC_CHARDEV
  143. tristate "ChromeOS EC miscdevice"
  144. depends on MFD_CROS_EC_DEV
  145. default MFD_CROS_EC_DEV
  146. help
  147. This driver adds file operations support to talk with the
  148. ChromeOS EC from userspace via a character device.
  149. To compile this driver as a module, choose M here: the
  150. module will be called cros_ec_chardev.
  151. config CROS_EC_LIGHTBAR
  152. tristate "Chromebook Pixel's lightbar support"
  153. depends on MFD_CROS_EC_DEV
  154. default MFD_CROS_EC_DEV
  155. help
  156. This option exposes the Chromebook Pixel's lightbar to
  157. userspace.
  158. To compile this driver as a module, choose M here: the
  159. module will be called cros_ec_lightbar.
  160. config CROS_EC_VBC
  161. tristate "ChromeOS EC vboot context support"
  162. depends on MFD_CROS_EC_DEV && OF
  163. default MFD_CROS_EC_DEV
  164. help
  165. This option exposes the ChromeOS EC vboot context nvram to
  166. userspace.
  167. To compile this driver as a module, choose M here: the
  168. module will be called cros_ec_vbc.
  169. config CROS_EC_DEBUGFS
  170. tristate "Export ChromeOS EC internals in DebugFS"
  171. depends on MFD_CROS_EC_DEV && DEBUG_FS
  172. default MFD_CROS_EC_DEV
  173. help
  174. This option exposes the ChromeOS EC device internals to
  175. userspace.
  176. To compile this driver as a module, choose M here: the
  177. module will be called cros_ec_debugfs.
  178. config CROS_EC_SENSORHUB
  179. tristate "ChromeOS EC MEMS Sensor Hub"
  180. depends on MFD_CROS_EC_DEV
  181. default MFD_CROS_EC_DEV
  182. help
  183. Allow loading IIO sensors. This driver is loaded by MFD and will in
  184. turn query the EC and register the sensors.
  185. It also spreads the sensor data coming from the EC to the IIO sensor
  186. object.
  187. To compile this driver as a module, choose M here: the
  188. module will be called cros_ec_sensorhub.
  189. config CROS_EC_SYSFS
  190. tristate "ChromeOS EC control and information through sysfs"
  191. depends on MFD_CROS_EC_DEV && SYSFS
  192. default MFD_CROS_EC_DEV
  193. help
  194. This option exposes some sysfs attributes to control and get
  195. information from ChromeOS EC.
  196. To compile this driver as a module, choose M here: the
  197. module will be called cros_ec_sysfs.
  198. config CROS_EC_TYPEC_ALTMODES
  199. bool
  200. help
  201. Selectable symbol to enable altmodes.
  202. config CROS_EC_TYPEC
  203. tristate "ChromeOS EC Type-C Connector Control"
  204. depends on MFD_CROS_EC_DEV && TYPEC
  205. depends on CROS_USBPD_NOTIFY
  206. depends on USB_ROLE_SWITCH
  207. default MFD_CROS_EC_DEV
  208. select CROS_EC_TYPEC_ALTMODES if TYPEC_DP_ALTMODE
  209. select CROS_EC_TYPEC_ALTMODES if TYPEC_TBT_ALTMODE
  210. help
  211. If you say Y here, you get support for accessing Type C connector
  212. information from the Chrome OS EC.
  213. To compile this driver as a module, choose M here: the module will be
  214. called cros-ec-typec.
  215. config CROS_HPS_I2C
  216. tristate "ChromeOS HPS device"
  217. depends on HID && I2C && PM
  218. help
  219. Say Y here if you want to enable support for the ChromeOS
  220. human presence sensor (HPS), attached via I2C. The driver supports a
  221. sensor connected to the I2C bus and exposes it as a character device.
  222. To save power, the sensor is automatically powered down when no
  223. clients are accessing it.
  224. config CROS_USBPD_LOGGER
  225. tristate "Logging driver for USB PD charger"
  226. depends on CHARGER_CROS_USBPD
  227. default y
  228. select RTC_LIB
  229. help
  230. This option enables support for logging event data for the USB PD charger
  231. available in the Embedded Controller on ChromeOS systems.
  232. To compile this driver as a module, choose M here: the
  233. module will be called cros_usbpd_logger.
  234. config CROS_USBPD_NOTIFY
  235. tristate "ChromeOS Type-C power delivery event notifier"
  236. depends on MFD_CROS_EC_DEV
  237. default MFD_CROS_EC_DEV
  238. help
  239. If you say Y here, you get support for Type-C PD event notifications
  240. from the ChromeOS EC. On ACPI platforms this driver will bind to the
  241. GOOG0003 ACPI device, and on platforms which don't have this device it
  242. will get initialized on ECs which support the feature
  243. EC_FEATURE_USB_PD.
  244. To compile this driver as a module, choose M here: the
  245. module will be called cros_usbpd_notify.
  246. config CHROMEOS_PRIVACY_SCREEN
  247. tristate "ChromeOS Privacy Screen support"
  248. depends on ACPI
  249. depends on DRM
  250. select DRM_PRIVACY_SCREEN
  251. help
  252. This driver provides the support needed for the in-built electronic
  253. privacy screen that is present on some ChromeOS devices. When enabled,
  254. this should probably always be built into the kernel to avoid or
  255. minimize drm probe deferral.
  256. config CROS_TYPEC_SWITCH
  257. tristate "ChromeOS EC Type-C Switch Control"
  258. depends on MFD_CROS_EC_DEV && TYPEC && ACPI
  259. default MFD_CROS_EC_DEV
  260. help
  261. If you say Y here, you get support for configuring the ChromeOS EC Type-C
  262. muxes and retimers.
  263. To compile this driver as a module, choose M here: the module will be
  264. called cros_typec_switch.
  265. source "drivers/platform/chrome/wilco_ec/Kconfig"
  266. # Kunit test cases
  267. config CROS_KUNIT_EC_PROTO_TEST
  268. tristate "Kunit tests for ChromeOS EC protocol" if !KUNIT_ALL_TESTS
  269. depends on KUNIT && CROS_EC
  270. default KUNIT_ALL_TESTS
  271. select CROS_EC_PROTO
  272. help
  273. Kunit tests for ChromeOS EC protocol.
  274. endif # CHROMEOS_PLATFORMS