From nobody Sun Sep 27 12:20:42 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 4ht3SB2W13z6tRmd for ; Sun, 27 Sep 2026 12:20:42 +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 4ht3SB1Gfcz4Qhq for ; Sun, 27 Sep 2026 12:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790511642; 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=160c0J+SObBIQhUzUW5LiAN839HfluYm+9P/s5VSRAs=; b=BFCSZQ3q43iFr8PpF7CTo4bGHXyLZn8ltOaEt+p8b/AVR+ToMg4dRBUHpvWX0ygdgpX/DF 7raZ1m8V0DCah2Tn+ZGUD4wkzNYAo063uWZgXK/OvPZ60szKcSOXWdxpGQN9+sIMVHm7/X Wt2DyiVhwofqOwG58K0yUY6wgc8qqVLxgAnxkqKF+Jb846eaggxtXCdxrYGd9mKOWMTsMi cY2PvDQ6lKlCD3XAIbPq2F9YUYaGxXy6GoFGfCT/eN5IgQ5Og8js2hOCIDv8B2L4EuKS9a erGCi7cWPpCa1GibQKUVbovXWEv5buLjycKsW/Lj6bRKRGQUpGU/zrJfnArhSA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790511642; b=gmlc9lC4eJzJYHMXV+XLym1ZlWnDMW3w5mGP997yxxOrt31I5Z4D9wPqaB9iqoNYRXfu/K DGdp1uASMarsHFUIYwqo80yIx9NrRaMq02mb0TNKJ9WIJT0fh4bXR5iWCyyqmcQRiOE/E+ CMXuJGYwRdc11RNdgrWvm1Qb8P3bImusX1URPD/msPY7eoaIx7hioVwZ5CfdnKGSyeiUL/ Tmx00z5rRnD7/X623GwjD4PY7tPaTLEC39lB5zfo/99eXZfD38//Pzho0ZR6UmtSj6J3Jz Ub1drY8PWr84uirXSgNrycWpDa/gsYtzF7tp5bIG0ZRHeOzpEmcK8os8VveyMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790511642; 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=160c0J+SObBIQhUzUW5LiAN839HfluYm+9P/s5VSRAs=; b=D3JJLQs/oBzCR0BneU/LNrjtDSL7fsOMm0FrNDSE+3YX2yV8NdHxp63FTyWRc7wGwAF8Mp MiEBhFxDNYzdHOktQH3M19w0+FIXK7mIcN09FDft47hH4iZdR/t6R39EdIdhSXWOEqyr/g kziUb2oomb7flLudM3exHvoq6ECAS1QWXJF9XaVDSpMhqW7+2J7VJV+hBEtipSt7fremyF OsF3tFHZeGy4nQECeYKniSlE7f7YvQZsI+0HyY9a7ebqZ2mOu25gonKY0UdX4a6DsW0Zow TsNt9pHaQWdRxkSdCnR806yFlDX/8Mpa+MbixXUWKGU/B7zoJW3lkKpVWdCmAw== 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 4ht3SB044Qzgnp for ; Sun, 27 Sep 2026 12:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33888 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 27 Sep 2026 12:20:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Please From: Vladimir Kondratyev Subject: git: dd38230b589b - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: dd38230b589bf001f8bfa20c8a2816069eef001c Auto-Submitted: auto-generated Date: Sun, 27 Sep 2026 12:20:42 +0000 Message-Id: <6ab90a1a.33888.69307778@gitrepo.freebsd.org> The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=dd38230b589bf001f8bfa20c8a2816069eef001c commit dd38230b589bf001f8bfa20c8a2816069eef001c Author: Please AuthorDate: 2026-09-17 09:08:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-09-27 12:19:38 +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 (cherry picked from commit e75f61962ca47f0b0ae4aed89c8416e6544d9845) --- 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 6f957f900944..ab8b685ef861 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -918,6 +918,17 @@ ig4iic_set_config(ig4iic_softc_t *sc, bool reset) 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 71247b1f90d3..e26d4a258063 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 */