Add support for upcoming chips to k10temp and amd_nb
Subsystems (4)
v3 cover 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(+)
Signature · 1 line
2.25.1
PATCH v3 1/6 x86/amd_nb: Add AMD Family 17h A0-AF IDs
Add support for SMN communication on Family 17h Model A0h.
--- arch/x86/kernel/amd_nb.c | 5 +++++ include/linux/pci_ids.h | 1 + 2 files changed, 6 insertions(+)
arch/x86/kernel/amd_nb.c +5 -0
@@ -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) },
include/linux/pci_ids.h +1 -0
@@ -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
Signature · 1 line
2.25.1
PATCH v3 2/6 x86/amd_nb: Add Family 19h model 70h-7Fh IDs
In reply to Mario LimoncielloAdd support for SMN communication on Family 19h Model 70h.
---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(+)
arch/x86/kernel/amd_nb.c +4 -0
@@ -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) }, {} };
include/linux/pci_ids.h +1 -0
@@ -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
Signature · 1 line
2.25.1
PATCH v3 3/6 x86/amd_nb: Add Family 19h model 60h-6Fh IDs
In reply to Mario LimoncielloAdd support for SMN communication on Family 19h Model 60h.
---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(+)
arch/x86/kernel/amd_nb.c +4 -0
@@ -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) }, {} };
include/linux/pci_ids.h +1 -0
@@ -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
Signature · 1 line
2.25.1
PATCH v3 4/6 hwmon: (k10temp): Add support for family 17h models A0h-AFh
In reply to Mario LimoncielloAdd the support for CCD offsets used on family 17h models A0h-AFh.
--- drivers/hwmon/k10temp.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/hwmon/k10temp.c +5 -0
@@ -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) },
Signature · 1 line
2.25.1
PATCH v3 5/6 hwmon: (k10temp): Add support for family 19h models 70h-7Fh
In reply to Mario LimoncielloAdd the support for CCD offsets used on family 19h models 70h-7Fh.
--- drivers/hwmon/k10temp.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/hwmon/k10temp.c +5 -0
@@ -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) }, {} };
Signature · 1 line
2.25.1
PATCH v3 6/6 hwmon: (k10temp): Add support for family 19h models 60h-6Fh
In reply to Mario LimoncielloAdd the support for CCD offsets used on family 19h models 60h-6Fh.
--- drivers/hwmon/k10temp.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hwmon/k10temp.c +2 -0
@@ -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) }, {}
Signature · 1 line
2.25.1
[Public]
Quoted 33 lines
-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Monday, June 13, 2022 14:30
To: Clemens Ladisch <[email protected]>
Cc: [email protected]; Guenter Roeck <[email protected]>; Moger, Babu <[email protected]>; Ghannam, Yazen <[email protected]>; [email protected]; [email protected]; Limonciello, Mario <[email protected]>
Subject: [PATCH v3 0/6] Add support for upcoming chips to k10temp andamd_nbThis 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
Quoted 7 lines
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,