From: "Adil Hüsrev Tepe" <tadilhusrev@gmail.com>
To: Alexey Klimov <alexey.klimov@linaro.org>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.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>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Mateusz Majewski <m.majewski2@samsung.com>,
Thomas Turner <tturner@lineageos.org>,
Peter Griffin <peter.griffin@linaro.org>,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] thermal: samsung: acpm-tmu: Add Exynos850 support
Date: Sun, 22 Nov 2026 11:11:14 +0300 [thread overview]
Message-ID: <20261122081114.2979414-1-tadilhusrev@gmail.com> (raw)
In-Reply-To: <20261118-acpm-tmu-e850-support-v2-0-19848c0d97e5@linaro.org>
Hi Alexey,
On Wed, Nov 18, 2026 at 01:51:44PM +0000, Alexey Klimov wrote:
> Tested with:
>
> tmu_top: thermal-sensor@100a0000 {
> compatible = "samsung,exynos850-tmu-top";
> reg = <0x10070000 0x800>;
Nit: the unit address doesn't match reg, it should be
thermal-sensor@10070000.
I ran v2 on a retail Samsung Galaxy XCover5 (SM-G525F, Exynos850, stock
Samsung bootloader and ACPM firmware), as a data point next to the
E850-96. Base: v7.4-rc3 plus out-of-tree board support, Tudor's acpm-tmu
fixes as queued in thermal/linux-next, then this series. Christian's
threshold-7 fix doesn't apply on top of those fixes yet, so it isn't
included; it only touches the GS101 path anyway. DT node as above, with
the unit address fixed, and three interrupt-only zones (polling-delay = 0,
an active trip at 50C with 2C hysteresis, critical at 110C).
What works:
- The TMU is accessible from the AP on this production device, so the
direct MMIO approach isn't blocked by the secure world there. The
bootloader leaves the block configured: two-point calibration
(CALIB_SEL=1; 25C/85C codes 288/346, 288/346, 287/346, 287/345 for
probes 0-3), CONTROL=0x9503, CONTROL1=0x00030000, AVG_CONTROL=0x00010016,
COUNTER_VALUE0/1=0x28a, TRIM0=0. exynos850_tmu_init() computes the same
values.
- ACPM read_temp for groups 0/1/2 tracks the raw CURRENT_TEMP codes of
probes 1/2/3 within 1-2C.
- Threshold interrupts work. The GPU zone got a rising update at 50C and
a falling one at 45C. After the CPU zones crossed 50C, their registers
were re-armed correctly (rise ~110C, fall ~47C, INTEN = RISE1|FALL1).
An 8-core load up to 83C caused no spurious updates.
Two issues:
1) THERM_TRIP_EN is cleared in exynos850_tmu_init() and never set again.
CONTROL went from 0x9503 to 0x8503 after probe. The bootloader leaves
level 7 programmed at code 0x177 (about 115C) with the hardware trip
enabled, so after probe the hardware thermal trip is off. Samsung's
downstream driver for this SoC (exynos3830 in exynos_tmu_v2.c) sets
TRIP_EN together with CORE_EN when it enables the core. Should the
driver keep it, or set it again in tz_control()?
2) Runtime PM gates the TMU pclk (gout_busif_tmu_pclk) 100ms after each
access, but the ACPM firmware on E850 reads the TMU through that clock
too. An ACPM TMU read_temp sent while the pclk is gated hangs the SoC
until it resets, with nothing in the log. I hit this through an
out-of-tree ACPM consumer that calls read_temp without going through
acpm-tmu's runtime PM, so this series on its own does not trigger it:
acpm_tmu_get_temp() resumes the device before the IPC. It reproduced
both times with the clock gated, and the same read always works with
the device held active (power/control = on).
It does mean the clock is shared with the firmware, and gating it is
only safe if ACPM never touches the TMU on its own while the AP has it
gated. I can't rule that out from here: the bootloader leaves RISE7
enabled on probe 0. The downstream driver never gates this clock.
Would it be safer to keep it enabled while the device is bound on E850?
Minor:
- NUM_PROBE is set from priv->num_sensors (3 thermal zones). That happens
to match what the bootloader programs (3, covering probes 0-3; probe 3
keeps updating), but they are different quantities. Downstream reads
NUM_PROBE back from CONTROL1 instead.
- About sashiko's temp_error2 point: all four probes on this unit have
non-zero 85C trims, so that fallback isn't exercised here.
I'm happy to retest the next version on this phone.
Thanks,
Adil
prev parent reply other threads:[~2026-11-22 8:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 13:51 [PATCH v2 0/3] thermal: samsung: acpm-tmu: Add Exynos850 support Alexey Klimov
2026-11-18 13:51 ` [PATCH v2 1/3] dt-bindings: thermal: gs101-tmu: add Exynos850 compatible Alexey Klimov
2026-11-18 14:45 ` Tudor Ambarus
2026-11-18 13:51 ` [PATCH v2 2/3] thermal: samsung: acpm-tmu: refactor SoC-specific operations into driver data Alexey Klimov
2026-11-19 12:17 ` Tudor Ambarus
2026-11-18 13:51 ` [PATCH v2 3/3] thermal: samsung: acpm-tmu: add Exynos850 support Alexey Klimov
2026-11-18 14:16 ` sashiko-bot
2026-11-19 12:21 ` Tudor Ambarus
2026-11-19 11:41 ` [PATCH v2 0/3] thermal: samsung: acpm-tmu: Add " Tudor Ambarus
2026-11-22 8:11 ` Adil Hüsrev Tepe [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=20261122081114.2979414-1-tadilhusrev@gmail.com \
--to=tadilhusrev@gmail.com \
--cc=alexey.klimov@linaro.org \
--cc=bzolnier@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=m.majewski2@samsung.com \
--cc=peter.griffin@linaro.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=tturner@lineageos.org \
--cc=tudor.ambarus@linaro.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