From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BD643033F8 for ; Sun, 12 Jul 2026 16:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783873514; cv=none; b=kXkYWqJKZQNFwIQFq0uITs/kVkfp+QCdH3hwg1S4mcoG+S8xMda+gkl7GNTDRvCrjkImrv9BuDpXXO6sAxufER28BVXZacUuEaNES9JldlZCt3EFIBkUDqjHjLY0JRawSvAAOxKwDJ7Br5kfI07r9SN1tAzN0RK0kbr46nt5aUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783873514; c=relaxed/simple; bh=TizsjAo6H22VabPBe58L5vdTzzQI1Fe/SLJnZUEKHng=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=D3iufL0ztZEu6uJuRGLRvaxRV5vxeVJJRZCRRWKZUWzjrkMA8wu4JrTW7hq4CUY3Xv5z+IOpmAVbXW8Ra3YLRqxR21PCeKteNdqaL/fNUBI6/Y1f3oNaj5/Bl9RXQ7xP0pfAPzStnUFtf1nUCb4KPNKIVOuGF5ck2DgmyYx6JnM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2cc97653887so26603655ad.1 for ; Sun, 12 Jul 2026 09:25:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783873513; x=1784478313; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=mYwbmm2rFd+cIg+osK2dDYIzk9bxMwezMqTjeK3T5cs=; b=ECM94slbS4/WLnn4FXKPOibiwHJRfox4Qjmies6aGRb5Hc5Mlzv1ZLVpg2+lcLiqLO 05kbUWhnRsraEKQBFxLnLcNyMR7glTswknkiQwj/2LA2irPuXjahQeYDyHgNkWEu5tq4 p31pe7zvbG3Tj3hN7DqxSfV41qvLJ99nBXYoY4IJgBl2Zbu/tsDHjvm9ObnBtX/5tYCg oseIOv+yUaKuP4ZVQ/MraWM+fHADjBt3qMQFiFqVgdkhh6RPndAxsi3WGtjARk+ZSzp1 XQw35Zz7XxF+urbB+JhQrVbi8sn/yg4MFgcCnZ1f4XZTItLPjBBySRLILbODpWgVj6Tr gT5A== X-Forwarded-Encrypted: i=1; AHgh+RqeQj+sStX7u1rrCdmogM88tnWicOICNlHkB5vy9afPUtsGmNEYd/V4XoLzUiaJ0/VsVPfL9bKy/XgTSxM=@vger.kernel.org X-Gm-Message-State: AOJu0YyfoONJ0waiwVajuNBte1uIBzgBKruWrEheivhlWbl6/aTOcoG2 dUey/ika1/7AcSxMGna2MYtVJy4rD+SEUXPvaATphX1ZswMMy0lp3rw= X-Gm-Gg: AfdE7cnTFNp4lIbgxkU90lRX9QpUsOcC8lpLOneCblJh1BuwyZj00mgD8uDdACMDJVO y1whhvlFIDLdO8oocBorKd5LNZs+76Hks5jc3JY/JFdVAc0QmR5ksyNLpJaKYyxZmm6+nUwFqfV oPVmWjfsM8PkSkgsXOTNO01c68vbjJCvFO5ts3vtCTXIwbDj9EWM+6hZX+MZZBrTJUXJD6jiC2+ JxfVO7T+hnjqREwANDlQl0h9tDncgN+rwZRwJcogqS9F3bFtIrl+t0Q20guhBnDSmut7wdFaeqk CZIUebJC9vsaRVv+sdvN1/hXoDJIFyOzl9NEyt0G5PRQNuRQt+MuYeJfzs+7QwowaaGMhwToPTZ BeAvcC/1ooYHbIj5j9jX2M+z376jCYoxFH/ChF3B+9ZFzSn2JW15ixCmZ3WlYKJQLSpvdOOvB7b RhRjEydkggEkqs0KXT9HRyJwGvvk59bGSvV7+m5XOTPQu3gnx26HtxJcdS3eHKEo+No7BO8SxvR yY88tuk0Sxcp+MqFOEFguEvxzmw X-Received: by 2002:a17:903:1af0:b0:2ca:e9dc:7357 with SMTP id d9443c01a7336-2ce9e9aaafdmr56220055ad.9.1783873512762; Sun, 12 Jul 2026 09:25:12 -0700 (PDT) Received: from penguin.tail0a1999.ts.net (61-228-44-142.dynamic-ip.hinet.net. [61.228.44.142]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13b93ae3b45sm12329887c88.15.2026.07.12.09.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 09:25:12 -0700 (PDT) From: Shih-Yuan Lee To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Shih-Yuan Lee Subject: [PATCH 0/2] spi: pxa2xx: MacBook8,1 quirk and LPSS S3 resume fixes Date: Mon, 13 Jul 2026 00:24:18 +0800 Message-Id: <20260712162420.7453-1-fourdollars@debian.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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