|
|
Log in / Subscribe / Register

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

From:  Shuwei Wu <shuweiwoo-AT-163.com>
To:  "Rafael J. Wysocki" <rafael-AT-kernel.org>, Daniel Lezcano <daniel.lezcano-AT-linaro.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-gentoo.org>, Shuwei Wu <shuweiwoo-AT-163.com>, 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 0/3] thermal: spacemit: Add support for SpacemiT K1 SoC thermal sensor
Date:  Thu, 27 Nov 2025 02:44:06 +0800
Message-ID:  <20251127-b4-k1-thermal-v1-0-f32ce47b1aba@163.com>
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
Archive-link:  Article

Introduce support for the on-die thermal sensor unit (TSU)
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.

Test logs:
Hardware: OrangePi-RV2 integrates SpacemiT K1 SoC
Kernel: 6.18.0-rc4 mainline

Verified that all five thermal sensors are registered and reporting
valid temperatures.

$ cat /sys/class/thermal/thermal_zone*/type
soc-thermal
package-thermal
gpu-thermal
cluster0-thermal
cluster1-thermal

$ cat /sys/class/thermal/thermal_zone3/temp
28000

Dynamic threshold and interrupt tests passed via sysfs trip_point
manipulation.

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

 .../bindings/thermal/spacemit,k1-thermal.yaml      |  76 +++++
 arch/riscv/boot/dts/spacemit/k1.dtsi               | 101 +++++++
 drivers/thermal/Kconfig                            |  14 +
 drivers/thermal/Makefile                           |   1 +
 drivers/thermal/k1_thermal.c                       | 307 +++++++++++++++++++++
 5 files changed, 499 insertions(+)
---
base-commit: f5f2e20b1cbc5f9ea20b372d15967b24921ede19
change-id: 20251124-b4-k1-thermal-eca906e6dd7a

Best regards,
-- 
Shuwei Wu <shuweiwoo@163.com>




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