linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb
@ 2022-06-13 19:29 Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 1/6] x86/amd_nb: Add AMD Family 17h A0-AF IDs Mario Limonciello
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Mario Limonciello @ 2022-06-13 19:29 UTC (permalink / raw)
  To: Clemens Ladisch
  Cc: linux-hwmon, Guenter Roeck, babu.moger, yazen.ghannam,
	linux-kernel, x86, Mario Limonciello

This series started as what looked like a correction to previous
commits, but I missed that the previous commits were for a different
family with the same chip models.  So while fixing up the series I also
noticed that a few upcoming chips have new PCIe IDs and CCD offsets not
yet supported, so add them to amd_nb/k10temp.

v2->v3
 * Pick up tags
 * Group "ROOT" PCI IDs with others in patches 2 and 3.
v1->v2:
 * Correct commit messages
 * Add more missing chips and offsets
 * since so much changed, do not include Bjorn's Ack.

Mario Limonciello (6):
  x86/amd_nb: Add AMD Family 17h A0-AF IDs
  x86/amd_nb: Add Family 19h model 70h-7Fh IDs
  x86/amd_nb: Add Family 19h model 60h-6Fh IDs
  hwmon: (k10temp): Add support for family 17h models A0h-AFh
  hwmon: (k10temp): Add support for family 19h models 70h-7Fh
  hwmon: (k10temp): Add support for family 19h models 60h-6Fh

 arch/x86/kernel/amd_nb.c | 13 +++++++++++++
 drivers/hwmon/k10temp.c  | 12 ++++++++++++
 include/linux/pci_ids.h  |  3 +++
 3 files changed, 28 insertions(+)

-- 
2.25.1


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

* [PATCH v3 1/6] x86/amd_nb: Add AMD Family 17h A0-AF IDs
  2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
@ 2022-06-13 19:29 ` Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 2/6] x86/amd_nb: Add Family 19h model 70h-7Fh IDs Mario Limonciello
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2022-06-13 19:29 UTC (permalink / raw)
  To: Clemens Ladisch, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	H. Peter Anvin, Bjorn Helgaas, Yazen Ghannam, Mario Limonciello,
	Guenter Roeck, Muralidhara M K,
	open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:PCI SUBSYSTEM
  Cc: linux-hwmon, babu.moger, linux-kernel, x86

Add support for SMN communication on Family 17h Model A0h.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>	# pci_ids.h
---
 arch/x86/kernel/amd_nb.c | 5 +++++
 include/linux/pci_ids.h  | 1 +
 2 files changed, 6 insertions(+)

diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index 190e0f763375..60c7bd525237 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -19,12 +19,14 @@
 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT	0x15d0
 #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT	0x1480
 #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT	0x1630
+#define PCI_DEVICE_ID_AMD_17H_MA0H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M10H_ROOT	0x14a4
 #define PCI_DEVICE_ID_AMD_17H_DF_F4	0x1464
 #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
 #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
+#define PCI_DEVICE_ID_AMD_17H_MA0H_DF_F4 0x1728
 #define PCI_DEVICE_ID_AMD_19H_DF_F4	0x1654
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 0x14b1
 #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
@@ -41,6 +43,7 @@ static const struct pci_device_id amd_root_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_MA0H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
 	{}
@@ -61,6 +64,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_MA0H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) },
@@ -81,6 +85,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_MA0H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 0178823ce8c2..ec1c226d13e6 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -556,6 +556,7 @@
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F3 0x1493
 #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b
 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443
+#define PCI_DEVICE_ID_AMD_17H_MA0H_DF_F3 0x1727
 #define PCI_DEVICE_ID_AMD_19H_DF_F3	0x1653
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
-- 
2.25.1


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

* [PATCH v3 2/6] x86/amd_nb: Add Family 19h model 70h-7Fh IDs
  2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 1/6] x86/amd_nb: Add AMD Family 17h A0-AF IDs Mario Limonciello
@ 2022-06-13 19:29 ` Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 3/6] x86/amd_nb: Add Family 19h model 60h-6Fh IDs Mario Limonciello
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2022-06-13 19:29 UTC (permalink / raw)
  To: Clemens Ladisch, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	H. Peter Anvin, Bjorn Helgaas, Yazen Ghannam, Mario Limonciello,
	Guenter Roeck, Muralidhara M K,
	open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:PCI SUBSYSTEM
  Cc: linux-hwmon, babu.moger, linux-kernel, x86

