From nobody Thu Aug 6 06:42:46 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 4hFyQG556hz6nxb8 for ; Thu, 06 Aug 2026 06:42:46 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hFyQG2c3Kz468d for ; Thu, 06 Aug 2026 06:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785998566; 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=cuapomlJIOr6/YiMGekofPQp2nt3ylJp0jPxzQdwRwI=; b=AuGEBQvXVo3Tg0TKs79uNhaLfMbHgcYUJ40zXiyczQTgt2j9GKdwKvzMpACWyBgYxsffkm 3mXvmY4GSjXPqTsJpuC9pOZhAAIYfETBMGQin5oj4e4sANQtRcItelAUUNZbcnp+q2ocup Xjgr8s3igGavby9XwfIemlyIYJNdEh4tM9AiCn0BTGx98dsBnb+yOFpBIypuDi0DwIPGGN vKr3wtIeN8OiQrOQLURqTzPjzBoTef+BH6NMsNtfkzaId6htFg9ohcr3/61s2jB1aQUgek 5TWmJNQsdkwOyAePVuvEsUhDlIy+RZeI2/hXz2ktbe/W/qKa1vnimVZpXH0eyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785998566; a=rsa-sha256; cv=none; b=ahGdBKzmtC8yVYYnEV54yuGZYlQDugdzgBW3sUT968s4Z6OhzWToG6Gytaql8zMyP47eQK JC9ognUtrdnRDph/i6hvGfVShqiYITy4YiOx7S8Vg4iAqyXqeDMa3sZ3iQIkzEsU3T38rR 2isgNrq2YqzMT93LbaRSpGIbTWDCJdNejVxKCoar0iKKk9LfZrlzcTbrVmpTiJLFn6jN1o ELf6FKZMd5zrEZY8TTQmHBjdgh35nM6JZk8f3L83ngKl3DA0dMA+9G8yugtWh3ZEMo4UwP Q5HmN+jtBtHKst8Bzlr7Rl+PJ3btEuukN0GP7kNymLjwHsAqyAYACMKlsLD4pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785998566; 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=cuapomlJIOr6/YiMGekofPQp2nt3ylJp0jPxzQdwRwI=; b=a5n8wpsoAZhG7O+YtPcVuxnx2paVkPNgGv1ezBShsMIcSzs16FeJemQzWfqoHrgh3jelJ1 lHAZcYw2mf4Aekqn49Ig3jex9K2JYLyuObHWkSoXuCO4yjFwbRp6qMmgZ38DZASei6+Rb8 X67QO7P+n3/6MvuAEBZRQ6GE+ZTQlO4umCwtEFgcBR4aUo3fny6y9MfNCoECfqZ632uz+A VXVCE44Z1PQFrWRmVEl1wxpZfSyf/sTwNXBrNl9i7wJvtRxe/l/VbMVhROJb0Vb+P96TZO y53mjkRkbUp9fJd74gxORjpnCPgpaqC0DYS3TMohigjS0G+Oz5l5TAOCq5oLmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hFyQG1ZgPz17R7 for ; Thu, 06 Aug 2026 06:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31fa0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 06 Aug 2026 06:42:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: YannickV From: Corvi=?utf-8?Q?n K=C3=B6h?=ne Subject: git: 8c7a3ccf54f9 - main - gpio: add Intel Alder Lake-N GPIO driver 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: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c7a3ccf54f93330830ef9ffd20e71d5834936ed Auto-Submitted: auto-generated Date: Thu, 06 Aug 2026 06:42:46 +0000 Message-Id: <6a742ce6.31fa0.f84860d@gitrepo.freebsd.org> The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=8c7a3ccf54f93330830ef9ffd20e71d5834936ed commit 8c7a3ccf54f93330830ef9ffd20e71d5834936ed Author: YannickV AuthorDate: 2026-04-29 13:02:08 +0000 Commit: Corvin Köhne CommitDate: 2026-08-06 06:41:54 +0000 gpio: add Intel Alder Lake-N GPIO driver Add a GPIO driver for the Intel Alder Lake-N platform based on the generic intelgpio framework. The driver provides pad group definitions for four GPIO communities covering groups GPP_A through GPP_T, vGPIO and HVCMOS, and matches ACPI hardware IDs INTC1056, INTC1057 and INTC1085. The kernel module build infrastructure and the wiring into files.x86 are included. Reviewed by: vexeduxr MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Pull Request: https://github.com/freebsd/freebsd-src/pull/2205 --- sys/conf/files.x86 | 2 + sys/dev/gpio/intel/adlngpio.c | 94 +++++++++++++++++++++++++++++++++++++++++++ sys/modules/Makefile | 2 + sys/modules/adlngpio/Makefile | 6 +++ 4 files changed, 104 insertions(+) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 8c02edbb6a35..c5048ae9a38d 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -99,6 +99,8 @@ dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/gpio/bytgpio.c optional bytgpio dev/gpio/chvgpio.c optional chvgpio +dev/gpio/intel/adlngpio.c optional adlngpio +dev/gpio/intel/intelgpio.c optional adlngpio dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_osm_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_config.c optional hpt27xx diff --git a/sys/dev/gpio/intel/adlngpio.c b/sys/dev/gpio/intel/adlngpio.c new file mode 100644 index 000000000000..55e903c95aaa --- /dev/null +++ b/sys/dev/gpio/intel/adlngpio.c @@ -0,0 +1,94 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Beckhoff Automation GmbH & Co. KG + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "intelgpio.h" + +#include "gpio_if.h" +#include "opt_acpi.h" + +static const struct intelgpio_padgroup adln_com0_groups[] = { + { .first_pad = 0, .npads = 26, .gpio_base = 0, .name = "GPP_B" }, + { .first_pad = 26, .npads = 16, .gpio_base = 32, .name = "GPP_T" }, + { .first_pad = 42, .npads = 25, .gpio_base = 64, .name = "GPP_A" }, +}; + +static const struct intelgpio_padgroup adln_com1_groups[] = { + { .first_pad = 67, .npads = 8, .gpio_base = 96, .name = "GPP_S" }, + { .first_pad = 75, .npads = 20, .gpio_base = 128, .name = "GPP_I" }, + { .first_pad = 95, .npads = 24, .gpio_base = 160, .name = "GPP_H" }, + { .first_pad = 119, .npads = 21, .gpio_base = 192, .name = "GPP_D" }, + { .first_pad = 140, .npads = 29, .gpio_base = 224, .name = "vGPIO" }, +}; + +static const struct intelgpio_padgroup adln_com4_groups[] = { + { .first_pad = 169, .npads = 24, .gpio_base = 256, .name = "GPP_C" }, + { .first_pad = 193, .npads = 25, .gpio_base = 288, .name = "GPP_F" }, + { .first_pad = 218, + .npads = 6, + .gpio_base = INTELGPIO_GPIO_NOMAP, + .name = "HVCMOS" }, + { .first_pad = 224, .npads = 25, .gpio_base = 320, .name = "GPP_E" }, +}; + +static const struct intelgpio_padgroup adln_com5_groups[] = { + { .first_pad = 249, .npads = 8, .gpio_base = 352, .name = "GPP_R" }, +}; + +static const struct intelgpio_community adln_communities[] = { + { .ngroups = nitems(adln_com0_groups), .groups = adln_com0_groups }, + { .ngroups = nitems(adln_com1_groups), .groups = adln_com1_groups }, + { .ngroups = nitems(adln_com4_groups), .groups = adln_com4_groups }, + { .ngroups = nitems(adln_com5_groups), .groups = adln_com5_groups }, +}; + +static char *adln_hids[] = { "INTC1056", "INTC1057", "INTC1085", NULL }; + +static const struct intelgpio_platform adln_platform = { + .communities = adln_communities, + .ncommunities = nitems(adln_communities), + .hids = adln_hids, + .desc = "Intel Alder Lake-N GPIO", +}; + +static int +adln_probe(device_t dev) +{ + return (intelgpio_probe(dev, &adln_platform)); +} + +static int +adln_attach(device_t dev) +{ + return (intelgpio_attach(dev, &adln_platform)); +} + +static device_method_t adln_methods[] = { + DEVMETHOD(device_probe, adln_probe), + DEVMETHOD(device_attach, adln_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(gpio, adln_driver, adln_methods, + sizeof(struct intelgpio_softc), intelgpio_driver); + +DRIVER_MODULE(adlngpio, acpi, adln_driver, NULL, NULL); +MODULE_DEPEND(adlngpio, acpi, 1, 1, 1); +MODULE_DEPEND(adlngpio, gpiobus, 1, 1, 1); +MODULE_VERSION(adlngpio, 1); +ACPI_PNP_INFO(adln_hids); diff --git a/sys/modules/Makefile b/sys/modules/Makefile index df4cb4b63ded..bf2fda77ab1d 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -73,6 +73,7 @@ SUBDIR= \ bridgestp \ bwi \ bwn \ + ${_adlngpio} \ ${_bytgpio} \ ${_chvgpio} \ cam \ @@ -797,6 +798,7 @@ _wdatwd= wdatwd _aac= aac _aacraid= aacraid +_adlngpio= adlngpio .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _aesni= aesni .endif diff --git a/sys/modules/adlngpio/Makefile b/sys/modules/adlngpio/Makefile new file mode 100644 index 000000000000..c1a276198efa --- /dev/null +++ b/sys/modules/adlngpio/Makefile @@ -0,0 +1,6 @@ +.PATH: ${SRCTOP}/sys/dev/gpio/intel +KMOD= adlngpio +SRCS= intelgpio.c adlngpio.c +SRCS+= acpi_if.h device_if.h bus_if.h gpio_if.h opt_acpi.h opt_platform.h + +.include