Devicetree
 help / color / mirror / Atom feed
From: "Winiarska, Iwona" <iwona.winiarska@intel.com>
To: "linux@roeck-us.net" <linux@roeck-us.net>,
	"changhuang.liang@starfivetech.com"
	<changhuang.liang@starfivetech.com>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"robh@kernel.org" <robh@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH v3 5/6] hwmon: (peci/cputemp) Add support for Granite Rapids (GNR)
Date: Fri, 16 Oct 2026 20:10:28 +0000	[thread overview]
Message-ID: <5736985e9b63629d0bd5539ac9bd6d6b87c5ae3a.camel@intel.com> (raw)
In-Reply-To: <20261008100623.7085-6-changhuang.liang@starfivetech.com>

On Thu, 2026-10-08 at 03:06 -0700, Changhuang Liang wrote:
> Add Granite Rapids (GNR) CPU support to the PECI cputemp driver.
> 
> For Granite Rapids, the resolved cores mask must be collected from each
> compute core. This implementation is relatively complex. Since we do not
> use the resolved cores information for these CPUs, we can explicitly
> state in the driver that the core mask is not supported for this model.
> 
> Define new cpu_info structure for GNR with minimum PECI revision 0x42 and
> the thermal margin conversion function dts_ten_dot_six_to_millidegree().
> 
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>

Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>

Thanks
-Iwona

> ---
>  drivers/hwmon/peci/cputemp.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/drivers/hwmon/peci/cputemp.c b/drivers/hwmon/peci/cputemp.c
> index 457089c561b4..69c4a07b99f7 100644
> --- a/drivers/hwmon/peci/cputemp.c
> +++ b/drivers/hwmon/peci/cputemp.c
> @@ -339,6 +339,18 @@ static int init_core_mask(struct peci_cputemp *priv)
>  	u32 data;
>  	int ret;
>  
> +	/*
> +	 * For Granite Rapids, the resolved cores mask is relatively complex
> to implement.
> +	 * Since we do not use the resolved cores information for this CPU,
> the driver
> +	 * explicitly does not support the core mask for this model.
> +	 */
> +	if (!reg) {
> +		dev_dbg(priv->dev,
> +			"resolved cores scan is not supported on vendor-
> family-model 0x%x\n",
> +			peci_dev->info.x86_vfm);
> +		return -EOPNOTSUPP;
> +	}
> +
>  	/* Get the RESOLVED_CORES register value */
>  	switch (peci_dev->info.x86_vfm) {
>  	case INTEL_ICELAKE_X:
> @@ -543,6 +555,11 @@ static const struct cpu_info cpu_emr = {
>  	.thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
>  };
>  
> +static const struct cpu_info cpu_gnr = {
> +	.min_peci_revision = 0x42,
> +	.thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
> +};
> +
>  static const struct auxiliary_device_id peci_cputemp_ids[] = {
>  	{
>  		.name = "peci_cpu.cputemp.hsx",
> @@ -576,6 +593,10 @@ static const struct auxiliary_device_id
> peci_cputemp_ids[] = {
>  		.name = "peci_cpu.cputemp.emr",
>  		.driver_data = (kernel_ulong_t)&cpu_emr,
>  	},
> +	{
> +		.name = "peci_cpu.cputemp.gnr",
> +		.driver_data = (kernel_ulong_t)&cpu_gnr,
> +	},
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(auxiliary, peci_cputemp_ids);

  parent reply	other threads:[~2026-10-16 20:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 10:06 [PATCH v3 0/6] Add StarFive JHB100 PECI support Changhuang Liang
2026-10-08 10:06 ` [PATCH v3 1/6] dt-bindings: peci: Add StarFive JHB100 PECI controller Changhuang Liang
2026-10-08 11:45   ` sashiko-bot
2026-10-16 20:08   ` Winiarska, Iwona
2026-10-08 10:06 ` [PATCH v3 2/6] peci: controller: Add StarFive JHB100 PECI driver Changhuang Liang
2026-10-08 11:52   ` sashiko-bot
2026-10-16 20:09   ` Winiarska, Iwona
2026-10-08 10:06 ` [PATCH v3 3/6] peci: Add support for PECI CC 0x83 retry condition Changhuang Liang
2026-10-08 11:51   ` sashiko-bot
2026-10-16 20:09   ` Winiarska, Iwona
2026-10-08 10:06 ` [PATCH v3 4/6] peci: cpu: Add Intel Granite Rapids support Changhuang Liang
2026-10-08 11:49   ` sashiko-bot
2026-10-16 20:09   ` Winiarska, Iwona
2026-10-08 10:06 ` [PATCH v3 5/6] hwmon: (peci/cputemp) Add support for Granite Rapids (GNR) Changhuang Liang
2026-10-08 11:48   ` sashiko-bot
2026-10-16 20:10   ` Winiarska, Iwona [this message]
2026-10-08 10:06 ` [PATCH v3 6/6] hwmon: (peci/dimmtemp) " Changhuang Liang
2026-10-08 11:48   ` sashiko-bot
2026-10-16 20:10   ` Winiarska, Iwona

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5736985e9b63629d0bd5539ac9bd6d6b87c5ae3a.camel@intel.com \
    --to=iwona.winiarska@intel.com \
    --cc=changhuang.liang@starfivetech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=openbmc@lists.ozlabs.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox