Skip to content
Permalink
Browse files
WIP: hid: transport: spi: add apple SPI transport
Keyboard and touchpad of Apple Sillicon SoCs (M1, M1 Pro/Max) laptops
are connected over SPI. The input devices it use HID.`

This is the same protocol as drivers/input/keyboard/applespi.c. At the
time it appears nobody noticed that it was using HID over SPI.
Adding support for ACPI based Intel MacBooks currently using applespi
should be possible.

Microsoft has a specification for HID over SPI [1] incompatible with the
transport protocol used by Apple.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/hid-over-spi

Signed-off-by: Janne Grunau <j@jannau.net>
  • Loading branch information
jannau authored and marcan committed Dec 15, 2021
1 parent c3803af commit 49c089b290128ddba454c0341a9906337e24751e
Show file tree
Hide file tree
Showing 5 changed files with 863 additions and 0 deletions.
@@ -1268,4 +1268,6 @@ source "drivers/hid/amd-sfh-hid/Kconfig"

source "drivers/hid/surface-hid/Kconfig"

source "drivers/hid/spi-hid/Kconfig"

endmenu
@@ -151,3 +151,5 @@ obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/
obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/

obj-$(CONFIG_SURFACE_HID_CORE) += surface-hid/

obj-$(CONFIG_SPI_HID_APPLE) += spi-hid/
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "SPI HID support"
depends on SPI

config SPI_HID_APPLE
tristate "HID over SPI transport layer for Apple Silicon SoCs"
default n
depends on SPI && INPUT && OF
help
Say Y here if you use Apple Silicon based laptop. The keyboard and
touchpad are HID based devices connected via SPI.\

If unsure, say N.

This support is also available as a module. If so, the module
will be called spi-hid-apple.

endmenu
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Makefile for SPI HID tarnsport drivers
#

obj-$(CONFIG_SPI_HID_APPLE) += spi-hid-apple.o

0 comments on commit 49c089b

Please sign in to comment.