[PATCH 0/2] spi: pxa2xx: MacBook8,1 quirk and LPSS S3 resume fixes
From: Shih-Yuan Lee
Date: Sun Jul 12 2026 - 12:25:24 EST
This series fixes two bugs in the spi-pxa2xx driver found during work
to restore MacBook8,1 SPI keyboard/touchpad functionality across S3
suspend/resume cycles.
Patch 1 moves the force-PIO quirk for Apple MacBook8,1 from the client
driver (applespi) to the host controller driver (spi-pxa2xx-pci), where
LPSS setup properly belongs. It also fixes a related runtime PM bug:
when DMA is disabled, pm_runtime_allow() must not be called, because
runtime autosuspend clock-gates the LPSS block between transfers and
causes PCIe Completion Timeouts when its MMIO registers are subsequently
accessed.
Patch 2 fixes S3 suspend/resume for all Intel LPSS SPI controllers.
The LPSS power domain is fully removed across S3, so all private
registers (BAR0 0x200-0x2ff) and IDMA registers (0x800-0x814) are lost.
Without explicitly de-asserting LPSS_PRIV_RESETS (0x204) on resume,
any MMIO access triggers a PCIe Completion Timeout and watchdog reset.
Additionally, the IDMA block (sharing the SPI interrupt line) must have
its registers restored to prevent spurious interrupts from masking real
SPI transfers. The CS control register (0x224) is intentionally
re-initialised via lpss_ssp_setup() rather than restored from snapshot,
ensuring CS starts deasserted regardless of its state at suspend time.
These patches are independent of the companion applespi series also
submitted today.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=108331
Shih-Yuan Lee (2):
spi: pxa2xx: disable DMA and fix runtime PM for Apple MacBook8,1
spi: pxa2xx: restore LPSS private and IDMA registers on S3 resume
drivers/spi/spi-pxa2xx-pci.c | 38 ++++++++++++++++++++++--
drivers/spi/spi-pxa2xx.c | 57 ++++++++++++++++++++++++++++++++++++
drivers/spi/spi-pxa2xx.h | 4 +++
3 files changed, 96 insertions(+), 3 deletions(-)
--
2.39.5