Add support to read DTS for reading Intel Emerald Rapids platform.
Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
---
drivers/hwmon/peci/cputemp.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/hwmon/peci/cputemp.c b/drivers/hwmon/peci/cputemp.c
index c7112dbf008b..b350c9a76894 100644
--- a/drivers/hwmon/peci/cputemp.c
+++ b/drivers/hwmon/peci/cputemp.c
@@ -364,6 +364,7 @@ static int init_core_mask(struct peci_cputemp *priv)
case INTEL_ICELAKE_X:
case INTEL_ICELAKE_D:
case INTEL_SAPPHIRERAPIDS_X:
+ case INTEL_EMERALDRAPIDS_X:
ret = peci_ep_pci_local_read(peci_dev, 0, reg->bus, reg->dev,
reg->func, reg->offset + 4, &data);
if (ret)
@@ -539,6 +540,13 @@ static struct resolved_cores_reg resolved_cores_reg_spr = {
.offset = 0x80,
};
+static struct resolved_cores_reg resolved_cores_reg_emr = {
+ .bus = 31,
+ .dev = 30,
+ .func = 6,
+ .offset = 0x80,
+};
+
static const struct cpu_info cpu_hsx = {
.reg = &resolved_cores_reg_hsx,
.min_peci_revision = 0x33,
@@ -563,6 +571,12 @@ static const struct cpu_info cpu_spr = {
.thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
};
+static const struct cpu_info cpu_emr = {
+ .reg = &resolved_cores_reg_emr,
+ .min_peci_revision = 0x40,
+ .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
+};
+
static const struct auxiliary_device_id peci_cputemp_ids[] = {
{
.name = "peci_cpu.cputemp.hsx",
@@ -592,6 +606,10 @@ static const struct auxiliary_device_id peci_cputemp_ids[] = {
.name = "peci_cpu.cputemp.spr",
.driver_data = (kernel_ulong_t)&cpu_spr,
},
+ {
+ .name = "peci_cpu.cputemp.emr",
+ .driver_data = (kernel_ulong_t)&cpu_emr,
+ },
{ }
};
MODULE_DEVICE_TABLE(auxiliary, peci_cputemp_ids);
--
2.49.0
On Tue, Oct 07, 2025 at 12:53:21AM +0300, Ivan Mikhaylov wrote: > Add support to read DTS for reading Intel Emerald Rapids platform. > > Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> > Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Applied to hwmon-next. Thanks, Guenter
Dear Ivan,
Thank you for your patch.
Am 06.10.25 um 23:53 schrieb Ivan Mikhaylov:
> Add support to read DTS for reading Intel Emerald Rapids platform.
>
> Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
> ---
> drivers/hwmon/peci/cputemp.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/hwmon/peci/cputemp.c b/drivers/hwmon/peci/cputemp.c
> index c7112dbf008b..b350c9a76894 100644
> --- a/drivers/hwmon/peci/cputemp.c
> +++ b/drivers/hwmon/peci/cputemp.c
> @@ -364,6 +364,7 @@ static int init_core_mask(struct peci_cputemp *priv)
> case INTEL_ICELAKE_X:
> case INTEL_ICELAKE_D:
> case INTEL_SAPPHIRERAPIDS_X:
> + case INTEL_EMERALDRAPIDS_X:
> ret = peci_ep_pci_local_read(peci_dev, 0, reg->bus, reg->dev,
> reg->func, reg->offset + 4, &data);
> if (ret)
> @@ -539,6 +540,13 @@ static struct resolved_cores_reg resolved_cores_reg_spr = {
> .offset = 0x80,
> };
>
> +static struct resolved_cores_reg resolved_cores_reg_emr = {
> + .bus = 31,
> + .dev = 30,
> + .func = 6,
> + .offset = 0x80,
> +};
> +
> static const struct cpu_info cpu_hsx = {
> .reg = &resolved_cores_reg_hsx,
> .min_peci_revision = 0x33,
> @@ -563,6 +571,12 @@ static const struct cpu_info cpu_spr = {
> .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
> };
>
> +static const struct cpu_info cpu_emr = {
> + .reg = &resolved_cores_reg_emr,
Only use one space before the =.
> + .min_peci_revision = 0x40,
> + .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
> +};
> +
> static const struct auxiliary_device_id peci_cputemp_ids[] = {
> {
> .name = "peci_cpu.cputemp.hsx",
> @@ -592,6 +606,10 @@ static const struct auxiliary_device_id peci_cputemp_ids[] = {
> .name = "peci_cpu.cputemp.spr",
> .driver_data = (kernel_ulong_t)&cpu_spr,
> },
> + {
> + .name = "peci_cpu.cputemp.emr",
> + .driver_data = (kernel_ulong_t)&cpu_emr,
> + },
> { }
> };
> MODULE_DEVICE_TABLE(auxiliary, peci_cputemp_ids);
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
© 2016 - 2025 Red Hat, Inc.