xref: /linux/drivers/platform/surface/Kconfig (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
11e3a2bc8SMaximilian Luz# SPDX-License-Identifier: GPL-2.0-only
21e3a2bc8SMaximilian Luz#
31e3a2bc8SMaximilian Luz# Microsoft Surface Platform-Specific Drivers
41e3a2bc8SMaximilian Luz#
51e3a2bc8SMaximilian Luz
61e3a2bc8SMaximilian Luzmenuconfig SURFACE_PLATFORMS
71e3a2bc8SMaximilian Luz	bool "Microsoft Surface Platform-Specific Device Drivers"
8c197e969SGeert Uytterhoeven	depends on ARM64 || X86 || COMPILE_TEST
91e3a2bc8SMaximilian Luz	default y
101e3a2bc8SMaximilian Luz	help
111e3a2bc8SMaximilian Luz	  Say Y here to get to see options for platform-specific device drivers
121e3a2bc8SMaximilian Luz	  for Microsoft Surface devices. This option alone does not add any
131e3a2bc8SMaximilian Luz	  kernel code.
141e3a2bc8SMaximilian Luz
151e3a2bc8SMaximilian Luz	  If you say N, all options in this submenu will be skipped and disabled.
16f23027caSMaximilian Luz
17f23027caSMaximilian Luzif SURFACE_PLATFORMS
18f23027caSMaximilian Luz
19f23027caSMaximilian Luzconfig SURFACE3_WMI
20f23027caSMaximilian Luz	tristate "Surface 3 WMI Driver"
21f23027caSMaximilian Luz	depends on ACPI_WMI
22f23027caSMaximilian Luz	depends on DMI
23f23027caSMaximilian Luz	depends on INPUT
24f23027caSMaximilian Luz	depends on SPI
25f23027caSMaximilian Luz	help
26f23027caSMaximilian Luz	  Say Y here if you have a Surface 3.
27f23027caSMaximilian Luz
28f23027caSMaximilian Luz	  To compile this driver as a module, choose M here: the module will
29f23027caSMaximilian Luz	  be called surface3-wmi.
30f23027caSMaximilian Luz
3185f7582cSMaximilian Luzconfig SURFACE_3_POWER_OPREGION
3285f7582cSMaximilian Luz	tristate "Surface 3 battery platform operation region support"
3327247992SJarrett Schultz	depends on ACPI
34e4a02c7aSGeert Uytterhoeven	depends on I2C
3585f7582cSMaximilian Luz	help
3685f7582cSMaximilian Luz	  This driver provides support for ACPI operation
3785f7582cSMaximilian Luz	  region of the Surface 3 battery platform driver.
3885f7582cSMaximilian Luz
39fc00bc8aSMaximilian Luzconfig SURFACE_ACPI_NOTIFY
40fc00bc8aSMaximilian Luz	tristate "Surface ACPI Notify Driver"
41fc00bc8aSMaximilian Luz	depends on SURFACE_AGGREGATOR
42fc00bc8aSMaximilian Luz	help
43fc00bc8aSMaximilian Luz	  Surface ACPI Notify (SAN) driver for Microsoft Surface devices.
44fc00bc8aSMaximilian Luz
45fc00bc8aSMaximilian Luz	  This driver provides support for the ACPI interface (called SAN) of
46fc00bc8aSMaximilian Luz	  the Surface System Aggregator Module (SSAM) EC. This interface is used
47fc00bc8aSMaximilian Luz	  on 5th- and 6th-generation Microsoft Surface devices (including
48fc00bc8aSMaximilian Luz	  Surface Pro 5 and 6, Surface Book 2, Surface Laptops 1 and 2, and in
49fc00bc8aSMaximilian Luz	  reduced functionality on the Surface Laptop 3) to execute SSAM
50fc00bc8aSMaximilian Luz	  requests directly from ACPI code, as well as receive SSAM events and
51fc00bc8aSMaximilian Luz	  turn them into ACPI notifications. It essentially acts as a
52fc00bc8aSMaximilian Luz	  translation layer between the SSAM controller and ACPI.
53fc00bc8aSMaximilian Luz
54fc00bc8aSMaximilian Luz	  Specifically, this driver may be needed for battery status reporting,
55fc00bc8aSMaximilian Luz	  thermal sensor access, and real-time clock information, depending on
56fc00bc8aSMaximilian Luz	  the Surface device in question.
57fc00bc8aSMaximilian Luz
58178f6ab7SMaximilian Luzconfig SURFACE_AGGREGATOR_CDEV
59178f6ab7SMaximilian Luz	tristate "Surface System Aggregator Module User-Space Interface"
60178f6ab7SMaximilian Luz	depends on SURFACE_AGGREGATOR
61178f6ab7SMaximilian Luz	help
62178f6ab7SMaximilian Luz	  Provides a misc-device interface to the Surface System Aggregator
63178f6ab7SMaximilian Luz	  Module (SSAM) controller.
64178f6ab7SMaximilian Luz
65178f6ab7SMaximilian Luz	  This option provides a module (called surface_aggregator_cdev), that,
66178f6ab7SMaximilian Luz	  when loaded, will add a client device (and its respective driver) to
67178f6ab7SMaximilian Luz	  the SSAM controller. Said client device manages a misc-device
68178f6ab7SMaximilian Luz	  interface (/dev/surface/aggregator), which can be used by user-space
69178f6ab7SMaximilian Luz	  tools to directly communicate with the SSAM EC by sending requests and
70178f6ab7SMaximilian Luz	  receiving the corresponding responses.
71178f6ab7SMaximilian Luz
72178f6ab7SMaximilian Luz	  The provided interface is intended for debugging and development only,
73178f6ab7SMaximilian Luz	  and should not be used otherwise.
74178f6ab7SMaximilian Luz
75*993a9e2aSMaximilian Luzconfig SURFACE_AGGREGATOR_HUB
76*993a9e2aSMaximilian Luz	tristate "Surface System Aggregator Module Subsystem Device Hubs"
77*993a9e2aSMaximilian Luz	depends on SURFACE_AGGREGATOR
78*993a9e2aSMaximilian Luz	depends on SURFACE_AGGREGATOR_BUS
79*993a9e2aSMaximilian Luz	help
80*993a9e2aSMaximilian Luz	  Device-hub drivers for Surface System Aggregator Module (SSAM) subsystem
81*993a9e2aSMaximilian Luz	  devices.
82*993a9e2aSMaximilian Luz
83*993a9e2aSMaximilian Luz	  Provides subsystem hub drivers which manage client devices on various
84*993a9e2aSMaximilian Luz	  SSAM subsystems. In some subsystems, notably the BAS subsystem managing
85*993a9e2aSMaximilian Luz	  devices contained in the base of the Surface Book 3 and the KIP subsystem
86*993a9e2aSMaximilian Luz	  managing type-cover devices in the Surface Pro 8 and Surface Pro X,
87*993a9e2aSMaximilian Luz	  devices can be (hot-)removed. Hub devices and drivers are required to
88*993a9e2aSMaximilian Luz	  manage these subdevices.
89*993a9e2aSMaximilian Luz
90*993a9e2aSMaximilian Luz	  Devices managed via these hubs are:
91*993a9e2aSMaximilian Luz	  - Battery/AC devices (Surface Book 3).
92*993a9e2aSMaximilian Luz	  - HID input devices (7th-generation and later models with detachable
93*993a9e2aSMaximilian Luz	    input devices).
94*993a9e2aSMaximilian Luz
95*993a9e2aSMaximilian Luz	  Select M (recommended) or Y here if you want support for the above
96*993a9e2aSMaximilian Luz	  mentioned devices on the corresponding Surface models. Without this
97*993a9e2aSMaximilian Luz	  module, the respective devices mentioned above will not be instantiated
98*993a9e2aSMaximilian Luz	  and thus any functionality provided by them will be missing, even when
99*993a9e2aSMaximilian Luz	  drivers for these devices are present. This module only provides the
100*993a9e2aSMaximilian Luz	  respective subsystem hubs. Both drivers and device specification (e.g.
101*993a9e2aSMaximilian Luz	  via the Surface Aggregator Registry) for these devices still need to be
102*993a9e2aSMaximilian Luz	  selected via other options.
103*993a9e2aSMaximilian Luz
104fc622b3dSMaximilian Luzconfig SURFACE_AGGREGATOR_REGISTRY
105fc622b3dSMaximilian Luz	tristate "Surface System Aggregator Module Device Registry"
106fc622b3dSMaximilian Luz	depends on SURFACE_AGGREGATOR
107fc622b3dSMaximilian Luz	depends on SURFACE_AGGREGATOR_BUS
108fc622b3dSMaximilian Luz	help
109*993a9e2aSMaximilian Luz	  Device-registry for Surface System Aggregator Module (SSAM) devices.
110fc622b3dSMaximilian Luz
111fc622b3dSMaximilian Luz	  Provides a module and driver which act as a device-registry for SSAM
112fc622b3dSMaximilian Luz	  client devices that cannot be detected automatically, e.g. via ACPI.
113*993a9e2aSMaximilian Luz	  Such devices are instead provided and managed via this registry.
114fc622b3dSMaximilian Luz
115fc622b3dSMaximilian Luz	  Devices provided via this registry are:
116fc622b3dSMaximilian Luz	  - Platform profile (performance-/cooling-mode) device (5th- and later
117fc622b3dSMaximilian Luz	    generations).
118fc622b3dSMaximilian Luz	  - Battery/AC devices (7th-generation).
119fc622b3dSMaximilian Luz	  - HID input devices (7th-generation).
120fc622b3dSMaximilian Luz
121fc622b3dSMaximilian Luz	  Select M (recommended) or Y here if you want support for the above
122fc622b3dSMaximilian Luz	  mentioned devices on the corresponding Surface models. Without this
123fc622b3dSMaximilian Luz	  module, the respective devices will not be instantiated and thus any
124fc622b3dSMaximilian Luz	  functionality provided by them will be missing, even when drivers for
125fc622b3dSMaximilian Luz	  these devices are present. In other words, this module only provides
126fc622b3dSMaximilian Luz	  the respective client devices. Drivers for these devices still need to
127fc622b3dSMaximilian Luz	  be selected via the other options.
128fc622b3dSMaximilian Luz
1299f794056SMaximilian Luzconfig SURFACE_AGGREGATOR_TABLET_SWITCH
1309f794056SMaximilian Luz	tristate "Surface Aggregator Generic Tablet-Mode Switch Driver"
1319f794056SMaximilian Luz	depends on SURFACE_AGGREGATOR
1329f794056SMaximilian Luz	depends on SURFACE_AGGREGATOR_BUS
1339f794056SMaximilian Luz	depends on INPUT
1349f794056SMaximilian Luz	help
1359f794056SMaximilian Luz	  Provides a tablet-mode switch input device on Microsoft Surface models
1369f794056SMaximilian Luz	  using the KIP subsystem for detachable keyboards (e.g. keyboard covers)
1379f794056SMaximilian Luz	  or the POS subsystem for device/screen posture changes.
1389f794056SMaximilian Luz
1399f794056SMaximilian Luz	  The KIP subsystem is used on newer Surface generations to handle
1409f794056SMaximilian Luz	  detachable input peripherals, specifically the keyboard cover (containing
1419f794056SMaximilian Luz	  keyboard and touchpad) on the Surface Pro 8 and Surface Pro X. The POS
1429f794056SMaximilian Luz	  subsystem is used for device posture change notifications on the Surface
1439f794056SMaximilian Luz	  Laptop Studio. This module provides a driver to let user-space know when
1449f794056SMaximilian Luz	  the device should be considered in tablet-mode due to the keyboard cover
1459f794056SMaximilian Luz	  being detached or folded back (essentially signaling when the keyboard is
1469f794056SMaximilian Luz	  not available for input). It does so by creating a tablet-mode switch
1479f794056SMaximilian Luz	  input device, sending the standard SW_TABLET_MODE event on mode change.
1489f794056SMaximilian Luz
1499f794056SMaximilian Luz	  Select M or Y here, if you want to provide tablet-mode switch input
1509f794056SMaximilian Luz	  events on the Surface Pro 8, Surface Pro X, and Surface Laptop Studio.
1519f794056SMaximilian Luz
1521d609992SMaximilian Luzconfig SURFACE_DTX
1531d609992SMaximilian Luz	tristate "Surface DTX (Detachment System) Driver"
1541d609992SMaximilian Luz	depends on SURFACE_AGGREGATOR
1551d609992SMaximilian Luz	depends on INPUT
1561d609992SMaximilian Luz	help
1571d609992SMaximilian Luz	  Driver for the Surface Book clipboard detachment system (DTX).
1581d609992SMaximilian Luz
1591d609992SMaximilian Luz	  On the Surface Book series devices, the display part containing the
1601d609992SMaximilian Luz	  CPU (called the clipboard) can be detached from the base (containing a
1611d609992SMaximilian Luz	  battery, the keyboard, and, optionally, a discrete GPU) by (if
1621d609992SMaximilian Luz	  necessary) unlocking and opening the latch connecting both parts.
1631d609992SMaximilian Luz
1641d609992SMaximilian Luz	  This driver provides a user-space interface that can influence the
1651d609992SMaximilian Luz	  behavior of this process, which includes the option to abort it in
1661d609992SMaximilian Luz	  case the base is still in use or speed it up in case it is not.
1671d609992SMaximilian Luz
168e893d45fSMaximilian Luz	  Note that this module can be built without support for the Surface
169e893d45fSMaximilian Luz	  Aggregator Bus (i.e. CONFIG_SURFACE_AGGREGATOR_BUS=n). In that case,
170e893d45fSMaximilian Luz	  some devices, specifically the Surface Book 3, will not be supported.
171e893d45fSMaximilian Luz
172274335f1SMaximilian Luzconfig SURFACE_GPE
173274335f1SMaximilian Luz	tristate "Surface GPE/Lid Support Driver"
17427247992SJarrett Schultz	depends on ACPI
175274335f1SMaximilian Luz	depends on DMI
176274335f1SMaximilian Luz	help
177274335f1SMaximilian Luz	  This driver marks the GPEs related to the ACPI lid device found on
178274335f1SMaximilian Luz	  Microsoft Surface devices as wakeup sources and prepares them
179274335f1SMaximilian Luz	  accordingly. It is required on those devices to allow wake-ups from
180274335f1SMaximilian Luz	  suspend by opening the lid.
181274335f1SMaximilian Luz
182bd69bcceSMaximilian Luzconfig SURFACE_HOTPLUG
183bd69bcceSMaximilian Luz	tristate "Surface Hot-Plug Driver"
18427247992SJarrett Schultz	depends on ACPI
185bd69bcceSMaximilian Luz	depends on GPIOLIB
186bd69bcceSMaximilian Luz	help
187bd69bcceSMaximilian Luz	  Driver for out-of-band hot-plug event signaling on Microsoft Surface
188bd69bcceSMaximilian Luz	  devices with hot-pluggable PCIe cards.
189bd69bcceSMaximilian Luz
190bd69bcceSMaximilian Luz	  This driver is used on Surface Book (2 and 3) devices with a
191bd69bcceSMaximilian Luz	  hot-pluggable discrete GPU (dGPU). When not in use, the dGPU on those
192bd69bcceSMaximilian Luz	  devices can enter D3cold, which prevents in-band (standard) PCIe
193bd69bcceSMaximilian Luz	  hot-plug signaling. Thus, without this driver, detaching the base
194bd69bcceSMaximilian Luz	  containing the dGPU will not correctly update the state of the
195bd69bcceSMaximilian Luz	  corresponding PCIe device if it is in D3cold. This driver adds support
196bd69bcceSMaximilian Luz	  for out-of-band hot-plug notifications, ensuring that the device state
197bd69bcceSMaximilian Luz	  is properly updated even when the device in question is in D3cold.
198bd69bcceSMaximilian Luz
199bd69bcceSMaximilian Luz	  Select M or Y here, if you want to (fully) support hot-plugging of
200bd69bcceSMaximilian Luz	  dGPU devices on the Surface Book 2 and/or 3 during D3cold.
201bd69bcceSMaximilian Luz
202b78b4982SMaximilian Luzconfig SURFACE_PLATFORM_PROFILE
203b78b4982SMaximilian Luz	tristate "Surface Platform Profile Driver"
20427247992SJarrett Schultz	depends on ACPI
205b78b4982SMaximilian Luz	depends on SURFACE_AGGREGATOR_REGISTRY
206b78b4982SMaximilian Luz	select ACPI_PLATFORM_PROFILE
207b78b4982SMaximilian Luz	help
208b78b4982SMaximilian Luz	  Provides support for the ACPI platform profile on 5th- and later
209b78b4982SMaximilian Luz	  generation Microsoft Surface devices.
210b78b4982SMaximilian Luz
211b78b4982SMaximilian Luz	  More specifically, this driver provides ACPI platform profile support
212b78b4982SMaximilian Luz	  on Microsoft Surface devices with a Surface System Aggregator Module
213b78b4982SMaximilian Luz	  (SSAM) connected via the Surface Serial Hub (SSH / SAM-over-SSH). In
214b78b4982SMaximilian Luz	  other words, this driver provides platform profile support on the
215b78b4982SMaximilian Luz	  Surface Pro 5, Surface Book 2, Surface Laptop, Surface Laptop Go and
216b78b4982SMaximilian Luz	  later. On those devices, the platform profile can significantly
217b78b4982SMaximilian Luz	  influence cooling behavior, e.g. setting it to 'quiet' (default) or
218b78b4982SMaximilian Luz	  'low-power' can significantly limit performance of the discrete GPU on
219b78b4982SMaximilian Luz	  Surface Books, while in turn leading to lower power consumption and/or
220b78b4982SMaximilian Luz	  less fan noise.
221b78b4982SMaximilian Luz
222b78b4982SMaximilian Luz	  Select M or Y here, if you want to include ACPI platform profile
223b78b4982SMaximilian Luz	  support on the above mentioned devices.
224b78b4982SMaximilian Luz
225411269baSMaximilian Luzconfig SURFACE_PRO3_BUTTON
226411269baSMaximilian Luz	tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet"
22727247992SJarrett Schultz	depends on ACPI
228e4a02c7aSGeert Uytterhoeven	depends on INPUT
229411269baSMaximilian Luz	help
230411269baSMaximilian Luz	  This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
231411269baSMaximilian Luz
232c167b9c7SMaximilian Luzsource "drivers/platform/surface/aggregator/Kconfig"
233c167b9c7SMaximilian Luz
234f23027caSMaximilian Luzendif # SURFACE_PLATFORMS
235