Devicetree
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Add polling temperature monitoring for SpacemiT K3
@ 2026-12-04 14:23 Jiayu Du
  2026-12-04 14:23 ` [RFC PATCH 1/3] dt-bindings: thermal: Add SpacemiT K3 temperature sensor Jiayu Du
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jiayu Du @ 2026-12-04 14:23 UTC (permalink / raw)
  To: daniel.lezcano, rafael
  Cc: rui.zhang, lukasz.luba, robh, krzk+dt, conor+dt, dlan,
	troy.mitchell, pjw, palmer, aou, alex, p.zabel, me, linux.amoon,
	shuwei.wu, linux-pm, devicetree, linux-riscv, spacemit,
	linux-kernel, ipedrosa, aurelien, srini, Jiayu Du

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@gmail.com/
[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


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

end of thread, other threads:[~2026-12-04 14:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 14:23 [RFC PATCH 0/3] Add polling temperature monitoring for SpacemiT K3 Jiayu Du
2026-12-04 14:23 ` [RFC PATCH 1/3] dt-bindings: thermal: Add SpacemiT K3 temperature sensor Jiayu Du
2026-12-04 14:33   ` sashiko-bot
2026-12-04 14:23 ` [RFC PATCH 2/3] thermal/drivers/spacemit/k3: Add temperature sensor support Jiayu Du
2026-12-04 14:23 ` [RFC PATCH 3/3] riscv: dts: spacemit: Describe K3 temperature monitoring Jiayu Du
2026-12-04 14:57   ` sashiko-bot

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