From 6405be196b8afadd7db6e80c9cf191843153c781 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Fri, 23 Jun 2023 03:47:10 +0000 Subject: [PATCH] ksmn(4): Support thermal sensors on Ryzen 9 79xx ok deraadt, brynet --- sys/dev/pci/ksmn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/ksmn.c b/sys/dev/pci/ksmn.c index 608908be469..004d10514c9 100644 --- a/sys/dev/pci/ksmn.c +++ b/sys/dev/pci/ksmn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ksmn.c,v 1.7 2022/04/25 16:17:19 claudio Exp $ */ +/* $OpenBSD: ksmn.c,v 1.8 2023/06/23 03:47:10 mlarkin Exp $ */ /* * Copyright (c) 2019 Bryan Steele @@ -105,6 +105,7 @@ static const struct pci_matchid ksmn_devices[] = { { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_17_1X_RC }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_17_3X_RC }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_17_6X_RC }, + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_6X_RC }, }; int @@ -172,6 +173,9 @@ ksmn_attach(struct device *parent, struct device *self, void *aux) (m >= 0xa0 && m <= 0xaf)) sc->sc_ccd_offset = 0x300; + if (m >= 0x60 && m <= 0x6f) + sc->sc_ccd_offset = 0x308; + if ((m >= 0x10 && m <= 0x1f) || (m >= 0xa0 && m <= 0xaf)) ksmn_ccd_attach(sc, 12); -- 2.20.1