Skip to content

Commit ae2753e

Browse files
superm1crawfxrd
authored andcommitted
hwmon: (k10temp) Add support for yellow carp
Yellow carp matches same behavior as green sardine and other Zen3 products, but have different CCD offsets. Signed-off-by: Mario Limonciello <[email protected]> Acked-by: Borislav Petkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent f10d120 commit ae2753e

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

arch/x86/kernel/amd_nb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
2626
#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
2727
#define PCI_DEVICE_ID_AMD_19H_DF_F4 0x1654
28+
#define PCI_DEVICE_ID_AMD_19H_M40H_ROOT 0x14b5
29+
#define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
2830
#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
2931

3032
/* Protect the PCI config register pairs used for SMN and DF indirect access. */
@@ -37,6 +39,7 @@ static const struct pci_device_id amd_root_ids[] = {
3739
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_ROOT) },
3840
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_ROOT) },
3941
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) },
42+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
4043
{}
4144
};
4245

@@ -58,6 +61,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
5861
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
5962
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) },
6063
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) },
64+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
6165
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
6266
{}
6367
};
@@ -74,6 +78,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
7478
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) },
7579
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) },
7680
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F4) },
81+
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
7782
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) },
7883
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
7984
{}

drivers/hwmon/k10temp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
459459
data->ccd_offset = 0x154;
460460
k10temp_get_ccd_support(pdev, data, 8);
461461
break;
462+
case 0x40 ... 0x4f: /* Yellow Carp */
463+
data->ccd_offset = 0x300;
464+
k10temp_get_ccd_support(pdev, data, 8);
465+
break;
462466
}
463467
} else {
464468
data->read_htcreg = read_htcreg_pci;
@@ -499,6 +503,7 @@ static const struct pci_device_id k10temp_id_table[] = {
499503
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F3) },
500504
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) },
501505
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) },
506+
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
502507
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
503508
{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
504509
{}

include/linux/pci_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@
554554
#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b
555555
#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443
556556
#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653
557+
#define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
557558
#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
558559
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
559560
#define PCI_DEVICE_ID_AMD_LANCE 0x2000

0 commit comments

Comments
 (0)