{"id":2235078,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2235078/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260508143910.14673-2-hurryman2212@gmail.com/","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/1.2/projects/28/?format=json","name":"Linux PCI development","link_name":"linux-pci","list_id":"linux-pci.vger.kernel.org","list_email":"linux-pci@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260508143910.14673-2-hurryman2212@gmail.com>","list_archive_url":null,"date":"2026-05-08T14:39:09","name":"[v4,1/2] usb: xhci-pci: add AMD Promontory 21 PCI glue","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"80fb0ae916206ed5281a14b209e4663afe52ca85","submitter":{"id":93349,"url":"http://patchwork.ozlabs.org/api/1.2/people/93349/?format=json","name":"Jihong Min","email":"hurryman2212@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pci/patch/20260508143910.14673-2-hurryman2212@gmail.com/mbox/","series":[{"id":503404,"url":"http://patchwork.ozlabs.org/api/1.2/series/503404/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/list/?series=503404","date":"2026-05-08T14:39:08","name":"AMD Promontory 21 xHCI temperature sensor support","version":4,"mbox":"http://patchwork.ozlabs.org/series/503404/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2235078/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2235078/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-pci+bounces-54258-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=P3eJNuHR;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-54258-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"P3eJNuHR\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.177","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBsNd6fSCz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 00:45:21 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id B116B308EF6F\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2026 14:39:56 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E2E753F789F;\n\tFri,  8 May 2026 14:39:44 +0000 (UTC)","from mail-pf1-f177.google.com (mail-pf1-f177.google.com\n [209.85.210.177])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A7863F2110\n\tfor <linux-pci@vger.kernel.org>; Fri,  8 May 2026 14:39:41 +0000 (UTC)","by mail-pf1-f177.google.com with SMTP id\n d2e1a72fcca58-82748257f5fso2009532b3a.1\n        for <linux-pci@vger.kernel.org>; Fri, 08 May 2026 07:39:41 -0700 (PDT)","from mincom1 ([115.4.79.42])\n        by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-839679c8462sm12395499b3a.38.2026.05.08.07.39.38\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 08 May 2026 07:39:40 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778251184; cv=none;\n b=HC7dLaBMzmrwbQg+62f/kvoACJdZYUJRXfHT+JIFNH9KKW24GnoUaZOlkdD6OE2YmTp/SwnmeNII+iPGvwbg214f0j6CojpWkHriv+uVWYx8t8S3R6n0sqg58lXVXS18YF4JnZ6mKQYh8xXIF0czpLwB6ju9IgW9T3AotQXcjjU=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778251184; c=relaxed/simple;\n\tbh=31W/5XKpkAMY1zC1qNeJsdkWRstLcS7xST8lQtSJUbc=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=himjlY9SfNJ+zTYbFhvVTUZorPl51ucDaATd8m2X/UnVwJ1PrE5B5SswPR5JRFX6mJz3xiw3t1+1YJXnz35OKBctyLVXahFAV3YT6QuMIZOms5YMpEK4nzt/u9kEAyga/I8tWzI63CjVbKYrofIZbv5j6c3H/8AjELFTn0ABDtM=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=P3eJNuHR; arc=none smtp.client-ip=209.85.210.177","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1778251181; x=1778855981;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=BukObmuQhhla3rszXKyimKykJhX+xj56H9yvwH31YK0=;\n        b=P3eJNuHRCjtQk4xasygMIm7/qwdVEuNyAQ0Ii2X/0IN2jhfRACAAv66cnIuyAcaJjb\n         0M4PO72udD/jPVk9sNQEJhON+ninBvWVcxDZVZYxymn14Jumik4Rxn0OPmXwRdMoagLu\n         HLmNa3aA0ffkKLfHcxfZ7TvpDfO5RTs3nWrksmt+AAxzJp/baaNfJRRHrrTNgKVaH8Ip\n         JwdXkbYn32kmAXtmpvbrOAivw/hRi4n5den4XWk6Oa+/MeXLNSA+Rq9amH7JbyRVVO3N\n         2HxHkj/fVhS3Qh/zi8srnZdweW6Mg6iiCIPorK7kmTZrI9Fkaq32MPnqe36/Ow2ZDc+m\n         n+5g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1778251181; x=1778855981;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=BukObmuQhhla3rszXKyimKykJhX+xj56H9yvwH31YK0=;\n        b=V+9ByRwbAK5WByPXCZbY2gHOQkLGth6VkYRLg0164E0zuX5YqzvD0EaehXS8E0F66E\n         IGBJeH60RltbyZLE237s9dAvbHUUlDc9oZVCCMkUW9qAKbgq8FfTJItKHHO+z7UFVr11\n         y7A+bcYAP5+KAMj27KdtVOBB3qBOywTrMQpMFxxbHouMMmYWhS6gmc1nhHjMia5cSBuE\n         tJ2Lg9plLcdnHmdfBUfKb3MhbBDPp8XL8BaY4SYPwiKhj3ubz+USqEKRKEH6R1LysvRZ\n         kuikn5PAfzb/a/O3N1LPSrjGb+azRVzR613/H+ngnOpu65kM3ytk/diNCQWSrcUvPmvk\n         47jg==","X-Forwarded-Encrypted":"i=1;\n AFNElJ/GwQZWLu3gqHNudpnXiN8tF2TGIqLUdGJVHeY7HE27RNSLjdpc7ffnnSiuUjWgXgoEw09aNLKz0QM=@vger.kernel.org","X-Gm-Message-State":"AOJu0YxWaPgxxl3lvdpdip+v0xx+wlRXOUanDoUqDg3TYwSPn1jafJ9c\n\tS6W/SF5pk2MKQiGUz+DHS5n+r3/S/F27lPSUiJF8Z5xP1OVaYqKIJGDO","X-Gm-Gg":"AeBDiesVDyUFP6X+A4pv0s2g7fOBKSNicDoaeJ9kk1WqNtKJ6/KXC+XSI0SNHDMR0en\n\t0rKFquKMKZ2754nWi3k1+AKGraPqg7tUP8nF4ABkQraaHj1cEhAcwqsBFrm2r9X5DAdYd4kze8N\n\tBLcbUH0LL1deHplfN80fOMC5Ho+EoJjLIFeqcC7xfoUxQd9h4X0k1s99t+/Ik8OT6lJOTr/5l64\n\tyEX/eZViLgRTVsuXQ5Y0/pQhhFiHTeXKELJmC3FGdhG1c24pKyCcfTvHGMn0A7yW1fwiLT/n4sT\n\tst0nMyWPGCzMoPjVx08ma8GqrigO0BO8SIvzAzO/ZIvDlPm5M+kBAPO41jRaR0WBRJP1cSG46Yt\n\tRVY5j7gZ+cKjpn1iym3hHqZAXxHcwM3Cqg+GCPADsvgj+PtrfGBCScu8XYvloYIZe6YpOHAEwox\n\tSDfocFCYAhQ8qjH6xDBeKknXwkizUi/Q==","X-Received":"by 2002:a05:6a00:398f:b0:82f:2985:2094 with SMTP id\n d2e1a72fcca58-83bb8986717mr6204550b3a.30.1778251180759;\n        Fri, 08 May 2026 07:39:40 -0700 (PDT)","From":"Jihong Min <hurryman2212@gmail.com>","To":"Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tMathias Nyman <mathias.nyman@intel.com>","Cc":"Guenter Roeck <linux@roeck-us.net>,\n\tJonathan Corbet <corbet@lwn.net>,\n\tShuah Khan <skhan@linuxfoundation.org>,\n\tMario Limonciello <mario.limonciello@amd.com>,\n\tBasavaraj Natikar <Basavaraj.Natikar@amd.com>,\n\tlinux-usb@vger.kernel.org,\n\tlinux-hwmon@vger.kernel.org,\n\tlinux-doc@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tJihong Min <hurryman2212@gmail.com>","Subject":"[PATCH v4 1/2] usb: xhci-pci: add AMD Promontory 21 PCI glue","Date":"Fri,  8 May 2026 23:39:09 +0900","Message-ID":"<20260508143910.14673-2-hurryman2212@gmail.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260508143910.14673-1-hurryman2212@gmail.com>","References":"<20260508143910.14673-1-hurryman2212@gmail.com>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"AMD Promontory 21 (PROM21) xHCI controllers use generic xHCI\noperation, but the PCI function also exposes optional\ncontroller-specific sensor functionality. Add a small PROM21 PCI glue\ndriver for AMD 1022:43fd controllers.\n\nThe driver delegates USB host operation to the common xhci-pci core and\ncreates a \"hwmon\" auxiliary device for optional child drivers. Failure\nto create the auxiliary device is logged but does not fail the xHCI\nprobe, since the auxiliary device is only needed for sensor support.\n\nKeep the PROM21 PCI glue built-in only when enabled because it owns the\nPCI binding for PROM21 xHCI controllers and must be available whenever\nthe common built-in xhci-pci driver hands those controllers off. This\navoids an early boot case where generic xhci-pci rejects a PROM21\ncontroller but a modular xhci-pci-prom21 driver is not available in the\ninitramfs, leaving USB devices behind that controller unavailable.\n\nAssisted-by: Codex:gpt-5.5\nSigned-off-by: Jihong Min <hurryman2212@gmail.com>\n---\n drivers/usb/host/Kconfig           |  18 +++++\n drivers/usb/host/Makefile          |   1 +\n drivers/usb/host/xhci-pci-prom21.c | 111 +++++++++++++++++++++++++++++\n drivers/usb/host/xhci-pci.c        |  11 +++\n 4 files changed, 141 insertions(+)\n create mode 100644 drivers/usb/host/xhci-pci-prom21.c","diff":"diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig\nindex 0a277a07cf70..74eedef1440d 100644\n--- a/drivers/usb/host/Kconfig\n+++ b/drivers/usb/host/Kconfig\n@@ -42,6 +42,24 @@ config USB_XHCI_PCI\n \tdepends on USB_PCI\n \tdefault y\n \n+config USB_XHCI_PCI_PROM21\n+\tbool \"AMD Promontory 21 xHCI PCI support\"\n+\tdepends on USB_XHCI_PCI=y\n+\tselect AUXILIARY_BUS\n+\thelp\n+\t  Say 'Y' to enable support for the AMD Promontory 21 xHCI PCI\n+\t  controller with optional sensor support. This driver does not add\n+\t  PROM21-specific USB or xHCI operation. It binds PROM21 xHCI PCI\n+\t  functions, delegates USB host operation to the common xHCI PCI core,\n+\t  and creates auxiliary devices for optional sensor drivers.\n+\n+\t  This driver is built-in only because it owns the PCI binding for\n+\t  PROM21 xHCI controllers when enabled and must be available whenever\n+\t  the common xHCI PCI driver is available. The optional sensor driver\n+\t  can still be built as a module.\n+\n+\t  If unsure, say 'N'.\n+\n config USB_XHCI_PCI_RENESAS\n \ttristate \"Support for additional Renesas xHCI controller with firmware\"\n \tdepends on USB_XHCI_PCI\ndiff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile\nindex a07e7ba9cd53..174580c1281a 100644\n--- a/drivers/usb/host/Makefile\n+++ b/drivers/usb/host/Makefile\n@@ -71,6 +71,7 @@ obj-$(CONFIG_USB_UHCI_HCD)\t+= uhci-hcd.o\n obj-$(CONFIG_USB_FHCI_HCD)\t+= fhci.o\n obj-$(CONFIG_USB_XHCI_HCD)\t+= xhci-hcd.o\n obj-$(CONFIG_USB_XHCI_PCI)\t+= xhci-pci.o\n+obj-$(CONFIG_USB_XHCI_PCI_PROM21)\t+= xhci-pci-prom21.o\n obj-$(CONFIG_USB_XHCI_PCI_RENESAS)\t+= xhci-pci-renesas.o\n obj-$(CONFIG_USB_XHCI_PLATFORM) += xhci-plat-hcd.o\n obj-$(CONFIG_USB_XHCI_HISTB)\t+= xhci-histb.o\ndiff --git a/drivers/usb/host/xhci-pci-prom21.c b/drivers/usb/host/xhci-pci-prom21.c\nnew file mode 100644\nindex 000000000000..7354a898732e\n--- /dev/null\n+++ b/drivers/usb/host/xhci-pci-prom21.c\n@@ -0,0 +1,111 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/*\n+ * AMD Promontory 21 xHCI host controller PCI Bus Glue.\n+ *\n+ * This does not add any PROM21-specific USB or xHCI operation. It exists only\n+ * to publish an auxiliary device for integrated temperature sensor support.\n+ *\n+ * Copyright (C) 2026 Jihong Min <hurryman2212@gmail.com>\n+ */\n+\n+#include <linux/auxiliary_bus.h>\n+#include <linux/device/devres.h>\n+#include <linux/errno.h>\n+#include <linux/module.h>\n+#include <linux/pci.h>\n+#include <linux/slab.h>\n+#include <linux/usb.h>\n+#include <linux/usb/hcd.h>\n+\n+#include \"xhci-pci.h\"\n+\n+struct prom21_xhci_auxdev {\n+\tstruct auxiliary_device *auxdev;\n+};\n+\n+static void prom21_xhci_auxdev_release(struct device *dev, void *res)\n+{\n+\tstruct prom21_xhci_auxdev *prom21_auxdev = res;\n+\n+\tauxiliary_device_destroy(prom21_auxdev->auxdev);\n+}\n+\n+static int prom21_xhci_create_auxdev(struct pci_dev *pdev)\n+{\n+\tstruct prom21_xhci_auxdev *prom21_auxdev;\n+\n+\tprom21_auxdev = devres_alloc(prom21_xhci_auxdev_release,\n+\t\t\t\t     sizeof(*prom21_auxdev), GFP_KERNEL);\n+\tif (!prom21_auxdev)\n+\t\treturn -ENOMEM;\n+\n+\tprom21_auxdev->auxdev =\n+\t\tauxiliary_device_create(&pdev->dev, KBUILD_MODNAME, \"hwmon\",\n+\t\t\t\t\tNULL, (pci_domain_nr(pdev->bus) << 16) |\n+\t\t\t\t\t\t      pci_dev_id(pdev));\n+\tif (!prom21_auxdev->auxdev) {\n+\t\tdevres_free(prom21_auxdev);\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tdevres_add(&pdev->dev, prom21_auxdev);\n+\treturn 0;\n+}\n+\n+static void prom21_xhci_destroy_auxdev(struct pci_dev *pdev)\n+{\n+\tdevres_release(&pdev->dev, prom21_xhci_auxdev_release, NULL, NULL);\n+}\n+\n+static int prom21_xhci_probe(struct pci_dev *dev,\n+\t\t\t     const struct pci_device_id *id)\n+{\n+\tint retval;\n+\n+\tretval = xhci_pci_common_probe(dev, id);\n+\tif (retval)\n+\t\treturn retval;\n+\n+\tretval = prom21_xhci_create_auxdev(dev);\n+\tif (retval) {\n+\t\t/*\n+\t\t * The auxiliary device only provides optional temperature sensor\n+\t\t * support. Keep the xHCI controller usable if it fails.\n+\t\t */\n+\t\tdev_err(&dev->dev,\n+\t\t\t\"failed to create PROM21 hwmon auxiliary device: %d\\n\",\n+\t\t\tretval);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static void prom21_xhci_remove(struct pci_dev *dev)\n+{\n+\tprom21_xhci_destroy_auxdev(dev);\n+\txhci_pci_remove(dev);\n+}\n+\n+static const struct pci_device_id pci_ids[] = {\n+\t{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x43fd) }, /* PROM21 xHCI */\n+\t{ /* end: all zeroes */ }\n+};\n+MODULE_DEVICE_TABLE(pci, pci_ids);\n+\n+static struct pci_driver prom21_xhci_driver = {\n+\t.name = \"xhci-pci-prom21\",\n+\t.id_table = pci_ids,\n+\n+\t.probe = prom21_xhci_probe,\n+\t.remove = prom21_xhci_remove,\n+\n+\t.shutdown = usb_hcd_pci_shutdown,\n+\t.driver = {\n+\t\t.pm = pm_ptr(&usb_hcd_pci_pm_ops),\n+\t},\n+};\n+module_pci_driver(prom21_xhci_driver);\n+\n+MODULE_DESCRIPTION(\"AMD Promontory 21 xHCI PCI Host Controller Driver\");\n+MODULE_IMPORT_NS(\"xhci\");\n+MODULE_LICENSE(\"GPL\");\ndiff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c\nindex 585b2f3117b0..5db427ad0422 100644\n--- a/drivers/usb/host/xhci-pci.c\n+++ b/drivers/usb/host/xhci-pci.c\n@@ -84,6 +84,7 @@\n #define PCI_DEVICE_ID_AMD_PROMONTORYA_3\t\t\t0x43ba\n #define PCI_DEVICE_ID_AMD_PROMONTORYA_2\t\t\t0x43bb\n #define PCI_DEVICE_ID_AMD_PROMONTORYA_1\t\t\t0x43bc\n+#define PCI_DEVICE_ID_AMD_PROM21_XHCI\t\t\t0x43fd\n \n #define PCI_DEVICE_ID_ATI_NAVI10_7316_XHCI\t\t0x7316\n \n@@ -696,12 +697,22 @@ static const struct pci_device_id pci_ids_renesas[] = {\n \t{ /* end: all zeroes */ }\n };\n \n+/* handled by xhci-pci-prom21 if enabled */\n+static const struct pci_device_id pci_ids_prom21[] = {\n+\t{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_PROM21_XHCI) },\n+\t{ /* end: all zeroes */ }\n+};\n+\n static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)\n {\n \tif (IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS) &&\n \t\t\tpci_match_id(pci_ids_renesas, dev))\n \t\treturn -ENODEV;\n \n+\tif (IS_ENABLED(CONFIG_USB_XHCI_PCI_PROM21) &&\n+\t    pci_match_id(pci_ids_prom21, dev))\n+\t\treturn -ENODEV;\n+\n \treturn xhci_pci_common_probe(dev, id);\n }\n \n","prefixes":["v4","1/2"]}