From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 405E6386C13 for ; Tue, 12 May 2026 21:40:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778622024; cv=none; b=KnKK3KEJ8Hi11it3CxU6PmyARcyXRDEyY8YY/Pvwg1jCfaJXA1kVHclTgzcXpfQsRIdIVzYdqjesKBPP1dT2KMd3UHYgklzjE17MX3oe8aYPMFnHjc2hM909g+3o+y+weQrPwbc+Tsk7UnP/94rybJuU198noJUpE+hj/fOqu1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778622024; c=relaxed/simple; bh=sTJxJ/xasIqDRCeYM0JtmkGU7hXrTwpbCDass0bVHps=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pH4aMTlSg1Qaits9OnQXvSqbsH17LcCsyhHox1QjOla9lNVQX4Zk+ZdMWwrLLUUdtS0hopwugq6/auxT3jwyTYTt0oH0e689Xo+5gWfNkJJRo5pgAiOtqzQJZ9QMg+aJLO7SWGK7n8+MURHM6K+iPRmfj9Qyvkix51R/fG8Ulxc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OQWdnaij; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OQWdnaij" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2b9ec9443c2so37714965ad.1 for ; Tue, 12 May 2026 14:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778622022; x=1779226822; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LuJpPqhDcONg49vri+mgJGghvc2o/ilLGU2ZfssziEI=; b=OQWdnaijZ1h7L8r1EP1KKJUSbtDYxqsiw2/0vKLvMvQLdrb9ZVGnOOp2Gbe+jUMvYP PVCkgYSFZtaLFcaLWJxW4EL95IZznbDnPWDEsv845ZFoxjpn+JZSxi2ASVX/asrez5N3 C++ah2Bt+sYUOE4mVfIa3Hiovmzn8uVee1VKr8VwD2DQFKyJ9B/UAWk4wH7g121HrhSb 9EnoRB2tI4jdGbHrVW1IT0Q6ChG15TTtxdvMgF+15GAdv/tyoXrKB+reAvow7lj5cgx0 e9IzOSlonqDlYRfOaIVga0qdurXUtBxkpjQKvhUPhCp7xT82X3TCCo/X0gP7wMsORNae mZlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778622022; x=1779226822; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LuJpPqhDcONg49vri+mgJGghvc2o/ilLGU2ZfssziEI=; b=F9RdgdpK9iXiDHMLbs3jRNJbu8g90196O9oYOQRTJ8Kp3EP+UyHaJpmHAgVhYBgkOI Ea4pw2UjAeeUwHHfWC2UjpU11KzsHJ6okiTQq9ioZyjqD1CBYU5QBU+QSwSdN6GswWuj eYiocal41YHKQxbf2G9IWR/iPZKBwy1TO7/Qg7FaZE0zrPscOH5gQfvB/2fPVxcl93u+ nT4mFn+Ul8pAUDONIBj96hyhjPZXMk0f0zRZprlUuaqjgcTy4PiS1x4xIuuc2LS+PRpc /Riu5zTeVYTltxVdIZxZOEYClAIetpbonuepsQZfOiYzbaMEcnzO8WQh3FAOfttwHhbI 074Q== X-Forwarded-Encrypted: i=1; AFNElJ+Y0zddcC6RfvziFny5ml6EEbnA0y+p3RpqIePubtWBUG2OlPxxaOtqJjO8EwmQu0fICLtBszoa0Mf7OLY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw6vmmczS30LjIw2lcVsbVyHthU9v6jBWN1aPPcj9fIZvhodvrB HVgy3s5W8TV3CtekofM8/VviZvqJhuRfULqVYnuvD4ya9Epes7NYf67x X-Gm-Gg: Acq92OFoUjWpAyfTdZKRbbZH5Ec9Luzzv5BMVpf3tH9X5CXbdvXKIyb6QONKnDcz0IM D+9r4hAgUYzHq+AcQrGAKKbRECcakie7ToHwhxXFK8Ekv2fpJzE9H76NfnAaosGGTUcFYm4GfCQ Z0qACmzllDwYnmpWPnf9mHBzRJUibhqTwe4lHsWuJhNuL2T3msCo8o0NOa2RwnEWHguhpEa5ily taRzApShkMmr4ju0q/3TU3x49pGvD8h6q0L7TsY+rPsxqgJpr4CmuqZkEScYme+W1ipDiCGZqy+ +dogLyFESzq5BgHba62HdTmeJSOmKreMRIwSal398tlky5tYuRpU7YPwfwSOU75EUjBrxCmJVoG 1jOL7PW4XidnsbK2olpGQyWH7cjOXjC4h4v+IgWn95Kt7HmjmBbR3xEYVbEtIF5eNWSdlUAve0p lgwRmAMCOpQ6ZAAkysVQGAwoqWN2ZQpI4= X-Received: by 2002:a17:903:3b8e:b0:2ba:7617:a755 with SMTP id d9443c01a7336-2bcfd48ace8mr55972255ad.25.1778622022203; Tue, 12 May 2026 14:40:22 -0700 (PDT) Received: from mincom1 ([27.232.220.10]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2baf1d409eesm143949895ad.32.2026.05.12.14.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 14:40:21 -0700 (PDT) From: Jihong Min To: Greg Kroah-Hartman , Mathias Nyman Cc: Guenter Roeck , Jonathan Corbet , Shuah Khan , Mario Limonciello , Basavaraj Natikar , linux-usb@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jihong Min Subject: [PATCH v5 0/2] AMD Promontory 21 xHCI temperature sensor support Date: Wed, 13 May 2026 06:39:08 +0900 Message-ID: <20260512213910.871859-1-hurryman2212@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, This series adds temperature monitoring for AMD Promontory 21 (PROM21) xHCI PCI functions. Patch 1 adds a small PROM21-specific xHCI PCI glue driver. USB host operation is delegated to the common xhci-pci code, while the PROM21 glue publishes an auxiliary device for optional sensor support. Patch 2 adds an auxiliary-bus hwmon driver that binds to that auxiliary device and exposes the PROM21 xHCI temperature value as temp1_input. The hwmon driver reads the sensor through a vendor index/data register pair in the xHCI PCI MMIO BAR. It does not wake the parent PCI device for hwmon reads; if the parent is suspended, the read returns -ENODATA. Changes in v5: - Add support for AMD 1022:43fc PROM21 xHCI controllers and document the new PCI ID. - Make USB_XHCI_PCI_PROM21 depend on X86 and default to USB_XHCI_PCI. - Keep the PROM21 PCI glue built-in-only when enabled, while allowing the hwmon sensor driver to be built as a separate module. - Move PROM21 xHCI PCI device IDs to xhci-pci.h so xhci-pci.c and xhci-pci-prom21.c use shared definitions. - Pass the parent PCI device, MMIO base, and resource length to the hwmon driver through platform data defined in a common header, instead of inspecting the parent driver's drvdata from the hwmon driver. - Remove the private hwmon mutex and rely on hwmon core serialization for this driver's callbacks. - Clarify that the driver only serializes its own hwmon callbacks and does not synchronize with firmware, SMM, ACPI AML, or other possible users of the PROM21 vendor index/data register pair. - Use readb() for the temperature data register, validate the value before writing the output pointer, and drop the 0xff invalid-value check. - Use pm_runtime_put() after successful reads with the parent device active so the PM core can re-evaluate the parent device's idle state. - Simplify the documentation and use more precise terminology for the supported device. Jihong Min (2): usb: xhci-pci: add AMD Promontory 21 PCI glue hwmon: add AMD Promontory 21 xHCI temperature sensor support Documentation/hwmon/index.rst | 1 + Documentation/hwmon/prom21-xhci.rst | 101 ++++++++ drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/prom21-xhci.c | 238 ++++++++++++++++++ drivers/usb/host/Kconfig | 20 ++ drivers/usb/host/Makefile | 1 + drivers/usb/host/xhci-pci-prom21.c | 123 +++++++++ drivers/usb/host/xhci-pci.c | 11 + drivers/usb/host/xhci-pci.h | 3 + include/linux/platform_data/usb-xhci-prom21.h | 22 ++ 11 files changed, 531 insertions(+) create mode 100644 Documentation/hwmon/prom21-xhci.rst create mode 100644 drivers/hwmon/prom21-xhci.c create mode 100644 drivers/usb/host/xhci-pci-prom21.c create mode 100644 include/linux/platform_data/usb-xhci-prom21.h -- 2.53.0