Re: [PATCH]hwmon: (k10temp) Add support for Zen5 Ryzen Desktop

From: Guenter Roeck
Date: Thu Mar 27 2025 - 19:51:21 EST


On 3/27/25 16:17, David Hows wrote:
---

Is it so difficult to add a couple of lines of description ?

There are lots of examples in previous patches.

hwmon: (k10temp) add support for cyan skillfish

Add support for Cyan Skillfish (AMD Family 17h Model 47h),
which appear to be Zen 2 based APU.


hwmon: (k10temp) Add support for AMD Family 19h Model 8h

Add support for AMD Family 19h Model 8h CPUs, which appear to
be the Zen 3 based AMD Threadripper 5000WX series (Chagall).


hwmon: (k10temp) Add thermal support for AMD Family 1Ah-based models

Add thermal info support for AMD Family 1Ah-based models. Support is
provided on a per-socket granularity.


hwmon: (k10temp): Add support for new family 17h and 19h models

Add the support for CCD offsets used on family 17h models A0h-AFh,
and family 19h models 60h-7Fh.

Even

hwmon: (k10temp) Add PCI ID for family 19, model 78h

Enable k10temp on this system.

is better than nothing.

Ok, ok, no problem, I'll do it myself, and add a note saying that this is
Zen 5 based Granite Ridge. If and when I find the time to do it.

Guenter

drivers/hwmon/k10temp.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index d0b4cc9a5011..cc2ad7a324f9 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -502,6 +502,13 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
k10temp_get_ccd_support(data, 12);
break;
}
+ } else if (boot_cpu_data.x86 == 0x1a) {
+ switch (boot_cpu_data.x86_model) {
+ case 0x40 ... 0x4f: /* Zen5 Ryzen Desktop*/
+ data->ccd_offset = 0x308;
+ k10temp_get_ccd_support(data, 8);
+ break;
+ }
}
for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {