[PATCH 0/1] Input: applespi - force PIO mode on MacBook8,1

From: Shih-Yuan Lee

Date: Sat Jul 11 2026 - 01:53:07 EST


Hi Dmitry and the linux-input community,

This patch addresses a long-standing issue on the early 2015 12" MacBook
(MacBook8,1) where the SPI-connected keyboard and trackpad intermittently
fail to initialize on boot, and consistently fail to initialize after warm
reboots (soft restarts).

The issue stems from a race condition between the Intel LPSS DMA controller
(dw_dmac) and the host SPI controller (spi-pxa2xx-pci). When DMA mode is
active on this controller, transfers consistently time out (taking exactly
200ms per transfer), leaving the applespi client device in an uninitialized
and unresponsive state.

When the host controller probes before the DMA controller, it gracefully
falls back to PIO mode, which operates flawlessly.

To resolve this reliably without introducing platform-level DMI quirks into
the generic Intel LPSS PCI driver (which might affect non-Apple systems),
this patch introduces a targeted DMI quirk directly within applespi.c. On
MacBook8,1, it overrides the SPI controller's can_dma callback to a custom
helper that always returns false. This forces the controller to use the
rock-solid PIO mode specifically for this device.

Testing shows 100% reliable initialization of the keyboard and trackpad
across multiple soft and hard reboots.

Shih-Yuan Lee (1):
Input: applespi - force PIO mode on MacBook8,1

drivers/input/keyboard/applespi.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

--
2.39.5