Add support for SMN communication on Family 19h Model 70h.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
---
v2->v3:
 * Pick up tags
 * Move "ROOT" declaration to match others

 arch/x86/kernel/amd_nb.c | 4 ++++
 include/linux/pci_ids.h  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index 60c7bd525237..cb7a40378ed3 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -21,6 +21,7 @@
 #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT	0x1630
 #define PCI_DEVICE_ID_AMD_17H_MA0H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M10H_ROOT	0x14a4
+#define PCI_DEVICE_ID_AMD_19H_M70H_ROOT	0x14e8
 #define PCI_DEVICE_ID_AMD_17H_DF_F4	0x1464
 #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
@@ -32,6 +33,7 @@
 #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
+#define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4
 
 /* Protect the PCI config register pairs used for SMN. */
 static DEFINE_MUTEX(smn_mutex);
@@ -46,6 +48,7 @@ static const struct pci_device_id amd_root_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_MA0H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_ROOT) },
 	{}
 };
 
@@ -71,6 +74,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) },
 	{}
 };
 
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index ec1c226d13e6..32a1f85ff0de 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -561,6 +561,7 @@
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
+#define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3
 #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
-- 
2.25.1


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

* [PATCH v3 3/6] x86/amd_nb: Add Family 19h model 60h-6Fh IDs
  2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 1/6] x86/amd_nb: Add AMD Family 17h A0-AF IDs Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 2/6] x86/amd_nb: Add Family 19h model 70h-7Fh IDs Mario Limonciello
@ 2022-06-13 19:29 ` Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 4/6] hwmon: (k10temp): Add support for family 17h models A0h-AFh Mario Limonciello
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2022-06-13 19:29 UTC (permalink / raw)
  To: Clemens Ladisch, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	H. Peter Anvin, Bjorn Helgaas, Yazen Ghannam, Mario Limonciello,
	Guenter Roeck, Muralidhara M K,
	open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:PCI SUBSYSTEM
  Cc: linux-hwmon, babu.moger, linux-kernel, x86

Add support for SMN communication on Family 19h Model 60h.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
v2->v3:
 * Pick up tags
 * Move ROOT declaration to match others

 arch/x86/kernel/amd_nb.c | 4 ++++
 include/linux/pci_ids.h  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index cb7a40378ed3..4266b64631a4 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -21,6 +21,7 @@
 #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT	0x1630
 #define PCI_DEVICE_ID_AMD_17H_MA0H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M10H_ROOT	0x14a4
+#define PCI_DEVICE_ID_AMD_19H_M60H_ROOT	0x14d8
 #define PCI_DEVICE_ID_AMD_19H_M70H_ROOT	0x14e8
 #define PCI_DEVICE_ID_AMD_17H_DF_F4	0x1464
 #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
@@ -33,6 +34,7 @@
 #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
+#define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4
 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4
 
 /* Protect the PCI config register pairs used for SMN. */
@@ -48,6 +50,7 @@ static const struct pci_device_id amd_root_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_MA0H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_ROOT) },
 	{}
 };
@@ -74,6 +77,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) },
 	{}
 };
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 32a1f85ff0de..7fa460ccf7fa 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -561,6 +561,7 @@
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
+#define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3
 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3
 #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
-- 
2.25.1


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

* [PATCH v3 4/6] hwmon: (k10temp): Add support for family 17h models A0h-AFh
  2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
                   ` (2 preceding siblings ...)
  2022-06-13 19:29 ` [PATCH v3 3/6] x86/amd_nb: Add Family 19h model 60h-6Fh IDs Mario Limonciello
@ 2022-06-13 19:29 ` Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 5/6] hwmon: (k10temp): Add support for family 19h models 70h-7Fh Mario Limonciello
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2022-06-13 19:29 UTC (permalink / raw)
  To: Clemens Ladisch, Jean Delvare, Guenter Roeck,
	open list:K10TEMP HARDWARE MONITORING DRIVER, open list
  Cc: linux-hwmon, babu.moger, yazen.ghannam, linux-kernel, x86,
	Mario Limonciello

