public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] k10temp support for AMD Ryzen w/ Vega gfx
@ 2018-03-05 22:38 René Rebe
  2018-03-05 23:03 ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: René Rebe @ 2018-03-05 22:38 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Clemens Ladisch, linux-kernel

Hi,

This enables k10temp for the new AMD Ryzen APUs w/ Vega Mobile Gfx.
Tested on Ryzen 5 2500U, the temperature looked plausible.

  Signed-off-by: René Rebe <rene@exactcode.de>

PS: 1st RFC - might get white-space damaged, will resend when ACKed.
Sorry my Xemacs/Mew broke.

--- linux-4.15/drivers/hwmon/k10temp.c.vanilla	2018-03-05 22:22:30.974331180 +0000
+++ linux-4.15/drivers/hwmon/k10temp.c	2018-03-05 22:24:17.186327291 +0000
@@ -40,6 +40,10 @@
 #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
@@ -89,6 +93,8 @@
 	{ 0x17, "AMD Ryzen Threadripper 1950", 10000 },
 	{ 0x17, "AMD Ryzen Threadripper 1920", 10000 },
 	{ 0x17, "AMD Ryzen Threadripper 1910", 10000 },
+	{ 0x17, "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", 20000 },
+	{ 0x17, "AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx", 20000 },
 };
 
 static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
@@ -289,6 +2944,7 @@
 	{ 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);

-- 
 ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-06 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05 22:38 [PATCH] k10temp support for AMD Ryzen w/ Vega gfx René Rebe
2018-03-05 23:03 ` Guenter Roeck
     [not found]   ` <E39517F8-AEF1-444D-BA90-DE84CF656D7F@exactcode.de>
2018-03-06 10:06     ` Guenter Roeck
2018-03-06 16:40       ` René Rebe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox