mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "CHENG Haoning (BCSC/ENG1)" <Haoning.CHENG@cn.bosch.com>
To: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 3/3] thermal/drivers/imx: Add calibration offset support
Date: Wed, 22 Jul 2026 01:42:39 +0000	[thread overview]
Message-ID: <PAWPR10MB7415C0CD57F76103C5F858C4C2C12@PAWPR10MB7415.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <cf03ce93-bd08-411c-9ca3-2a3238e38eec@kontron.de>

On 2026-07-20 10:27:33+02:00, Frieder Schrempf wrote:
> On 20.07.26 04:10, CHENG Haoning (BCSC/ENG1) wrote:
>
> > [Sie erhalten nicht h?ufig E-Mails von haoning.cheng@cn.bosch.com. Weitere Informationen, warum dies wichtig ist, finden Sie unter https://aka.ms/LearnAboutSenderIdentification ]
> >
> > On 2026-07-17 06:23:44+00:00, CHENG Haoning (BCSC/ENG1) wrote:
> > Hi Frieder,
> >
> > I need to correct my previous reply. After further discussion with our hardware team, the offset does NOT convert die temperature to package-surface temperature.
> >
> > Their thermal characterization shows that the raw TEMPMON sensor reading itself deviates from the theoretical junction temperature - this deviation exists even at the die level, before any board or package influence. The offset corrects the sensor reading toward the actual junction temperature, so it is a genuine sensor calibration.
> >
> > Board-level effects may contribute additionally, but they are not the primary reason for this feature. I apologize for the confusion - my earlier description was inaccurate. The v10 series reflects this corrected understanding.
>
> Thanks for the update. If that is the case, then I would still be
> interested to know:
>
> 1. How is the value for fsl,temp-calibration-offset-millicelsius
> determined, if it is not provided by the SoC vendor.
>
> 2. Why do we need an additional offset, if there is already a
> calibration using the value that NXP stores in the OTPs.
>
> 3. Who is supposed to set this property and where does it belong? The
> SoC dtsi, the board dts?
>
> Thanks
> Frieder
Hi Frieder,

On 1: The offset was determined during product-level thermal characterization by comparing TEMPMON readings against the junction temperature, as estimated from calibrated external measurements and a validated thermal model. A repeatable residual bias was observed. This offset compensates for that bias and does not replace the NXP factory OTP calibration.

On 2: After applying the NXP factory calibration data and vendor-provided conversion formula, a repeatable residual error remains. The offset compensates for this residual error. This correction is particularly important in the high-temperature range, where accurate trip points are most critical.

The correction must be applied consistently in the kernel to both temperature reporting and hardware alarm programming. imx_set_alarm_temp() converts a thermal trip temperature into the raw threshold value programmed into the TEMPMON hardware comparator. If the correction were applied only in userspace, the hardware IRQ threshold would not correspond to the corrected temperature scale used by the thermal framework.

On 3: The offset was determined and validated by the product integrator's hardware team during development, based on thermal characterization of representative devices. The resulting value is specified in the board DTS because it was derived and validated for this specific board/product configuration. It should not be treated as a generic correction for all i.MX6UL devices.

Thanks,
Haoning

      reply	other threads:[~2026-07-22  1:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 10:28 [PATCH v8 0/3] thermal: imx: " Haoning CHENG via B4 Relay
2026-07-14 10:28 ` [PATCH v8 1/3] dt-bindings: thermal: imx: Document calibration offset property Haoning CHENG via B4 Relay
2026-07-15  7:24   ` Lukasz Luba
2026-07-14 10:28 ` [PATCH v8 2/3] thermal/drivers/imx: Fix rounding and clamp for i.MX7D alarm Haoning CHENG via B4 Relay
2026-07-14 14:29   ` Frank Li
2026-07-15  7:29   ` Lukasz Luba
2026-07-14 10:28 ` [PATCH v8 3/3] thermal/drivers/imx: Add calibration offset support Haoning CHENG via B4 Relay
2026-07-14 14:35   ` Frank Li
2026-07-15  7:30   ` Lukasz Luba
2026-07-15  9:06   ` Frieder Schrempf
2026-07-17  6:23     ` CHENG Haoning (BCSC/ENG1)
2026-07-20  2:10       ` CHENG Haoning (BCSC/ENG1)
2026-07-20  8:27         ` Frieder Schrempf
2026-07-22  1:42           ` CHENG Haoning (BCSC/ENG1) [this message]

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=PAWPR10MB7415C0CD57F76103C5F858C4C2C12@PAWPR10MB7415.EURPRD10.PROD.OUTLOOK.COM \
    --to=haoning.cheng@cn.bosch.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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

all inboxes | Powered by JetHome®