Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/3] thermal: samsung: acpm-tmu: Add Exynos850 support
@ 2026-11-18 13:51 Alexey Klimov
  2026-11-18 13:51 ` [PATCH v2 1/3] dt-bindings: thermal: gs101-tmu: add Exynos850 compatible Alexey Klimov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexey Klimov @ 2026-11-18 13:51 UTC (permalink / raw)
  To: Daniel Lezcano, Tudor Ambarus, Rafael J. Wysocki, Zhang Rui,
	Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski
  Cc: Mateusz Majewski, Thomas Turner, Peter Griffin, linux-pm,
	linux-samsung-soc, devicetree, linux-kernel

This series adds support for the Thermal Management Unit found on
the Samsung Exynos850 SoC to the existing acpm-tmu driver.

The acpm-tmu driver was recently introduced to support a hybrid thermal
architecture where hardware management is shared between the kernel and
the ACPM firmware. 

However, the distribution of responsibilities between the Application
Processor and the firmware varies depending on the SoC:

1. GS101 (Existing):
   The ACPM firmware handles sensor initialization, threshold configuration,
   and temperature reading via ACPM IPC. The kernel only uses MMIO to read
   the interrupt pending registers.

2. Exynos850 (This series):
   The firmware implements a much smaller subset of TMU IPC commands
   (temperature readings, TMU suspend/resume, basic TMU init).
   The driver should use direct MMIO register access to support the
   remaining functionality.

In this series the patch 2/3 prepares the acpm-tmu driver by moving the
hardcoded GS101 IPC calls into SoC-specific callbacks: tz_control,
tmu_init, tmu_update_thresholds, and tmu_check_and_clear_irqs.
The patch 3/3 implements actual Exynos850 support.

Tested with:

tmu_top: thermal-sensor@100a0000 {
	compatible = "samsung,exynos850-tmu-top";
	reg = <0x10070000 0x800>;
	interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&cmu_peri CLK_GOUT_BUSIF_TMU_PCLK>;
	samsung,acpm-ipc = <&acpm_ipc>;
	#thermal-sensor-cells = <1>;
};
and corresponding thermal zones.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
Changes in v2:
- rebased;
- reworked defines and hardcoded values a bit;
- removed efuse_value from acpm_tmu_sensor struct;
- regmap renamed to "exynos850_tmu_regs" from "e850_tmu_regs";
- checked ret value from regmap_read/update_bits calls;
- dev_err() -> dev_err_ratelimited() and return error if clearing
  irq failed in exynos850_handle_irqs();
- exynos850_tmu_update_thresholds() tries to restore sensor state
  if failed;
- Link to v1: https://lore.kernel.org/r/20260709-acpm-tmu-e850-support-v1-0-9fdd58b634af@linaro.org

---
Alexey Klimov (3):
      dt-bindings: thermal: gs101-tmu: add Exynos850 compatible
      thermal: samsung: acpm-tmu: refactor SoC-specific operations into driver data
      thermal: samsung: acpm-tmu: add Exynos850 support

 .../bindings/thermal/google,gs101-tmu-top.yaml     |  26 +-
 drivers/thermal/samsung/acpm-tmu.c                 | 588 ++++++++++++++++++++-
 2 files changed, 577 insertions(+), 37 deletions(-)
---
base-commit: 7cfbf79c66c63e807ea452abf0546e6f6d6833a6
change-id: 20261118-acpm-tmu-e850-support-d10e9018719b

Best regards,
-- 
Alexey Klimov <alexey.klimov@linaro.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-18 14:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 13:51 ` [PATCH v2 2/3] thermal: samsung: acpm-tmu: refactor SoC-specific operations into driver data Alexey Klimov
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox