hwmon: (k10temp) Add support for AMD Ryzen w/ Vega graphics
authorGuenter Roeck <linux@roeck-us.net>
Tue, 24 Apr 2018 15:59:45 +0000 (08:59 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 25 Apr 2018 12:31:06 +0000 (05:31 -0700)
Enable k10temp for AMD Ryzen APUs w/ Vega Mobile Gfx.

Based on patch from RenĂ© Rebe <rene@exactcode.de>. Dropped temperature
offsets since those are not supposed to apply for the affected CPUs.

Cc: stable@vger.kernel.org # v4.16+
Cc: René Rebe <rene@exactcode.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/k10temp.c

index d19d08f81c6fb410ff545bec6cfd975483b707cc..d2cc55e213747963de9cf5e061896032f1609fd5 100644 (file)
@@ -40,6 +40,10 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
 #define PCI_DEVICE_ID_AMD_17H_DF_F3    0x1463
 #endif
 
+#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
+#define PCI_DEVICE_ID_AMD_17H_RR_NB    0x15d0
+#endif
+
 /* CPUID function 0x80000001, ebx */
 #define CPUID_PKGTYPE_MASK     0xf0000000
 #define CPUID_PKGTYPE_F                0x00000000
@@ -298,6 +302,7 @@ static const struct pci_device_id k10temp_id_table[] = {
        { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
        { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
        { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+       { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_RR_NB) },
        {}
 };
 MODULE_DEVICE_TABLE(pci, k10temp_id_table);