Add the support for CCD offsets used on family 17h models A0h-AFh.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/k10temp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 4e239bd75b1d..5f831e74bc51 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -428,6 +428,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			data->ccd_offset = 0x154;
 			k10temp_get_ccd_support(pdev, data, 8);
 			break;
+		case 0xa0 ... 0xaf:
+			data->ccd_offset = 0x300;
+			k10temp_get_ccd_support(pdev, data, 8);
+			break;
 		}
 	} else if (boot_cpu_data.x86 == 0x19) {
 		data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK;
@@ -489,6 +493,7 @@ static const struct pci_device_id k10temp_id_table[] = {
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) },
+	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_MA0H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
-- 
2.25.1


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

* [PATCH v3 5/6] hwmon: (k10temp): Add support for family 19h models 70h-7Fh
  2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
                   ` (3 preceding siblings ...)
  2022-06-13 19:29 ` [PATCH v3 4/6] hwmon: (k10temp): Add support for family 17h models A0h-AFh Mario Limonciello
@ 2022-06-13 19:29 ` Mario Limonciello
  2022-06-13 19:29 ` [PATCH v3 6/6] hwmon: (k10temp): Add support for family 19h models 60h-6Fh Mario Limonciello
  2022-06-23 19:10 ` [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Limonciello, Mario
  6 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2022-06-13 19:29 UTC (permalink / raw)
  To: Clemens Ladisch, Jean Delvare, Guenter Roeck,
	open list:K10TEMP HARDWARE MONITORING DRIVER, open list
  Cc: linux-hwmon, babu.moger, yazen.ghannam, linux-kernel, x86,
	Mario Limonciello

Add the support for CCD offsets used on family 19h models 70h-7Fh.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/k10temp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 5f831e74bc51..5f37e2e7833e 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -449,6 +449,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			data->ccd_offset = 0x300;
 			k10temp_get_ccd_support(pdev, data, 8);
 			break;
+		case 0x70 ... 0x7f:
+			data->ccd_offset = 0x308;
+			k10temp_get_ccd_support(pdev, data, 8);
+			break;
 		case 0x10 ... 0x1f:
 		case 0xa0 ... 0xaf:
 			data->ccd_offset = 0x300;
@@ -498,6 +502,7 @@ static const struct pci_device_id k10temp_id_table[] = {
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) },
 	{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
 	{}
 };
-- 
2.25.1


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

* [PATCH v3 6/6] hwmon: (k10temp): Add support for family 19h models 60h-6Fh
  2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
                   ` (4 preceding siblings ...)
  2022-06-13 19:29 ` [PATCH v3 5/6] hwmon: (k10temp): Add support for family 19h models 70h-7Fh Mario Limonciello
@ 2022-06-13 19:29 ` Mario Limonciello
  2022-06-23 19:10 ` [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Limonciello, Mario
  6 siblings, 0 replies; 8+ messages in thread
From: Mario Limonciello @ 2022-06-13 19:29 UTC (permalink / raw)
  To: Clemens Ladisch, Jean Delvare, Guenter Roeck,
	open list:K10TEMP HARDWARE MONITORING DRIVER, open list
  Cc: linux-hwmon, babu.moger, yazen.ghannam, linux-kernel, x86,
	Mario Limonciello

Add the support for CCD offsets used on family 19h models 60h-6Fh.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/k10temp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index 5f37e2e7833e..5a9d47a229e4 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -449,6 +449,7 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			data->ccd_offset = 0x300;
 			k10temp_get_ccd_support(pdev, data, 8);
 			break;
+		case 0x60 ... 0x6f:
 		case 0x70 ... 0x7f:
 			data->ccd_offset = 0x308;
 			k10temp_get_ccd_support(pdev, data, 8);
@@ -502,6 +503,7 @@ static const struct pci_device_id k10temp_id_table[] = {
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) },
 	{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
 	{}
-- 
2.25.1


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

* RE: [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb
  2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
                   ` (5 preceding siblings ...)
  2022-06-13 19:29 ` [PATCH v3 6/6] hwmon: (k10temp): Add support for family 19h models 60h-6Fh Mario Limonciello
@ 2022-06-23 19:10 ` Limonciello, Mario
  6 siblings, 0 replies; 8+ messages in thread
