xref: /linux/drivers/platform/surface/Kconfig (revision c197e969e3082b9c19175d2f013a0dbd3ce52236)
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"
8*c197e969SGeert 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
314df56c36SMaximilian Luzconfig SURFACE_3_BUTTON
324df56c36SMaximilian Luz	tristate "Power/home/volume buttons driver for Microsoft Surface 3 tablet"
3327247992SJarrett Schultz	depends on ACPI
34e4a02c7aSGeert Uytterhoeven	depends on KEYBOARD_GPIO && I2C
354df56c36SMaximilian Luz	help
364df56c36SMaximilian Luz	  This driver handles the power/home/volume buttons on the Microsoft Surface 3 tablet.
374df56c36SMaximilian Luz
3885f7582cSMaximilian Luzconfig SURFACE_3_POWER_OPREGION
3985f7582cSMaximilian Luz	tristate "Surface 3 battery platform operation region support"
4027247992SJarrett Schultz	depends on ACPI
41e4a02c7aSGeert Uytterhoeven	depends on I2C
4285f7582cSMaximilian Luz	help
4385f7582cSMaximilian Luz	  This driver provides support for ACPI operation
4485f7582cSMaximilian Luz	  region of the Surface 3 battery platform driver.
4585f7582cSMaximilian Luz
46fc00bc8aSMaximilian Luzconfig SURFACE_ACPI_NOTIFY
47fc00bc8aSMaximilian Luz	tristate "Surface ACPI Notify Driver"
48fc00bc8aSMaximilian Luz	depends on SURFACE_AGGREGATOR
49fc00bc8aSMaximilian Luz	help
50fc00bc8aSMaximilian Luz	  Surface ACPI Notify (SAN) driver for Microsoft Surface devices.
51fc00bc8aSMaximilian Luz
52fc00bc8aSMaximilian Luz	  This driver provides support for the ACPI interface (called SAN) of
53fc00bc8aSMaximilian Luz	  the Surface System Aggregator Module (SSAM) EC. This interface is used
54fc00bc8aSMaximilian Luz	  on 5th- and 6th-generation Microsoft Surface devices (including
55fc00bc8aSMaximilian Luz	  Surface Pro 5 and 6, Surface Book 2, Surface Laptops 1 and 2, and in
56fc00bc8aSMaximilian Luz	  reduced functionality on the Surface Laptop 3) to execute SSAM
57fc00bc8aSMaximilian Luz	  requests directly from ACPI code, as well as receive SSAM events and
58fc00bc8aSMaximilian Luz	  turn them into ACPI notifications. It essentially acts as a
59fc00bc8aSMaximilian Luz	  translation layer between the SSAM controller and ACPI.
60fc00bc8aSMaximilian Luz
61fc00bc8aSMaximilian Luz	  Specifically, this driver may be needed for battery status reporting,
62fc00bc8aSMaximilian Luz	  thermal sensor access, and real-time clock information, depending on
63fc00bc8aSMaximilian Luz	  the Surface device in question.
64fc00bc8aSMaximilian Luz
65178f6ab7SMaximilian Luzconfig SURFACE_AGGREGATOR_CDEV
66178f6ab7SMaximilian Luz	tristate "Surface System Aggregator Module User-Space Interface"
67178f6ab7SMaximilian Luz	depends on SURFACE_AGGREGATOR
68178f6ab7SMaximilian Luz	help
69178f6ab7SMaximilian Luz	  Provides a misc-device interface to the Surface System Aggregator
70178f6ab7SMaximilian Luz	  Module (SSAM) controller.
71178f6ab7SMaximilian Luz
72178f6ab7SMaximilian Luz	  This option provides a module (called surface_aggregator_cdev), that,
73178f6ab7SMaximilian Luz	  when loaded, will add a client device (and its respective driver) to
74178f6ab7SMaximilian Luz	  the SSAM controller. Said client device manages a misc-device
75178f6ab7SMaximilian Luz	  interface (/dev/surface/aggregator), which can be used by user-space
76178f6ab7SMaximilian Luz	  tools to directly communicate with the SSAM EC by sending requests and
77178f6ab7SMaximilian Luz	  receiving the corresponding responses.
78178f6ab7SMaximilian Luz
79178f6ab7SMaximilian Luz	  The provided interface is intended for debugging and development only,
80178f6ab7SMaximilian Luz	  and should not be used otherwise.
81178f6ab7SMaximilian Luz
82fc622b3dSMaximilian Luzconfig SURFACE_AGGREGATOR_REGISTRY
83fc622b3dSMaximilian Luz	tristate "Surface System Aggregator Module Device Registry"
84fc622b3dSMaximilian Luz	depends on SURFACE_AGGREGATOR
85fc622b3dSMaximilian Luz	depends on SURFACE_AGGREGATOR_BUS
86fc622b3dSMaximilian Luz	help
87fc622b3dSMaximilian Luz	  Device-registry and device-hubs for Surface System Aggregator Module
88fc622b3dSMaximilian Luz	  (SSAM) devices.
89fc622b3dSMaximilian Luz
90fc622b3dSMaximilian Luz	  Provides a module and driver which act as a device-registry for SSAM
91fc622b3dSMaximilian Luz	  client devices that cannot be detected automatically, e.g. via ACPI.
92fc622b3dSMaximilian Luz	  Such devices are instead provided via this registry and attached via
93fc622b3dSMaximilian Luz	  device hubs, also provided in this module.
94fc622b3dSMaximilian Luz
95fc622b3dSMaximilian Luz	  Devices provided via this registry are:
96fc622b3dSMaximilian Luz	  - Platform profile (performance-/cooling-mode) device (5th- and later
97fc622b3dSMaximilian Luz	    generations).
98fc622b3dSMaximilian Luz	  - Battery/AC devices (7th-generation).
99fc622b3dSMaximilian Luz	  - HID input devices (7th-generation).
100fc622b3dSMaximilian Luz
101fc622b3dSMaximilian Luz	  Select M (recommended) or Y here if you want support for the above
102fc622b3dSMaximilian Luz	  mentioned devices on the corresponding Surface models. Without this
103fc622b3dSMaximilian Luz	  module, the respective devices will not be instantiated and thus any
104fc622b3dSMaximilian Luz	  functionality provided by them will be missing, even when drivers for
105fc622b3dSMaximilian Luz	  these devices are present. In other words, this module only provides
106fc622b3dSMaximilian Luz	  the respective client devices. Drivers for these devices still need to
107fc622b3dSMaximilian Luz	  be selected via the other options.
108fc622b3dSMaximilian Luz
1091d609992SMaximilian Luzconfig SURFACE_DTX
1101d609992SMaximilian Luz	tristate "Surface DTX (Detachment System) Driver"
1111d609992SMaximilian Luz	depends on SURFACE_AGGREGATOR
1121d609992SMaximilian Luz	depends on INPUT
1131d609992SMaximilian Luz	help
1141d609992SMaximilian Luz	  Driver for the Surface Book clipboard detachment system (DTX).
1151d609992SMaximilian Luz
1161d609992SMaximilian Luz	  On the Surface Book series devices, the display part containing the
1171d609992SMaximilian Luz	  CPU (called the clipboard) can be detached from the base (containing a
1181d609992SMaximilian Luz	  battery, the keyboard, and, optionally, a discrete GPU) by (if
1191d609992SMaximilian Luz	  necessary) unlocking and opening the latch connecting both parts.
1201d609992SMaximilian Luz
1211d609992SMaximilian Luz	  This driver provides a user-space interface that can influence the
1221d609992SMaximilian Luz	  behavior of this process, which includes the option to abort it in
1231d609992SMaximilian Luz	  case the base is still in use or speed it up in case it is not.
1241d609992SMaximilian Luz
125e893d45fSMaximilian Luz	  Note that this module can be built without support for the Surface
126e893d45fSMaximilian Luz	  Aggregator Bus (i.e. CONFIG_SURFACE_AGGREGATOR_BUS=n). In that case,
127e893d45fSMaximilian Luz	  some devices, specifically the Surface Book 3, will not be supported.
128e893d45fSMaximilian Luz
129274335f1SMaximilian Luzconfig SURFACE_GPE
130274335f1SMaximilian Luz	tristate "Surface GPE/Lid Support Driver"
13127247992SJarrett Schultz	depends on ACPI
132274335f1SMaximilian Luz	depends on DMI
133274335f1SMaximilian Luz	help
134274335f1SMaximilian Luz	  This driver marks the GPEs related to the ACPI lid device found on
135274335f1SMaximilian Luz	  Microsoft Surface devices as wakeup sources and prepares them
136274335f1SMaximilian Luz	  accordingly. It is required on those devices to allow wake-ups from
137274335f1SMaximilian Luz	  suspend by opening the lid.
138274335f1SMaximilian Luz
139bd69bcceSMaximilian Luzconfig SURFACE_HOTPLUG
140bd69bcceSMaximilian Luz	tristate "Surface Hot-Plug Driver"
14127247992SJarrett Schultz	depends on ACPI
142bd69bcceSMaximilian Luz	depends on GPIOLIB
143bd69bcceSMaximilian Luz	help
144bd69bcceSMaximilian Luz	  Driver for out-of-band hot-plug event signaling on Microsoft Surface
145bd69bcceSMaximilian Luz	  devices with hot-pluggable PCIe cards.
146bd69bcceSMaximilian Luz
147bd69bcceSMaximilian Luz	  This driver is used on Surface Book (2 and 3) devices with a
148bd69bcceSMaximilian Luz	  hot-pluggable discrete GPU (dGPU). When not in use, the dGPU on those
149bd69bcceSMaximilian Luz	  devices can enter D3cold, which prevents in-band (standard) PCIe
150bd69bcceSMaximilian Luz	  hot-plug signaling. Thus, without this driver, detaching the base
151bd69bcceSMaximilian Luz	  containing the dGPU will not correctly update the state of the
152bd69bcceSMaximilian Luz	  corresponding PCIe device if it is in D3cold. This driver adds support
153bd69bcceSMaximilian Luz	  for out-of-band hot-plug notifications, ensuring that the device state
154bd69bcceSMaximilian Luz	  is properly updated even when the device in question is in D3cold.
155bd69bcceSMaximilian Luz
156bd69bcceSMaximilian Luz	  Select M or Y here, if you want to (fully) support hot-plugging of
157bd69bcceSMaximilian Luz	  dGPU devices on the Surface Book 2 and/or 3 during D3cold.
158bd69bcceSMaximilian Luz
159b78b4982SMaximilian Luzconfig SURFACE_PLATFORM_PROFILE
160b78b4982SMaximilian Luz	tristate "Surface Platform Profile Driver"
16127247992SJarrett Schultz	depends on ACPI
162b78b4982SMaximilian Luz	depends on SURFACE_AGGREGATOR_REGISTRY
163b78b4982SMaximilian Luz	select ACPI_PLATFORM_PROFILE
164b78b4982SMaximilian Luz	help
165b78b4982SMaximilian Luz	  Provides support for the ACPI platform profile on 5th- and later
166b78b4982SMaximilian Luz	  generation Microsoft Surface devices.
167b78b4982SMaximilian Luz
168b78b4982SMaximilian Luz	  More specifically, this driver provides ACPI platform profile support
169b78b4982SMaximilian Luz	  on Microsoft Surface devices with a Surface System Aggregator Module
170b78b4982SMaximilian Luz	  (SSAM) connected via the Surface Serial Hub (SSH / SAM-over-SSH). In
171b78b4982SMaximilian Luz	  other words, this driver provides platform profile support on the
172b78b4982SMaximilian Luz	  Surface Pro 5, Surface Book 2, Surface Laptop, Surface Laptop Go and
173b78b4982SMaximilian Luz	  later. On those devices, the platform profile can significantly
174b78b4982SMaximilian Luz	  influence cooling behavior, e.g. setting it to 'quiet' (default) or
175b78b4982SMaximilian Luz	  'low-power' can significantly limit performance of the discrete GPU on
176b78b4982SMaximilian Luz	  Surface Books, while in turn leading to lower power consumption and/or
177b78b4982SMaximilian Luz	  less fan noise.
178b78b4982SMaximilian Luz
179b78b4982SMaximilian Luz	  Select M or Y here, if you want to include ACPI platform profile
180b78b4982SMaximilian Luz	  support on the above mentioned devices.
181b78b4982SMaximilian Luz
182411269baSMaximilian Luzconfig SURFACE_PRO3_BUTTON
183411269baSMaximilian Luz	tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet"
18427247992SJarrett Schultz	depends on ACPI
185e4a02c7aSGeert Uytterhoeven	depends on INPUT
186411269baSMaximilian Luz	help
187411269baSMaximilian Luz	  This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet.
188411269baSMaximilian Luz
189c167b9c7SMaximilian Luzsource "drivers/platform/surface/aggregator/Kconfig"
190c167b9c7SMaximilian Luz
191f23027caSMaximilian Luzendif # SURFACE_PLATFORMS
192