From: Patrick Fischer <admin@tsv-stahl-riesa.de>
To: Daniel Lezcano <daniel.lezcano@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Lukasz Luba <lukasz.luba@arm.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Thierry Reding <thierry.reding@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Svyatoslav Ryhel <clamor95@gmail.com>,
Mikko Perttunen <mperttunen@nvidia.com>,
linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 0/2] thermal: tegra: Fix SOC_THERM temperatures on Tegra114
Date: Sun, 22 Nov 2026 11:21:18 +0100 [thread overview]
Message-ID: <57a7461f-8c0f-43b1-83e2-e2867cb35e0e@tsv-stahl-riesa.de> (raw)
In-Reply-To: <20261106-upstream-soctherm-t114-v1-0-c875d1921084@tsv-stahl-riesa.de>
Am 06.11.26 um 21:31 schrieb Patrick Fischer via B4 Relay:
> On the NVIDIA Tegra Note 7 (Tegra114) all four SOC_THERM zones read 0 C
> with mainline, in idle and under load, so throttling and thermtrip have
> no effect on this SoC. There are two separate causes:
>
> 1. tegra_calc_shared_calib() sign-extends the whole fuse word instead of
> the SHIFT_CP field. On Tegra114, where SHIFT_CP is not in the low
> bits, this distorts the calibration of every sensor.
>
> 2. The hardware calculates THERMA * capture in 24 bits and discards the
> result above 2^24 (TCALC_OVER set, TEMP_VALID cleared). With the
> calibration in 0.5 C units a Tegra114 sensor is only valid for
> T < (2048 + THERMB) / 2, which is far below the thermtrip
> temperature. Patch 2 switches Tegra114 to 1 C units, as the
> downstream driver does. The fuse calibration stays in 0.5 C units,
> as discussed in the review of the Tegra114 series [1].
>
> Patch 1 is Svyatoslav's fix, unchanged apart from the Fixes and stable
> tags and a sentence on why the other SoCs are not affected. Without
> patch 2 it gives three zones that work only up to about 45-53 C on this
> device.
>
> Zone temperatures on a Tegra Note 7 (P1640) in C, idle / after 60 s of
> load on all four cores:
>
> mainline patch 1 patches 1+2
> cpu 0 / 0 41.5 / 55.5* 43 / 63
> gpu 0 / 0 0 / 0 39 / 55
> pllx 0 / 0 44 / 52.5* 43 / 62
> mem 0 / 0 39 / 50.5 39 / 53
> thermistor - 34 / 39 34 / 42
>
> * the sensors behind the zone were already invalid, the zone stayed
> below the real temperature
>
> "thermistor" is the board thermistor on the PMIC GPADC, as a
> reference. With both patches all eight sensors stay valid and thermtrip,
> throttle and trip thresholds are programmed as 102, 100 and 90 C.
>
> Tested with v7.3 on the Tegra Note 7 P1640 (me) and P1988 (Svyatoslav,
> all four zones work; tags to follow from him on the list). The series
> is unchanged on top of thermal/linux-next, but only build tested there.
> Thermtrip and the hardware throttle were not provoked on purpose, the
> highest temperature seen was 98 C. Suspend/resume was not tested.
>
> The series is independent of "thermal/drivers/tegra/soctherm: Program
> throttrip with hot trip temperature" [2], which is still pending; they
> apply in either order.
>
> Tool use (see Documentation/process/generated-content.rst): patch 2,
> its changelog and this cover letter were prepared with an LLM coding
> assistant (Claude Code). It evaluated the SOC_THERM register dumps from
> the device, recalculated the calibration from the fuse values, wrote
> the code change and drafted the texts from my measurements and
> instructions. I reviewed the change and ran all tests on the device.
> Patch 1 is Svyatoslav's own work.
>
> [1] https://lore.kernel.org/all/22816196.EfDdHjke4D@senjougahara/
> [2] https://lore.kernel.org/all/20261020-upstream-soctherm-throttrip-v1-1-c67f8a02ec3b@tsv-stahl-riesa.de/
>
> ---
> Patrick Fischer (1):
> thermal/drivers/tegra: Avoid SOC_THERM calculation overflow on Tegra114
>
> Svyatoslav Ryhel (1):
> thermal: tegra: soctherm-fuse: Fix shifted_cp extension
>
> drivers/thermal/tegra/soctherm-fuse.c | 17 +++++++++++++----
> drivers/thermal/tegra/soctherm.c | 21 +++++++++++++--------
> drivers/thermal/tegra/soctherm.h | 6 ++++++
> drivers/thermal/tegra/tegra114-soctherm.c | 4 +++-
> 4 files changed, 35 insertions(+), 13 deletions(-)
> ---
> base-commit: 32cb06b34701827db0ff34244d84fc74e40ca350
> change-id: 20261023-upstream-soctherm-t114-9591c6b779d6
>
> Best regards,
> --
> Patrick Fischer <admin@tsv-stahl-riesa.de>
Hi Daniel,
gentle ping on this series. Without both patches the SOC_THERM
sensors on Tegra114 read wrong or invalid values, so thermal
throttling does not work there. Svyatoslav has tested it on two
devices, and it still applies cleanly to 7.4-rc3. Please let me know
if anything needs to change.
Thanks,
Patrick
prev parent reply other threads:[~2026-11-22 10:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 20:31 Patrick Fischer via B4 Relay
2026-11-06 20:31 ` [PATCH 1/2] thermal: tegra: soctherm-fuse: Fix shifted_cp extension Patrick Fischer via B4 Relay
2026-11-26 8:13 ` Mikko Perttunen
2026-11-06 20:31 ` [PATCH 2/2] thermal/drivers/tegra: Avoid SOC_THERM calculation overflow on Tegra114 Patrick Fischer via B4 Relay
2026-11-07 10:17 ` Svyatoslav Ryhel
2026-11-26 10:27 ` Mikko Perttunen
2026-11-22 10:21 ` Patrick Fischer [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=57a7461f-8c0f-43b1-83e2-e2867cb35e0e@tsv-stahl-riesa.de \
--to=admin@tsv-stahl-riesa.de \
--cc=clamor95@gmail.com \
--cc=daniel.lezcano@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mperttunen@nvidia.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@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®