git: 7aa6eeb220d8 - main - amdsmn(4), amdtemp(4): add support for AMD Ryzen 7 "Cezanne" cpus

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Sun, 12 Jan 2025 12:14:21 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=7aa6eeb220d89a3c29eb4f768f258622c3803f46

commit 7aa6eeb220d89a3c29eb4f768f258622c3803f46
Author:     Simon Wells <swel024@gmail.com>
AuthorDate: 2025-01-12 11:45:05 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-01-12 12:14:01 +0000

    amdsmn(4), amdtemp(4): add support for AMD Ryzen 7 "Cezanne" cpus
    
    Tested on AMD 5700G
    
    PR:     284009
    MFC after:      1 week
---
 sys/dev/amdsmn/amdsmn.c   | 2 +-
 sys/dev/amdtemp/amdtemp.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c
index 111c3cc8e7c1..9f5c55b1abd6 100644
--- a/sys/dev/amdsmn/amdsmn.c
+++ b/sys/dev/amdsmn/amdsmn.c
@@ -57,7 +57,7 @@
 #define	PCI_DEVICE_ID_AMD_17H_ROOT		0x1450
 #define	PCI_DEVICE_ID_AMD_17H_M10H_ROOT		0x15d0
 #define	PCI_DEVICE_ID_AMD_17H_M30H_ROOT		0x1480	/* Also M70H, F19H M00H/M20H */
-#define	PCI_DEVICE_ID_AMD_17H_M60H_ROOT		0x1630
+#define	PCI_DEVICE_ID_AMD_17H_M60H_ROOT		0x1630	/* Also F19H M50H */
 #define	PCI_DEVICE_ID_AMD_19H_M10H_ROOT		0x14a4
 #define	PCI_DEVICE_ID_AMD_19H_M40H_ROOT		0x14b5
 #define	PCI_DEVICE_ID_AMD_19H_M60H_ROOT		0x14d8
diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c
index 431890dfce20..0c423e0b2502 100644
--- a/sys/dev/amdtemp/amdtemp.c
+++ b/sys/dev/amdtemp/amdtemp.c
@@ -112,7 +112,7 @@ struct amdtemp_softc {
 #define	DEVICEID_AMD_HOSTB17H_ROOT	0x1450
 #define	DEVICEID_AMD_HOSTB17H_M10H_ROOT	0x15d0
 #define	DEVICEID_AMD_HOSTB17H_M30H_ROOT	0x1480	/* Also M70H, F19H M00H/M20H */
-#define	DEVICEID_AMD_HOSTB17H_M60H_ROOT	0x1630
+#define	DEVICEID_AMD_HOSTB17H_M60H_ROOT	0x1630	/* Also F19H M50H */
 #define	DEVICEID_AMD_HOSTB19H_M10H_ROOT	0x14a4
 #define	DEVICEID_AMD_HOSTB19H_M40H_ROOT	0x14b5
 #define	DEVICEID_AMD_HOSTB19H_M60H_ROOT	0x14d8
@@ -868,6 +868,7 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model)
 	switch (model) {
 	case 0x00 ... 0x0f: /* Zen3 EPYC "Milan" */
 	case 0x20 ... 0x2f: /* Zen3 Ryzen "Vermeer" */
+	case 0x50 ... 0x5f: /* Zen3 Ryzen "Cezanne" */
 		maxreg = 8;
 		_Static_assert((int)NUM_CCDS >= 8, "");
 		break;