From nobody Thu Sep 17 09:10:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hlqj31MjYz6skRJ for ; Thu, 17 Sep 2026 09:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hlqj3062hz3Fy2 for ; Thu, 17 Sep 2026 09:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789636215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4y6TSnqOni947l726Ai81Nyq6il2aAmJxfSXfWYDhM=; b=IGIlHJD+SrwzcMbdfi5gICXawImkwxG8vlCLrQFFV28oO4YzGXDlUGojviR8C0/In5OtSR tOj/yHlSEmcSTdRBPWTFciMUBoeUO9FD1a+TfNPsa/5UnFpjESsB5MAxUlLF05romvoc6t zcWdnDJYtDtpbdv3wASszwChzW7B7c4PbKl9nASi9shpQAmlbgYYtSiahbks9P7q46xt7t LWX2Vkog+5YG3RIUvpAe+D7lvVkvw900q490r0SSnL1lZPK+VaZ8NurIhdbU1qj5CfImV3 fKc0eQiVtNtDrN+0D5eJAokgRfeSaR28Thdiqfw761UO6jk09TKtBdvW0698Ug== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789636215; b=hh1L9adV97l55xokKN1OVuP2lHvPyhCsKZ7Ci6FpQtet5UdinNlZ8PqlJssW8Np9+eNl38 +R5HSwXQ2ufOyYn1r2Gztj7zeoP3yMcRkzF0EIaDYl3EBnpSVdkn7rkQmfbcdfEdk0vb5K JeSpur0lYPQahgUpquz7J1HD0HezRcvLOr6/D5KHihsR5WdPHp+8x7CWNJRYhHOnQFoCTp HH8yAhCcXniM8lcXwyijAIJTGC/+i2X4ffgdlqj9uCup8L6A59a4txAgsq3/8F4NUP4sez UrbSPW223tnSGQo/SE6vG3c/9X6lOX/fxi6kGpDVatcV/1vn1s3i0uMuCQzfCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789636215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4y6TSnqOni947l726Ai81Nyq6il2aAmJxfSXfWYDhM=; b=L9xL6o77UyUdjS/f+CkXwclZ9xXGcTN5XdWCE2L7ZwOKmy5dZ4XX1xmrvzL4V1Bcl1TprA eDTBqVqbIeD9d96+MkTreymFzB1E6Clc8Swln92uRnOECU4trZeRiT++5Y9Fh8y0rD0npc 3mCnzcuIJoKMHq2Rb0vNwoki8ftWr4mtp1Qg2UaefJmfAuCb5Nk6lOYhkhQl9Njj3UAX06 IyrurdVBklU5RLAtvw7YoYZgXGh+fkvBoe8wL5L6ryvmDUlm3zsoWQK6p8NrlDUVGbKPLY FD3CD1U0/bu0Ivqs8tAWCxxsycZVXqVbc6QIcwD89NMwkeNsfQbbxYT0ZLBKLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hlqj25sp4zPsf for ; Thu, 17 Sep 2026 09:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40d07 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 17 Sep 2026 09:10:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Please From: Vladimir Kondratyev Subject: git: e75f61962ca4 - main - ig4(4): fix attach of ACPI-enumerated LPSS controllers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e75f61962ca47f0b0ae4aed89c8416e6544d9845 Auto-Submitted: auto-generated Date: Thu, 17 Sep 2026 09:10:09 +0000 Message-Id: <6aabae71.40d07.d6e1527@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e75f61962ca47f0b0ae4aed89c8416e6544d9845 commit e75f61962ca47f0b0ae4aed89c8416e6544d9845 Author: Please AuthorDate: 2026-09-17 09:08:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-09-17 09:08:43 +0000 ig4(4): fix attach of ACPI-enumerated LPSS controllers Intel LPSS I2C controllers enumerated through ACPI rather than PCI never attach on Haswell and Broadwell, so every device behind those buses is lost. On a Dell XPS 13 9343 that hides the I2C HID touchpad and leaves only the PS/2 fallback, which the firmware does not restore after S3. Three causes, all on the ACPI path: Firmware may leave an LPSS function in D3, where its registers read as all-ones and set_controller() fails with "controller error during attach-1". Run _PS0 before mapping them. The PCI path does not need this, which is why the gap went unnoticed. INT33C2, INT33C3, INT3432 and INT3433 are Lynx Point-LP and Wildcat Point-LP, which ig4_pci.c already classifies as IG4_HASWELL; the ACPI path called everything but APMC0D0F an Atom SoC. The functional clock stays gated until bit 0 of IG4_REG_CLK_PARMS is set. Until then the controller accepts writes into the TX FIFO, never drives the bus, raises no interrupts, and every transfer ends in IIC_ETIMEOUT. Linux ungates the same bit in acpi_lpss.c. Doing it in ig4iic_set_config() covers resume as well as attach. With all three in place the touchpad attaches as iichid0/hmt1 with multi-touch and survives suspend and resume. PR: 298558 Tested by: Please (XPS 13 9343, Broadwell-U, 15.1-RELEASE-p3) Reviewed by: wulf MFC after: 1 week --- sys/dev/ichiic/ig4_acpi.c | 10 ++++++++++ sys/dev/ichiic/ig4_iic.c | 11 +++++++++++ sys/dev/ichiic/ig4_reg.h | 1 + 3 files changed, 22 insertions(+) diff --git a/sys/dev/ichiic/ig4_acpi.c b/sys/dev/ichiic/ig4_acpi.c index 1275790a4412..10540d2bd889 100644 --- a/sys/dev/ichiic/ig4_acpi.c +++ b/sys/dev/ichiic/ig4_acpi.c @@ -95,10 +95,20 @@ ig4iic_acpi_attach(device_t dev) return (error); if (strcmp(str, "APMC0D0F") == 0) { sc->version = IG4_EMAG; + } else if (strcmp(str, "INT33C2") == 0 || strcmp(str, "INT33C3") == 0 || + strcmp(str, "INT3432") == 0 || strcmp(str, "INT3433") == 0) { + /* Lynx Point-LP / Wildcat Point-LP LPSS in ACPI mode. */ + sc->version = IG4_HASWELL; } else { /* All the other HIDs matched are Atom SOCs. */ sc->version = IG4_ATOM; } + /* + * Firmware may leave LPSS functions in D3 (e.g. Dell XPS 13 9343): + * the registers then read as all-ones and attach fails. Run _PS0. + */ + acpi_set_powerstate(dev, ACPI_STATE_D0); + sc->regs_rid = 0; sc->regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->regs_rid, RF_ACTIVE); diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index 161a940c5e7a..a326d487e1d9 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -933,6 +933,17 @@ ig4iic_set_config(ig4iic_softc_t *sc, bool reset, bool force_restore) reset = true; } + /* + * Haswell/Broadwell LPSS in ACPI mode can come up with the functional + * clock gated. The controller then accepts FIFO writes but never + * drives the bus and every transfer times out. + */ + if (sc->version == IG4_HASWELL) { + v = reg_read(sc, IG4_REG_CLK_PARMS); + if ((v & IG4_CLK_PARMS_EN) == 0) + reg_write(sc, IG4_REG_CLK_PARMS, v | IG4_CLK_PARMS_EN); + } + if ((sc->version == IG4_HASWELL || sc->version == IG4_ATOM) && reset) { reg_write(sc, IG4_REG_RESETS_HSW, IG4_RESETS_ASSERT_HSW); reg_write(sc, IG4_REG_RESETS_HSW, IG4_RESETS_DEASSERT_HSW); diff --git a/sys/dev/ichiic/ig4_reg.h b/sys/dev/ichiic/ig4_reg.h index 35342f7d79aa..435475465e6f 100644 --- a/sys/dev/ichiic/ig4_reg.h +++ b/sys/dev/ichiic/ig4_reg.h @@ -124,6 +124,7 @@ #define IG4_REG_DEVIDLE_CTRL 0x024C /* RW Device Control */ /* Available at least on Atom SoCs */ #define IG4_REG_CLK_PARMS 0x0800 /* RW Clock Parameters */ +#define IG4_CLK_PARMS_EN 0x00000001 /* functional clock ungated */ /* Available at least on Atom SoCs and Haswell mobile */ #define IG4_REG_RESETS_HSW 0x0804 /* RW Reset Register */ #define IG4_REG_GENERAL 0x0808 /* RW General Register */