From nobody Sun Sep 27 12:19: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 4ht3R81rbPz6tRld for ; Sun, 27 Sep 2026 12:19:48 +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 4ht3R81J2Rz4Q5W for ; Sun, 27 Sep 2026 12:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790511588; 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=sEL4F9T4ZZUfQgHZFjcom4hCYG+YrIQpmorCZbFIB20=; b=yYkNjsVSgWmnmPT1MkyVkNXS/KqaBrPNR1dPFQEuDTGV1ByeLD5u1ZP793OpUrsd1n8s8i SEKXRoLdAOjB16dFyQMtfwh4sRjXNxzbwLxQzRZDmZcXmwGoADBKBbRmxCOv25u0iAOlnr eDISk1BI4T82D1NTx+cW2sLXgVdlf7SeQLHqS0AhmrYQrsPeqCgjAQW8zwkXpY7d8OTrUK 6GiAo8Gv8Vdh8ldbinXOsWL+oYGwyebKJtjLAhEY0PudkSI9UM75jleCTtJswEk4CboKvJ zFetGlglRweRDu+M3/O6zFOZNaWW88N/aKEVrA0dbZpVHRkRW5vvZ8GtirkZ+A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790511588; b=tBd5PNQddJi0oNQLmtGr8DMIbaXxdASgtkszbTPJkNDCzX4eChDmti2Svo7IDvpck684// sT0tKLXlEzFrTMIXsAOQtimxpFVN5DGwYECt2AyQZZSl3PyhwLTzME0ReJZqMsCitVCOef QGGivsOW1tEICuUOpBs+YEx24NXUsKW9on6zdbCINUxYiSjCvZVCbAO4zGdXVMN0gj/b83 gqf5PvIJ5pv8snio539ATE1szMQY2jv2mm1zbUR/65oHZTB1bjjy/Znve480qtujXOYs9l txz0yYaOLQASUPP1S/zUMZ76TZzcDNt5kh95adQBQ1glI3sPbaFCiMSK80T43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790511588; 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=sEL4F9T4ZZUfQgHZFjcom4hCYG+YrIQpmorCZbFIB20=; b=g9W19DSaJjlvo/yPu5I6OJZvm+mToA+dFyF1tuG7J6jxFUmNunquqXYlIGkkvtawjYG7O/ Vk1PDmNm5cVQpYfyKX59D+tg3sHbA80WK6Vpzk1gwF3Tnb1chKHBz0tjXxAeP2c0kmdxXV yeXReWfjGGEo+6f3fds9zPFidLEO6totuEFBNrPXngULyQAccVdlQR1WB6rAJISA7JZU9+ ZALzMJwCwf+7f07ENthZYJSRI9Y8zRg67vtTWsm8bTKgjauN5shZiGnaYeoeDHVFlZUddb frmKEYMWLI53O7DhcvUT90ThTe1NFAQ3qSDutypQp8Ekatz8yqSJSMTwjRA4/A== 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 4ht3R804QmzhC1 for ; Sun, 27 Sep 2026 12:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 316ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 27 Sep 2026 12:19: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: 8603e1ff9ded - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: 8603e1ff9ded72d8b81e66c360a649dffd87afb8 Auto-Submitted: auto-generated Date: Sun, 27 Sep 2026 12:19:42 +0000 Message-Id: <6ab909de.316ed.1b6d87a@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=8603e1ff9ded72d8b81e66c360a649dffd87afb8 commit 8603e1ff9ded72d8b81e66c360a649dffd87afb8 Author: Please AuthorDate: 2026-09-17 09:08:43 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-09-27 12:18:26 +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 cd88b28a2d52..c47cccc2a957 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -922,6 +922,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 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 */