From: Limonciello, Mario @ 2022-06-23 19:10 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, dave.hansen
  Cc: linux-hwmon, Guenter Roeck, Moger, Babu, Ghannam, Yazen,
	linux-kernel, x86, Clemens Ladisch

[Public]

> -----Original Message-----
> From: Limonciello, Mario <Mario.Limonciello@amd.com>
> Sent: Monday, June 13, 2022 14:30
> To: Clemens Ladisch <clemens@ladisch.de>
> Cc: linux-hwmon@vger.kernel.org; Guenter Roeck <linux@roeck-us.net>;
> Moger, Babu <Babu.Moger@amd.com>; Ghannam, Yazen
> <Yazen.Ghannam@amd.com>; linux-kernel@vger.kernel.org;
> x86@kernel.org; Limonciello, Mario <Mario.Limonciello@amd.com>
> Subject: [PATCH v3 0/6] Add support for upcoming chips to k10temp and
> amd_nb
> 
> This series started as what looked like a correction to previous
> commits, but I missed that the previous commits were for a different
> family with the same chip models.  So while fixing up the series I also
> noticed that a few upcoming chips have new PCIe IDs and CCD offsets not
> yet supported, so add them to amd_nb/k10temp.
> 
> v2->v3
>  * Pick up tags
>  * Group "ROOT" PCI IDs with others in patches 2 and 3.
> v1->v2:
>  * Correct commit messages
>  * Add more missing chips and offsets
>  * since so much changed, do not include Bjorn's Ack.
> 
> Mario Limonciello (6):
>   x86/amd_nb: Add AMD Family 17h A0-AF IDs
>   x86/amd_nb: Add Family 19h model 70h-7Fh IDs
>   x86/amd_nb: Add Family 19h model 60h-6Fh IDs
>   hwmon: (k10temp): Add support for family 17h models A0h-AFh
>   hwmon: (k10temp): Add support for family 19h models 70h-7Fh
>   hwmon: (k10temp): Add support for family 19h models 60h-6Fh
> 
>  arch/x86/kernel/amd_nb.c | 13 +++++++++++++
>  drivers/hwmon/k10temp.c  | 12 ++++++++++++
>  include/linux/pci_ids.h  |  3 +++
>  3 files changed, 28 insertions(+)
> 
> --
> 2.25.1

+ x86 maintainers.  I believe, you weren't on the series to line, only CC.
This series crosses both x86 and hwmon so it needs to go one way or the other.

Can you please review and comment if you will take it or want hwmon to take it?
Here's the rest of the patches:
https://patchwork.kernel.org/project/linux-hwmon/list/?series=649968

If you'd like a RESEND, happy to do that too.

Thanks,

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

end of thread, other threads:[~2022-06-23 19:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 19:29 [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Mario Limonciello
2022-06-13 19:29 ` [PATCH v3 1/6] x86/amd_nb: Add AMD Family 17h A0-AF IDs Mario Limonciello
2022-06-13 19:29 ` [PATCH v3 2/6] x86/amd_nb: Add Family 19h model 70h-7Fh IDs Mario Limonciello
2022-06-13 19:29 ` [PATCH v3 3/6] x86/amd_nb: Add Family 19h model 60h-6Fh IDs Mario Limonciello
2022-06-13 19:29 ` [PATCH v3 4/6] hwmon: (k10temp): Add support for family 17h models A0h-AFh Mario Limonciello
2022-06-13 19:29 ` [PATCH v3 5/6] hwmon: (k10temp): Add support for family 19h models 70h-7Fh Mario Limonciello
2022-06-13 19:29 ` [PATCH v3 6/6] hwmon: (k10temp): Add support for family 19h models 60h-6Fh Mario Limonciello
2022-06-23 19:10 ` [PATCH v3 0/6] Add support for upcoming chips to k10temp and amd_nb Limonciello, Mario

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).