Skip to content

Commit 3cd9da4

Browse files
Avadhut Naikbp3tk0v
authored andcommitted
hwmon: (k10temp) Add thermal support for AMD Family 1Ah-based models
Add thermal info support for AMD Family 1Ah-based models. Support is provided on a per-socket granularity. Co-developed-by: Mario Limonciello <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Avadhut Naik <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Acked-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c640166 commit 3cd9da4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/hwmon/k10temp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
6565
#define F15H_M60H_HARDWARE_TEMP_CTRL_OFFSET 0xd8200c64
6666
#define F15H_M60H_REPORTED_TEMP_CTRL_OFFSET 0xd8200ca4
6767

68-
/* Common for Zen CPU families (Family 17h and 18h and 19h) */
68+
/* Common for Zen CPU families (Family 17h and 18h and 19h and 1Ah) */
6969
#define ZEN_REPORTED_TEMP_CTRL_BASE 0x00059800
7070

7171
#define ZEN_CCD_TEMP(offset, x) (ZEN_REPORTED_TEMP_CTRL_BASE + \
@@ -475,6 +475,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
475475
k10temp_get_ccd_support(pdev, data, 12);
476476
break;
477477
}
478+
} else if (boot_cpu_data.x86 == 0x1a) {
479+
data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK;
480+
data->read_tempreg = read_tempreg_nb_zen;
481+
data->is_zen = true;
478482
} else {
479483
data->read_htcreg = read_htcreg_pci;
480484
data->read_tempreg = read_tempreg_pci;
@@ -521,6 +525,8 @@ static const struct pci_device_id k10temp_id_table[] = {
521525
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) },
522526
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) },
523527
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) },
528+
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) },
529+
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3) },
524530
{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
525531
{}
526532
};

0 commit comments

Comments
 (0)