|
|
Log in / Subscribe / Register

thermal: spacemit: Add support for SpacemiT K1 SoC thermal sensor

From:  Shuwei Wu <shuwei.wu-AT-mailbox.org>
To:  "Rafael J. Wysocki" <rafael-AT-kernel.org>, Daniel Lezcano <daniel.lezcano-AT-kernel.org>, Zhang Rui <rui.zhang-AT-intel.com>, Lukasz Luba <lukasz.luba-AT-arm.com>, Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Yixun Lan <dlan-AT-kernel.org>, Shuwei Wu <shuwei.wu-AT-mailbox.org>, Philipp Zabel <p.zabel-AT-pengutronix.de>, Paul Walmsley <pjw-AT-kernel.org>, Palmer Dabbelt <palmer-AT-dabbelt.com>, Albert Ou <aou-AT-eecs.berkeley.edu>, Alexandre Ghiti <alex-AT-ghiti.fr>
Subject:  [PATCH v5 0/3] thermal: spacemit: Add support for SpacemiT K1 SoC thermal sensor
Date:  Mon, 27 Apr 2026 15:15:14 +0800
Message-ID:  <20260427-k1-thermal-v5-0-df39187480ed@mailbox.org>
Cc:  linux-pm-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, linux-riscv-AT-lists.infradead.org, spacemit-AT-lists.linux.dev, linux-kernel-AT-vger.kernel.org, Krzysztof Kozlowski <krzysztof.kozlowski-AT-oss.qualcomm.com>, Anand Moon <linux.amoon-AT-gmail.com>, Troy Mitchell <troy.mitchell-AT-linux.spacemit.com>, Yao Zi <me-AT-ziyao.cc>, Vincent Legoll <legoll-AT-online.fr>, Gong Shuai <gsh517025-AT-gmail.com>
Archive-link:  Article

Introduce support for the on-die thermal sensor found
on the SpacemiT K1 SoC.

Include the device tree binding documentation in YAML format, the
thermal sensor driver implementation, and the device tree changes to
enable the sensor on K1 SoC.

---
Changes in v5:
- Register threaded IRQ handler before enabling interrupts
- Clamp trip points with clamp_val in set_trips
- Link to v4: https://lore.kernel.org/r/20260410-k1-thermal-v1-0-12c87d...

Changes in v4:
- Add 'depends on THERMAL_OF' in Kconfig to ensure functional dependency
- Link to v3: https://lore.kernel.org/spacemit/20260119-patchv2-k1-ther...

Changes in v3:
- Fix indentation and variable types
- Simplify clock management and redundant assignments
- Link to v2: https://lore.kernel.org/r/20251216-patchv2-k1-thermal-v1-...

Changes in v2:
- Move driver to drivers/thermal/spacemit/ and update Kconfig/Makefile
- Address reviewer feedback on style and structure
- Improve variable naming and comments
- Link to v1: https://lore.kernel.org/r/20251127-b4-k1-thermal-v1-0-f32...

Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>

---
Shuwei Wu (3):
      dt-bindings: thermal: Add SpacemiT K1 thermal sensor
      thermal: spacemit: k1: Add thermal sensor support
      riscv: dts: spacemit: Add thermal sensor for K1 SoC

 .../bindings/thermal/spacemit,k1-tsensor.yaml      |  76 ++++++
 arch/riscv/boot/dts/spacemit/k1.dtsi               | 101 ++++++++
 drivers/thermal/Kconfig                            |   2 +
 drivers/thermal/Makefile                           |   1 +
 drivers/thermal/spacemit/Kconfig                   |  19 ++
 drivers/thermal/spacemit/Makefile                  |   3 +
 drivers/thermal/spacemit/k1_tsensor.c              | 280 +++++++++++++++++++++
 7 files changed, 482 insertions(+)
---
base-commit: 5a11253b34fde37ab9f899728bb1f7b19af5ee37
change-id: 20260409-k1-thermal-fa1a6bc8b65e

Best regards,
-- 
Shuwei Wu <shuwei.wu@mailbox.org>




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds