[RFC PATCH 0/3] Add polling temperature monitoring for SpacemiT K3
From: Jiayu Du
Date: Fri Dec 04 2026 - 09:23:31 EST
This series adds polling temperature monitoring for the SpacemiT K3 SoC.
It exposes seven on-die sensors for the SoC, VPU, GPU and four CPU
clusters through the thermal and hwmon interfaces. It does not add
thermal trips, cooling maps or interrupt-driven updates.
This series depends on the K3 eFuse v4 series [1], which provides the
NVMEM driver and the primary and backup voltage reference calibration
cells.
Tested on a SpacemiT K3 COM260 Kit after a cold boot. All seven channels
reported temperatures through both the thermal and hwmon interfaces.
The test kernel also included the separate SoC information patches,
which are not required by this series.
TSEN CFG bits 25/26 still need clarification. After enabling the sensors,
the downstream driver [2] sets both bits, reads back CFG, clears both
bits and reads it back again. This RFC leaves those bits unchanged.
I have asked SpacemiT what these bits control, whether this sequence is
required, and whether there are any timing or readback requirements.
I am waiting for their reply.
Feedback on the initialization sequence and testing on other K3 boards,
including the Pico-ITX, would be welcome.
[1] https://lore.kernel.org/all/20261129144250.3212056-1-duge1256@xxxxxxxxx/
[2] https://github.com/spacemit-com/linux-6.18/blob/k3-br-v1.0.y/drivers/thermal/k3-thermal.c#L242-L251
Jiayu Du (3):
dt-bindings: thermal: Add SpacemiT K3 temperature sensor
thermal/drivers/spacemit/k3: Add temperature sensor support
riscv: dts: spacemit: Describe K3 temperature monitoring
.../bindings/thermal/spacemit,k3-tsensor.yaml | 82 +++++++
MAINTAINERS | 6 +
arch/riscv/boot/dts/spacemit/k3.dtsi | 51 ++++
drivers/thermal/spacemit/Kconfig | 11 +
drivers/thermal/spacemit/Makefile | 1 +
drivers/thermal/spacemit/k3_tsensor.c | 224 ++++++++++++++++++
6 files changed, 375 insertions(+)
create mode 100644 Documentation/devicetree/bindings/thermal/spacemit,k3-tsensor.yaml
create mode 100644 drivers/thermal/spacemit/k3_tsensor.c
base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97
prerequisite-patch-id: 46efc135593cf02c0fe0e4ecee64414c6a0bf4ae
prerequisite-patch-id: 90781adce6b9f5e27c5460e3e49b0fa28455fcd9
prerequisite-patch-id: 54588ceef7a5671170d430e464d41ea2cb1cca01
--
2.43.0