.../bindings/thermal/google,gs101-tmu-top.yaml | 68 +++ MAINTAINERS | 8 + arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi | 136 +++++ arch/arm64/boot/dts/exynos/google/gs101.dtsi | 18 + arch/arm64/configs/defconfig | 1 + drivers/clk/samsung/clk-acpm.c | 8 +- drivers/firmware/samsung/Makefile | 1 + drivers/firmware/samsung/exynos-acpm-dvfs.c | 20 +- drivers/firmware/samsung/exynos-acpm-pmic.c | 20 +- drivers/firmware/samsung/exynos-acpm-tmu.c | 240 +++++++++ drivers/firmware/samsung/exynos-acpm-tmu.h | 28 ++ drivers/firmware/samsung/exynos-acpm.c | 113 +++-- drivers/firmware/samsung/exynos-acpm.h | 2 + drivers/mfd/sec-acpm.c | 6 +- drivers/thermal/samsung/Kconfig | 17 + drivers/thermal/samsung/Makefile | 2 + drivers/thermal/samsung/acpm-tmu.c | 547 +++++++++++++++++++++ .../linux/firmware/samsung/exynos-acpm-protocol.h | 32 +- 18 files changed, 1195 insertions(+), 72 deletions(-)
Add support for the Thermal Management Unit (TMU) on the Google GS101
SoC.
The GS101 TMU implementation utilizes a hybrid architecture where
management is shared between the kernel and the Alive Clock and
Power Manager (ACPM) firmware. This hybrid ACPM TMU architecture is
also present on other Samsung Exynos SoCs (e.g., AutoV920, Exynos850).
Dependencies
============
- context dependency on the ACPM fixes sent at:
Link: https://lore.kernel.org/linux-samsung-soc/20260423-acpm-fixes-sashiko-reports-v1-0-2217b790925e@linaro.org/T/#t
- cleanup and prep firmware patches 2, 3, 4, 5, 6, 7: required by the
thermal driver (patch 8).
- bindings (patch 1): required for DTS validation.
- thermal driver patch 8: required by defconfig (patch 11) - logical
dependency.
Given the thermal driver is a new addition, I suggest everything to go
through the Samsung SoC tree, with ACKs from the Thermal maintainers.
The MFD and clk maintainers are included because of the cleanup patches
(4 and 5). ACPM updated some structures that the mfd and clk client
drivers are using, so these patches shall naturally go via the Samsung
SoC tree.
If the Thermal maintainers prefer to take the bindings and the thermal
driver patches via their tree we'll need:
- an immutable branch containing the firmware patches from the Samsung
SoC tree to serve as a base for the thermal driver.
- an immutable branch containing the bindings and the thermal driver
from the thermal tree to serve as a base for the dts and defconfig.
Architecture Overview
=====================
The hardware supports two parallel control paths. For this
implementation, responsibilities are split as follows:
1. Kernel Responsibility:
- maintain direct memory-mapped access to the interrupt pending
(INTPEND) registers to identify thermal events.
- map physical hardware interrupts to logical thermal zones.
- coordinate functional operations through the ACPM IPC protocol.
2. Firmware Responsibility (ACPM):
- handle sensor initialization.
- manage thermal thresholds configuration.
- perform temperature acquisition and expose data via IPC.
Sensor Mapping (One-to-Many)
============================
The SoC contains multiple physical temperature sensors, but the ACPM
firmware abstracts these into logical groups (Clusters) for reporting:
- ACPM Sensor 0 (Big Cluster): Aggregates physical sensors 0, 6, 7, 8, 9.
- ACPM Sensor 1 (Mid Cluster): Aggregates physical sensors 4, 5.
- ACPM Sensor 2 (Little Cluster): Aggregates physical sensors 1, 2.
The driver maps physical interrupt bits back to these logical parents.
When an interrupt fires, the driver checks the bitmask in the INTPEND
registers and updates the corresponding logical thermal zone.
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
Changes in v4: address sashiko review:
- thermal driver: avoid mixing mutex cleanup helpers with goto statements
- firmware, tmu:
- remove __packed from union acpm_tmu_msg.
- return ERR_PTR(-ENODEV) for devm_acpm_get_by_phandle when
CONFIG_EXYNOS_ACPM_PROTOCOL is disabled.
- Link to v3: https://lore.kernel.org/r/20260420-acpm-tmu-v3-0-3dc8e93f0b26@linaro.org
Changes in v3:
- thermal driver: use .set_trips() instead of .set_trip_point()
- new cleaning/prerequisite patches for firmware/acpm:
- firmware: samsung: acpm: Make acpm_ops const and access via pointer
- firmware: samsung: acpm: Drop redundant _ops suffix in acpm_ops members
- firmware: samsung: acpm: Consolidate transfer initialization helper
- firmware: acpm: TMU helpers - check return value from the firmware
- overall change: emphasize that the ACPM TMU hibrid approach applies to
other Samsung SoCs as well (Exynos850, AutoV920).
- dts: drop active trip points, update trip point values
- collect R-b tags
- Link to v2: https://lore.kernel.org/r/20260119-acpm-tmu-v2-0-e02a834f04c6@linaro.org
Changes in v2:
- architecture: switch from a syscon/MFD approach to a thermal-sensor
node with a phandle to the ACPM interface
- bindings: address Krzysztof's feedback, drop redundencies,
interrupts description.
- firmware: introduce devm_acpm_get_by_phandle() to standardize IPC
handle acquisition.
- thermal driver: drop compatible's data and use the static data from
the driver directly.
- defconfig, make EXYNOS_ACPM_THERMAL a module
- Link to v1: https://lore.kernel.org/r/20260114-acpm-tmu-v1-0-cfe56d93e90f@linaro.org
---
Tudor Ambarus (11):
dt-bindings: thermal: Add Google GS101 TMU
firmware: samsung: acpm: Consolidate transfer initialization helper
firmware: samsung: acpm: Annotate rx_data->cmd with __counted_by_ptr
firmware: samsung: acpm: Drop redundant _ops suffix in acpm_ops members
firmware: samsung: acpm: Make acpm_ops const and access via pointer
firmware: samsung: acpm: Add TMU protocol support
firmware: samsung: acpm: Add devm_acpm_get_by_phandle helper
thermal: samsung: Add Exynos ACPM TMU driver GS101
MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver
arm64: dts: exynos: gs101: Add thermal management unit
arm64: defconfig: enable Exynos ACPM thermal support
.../bindings/thermal/google,gs101-tmu-top.yaml | 68 +++
MAINTAINERS | 8 +
arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi | 136 +++++
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 18 +
arch/arm64/configs/defconfig | 1 +
drivers/clk/samsung/clk-acpm.c | 8 +-
drivers/firmware/samsung/Makefile | 1 +
drivers/firmware/samsung/exynos-acpm-dvfs.c | 20 +-
drivers/firmware/samsung/exynos-acpm-pmic.c | 20 +-
drivers/firmware/samsung/exynos-acpm-tmu.c | 240 +++++++++
drivers/firmware/samsung/exynos-acpm-tmu.h | 28 ++
drivers/firmware/samsung/exynos-acpm.c | 113 +++--
drivers/firmware/samsung/exynos-acpm.h | 2 +
drivers/mfd/sec-acpm.c | 6 +-
drivers/thermal/samsung/Kconfig | 17 +
drivers/thermal/samsung/Makefile | 2 +
drivers/thermal/samsung/acpm-tmu.c | 547 +++++++++++++++++++++
.../linux/firmware/samsung/exynos-acpm-protocol.h | 32 +-
18 files changed, 1195 insertions(+), 72 deletions(-)
---
base-commit: 2e68039281932e6dc37718a1ea7cbb8e2cda42e6
change-id: 20260113-acpm-tmu-27e21f0e2c3b
prerequisite-change-id: 20260423-acpm-fixes-sashiko-reports-ae28b6ed5581:v1
prerequisite-patch-id: 18d89d0e2bc0efe2cb366746ac4db36f4682f061
prerequisite-patch-id: eb4f90add371877a1930c442c5464c4da7242889
prerequisite-patch-id: 021cd1ee6d2b93f554dd5098cd1158977294dc41
prerequisite-patch-id: b5da16b5c6d6731ea519ed68302fd52ce57c7ffa
Best regards,
--
Tudor Ambarus <tudor.ambarus@linaro.org>
On 23/04/2026 17:22, Tudor Ambarus wrote: > Add support for the Thermal Management Unit (TMU) on the Google GS101 > SoC. > > The GS101 TMU implementation utilizes a hybrid architecture where > management is shared between the kernel and the Alive Clock and > Power Manager (ACPM) firmware. This hybrid ACPM TMU architecture is > also present on other Samsung Exynos SoCs (e.g., AutoV920, Exynos850). > > Dependencies > ============ > - context dependency on the ACPM fixes sent at: > Link: https://lore.kernel.org/linux-samsung-soc/20260423-acpm-fixes-sashiko-reports-v1-0-2217b790925e@linaro.org/T/#t > - cleanup and prep firmware patches 2, 3, 4, 5, 6, 7: required by the > thermal driver (patch 8). Well, cleanup in one driver cannot be a dependency for other driver. > - bindings (patch 1): required for DTS validation. > - thermal driver patch 8: required by defconfig (patch 11) - logical > dependency. Most of the patches should be taken before, which would leave you only final new firmware interface as dependency. Creating such unnecessary dependencies is not helping. And the patchset even grew and will conflict with other firmware work, so I will deal with firmware bits and I can provide them via stable tag to thermal for the last patch. Best regards, Krzysztof
Hi, Krzysztof, On 4/28/26 12:24 PM, Krzysztof Kozlowski wrote: >> Dependencies >> ============ >> - context dependency on the ACPM fixes sent at: >> Link: https://lore.kernel.org/linux-samsung-soc/20260423-acpm-fixes-sashiko-reports-v1-0-2217b790925e@linaro.org/T/#t >> - cleanup and prep firmware patches 2, 3, 4, 5, 6, 7: required by the >> thermal driver (patch 8). > Well, cleanup in one driver cannot be a dependency for other driver. > >> - bindings (patch 1): required for DTS validation. >> - thermal driver patch 8: required by defconfig (patch 11) - logical >> dependency. > Most of the patches should be taken before, which would leave you only > final new firmware interface as dependency. Creating such unnecessary > dependencies is not helping. > > And the patchset even grew and will conflict with other firmware work, > so I will deal with firmware bits and I can provide them via stable tag > to thermal for the last patch. Sounds good, thank you! I'll send the firmware cleanup and preparatory patches in their own patch set after the firmware fixes get in. Then I will resend the thermal driver once all the firmware patches are sorted out and a stable tag is provided. In the meantime the thermal maintainers can still check the thermal driver proposal. Cheers, ta
On Thu Apr 23, 2026 at 4:22 PM BST, Tudor Ambarus wrote:
> Add support for the Thermal Management Unit (TMU) on the Google GS101
> SoC.
>
> The GS101 TMU implementation utilizes a hybrid architecture where
> management is shared between the kernel and the Alive Clock and
> Power Manager (ACPM) firmware. This hybrid ACPM TMU architecture is
> also present on other Samsung Exynos SoCs (e.g., AutoV920, Exynos850).
>
> Dependencies
> ============
> - context dependency on the ACPM fixes sent at:
> Link: https://lore.kernel.org/linux-samsung-soc/20260423-acpm-fixes-sashiko-reports-v1-0-2217b790925e@linaro.org/T/#t
> - cleanup and prep firmware patches 2, 3, 4, 5, 6, 7: required by the
> thermal driver (patch 8).
> - bindings (patch 1): required for DTS validation.
> - thermal driver patch 8: required by defconfig (patch 11) - logical
> dependency.
I've took series locally using b4 and result doesn't compile:
CC [M] drivers/firmware/samsung/exynos-acpm.o
drivers/firmware/samsung/exynos-acpm.c:485:13: error: static declaration of ‘acpm_set_xfer’ follows non-static declaration
485 | static void acpm_set_xfer(struct acpm_xfer *xfer, u32 *cmd, size_t cmdcnt,
| ^~~~~~~~~~~~~
In file included from drivers/firmware/samsung/exynos-acpm.c:31:
drivers/firmware/samsung/exynos-acpm.h:20:6: note: previous declaration of ‘acpm_set_xfer’ with type ‘void(struct acpm_xfer *, u32 *, size_t, unsigned int, bool)’ {aka ‘void(struct acpm_xfer *, unsigned int *, long unsigned int, unsigned int, _Bool)’}
20 | void acpm_set_xfer(struct acpm_xfer *xfer, u32 *cmd, size_t cmdcnt,
| ^~~~~~~~~~~~~
drivers/firmware/samsung/exynos-acpm.c:485:13: warning: ‘acpm_set_xfer’ defined but not used [-Wunused-function]
485 | static void acpm_set_xfer(struct acpm_xfer *xfer, u32 *cmd, size_t cmdcnt,
| ^~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:289: drivers/firmware/samsung/exynos-acpm.o] Error 1
(applies cleanly though).
Could be related to "[PATCH v4 02/11] firmware: samsung: acpm: Consolidate
transfer initialization helper".
Anything missing from dependencies/prerequisites?
[..]
> Tudor Ambarus (11):
> dt-bindings: thermal: Add Google GS101 TMU
> firmware: samsung: acpm: Consolidate transfer initialization helper
> firmware: samsung: acpm: Annotate rx_data->cmd with __counted_by_ptr
> firmware: samsung: acpm: Drop redundant _ops suffix in acpm_ops members
> firmware: samsung: acpm: Make acpm_ops const and access via pointer
> firmware: samsung: acpm: Add TMU protocol support
> firmware: samsung: acpm: Add devm_acpm_get_by_phandle helper
> thermal: samsung: Add Exynos ACPM TMU driver GS101
> MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver
> arm64: dts: exynos: gs101: Add thermal management unit
> arm64: defconfig: enable Exynos ACPM thermal support
>
> .../bindings/thermal/google,gs101-tmu-top.yaml | 68 +++
> MAINTAINERS | 8 +
> arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi | 136 +++++
> arch/arm64/boot/dts/exynos/google/gs101.dtsi | 18 +
> arch/arm64/configs/defconfig | 1 +
> drivers/clk/samsung/clk-acpm.c | 8 +-
> drivers/firmware/samsung/Makefile | 1 +
> drivers/firmware/samsung/exynos-acpm-dvfs.c | 20 +-
> drivers/firmware/samsung/exynos-acpm-pmic.c | 20 +-
> drivers/firmware/samsung/exynos-acpm-tmu.c | 240 +++++++++
> drivers/firmware/samsung/exynos-acpm-tmu.h | 28 ++
> drivers/firmware/samsung/exynos-acpm.c | 113 +++--
> drivers/firmware/samsung/exynos-acpm.h | 2 +
> drivers/mfd/sec-acpm.c | 6 +-
> drivers/thermal/samsung/Kconfig | 17 +
> drivers/thermal/samsung/Makefile | 2 +
> drivers/thermal/samsung/acpm-tmu.c | 547 +++++++++++++++++++++
> .../linux/firmware/samsung/exynos-acpm-protocol.h | 32 +-
> 18 files changed, 1195 insertions(+), 72 deletions(-)
> ---
> base-commit: 2e68039281932e6dc37718a1ea7cbb8e2cda42e6
> change-id: 20260113-acpm-tmu-27e21f0e2c3b
> prerequisite-change-id: 20260423-acpm-fixes-sashiko-reports-ae28b6ed5581:v1
> prerequisite-patch-id: 18d89d0e2bc0efe2cb366746ac4db36f4682f061
> prerequisite-patch-id: eb4f90add371877a1930c442c5464c4da7242889
> prerequisite-patch-id: 021cd1ee6d2b93f554dd5098cd1158977294dc41
> prerequisite-patch-id: b5da16b5c6d6731ea519ed68302fd52ce57c7ffa
Best regards,
Alexey
On 5/1/26 4:13 PM, Alexey Klimov wrote: >> Dependencies >> ============ >> - context dependency on the ACPM fixes sent at: >> Link: https://lore.kernel.org/linux-samsung-soc/20260423-acpm-fixes-sashiko-reports-v1-0-2217b790925e@linaro.org/T/#t cut > I've took series locally using b4 and result doesn't compile: take the set linked above as well please. Cheers, ta
On Fri May 1, 2026 at 3:33 PM BST, Tudor Ambarus wrote: > > > On 5/1/26 4:13 PM, Alexey Klimov wrote: >>> Dependencies >>> ============ >>> - context dependency on the ACPM fixes sent at: >>> Link: https://lore.kernel.org/linux-samsung-soc/20260423-acpm-fixes-sashiko-reports-v1-0-2217b790925e@linaro.org/T/#t > > cut > >> I've took series locally using b4 and result doesn't compile: > > take the set linked above as well please. Okay, now I am lost. Were dependencies incorrectly described in this series? Log below of applying patches below: Total patches: 11 --- Base: using specified base-commit 2e68039281932e6dc37718a1ea7cbb8e2cda42e6 Deps: looking for dependencies matching 4 patch-ids Grabbing search results from lore.kernel.org Deps: Applying prerequisite patch: [PATCH v3 1/6] firmware: samsung: acpm: Fix cross-thread RX length corruption Deps: Applying prerequisite patch: [PATCH 2/4] firmware: samsung: acpm: Fix sequence number leak and infinite loop Deps: Applying prerequisite patch: [PATCH 3/4] firmware: samsung: acpm: Fix mailbox channel leak on probe error Deps: Applying prerequisite patch: [PATCH v3 3/6] firmware: samsung: acpm: Fix dummy stubs to return ERR_PTR Applying: firmware: samsung: acpm: Fix cross-thread RX length corruption Applying: firmware: samsung: acpm: Fix sequence number leak and infinite loop Applying: firmware: samsung: acpm: Fix mailbox channel leak on probe error Applying: firmware: samsung: acpm: Fix dummy stubs to return ERR_PTR Applying: dt-bindings: thermal: Add Google GS101 TMU Applying: firmware: samsung: acpm: Consolidate transfer initialization helper Applying: firmware: samsung: acpm: Annotate rx_data->cmd with __counted_by_ptr Applying: firmware: samsung: acpm: Drop redundant _ops suffix in acpm_ops members Applying: firmware: samsung: acpm: Make acpm_ops const and access via pointer Applying: firmware: samsung: acpm: Add TMU protocol support Applying: firmware: samsung: acpm: Add devm_acpm_get_by_phandle helper Applying: thermal: samsung: Add Exynos ACPM TMU driver GS101 Applying: MAINTAINERS: Add entry for Samsung Exynos ACPM thermal driver Applying: arm64: dts: exynos: gs101: Add thermal management unit Applying: arm64: defconfig: enable Exynos ACPM thermal support Best regards, Alexey
© 2016 - 2026 Red Hat, Inc.